Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

… processing shortanswer/numerical question types
  • Loading branch information...
commit 7629332ba4d30b20c5957c3ccc6180b44a08eecf 1 parent f48dc33
michaelpenne authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 mod/lesson/report.php
View
4 mod/lesson/report.php
@@ -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])) {
@@ -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)) {
Please sign in to comment.
Something went wrong with that request. Please try again.