Permalink
Browse files

Bug: fixed a problem with the date completed value and a problem with…

… processing shortanswer/numerical question types
  • Loading branch information...
michaelpenne
michaelpenne committed Jun 9, 2005
1 parent ebe63af commit 4226f24829860772ba9fdca311974c2f37284f55
Showing with 4 additions and 2 deletions.
  1. +4 −2 mod/lesson/report.php
View
@@ -611,7 +611,7 @@
} else {
$answerdata->score = get_string("didnotreceivecredit", "lesson");
}
- } elseif ($answer == end($answers) && !isset($answerdata) && $useranswer != NULL) {
+ } elseif ($answer == end($answers) && empty($answerdata) && $useranswer != NULL) {
// get in here when what the user entered is not one of the answers
$data = "<input type=\"text\" size=\"50\" disabled=\"disabled\" readonly=\"readonly\" value=\"$useranswer->useranswer\">";
if (isset($pagestats[$page->id][$answer->answer])) {
@@ -779,7 +779,7 @@
}
if (isset($answerdata)) {
$answerpage->answerdata = $answerdata;
- }
+ }
}
$answerpages[] = $answerpage;
}
@@ -800,8 +800,10 @@
if (!$grades = get_records_select("lesson_grades", "lessonid = $lesson->id and userid = $userid", "completed", "*", $try, 1)) {
$grade = -1;
+ $completed = -1;
} else {
$grade = current($grades);
+ $completed = $grade->completed;
$grade = round($grade->grade, 2);
}
if (!$times = get_records_select("lesson_timer", "lessonid = $lesson->id and userid = $userid", "starttime", "*", $try, 1)) {

0 comments on commit 4226f24

Please sign in to comment.