mirror of
https://github.com/moodle/moodle.git
synced 2025-03-24 17:40:26 +01:00
MDL-39103 lesson: Fix lesson administration block
Credit to Joseph Rézeau for the fix
This commit is contained in:
parent
fefd49f70e
commit
02ff22e925
@ -805,8 +805,11 @@ function lesson_extend_settings_navigation($settings, $lessonnode) {
|
||||
$lessonnode->add(get_string('preview', 'lesson'), $url);
|
||||
|
||||
if (has_capability('mod/lesson:edit', $PAGE->cm->context)) {
|
||||
$url = new moodle_url('/mod/lesson/edit.php', array('id'=>$PAGE->cm->id));
|
||||
$lessonnode->add(get_string('edit', 'lesson'), $url);
|
||||
$editnode = $lessonnode->add(get_string('edit', 'lesson'));
|
||||
$url = new moodle_url('/mod/lesson/edit.php', array('id' => $PAGE->cm->id, 'mode' => 'collapsed'));
|
||||
$editnode->add(get_string('collapsed', 'lesson'), $url);
|
||||
$url = new moodle_url('/mod/lesson/edit.php', array('id' => $PAGE->cm->id, 'mode' => 'full'));
|
||||
$editnode->add(get_string('full', 'lesson'), $url);
|
||||
}
|
||||
|
||||
if (has_capability('mod/lesson:manage', $PAGE->cm->context)) {
|
||||
|
@ -69,9 +69,7 @@ if (! $students = $DB->get_records_sql($sql, $params)) {
|
||||
}
|
||||
|
||||
$url = new moodle_url('/mod/lesson/report.php', array('id'=>$id));
|
||||
if ($action !== 'reportoverview') {
|
||||
$url->param('action', $action);
|
||||
}
|
||||
$url->param('action', $action);
|
||||
if ($pageid !== null) {
|
||||
$url->param('pageid', $pageid);
|
||||
}
|
||||
|
@ -353,7 +353,6 @@ if ($pageid != LESSON_EOL) {
|
||||
}
|
||||
}
|
||||
|
||||
$PAGE->set_url('/mod/lesson/view.php', array('id' => $cm->id, 'pageid' => $page->id));
|
||||
$PAGE->set_subpage($page->id);
|
||||
$currenttab = 'view';
|
||||
$extraeditbuttons = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user