Skip to content

Test Management System - made for 1st semester exam at KEA, 2017

License

Notifications You must be signed in to change notification settings

Faptimus420/TMS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

TMS

Test Management System - made for 1st semester exam at KEA, 2017

Excerpt from accompanying report: "As per the project requirements, I have developed a simple software tool to create multiple-choice tests, allow students to take these tests, and save test results for review by the teacher. The tool was developed using the programming language Ruby. The final version of the source code has 560 lines. Each test is stored in a file, in a folder structure based on the tests’ subjects. Each student’s results are stored in their own individual files, and the database of registered users is a YAML database. The project requirements also state that the program is to use at least one class, with a few class methods as well. Each user should have their own account, with a username and a password. Only teachers should be able to create tests, and only students can take them. Teachers should be able to access all test results, while students can only access their own results. Last but not least, the tool also needed to have a main menu.

First run: As there are no tests available in the program by default, one administrator user must register first in order to create tests. However, for security reasons, administrators can only register by entering the password of an existing administrator, to prevent students from simply creating an account with administrator privileges to create their own tests, review other students’ results, or read the correct answers to the tests. Since there are also no default users in the database, the tool cannot be used immediately out-of-the-box. The tool is meant to be deployed on the educational institution’s own server, where all the files (including the script) and databases should be stored. The students and teachers are to receive only the executable files for the tool, so that they can use it on their devices over the school’s network, but not access and edit the database files themselves. This means that the script should be deployed on the server by the institution’s system or network administrator, who should have the skills to be able to edit the script file and set the tool to run in debug mode on its first run. Debug mode allows the tool to create a user with administrator privileges without needing verification, and will also generate the necessary initial folder structure.

Registration, log in, and the User class: After the tool is deployed and ready for use by actual students and teachers, upon execution, the login screen is displayed. Here, the user can either register, see the list of registered users, or log in, if this is not their first time using the tool. Users are stored as objects in the class User, with three variables: username, password and account type, which can be either admin or student. This class has 6 methods (excluding the initialize method), which are used in order to retrieve and display information from the class, or to compare data in the class when a user is either registering or logging in. The users in this class are stored in a YAML database, which is loaded upon the program’s launch. The users are currently stored in plain-text - a hash+salt algorithm should be added before deployment. Additionally, the tool has two additional classes (Numeric and String), used to convert letters of the alphabet into numbers and vice-versa when displaying tests to students. These two classes are courtesy of a StackOverflow user Dex. After a successful login, the user is presented with a main menu screen, which varies according to whether the user is an admin (teacher) or a student. Both user types have the option to view a list of available tests, log out, and quit. Admins are additionally able to create new tests and view the results of any student, and students are permitted to take tests and view their own results.

Creating tests: If a teacher chooses to create a new test, they are first required to state the test’s subject. This subject could be anything, but examples include Physics, History, Liter-ature, etc. This subject will be used as the name of the folder that will contain all the tests on this subject, and that folder itself will be located in a folder called tests. Then, the teacher needs to state the topic/name of the test (e.g. Atoms, Ancient Greece, Data Flow Diagrams, etc.), which will be used as the name of the test file. Afterwards, the actual process of writing questions and answers begins. The test can have an indefinite number of questions, and the actual number will be chosen by the teacher. Each question can also have any number of answers, and it can also have more than one correct answer, although this is not stated during the test creation process. After all the questions and answers are typed in, they will be stored in the test file in the following format: Each question will be on a separate line in the file. The question itself will be a simple string at the start of the line. The question will be followed by a semicolon (;) symbol, which separates it from the answers. The answers are a hash. The keys of the hash are the actual answers, and the values are either the letter T or the letter F, which denote which answer(s) are correct. After the test file itself is saved, the program also appends a file called testlist.txt in the tests folder, which lists all the available tests. Each available test is a string on a separate line. This string contains the topic/name of the test, the subject, which teacher created the test, and a timestamp of when the test was created.

Taking tests: If a student chooses to take a test, they will first be required to enter the exact topic/name of the test, and then the test’s subject. This allows the program to retrieve the correct test file from the test database. They are also allowed to view the list of available tests, read from the testlist.txt file. After the test is loaded, the student is presented with the rules of the test, and has the option to either start or cancel. The student is warned not to close the program while the test is in progress, as this would result in the corruption of their test results file. During the testing process, the program loops through every line (question) in the test file, and logs the student’s answer. The student is always informed about how many questions are remaining. The student chooses letters (A, B, C, …) to answer questions, rather than writing the full answers, which utilizes the aforementioned Numeric and String classes. The student’s answers are pushed into an array, and the program also keeps a track and a percentage of how many questions did the student answer correctly. After the student answers all questions, their answers are stored in a file. This file, which uses the student’s username as the file name, is stored in the folder results, and the file contains the results of all tests the student has taken, each on a separate line. The results are stored in the file in the following format: The topic/name of the test that was taken, separated from the next value with the semicolon (;) symbol. The next value is the array of answers, separated from the next value with the vertical slash (|) symbol. The answer choices themselves are separated from each other with a comma (,) and a space. The next value says how many questions were answered correctly out of the total amount of questions in the test, and also the percentage of correctness. This data is separated from the last value with the tilde (~) symbol. The last value is a timestamp of the date and time of when the test was finished.

Viewing results: If a student chooses to view their test results, they are displayed immediately. A teacher will first be asked to type the name of the student whose results they want to see. The result-displaying method uses the separator symbols on each line of the student’s results file (as all of their test results are stored in one file, in chronological order), to format the results in a neat and tidy way. The way the results are stored allows a student to take a test multiple times, but all their attempts will remain logged."

About

Test Management System - made for 1st semester exam at KEA, 2017

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages