Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Correction to the Error banded assessment grade.

  • Loading branch information...
commit 46b64701ab8239c21016d7236e7a3b329c56077f 1 parent 733e3c5
rkingdon authored
6 mod/exercise/assessments.php
@@ -786,7 +786,7 @@
786 786 if (!$element->id = insert_record("exercise_grades", $element)) {
787 787 error("Could not insert exercise element!");
788 788 }
789   - $grade = ($elements[$form->grade[0]]->maxscore + $form->grade[1]);
  789 + $grade = ($elements[$form->grade[0]]->maxscore + $form->grade[1]) * 100 / $exercise->grade;
790 790 // check the grade for sanity!
791 791 if ($grade >100.0) {
792 792 $grade = 100.0;
@@ -974,7 +974,7 @@
974 974 if (!$element->id = insert_record("exercise_grades", $element)) {
975 975 error("Could not insert exercise element!");
976 976 }
977   - $grade = ($elements[intval($error + 0.5)]->maxscore + $form->grade[$i]);
  977 + $grade = ($elements[intval($error + 0.5)]->maxscore + $form->grade[$i]) * 100 / $exercise->grade;
978 978 echo "<P><B>".get_string("weightederrorcount", "exercise", intval($error + 0.5))."</B>\n";
979 979 break;
980 980
@@ -997,7 +997,7 @@
997 997 if (!$element->id = insert_record("exercise_grades", $element)) {
998 998 error("Could not insert exercise element!");
999 999 }
1000   - $grade = ($elements[$form->grade[0]]->maxscore + $form->grade[1]);
  1000 + $grade = ($elements[$form->grade[0]]->maxscore + $form->grade[1]) * 100 / $exercise->grade;
1001 1001 break;
1002 1002
1003 1003 case 4: // rubric grading (identical to accumulative grading)
2  mod/exercise/locallib.php
@@ -1353,7 +1353,7 @@ function exercise_list_ungraded_assessments($exercise, $stype) {
1353 1353 }
1354 1354 else {
1355 1355 $action = "<A HREF=\"assessments.php?action=gradeassessment&id=$cm->id&stype=$stype&aid=$assessment->id\">".
1356   - get_string("grade", "exercise")."</A>";
  1356 + get_string("grade")."</A>";
1357 1357 }
1358 1358 $submission = get_record("exercise_submissions", "id", $assessment->submissionid);
1359 1359 $submissionowner = get_record("user", "id", $submission->userid);

0 comments on commit 46b6470

Please sign in to comment.
Something went wrong with that request. Please try again.