Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed grading bug#1517 and some other typos

  • Loading branch information...
commit eaf0b2d89fb97e926caf3daf2588cf1fcc901613 1 parent 47bd45c
skodak authored
Showing with 5 additions and 8 deletions.
  1. +5 −2 mod/assignment/lib.php
  2. +0 −6 mod/assignment/mod.html
View
7 mod/assignment/lib.php
@@ -505,7 +505,7 @@ function update_main_listing($submission) {
echo 'opener.document.getElementById("button'.$submission->userid.'").value="'.get_string('update').' ...";';
}
echo "\n-->\n</script>";
- fflush();
+ flush();
}
/*
@@ -1304,11 +1304,14 @@ function assignment_grades($assignmentid) {
if (!$assignment = get_record("assignment", "id", $assignmentid)) {
return NULL;
}
+ if ($assignment->grade == 0) { // No grading
+ return NULL;
+ }
$grades = get_records_menu("assignment_submissions", "assignment",
$assignment->id, "", "userid,grade");
- if ($assignment->grade >= 0) {
+ if ($assignment->grade > 0) {
$return->grades = $grades;
$return->maxgrade = $assignment->grade;
View
6 mod/assignment/mod.html
@@ -25,15 +25,9 @@
if (!isset($form->preventlate)) {
$form->preventlate = 0;
}
- if (!isset($form->grade)) {
- $form->grade = 100;
- }
if (empty($form->maxbytes)) {
$form->maxbytes = $CFG->assignment_maxbytes;
}
- if (empty($form->timedue)) {
- $form->timedue = "";
- }
?>
<script type="text/javascript" language="javascript">
Please sign in to comment.
Something went wrong with that request. Please try again.