-
Notifications
You must be signed in to change notification settings - Fork 0
Notifier
This script is responsible for reading results of the handle_submissions scripts from the main spreadsheet, do the required adjustments, update student scores, and send emails with detailed information using the account given in student_info.
| Argument | Function | Default |
|---|---|---|
| --name | Name of the quiz | "Quiz1" |
| --only_update | Should notify students | False |
| --update_scores | Should update scores in main sheet | True |
| --attdn_name | Name of the attendance column | - |
| --folder_name | Folder name of the answer scripts | - |
| --sheet_title | Title of the sheet to be read | - |
| --score_title | Title of the column containing scores | "points" |
| --total_score | Total score for the current quiz | 20 |
| --recalculate | Should test within the evaluation results should be recalculated | - |
| --recalculate_numbers | Questions locations that will be recalculated | - |
| --hide_files | Should withhold the answer scripts in notification emails | False |
| --delay | Wait period between each email requests | 1 |
| --exceptions | File path of the exceptions in grading final score | - |
The script connects to the main spreadsheet with the help of sheet_helper and gets the content of the sheet named --sheet_title which should be structured as specified in handle_submissions. From the question headers and score title specified by --score_title, gathered tables are parsed to get test results, total scores, and errors if any exist for each student.
To meet the shortcomings of quiz_checker_env, this script considers uneven grading(among questions and tests) and exceptions such as absence and switch which are sanctioned and therefore should not be punished in grading.
Script quiz_checker_env is not capable of given uneven scores to the tests when a question is evaluated. But some tests in a question can weigh differently. The parameter --recalculate and --recalculate_numbers comes into play in these situations.
Let us assume a 20 points question had 5 tests therefore each test graded with 4 points. But we prefer grade distribution to be 2, 2, 6, 6, and 4 respectively. We should use --recalculate 4,4,4,4,4:2,2,6,6,4 to create the scaling for each one of the tests. When this parameter is set, a student who got 2 from the first test will receive 1 instead and one who got 4 will receive 2.
If a quiz consists of multiple questions, these scaling factors can be chained with separator ;. For example, let us think about a three-question quiz with 2, 4, and 5 tests respectively. Grade distribution was equal for tests as well as the questions. Full points received with getting 10 and 10 from the first tests, 5 each from the second question tests, and finally 4 from each test in final question with a total of 60 points. In order to change the first question grade to 10, we can use --recalculate 10,10:5,5;5,5,5,5:5,5,5,5;4,4,4,4,4:4,4,4,4,4. Since this usage can be bothersome for multi-question quizzes, we can use the second argument like this: --recalculate 10,10:5,5 --recalculate_numbers 3:0. The argument --recalculate_numbers specifies which questions to be recalculated. The first number in this argument specifies the question count within the quiz and the second part specifies question locations that will be recalculated. In the previous example, we only recalculate the first question.
In Cmpe 140, absence and sections switches punished by grading 0 both in grade and absence column due to administrative decisions. Script has been designed to apply this rule by default but in some cases, exceptions can occur where students are pardoned for such behaviors and their grades should be counted. In such cases argument --exceptions <exception list document> could be used, which is a structured document to be read by the script to identify students and their situation. Every exception is written in a line with such a structure:
<student ID1>: <"ABSENCE" | "SWITCH">
<student ID2>: <"ABSENCE" | "SWITCH">
After reading and calculating total scores for a given quiz, this script first updates the main sheet and then starts sending emails. Normally attendance and score columns are updated for each student with a valid submission which is controlled with --attdn_name and --name arguments respectively.
In some cases, only updating the attendance column is enough and required. One example of this could be the need for sending email after manual changes occur in the grades which are not recognized by the code, therefore, should not be disturbed. When the quiz will not make to the grades, one may skip the updating scores which is achieved by using the --update_scores argument.
Argument --only_update used when grades will be calculated but notifications should not be sent at the moment. This is useful when debugging the evaluation scripts or analyzing student grades before sending the notifications.
Finally, emails are formed and sent to the students so they could review their mistakes and object if necessary. The script connects to the SMTP server by the 465 port with credentials specified in student_info. If the --hide_files argument is not given, documents in --folder_name are attached to the created emails and sent to the whole class(including absent ones) one by one waiting --delay seconds in between.
Transcript of entire emails is dumped into the project root folder by the name <--name>.mail including recipient email address and file name/path pairs to be sent. The contexts of the emails are hardcoded into the script which consists of 3 parts.
- Introduction: Contains information about the absence and wrong section status, total grade, and student ID information.
- Detailed Scores: Contains tables for each question in the quiz which has a row for each test that specifies name, score, and error(if any).
-
Footnote: In Cmpe 140, exams are open to objections where codes are inspected carefully by hand whereas, in quizzes; objections are considered only when a mistake in the grading or evaluation process occurs. Therefore, two(global variables named
PS_REGULARandPS_EXAM) footnotes are automatically assigned depending on the quiz name. When the name of the quiz contains 'Final', 'Midterm', or 'assignment', content in variablePS_EXAMis used andPS_REGULARfor the rest.
Example email from the dump for an assignment:
<student mail>@boun.edu.tr
Hello,
Please find attached your Assignment3 submission(s) and your score.
Student ID: <student ID>
+---------------------------+---------------------------------------------+
| Q1 | Info/Result |
+===========================+=============================================+
| sir_step(10.00) | TRUE |
+---------------------------+---------------------------------------------+
| sir_sim(10.00) | TRUE |
+---------------------------+-------+-------------------------------------+
| sir_sim_distancing(10.00) | Error | object sir_sim_distancing not found |
+---------------------------+-------+-------------------------------------+
| Total(30.00) | 20 |
+---------------------------+---------------------------------------------+
+--------------+-------------------------------------------------+
| Q2 | Info/Result |
+==============+=================================================+
| Source Error | invalid multibyte character in parser at line 2 |
+--------------+-------------------------------------------------+
| Total(40.00) | 0 |
+--------------+-------------------------------------------------+
+----------------+-------------+
| Q3 | Info/Result |
+================+=============+
| plot1.c(10.00) | 10 |
+----------------+-------------+
| plot1.e(10.00) | 10 |
+----------------+-------------+
| Total(20.00) | 20.0 |
+----------------+-------------+
+--------------+-------------+
| Q4 | Info/Result |
+==============+=============+
| plot2(10.00) | 10 |
+--------------+-------------+
| Total(10.00) | 10.0 |
+--------------+-------------+
+---------------+-------------+
| Assignment3 | Info/Result |
+===============+=============+
| Q1(30.00) | 20.0 |
+---------------+-------------+
| Q2(40.00) | 0.0 |
+---------------+-------------+
| Q3(20.00) | 20.0 |
+---------------+-------------+
| Q4(10.00) | 10.0 |
+---------------+-------------+
| Total(100.00) | 50.0 |
+---------------+-------------+
Best regards,
CmpE140 team.
answers/Assignment3/sect01/q01/<student ID>_1.png: <student ID>_1_q01.png,
answers/Assignment3/sect01/q01/<student ID>.R: <student ID>_q01.R,
answers/Assignment3/sect01/q01/<student ID>.png: <student ID>_q01.png,
answers/Assignment3/sect01/q02/<student ID>.R: <student ID>_q02.R,
answers/Assignment3/sect01/q02/<student ID>.png: <student ID>_q02.png
Here we can see the name of the assignment was "Assignment3" where scores for each question were 30, 40, 20, and 10 in order. The second question of the student could not be evaluated due to the error in the sourcing step with "invalid multibyte character in parser at line 2" output. Also, the third test of the first question cannot be evaluated even though the answer script is successfully sourced since the function with the given name could not be found.
After sharing the answer script, students are responsible to look for their mistakes by comparing the true answer with theirs for the test they have failed and object if necessary.
- Depends on dashtable package for easily building detailed score tables.
- Usually parameters
--folder_nameand--sheet_titleare not given and both will be considered equal to the--nameparameter in this situation. - Global variables
PS_REGULARandPS_EXAMshould be changed according to the need. Also, their numbers can be increased and when it did, the functionbuild_mail_bodyshould be updated accordingly.