K
K
kharisergey2016-05-04 22:28:24
JavaScript
kharisergey, 2016-05-04 22:28:24

Online activation of AWP (JS), how to implement?

Good afternoon.
Can you tell me how to implement such an algorithm as quickly and efficiently as possible? (backend on Laravel, frontend on jQuery and Angular, MySQL base).
Given
1. Educational class of N computers (AWP), which are numbered (sticker with serial number on the monitor).
2. Pupils (=< N) taking the exam.
3. The teacher who seats the students on the workstation
Find
It is necessary to implement the following logic:
1. On all computers in the class, a web page with the inscription "Workstation No. xx NOT ACTIVATED" is open and any input from the keyboard / mouse is blocked.
2. The teacher launches one student into the class, checks his data from the diary with the data entered into the database.
3. If the result of the comparison is positive, the system should display on the teacher's screen a random number of the workstation for which this student should be placed.
4. The teacher presses the button "Activate workstation No. xx" and the screen of this workstation is unlocked (goes to another web page). Activation is done by the teacher remotely from his workplace.
5. The teacher calls the number of the workstation to the student and he sits down at the computer in the classroom with the specified serial number.
6. Teaching takes the exam, the results are saved along with the number of the workstation where he took the exam.
Question: how to implement this in JS (item 4) so ​​that the activation takes place in real time? How to bind a specific computer to an workstation number (without being tied to IP addresses, MAC addresses and computer names)? There can be several classes and they can take the exam at the same time.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2016-05-04
@alexey-m-ukolov

Question: how to implement this in JS (item 4) so ​​that the activation takes place in real time?
The simplest is to use pusher , which works out of the box in Laravel and will most likely be free for your purposes. The option is more complicated and crooked - write to the database, and on the AWP side make periodic ajax requests for verification. Boss level - write a daemon that will listen to some ZeroMQ and push updates over web sockets.
How to bind a specific computer to an workstation number (without being tied to IP addresses, MAC addresses and computer names)?
Again, the simplest thing is to make a separate service page on which the number will be affixed. And write it to LocalStorage. A safer option is to write to the session, but this requires authentication and constantly kicking it so that it does not fall off.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question