From bae2d15eb24b99678532714eba0319452fc63c6c Mon Sep 17 00:00:00 2001 From: Miguel Barao Date: Thu, 2 Nov 2017 18:15:15 +0000 Subject: [PATCH] - updated MANUAL.md --- MANUAL.md | 81 ++++++++++++++++++++++++++++++++++++++++++++++----------------------------------- 1 file changed, 46 insertions(+), 35 deletions(-) diff --git a/MANUAL.md b/MANUAL.md index 45367f4..5ead728 100644 --- a/MANUAL.md +++ b/MANUAL.md @@ -17,70 +17,80 @@ New database created: students.db ... ... 1969 - Linus Torvalds$ mv students.db demo/ $ mv students.db demo/ +$ mkdir demo/ans $ ./serve.py demo/test.yaml -2016-11-19 15:44:55,401 | INFO | app | ============= Running perguntations ============= -2016-11-19 15:44:55,427 | INFO | questions | Loaded 9 questions from "questions.yaml". -2016-11-19 15:44:55,427 | INFO | test | Test factory ready for "demo". -2016-11-19 15:44:55,449 | INFO | app | Database has 7 students registered. -2016-11-19 15:44:55,507 | INFO | cherrypy.error | [19/Nov/2016:15:44:55] ENGINE Listening for SIGTERM. -2016-11-19 15:44:55,511 | INFO | cherrypy.error | [19/Nov/2016:15:44:55] ENGINE Listening for SIGHUP. -2016-11-19 15:44:55,511 | INFO | cherrypy.error | [19/Nov/2016:15:44:55] ENGINE Listening for SIGUSR1. -2016-11-19 15:44:55,511 | INFO | cherrypy.error | [19/Nov/2016:15:44:55] ENGINE Bus STARTING -2016-11-19 15:44:55,512 | INFO | cherrypy.error | [19/Nov/2016:15:44:55] ENGINE Started monitor thread '_TimeoutMonitor'. -2016-11-19 15:44:55,631 | INFO | cherrypy.error | [19/Nov/2016:15:44:55] ENGINE Serving on http://0.0.0.0:8080 -2016-11-19 15:44:55,631 | INFO | cherrypy.error | [19/Nov/2016:15:44:55] ENGINE Bus STARTED +2017-11-02 10:39:29,683 | INFO | root | =============================================== +2017-11-02 10:39:29,683 | INFO | app | Starting application +2017-11-02 10:39:29,684 | INFO | app | Loading test configuration "demo/test-tutorial.yaml". +2017-11-02 10:39:29,786 | INFO | questions | Loaded 10 questions from "questions-tutorial.yaml". +2017-11-02 10:39:29,787 | INFO | test | Checking question "tut-information". +2017-11-02 10:39:29,787 | INFO | test | Checking question "tut-success". +2017-11-02 10:39:29,787 | INFO | test | Checking question "tut-warning". +2017-11-02 10:39:29,788 | INFO | test | Checking question "tut-alert". +2017-11-02 10:39:29,788 | INFO | test | Checking question "tut-radio". +2017-11-02 10:39:29,788 | INFO | test | Checking question "tut-checkbox". +2017-11-02 10:39:29,789 | INFO | test | Checking question "tut-text". +2017-11-02 10:39:29,789 | INFO | test | Checking question "tut-text-regex". +2017-11-02 10:39:29,789 | INFO | test | Checking question "tut-numeric-interval". +2017-11-02 10:39:29,790 | INFO | test | Checking question "tut-textarea". +2017-11-02 10:39:29,790 | INFO | test | Test factory ready for "tutorial". +2017-11-02 10:39:29,880 | INFO | app | Database has 34 students registered. +2017-11-02 10:39:29,891 | INFO | root | Webserver running... ``` -You can now open a browser and point it to the server address, e.g. `http://127.0.0.1:8080`. +You can now open a browser and point it to the server address, e.g. `http://127.0.0.1:8443`. Enter `0` for the number and choose any password. This will be your password from now on. After login, you will see an administrator page. This page allows you to: -- Allow students to login to the test. This can be done one at a time, using the checkboxes on the left of each student, or allow all students by clicking the button in the bottom of the page. -- Review a test done by a student by clicking the grade colorbar on the right. If a student has multiple tests, then several bars will be shown. A tooltip shows the date/time for each test. -- Reset student passwords. Students that already have a password will have a label `PW` next to the student name. To reset the password, go to the bottom of the page and insert the student number in the box and press the button to reset the password. The label `PW` will disappear. -- Online students will be highlighted and the table on the top of the page will show some more information (login time, ip address, etc) -- If a student moves unfocus the browser window on his computer (e.g. for cheating), a red bar appears along with the status `unfocus`. Screen saver is also reported as unfocus, so some care should be taken... -- It is also possible to add new students by clicking the button on the bottom of the page. +- **Allow students** to login to the test. This can be done one at a time, using the checkboxes on the left of each student, or allow all students by clicking the menubar. +- **Review a test** done by a student by clicking the grade colorbar on the right. If a student has multiple tests, then several bars will be shown. A tooltip shows the date/time for each test. +- **Reset passwords**. Students that already have a password will have a key icon next to the student name. To reset the password, go to the menubar `alunos`. The key icon will disappear. +- Online students will have a label with the staring time next to the name. +~~- If a student moves unfocus the browser window on his computer (e.g. for cheating), a red bar appears along with the status `unfocus`. Screen saver is also reported as unfocus, so some care should be taken...~~ +- **Add new students** on the menu `alunos`. + ## Answering a test -Students are redirected to a test as soon as they login. +Students are redirected to a test as soon as they login. The test is a single page showing all questions. -Just answer the questions. If the answer is unknown, the question should be disabled on the top right corner. This avoids penalties in some questions. +If an answer to a question is unknown, the question can be disabled on the top right corner to avoid penalties. -After answering all the questions, the test is submited by clicking the button on the bottom of the page. A new page is shown with the grade obtained. +After answering all the questions, the test is submited by clicking the green button on the bottom of the page. A new page is shown with the grade obtained. At this point the test is terminated and the student has already been logged out. ## Creating a new test -A test is specified in a single yaml file. Look at `demo/test.yaml` for an example and documentation. +A test is specified in a single `yaml` file. Look at `demo/test.yaml` for an example and documentation. ## Creating questions -Questions are defined in yaml files. Each yaml file contains a list of questions from which some can be chosen to be part of a test. +Questions are defined in `yaml` files. Each `yaml` file contains a list of questions that can be selected to make up a test. The types of questions supported are: -- `radio` questions are multiple choice where only one can be selected. -- `checkbox` questions are also multiple choice but several can be selected. -- `text` and `text_regex` questions provide a line to write the answer. -- `textarea` provide a multiline text box to write the answer (e.g. for computer code). The answer is corrected by calling an external program that is not part of the server and is up to you to right it. +- `radio` are single choice questions. +- `checkbox` are multiple choice where multiple options can be selected. +- `text` answers have one line of text, which is checked against a list of possible accepted answers. +- `text-regex` is similar to `text` but answers are checked by a regular expression. +- `numeric-interval` provides a line of text where a number can be written. Numbers are converted to a float and checked if they belong to an interval. +- `textarea` provide a multiline text box to write the answer (e.g. for computer code). The answer is corrected by calling an external program that is not part of the server and is up to you to develop. -Besides these, there are `information` and `alert` types which just show text but do not expect answers. +Besides these, there are `information`, `warning` and `alert` types which just show text and do not expect answers. -All the types above are predifined questions. It is also possible to generate questions on the fly. These are defined with type `generator` and an external program must be provided to generate a question of the types above. +All the types above are predifined questions. It is also possible to generate questions of any type. These are defined with type `generator` and an external program must be provided to generate a question of the types above. An example file with these types of questions is provided in `demo/questions/questions.yaml` along with accompanying files under the directory `demo/questions`. -## Testing a new test +## Validating a new test -Before using a test in production you should test is very carefully. After writing the questions and the test configuration, it is recommended to: +Tests should be validated carefully before running a test in production one should test it very carefully. After writing the questions and the test configuration, it's recommended to: 1. Create a database for debug with `./initdb.py --demo`. 2. Run the server with `./serve.py --allow-all new_test.yaml` where the `--allow-all` option avoids having to use a second browser for the admin page to explicitly allow a student. -3. If bugs are found, try commenting questions in the `new_test.yaml` to isolate the bug. Use the `--debug` option to see more information in the webpage. +3. If bugs are found, try commenting questions in the `new_test.yaml` to isolate the bug. Use the `--debug` option to see more information on what is happening. ## Reviewing tests @@ -97,8 +107,9 @@ To review the tests: ## Getting the grades The grades are stored in the sqlite3 file specified in the test. -We can get the results from the command line: +We can get the results into a csv file and later import it into LibreOffice: ```.bash - $ sqlite3 demo/students.db "select student_id,grade from tests where ref='my-test-reference'" > test_grades.csv -``` \ No newline at end of file + $ sqlite3 demo/students.db "select student_id,grade from tests where ref='my-test-reference'" > grades.csv +``` + -- libgit2 0.21.2