Posting Marks Online
Background
This script applies for all courses using marmoset which post their marks online using the displaymarks.cgi/py script. As of winter 2010, this includes
CompSci136 and
CompSci138. The basic idea is as follows: To post marks online, the displaymarks.cgi script requires a file called public-marks.txt to be placed in the marks directory of the course account.
The file conventions are described at
OnlineMarkUpload; for Marmoset, you will be posting marks per project instead of marks per assignment (these may not be the same things).
Marmoset cannot create this file directly, which is where the gen_public_marks.pl script comes in. It takes files outputted from marmoset and creates the appropriate public-marks.txt file.
Note, this script can also be used to sum marks together in order to put them into the excel marks spreadsheet that is used by most courses.
Setup
To use the script, you first need the following things in the marks directory:
- the gen_public_marks.pl script (attached)
- a gen_public_marks_config file (sample is attached)
- Marks in .csv format from marmoset
The .csv files can be gotten from marmoset by going to the utilities page of any project, and clicking on the
Print grades for ALL submissions in CSV format for spreadsheet use
link. In the marks directory, create a subdirectory for each assignment and place all of the .csv files for that assignment in them.
Your directory might look something like:
.:
CS136MarksW10.xls* a_midterm/
a1/ gen_public_marks.pl
a2/ gen_public_marks_config
a3/ public-marks.txt
a1:
project-A1P1-grades.csv project-A1P3-grades.csv
project-A1P2-grades.csv project-A1P4-grades.csv
a2:
project-A2P1-grades.csv project-A2P3-grades.csv
project-A2P2-grades.csv project-A2bonus-grades.csv
a3:
project-A3P1a-grades.csv project-A3P1d-grades.csv project-A3P2a-grades.csv
project-A3P1a2-grades.csv project-A3P1d2-grades.csv project-A3P2b-grades.csv
a_midterm:
Midterm-grades.csv
Executing
The last thing we need to do before executing the script is to update the gen_public_marks_config file. This is where all of the flexibility of the script comes in. The file contains information about all of the assignments that you want to post. It has one line per assignment. Each line contains the following information (comma delimited):
- Assignment Name (What appears in the first row of public-marks.txt)
- Subdirectory Name (Where all of the .csv files for a particular assignment can be found)
- Total marks for assignment (What appears in the second row of public-marks.txt)
- Due date in YYYY-MM-DD HH:MM Format. The Hour should go up to 24, there is no AM or PM.
- Late due date (If your course accepts late submissions for credit, put the late due date here. eg: last day of classes. If not accepting late submissions, put 0)
- Late percentage (If your course accepts late submissions, put the percentage of value here. eg: 50% credit for lates? 0.5. No lates? 0)
Note that the script will ignore all lines in the config file starting with a
#
symbol.
So a sample file might look like this:
# Sample Config File
Assignment 01,a1,60,2010-01-04 22:01,0,0
Assignment 02,a2,60,2010-01-11 22:01,0,0
Assignment 03,a3,56,2010-01-18 22:01,2010-04-05 22:01,.5
Midterm,a_midterm,100,1,0,0
Once this is done, we can run the script. It can be run on the command line by typing the command:
./gen_public_marks.pl
It outputs to standard output. So, to update public-marks.txt, something like:
./gen_public_marks.pl > public-marks.txt
would be more appropriate.
To do
- Allow config file to take normal dates rather than epoch dates. -- Done April 19. Attachments Updated
--
ErikTraikov - 19 Apr 2010