mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'MDL-74127-master' of https://github.com/peterRd/moodle
This commit is contained in:
commit
95e3d07435
@ -69,7 +69,7 @@ class report_action_menu implements templatable, renderable {
|
||||
$reportselect = new \url_select($menu, $this->url->out(false), null, 'lesson-report-select');
|
||||
$data = [
|
||||
'reportselect' => $reportselect->export_for_template($output),
|
||||
'heading' => $menu[$reportselect->selected]
|
||||
'heading' => $menu[$reportselect->selected] ?? ''
|
||||
];
|
||||
return $data;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ if ($result->nodefaultresponse || $result->inmediatejump) {
|
||||
|
||||
// Set Messages.
|
||||
$lesson->add_messages_on_page_process($page, $result, $reviewmode);
|
||||
|
||||
$PAGE->set_secondary_active_tab('modulepage');
|
||||
$PAGE->set_url('/mod/lesson/view.php', array('id' => $cm->id, 'pageid' => $page->id));
|
||||
$PAGE->set_subpage($page->id);
|
||||
|
||||
|
@ -4229,9 +4229,11 @@ abstract class lesson_page extends lesson_base {
|
||||
}
|
||||
// "number of attempts remaining" message if $this->lesson->maxattempts > 1
|
||||
// displaying of message(s) is at the end of page for more ergonomic display
|
||||
if (!$result->correctanswer && ($result->newpageid == 0)) {
|
||||
// If we are showing the number of remaining attempts, we need to show it regardless of what the next
|
||||
// jump to page is.
|
||||
if (!$result->correctanswer) {
|
||||
// Retrieve the number of attempts left counter for displaying at bottom of feedback page.
|
||||
if (!empty($this->lesson->maxattempts) && $nattempts >= $this->lesson->maxattempts) {
|
||||
if ($result->newpageid == 0 && !empty($this->lesson->maxattempts) && $nattempts >= $this->lesson->maxattempts) {
|
||||
if ($this->lesson->maxattempts > 1) { // don't bother with message if only one attempt
|
||||
$result->maxattemptsreached = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user