mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
Merging fixes for MDL-12383 and MDL-12605 from MOODLE_19_STABLE
This commit is contained in:
parent
8888882af4
commit
4c99e342d2
@ -446,14 +446,17 @@
|
||||
if(has_capability('mod/lesson:manage', $context)) {
|
||||
lesson_set_message(get_string('teachertimerwarning', 'lesson'));
|
||||
} else {
|
||||
if ((($timer->starttime + $lesson->maxtime * 60) - time()) <= 0) {
|
||||
$timeleft = ($timer->starttime + $lesson->maxtime * 60) - time();
|
||||
|
||||
if ($timeleft <= 0) {
|
||||
// Out of time
|
||||
lesson_set_message(get_string('eolstudentoutoftime', 'lesson'));
|
||||
redirect("$CFG->wwwroot/mod/lesson/view.php?id=$cm->id&pageid=".LESSON_EOL."&outoftime=normal", get_string("outoftime", "lesson"));
|
||||
}
|
||||
// update clock when viewing a new page... no special treatment
|
||||
if ((($timer->starttime + $lesson->maxtime * 60) - time()) < 60) {
|
||||
redirect("$CFG->wwwroot/mod/lesson/view.php?id=$cm->id&pageid=".LESSON_EOL."&outoftime=normal");
|
||||
die; // Shouldn't be reached, but make sure
|
||||
} else if ($timeleft < 60) {
|
||||
// One minute warning
|
||||
lesson_set_message(get_string('studentoneminwarning', 'lesson'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -648,7 +651,6 @@
|
||||
break;
|
||||
|
||||
case LESSON_MATCHING :
|
||||
echo '<tr><td><table width="100%">';
|
||||
// don't suffle answers (could be an option??)
|
||||
foreach ($answers as $answer) {
|
||||
// get all the response
|
||||
@ -689,7 +691,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '</table></td></tr></table>';
|
||||
echo '</table>';
|
||||
print_simple_box_end();
|
||||
lesson_print_submit_link(get_string('pleasematchtheabovepairs', 'lesson'), 'answerform');
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user