1. Because I can enter the grades faster that way. (75, tab, 86, tab, 94, tab, 88, tab, etc.)
2. Because some students with extra credit receive grades over 100.
(Because extra credit technically would allow a student to get a score that is higher than the maximum score...)
Also see: http://moodle.org/mod/forum/discuss.php?d=1400
I doubt extra credit and decimal grades are going to be supported in the near future.
The modified script adds two buttons to the bottom of the page: Browse (for the input text file) and Import Grades.
The input text file is expected to have the following format. The first header line should have the form
user,id1,id2,id3,...
where id1, id2, id3, ... stand for assignment ids of the assignments for which you are submitting the grades. The subsequent data lines should read:
user id,grade1,grade2,grade3,...
There is a slight bug in the script, which I haven't had time to track down. The date shown as the submission date for the grades is wrong.
The input text file is expected to have the following format. The first header line should have the form
user,id1,id2,id3,...
where id1, id2, id3, ... stand for assignment ids of the assignments for which you are submitting the grades. The subsequent data lines should read:
user id,grade1,grade2,grade3,...
Actually I noticed that the script is buggy for multiple submissions (i.e. more than one assignment). It often fails in that situation. However it does work reliably when submitting grades for just a single assignment. As soon as we figure out what the problem is, I'll post a corrected script.
So it would be:
user,exam1
johndoe, 77
janedoe, 100
billsmith, 86
etc.
Do you know if this will accept decimals?
billsmith, 86.7
Sorry, not quite. It should be:
user,20 95, 77 121, 100 53, 86
The number 20 in the header line is what you might see in the url for exam1 if you clicked on it:
your_site/moodle/mod/assignment/view.php?id=20
Substitute the appropriate number in place of 20 for your particular assignment.
Similarly in the first data line 95 stands for what might see in the url by clicking on the user profile for johndoe:
your_site/moodle/user/view.php?id=95&course=3
Similarly 121 and 53 stand for the corresponding numbers for janedoe and billsmith.
The reason we use id numbers instead of student names is because students are allowed to edit their names (e.g. replace their legal first names by nicknames) and they do so at unpredictable times. Since some of our grades are generated automatically by other software, this would lead to confusion. By contrast the Moodle id numbers (indexes into the db user table) can't be editted, so they can be entered at the beginning of the course into the other software.
I believe that it is OK to enter decimal grades, but Moodle (or rather MySQL) rounds those to the nearest integer. At least that is the way it is displayed.
What is the first "user", then? (in the "user,20" line)
>> believe that it is OK to enter decimal grades, but Moodle (or rather MySQL) rounds those to the nearest integer.
It is the word "user" literally. It serves as a placeholder and sanity check, in case you click on the wrong file.
Some people are reporting problems with downloading ".php" files, so I am resubmitting grades.php with a "txt" extension.