Development of an automated queue for submitting laboratory work

Studying at the polytechnic consists of passing laboratory work. Literally. It very rarely happens that we learn something in classes; often everything is tied to self-learning. Roughly speaking, here is a manual for you, figure it out yourself, the deadline is in a week.

In this regard, we were faced with queues for taking these laboratory tests. At first, they simply wrote in the general chat about who would be in the queue (for example, “I’m first,” “I’m second,” “I’m third,” etc.). Next, we decided to create a shared table in Google to form queues. However, she also did not live long, since over time, “smart guys” appeared who began to put themselves first in line, pushing the rest down. Then public access to the table was closed, and it was decided to write to the headman to register for the test, he, in turn, will add students to the list. But the head of the group cannot be constantly in touch, in other words, it was simply impossible to quickly add to the queue.

In this regard, I thought about creating an automated queue. I chose as the core technology stack HTML5+CSS3 for frontend, PHP for the backend. The DBMS was chosen phpMyAdmin (SQL-DB). First of all, of course, it was necessary to think through the structure of the database. The subject area of ​​the information system has already been formulated: “A queue for submitting laboratory work with the ability to record in individual disciplines, delete your record. Accounting for the history of record creation, deletion of records, including the time of recording. The ability to change the password, view the profile.” The datalogical database model was built in MySQL Workbench 8.0 CE in notation IDEF1X.

Datalogical database model in IDEF1X notation

Datalogical database model in IDEF1X notation

A short explanation of the data model:

  1. Essence students is intended for storing a list of students, contains the following fields: first name, last name, login, password, registration date, information about the device from which registration was made, privileges (for the future admin panel).

  2. Essence authorization_list is intended for storing information about logging into the account of a particular user (student), linked by a foreign key to the students entity, contains the following fields: authorization date, information about the device from which authorization was made.

  3. Essence disciplines is intended for storing a list of disciplines (academic subjects), contains the field: name of the discipline.

  4. Essence shared_queue designed for forming queues, connected by foreign keys to the students and disciplines table, contains fields: date of entry into the queue, entry status (for storing the history of entries, the so-called archive).

Next there was the question of developing the frontend, that is, the design of the future project. I decided to follow the “MinimumCode” method and selected a suitable designer that supports layout for various types of devices (devices with different screen widths), which produces ready-made code without unnecessary bells and whistles, with the exception of the advertising section in the footer, which can be removed by simply editing the HTML page. The design included a full development of the project structure and the creation of various blocks that will be managed by the backend. Thus, the layout of two main pages was made: “Home” And “Profile”. The first should include authorization, selection of discipline, viewing the queue and entry into the queue. The second page should display profile information, log out and change your password.

Page "home"page header, authorization and discipline selection blocks

“Home” page, page header, authorization and discipline selection blocks

Page "home"queue blocks and queue entries, page footer

“Home” page, queue blocks and queue entries, page footer

Page "Profile"page header, profile and password change blocks

“Profile” page, page header, profile and password change blocks

Page "Profile"access restriction block, page footer

“Profile” page, access restriction block, page footer

Now we need to put everything together. That is, write the backend, including working with the database. I didn’t come up with any super-algorithms, the project is primitive. As if there is no point in dwelling on this. It’s worth mentioning only about storing the session key in COOKIESpassword encryption using 128-bit MD5 hashing algorithm, retrieving data from tables using SQL queries. Below is a code fragment that retrieves the name of the discipline (fetching the default discipline, or fetching the discipline stored in $_GET).

A code fragment that gets the name of the discipline

A code fragment that gets the name of the discipline

What do we end up with?

The result was a fairly good automated queue with the ability authorization, viewing records, creating a record and deleting a record. The project was successfully put into operation and is currently being used by the training group.

Page view "home" on a mobile device

View of the Home page on a mobile device

Page view "Profile" on a mobile device

View of the Profile page on a mobile device

What needs to be further worked on?

Of course, in the near future there are plans to introduce user privileges, in other words, an admin panel for certain users. In which it is necessary to implement the ability to add students to any place in the queue for any discipline, delete any entries, change passwords for each student, view the queue archive, close and open entries for any discipline.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *