The import file format looks like this:
username,###
smith,27
jones,43
ames,78
Here ### in the first line should be replaced by the assignment number into which you are uploading the grades. If you click on the assignment link the url will look like: http://yourmoodlesite/mod/assignment/view.php?id=###
You also need to make a few modifications to your course/grades.php
file (make a backup first). Add the line:
require_once("./import_grades.php");
right before the line:
$strgrades = get_string("grades");
Also right after the line:
print_single_button("grades.php", $options, get_string("downloadtext"));
add the following lines:
echo "</td></tr><tr><td colspan=\"2\">\n".
"<form method=\"post\" enctype=\"multipart/form-data\" action=\"grades.php\">\n".
"<input type=\"submit\" value=\"Import Grades\">".
"<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"get_max_upload_file_size()\">\n".
"<input type=\"hidden\" name=\"id\" value=\"$course->id\">".
"<input type=\"file\" name=\"gradefile\" size=30>\n".
"</form></td></tr>";
The next line (in the original grades.php) after these newly added lines should be:
echo "</TABLE>";
Make sure that you use a plain text editor to edit grades.php, NOT a word processor.