Eye Exam Simulator (Php/MySQL)

Eye Exam Simulator (Php/MySQL)


The Eye Exam Simulator is a web enabled system using Php and MySQL and Javascript developed for the Queen’s Department of Ophthalmology.  The system allows the professor administrator to add/edit students, add/edit clinical images of their eyes along with a range of attributes, and to conduct mock eye exam tests.

The client chose, as a way of keeping development costs to a minimum, to forgo any additional styling.  The various pages in the system are optimized for functionality and not for aesthetic appeal.

Administrative Section

  • Password protected section of the tool, only the administrator can login.
  • There is a function that allows the administrator to import student data from a spreadsheet.
  • A page to add possible Tags (Health Condition-Diabetes, Health Condition-High Blood Pressure, etc.)
  • A page to add Class and Year.
  • A page to add a Test.  Select Class/Year and Tags that might restrict the pool of Images for that Test.   Also, specify the kind of Test (Keep Answering Until Correct, New Set of Random Images on Incorrect Choice).  Also, specify the number of images to show with each test (default 9).
  • A page to add/edit Students:  First and Last Name, Student Number, Email, Password, and upload Image.  Check the various Tags that apply.  Check which Tags should restrict the Images for when that Student takes a Test.

Test Section

Students login to the system using their student numbers as a username and when they first login they will be prompted to choose a password.

  • At top of the page there is instruction text on how to proceed with the test.
  • The Student selects a Test (based on the groupings the Admin has set up) from a Dropdown.
  • They select the name/student# that corresponds to the “Patient” sitting with them from a drop down and click a start test button.  A grid of 9 images, including the image for the selected Student (“Patient”), are displayed randomly in three rows of three.
  • The list of Images is restricted by whatever Tags are assigned at either the Class/Year level, or the Student level.  If no Tags are set at the Student level, then the Tags at the Class/Year level are used.  If none are set there, it pulls from the entire pool of Images from that Class/Year.
  • There is a push button under each image.  The Student clicks the button under whichever Image they think that matches the “Patient” sitting with them.
  • If the choice is correct, the status “Correct” is displayed in the area beneath the image.  All buttons under the rest of the images are disabled.  The Student can choose another “Patient” from the dropdown to proceed with the test.  The previous “Patient” will be removed from the list.
  • If the choice is incorrect, it depends on the type of Test.  If the type is “Keeps Answering Until Correct”, the Student keeps trying until getting the correct answer.  If “New Set of Random Images” then there is a “Try Again” button or something similar to reset all other 8 Images.  The program tracks how many incorrect answers in each case and the time required to reach the correct answer.
  •  The Student keeps going until there are no “Patients” left in the drop down.



  • A Test report that lists the Students that took the Test, how many “Patients” they tried to answer, how many tries they required to get a correct answer, with an Average and Total at the bottom.
  • A Test report that lists the “Patients”, how many Students tried to answer that “Patient”, how many tries were required to get a correct answer, with an Average and Total at the bottom.
  • A Student report, that lists the Student’s score for a test, breaking it down by each “Patient” that they tried to answer, with time required to reach correct answer.