mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 03:16:42 +02:00
MDL-48962 mod-lesson: maxtime should use a duration form element
This commit is contained in:
parent
dba564c7db
commit
a1acc00177
13 changed files with 76 additions and 43 deletions
|
@ -50,8 +50,8 @@ $PAGE->navbar->add(get_string('continue', 'lesson'));
|
|||
if (!$canmanage) {
|
||||
$lesson->displayleft = lesson_displayleftif($lesson);
|
||||
$timer = $lesson->update_timer();
|
||||
if ($lesson->timed) {
|
||||
$timeleft = ($timer->starttime + $lesson->maxtime * 60) - time();
|
||||
if ($lesson->timelimit) {
|
||||
$timeleft = ($timer->starttime + $lesson->timelimit) - time();
|
||||
if ($timeleft <= 0) {
|
||||
// Out of time
|
||||
$lesson->add_message(get_string('eolstudentoutoftime', 'lesson'));
|
||||
|
@ -157,7 +157,7 @@ if ($canmanage) {
|
|||
$lesson->add_message(get_string("teacherjumpwarning", "lesson", $warningvars));
|
||||
}
|
||||
// Inform teacher that s/he will not see the timer
|
||||
if ($lesson->timed) {
|
||||
if ($lesson->timelimit) {
|
||||
$lesson->add_message(get_string("teachertimerwarning", "lesson"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue