Skip to content

Commit

Permalink
MDL-62944 mod_data: Action menu missing from database pages
Browse files Browse the repository at this point in the history
The action menu was missing from many of the database activity pages,
which meant that it could not be accessed until enough had been done to
the activity to make the editing tabs that used view.php accessible.
  • Loading branch information
NeillM committed Aug 31, 2018
1 parent 0138983 commit ee9c931
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions mod/data/edit.php
Expand Up @@ -156,6 +156,7 @@

$PAGE->set_title($data->name);
$PAGE->set_heading($course->fullname);
$PAGE->force_settings_menu(true);

// Process incoming data for adding/updating records.

Expand Down
1 change: 1 addition & 0 deletions mod/data/export.php
Expand Up @@ -84,6 +84,7 @@
// build header to match the rest of the UI
$PAGE->set_title($data->name);
$PAGE->set_heading($course->fullname);
$PAGE->force_settings_menu(true);
echo $OUTPUT->header();
echo $OUTPUT->heading(format_string($data->name), 2);
echo $OUTPUT->box(format_module_intro('data', $data, $cm->id), 'generalbox', 'intro');
Expand Down
1 change: 1 addition & 0 deletions mod/data/field.php
Expand Up @@ -241,6 +241,7 @@
asort($menufield); //sort in alphabetical order
$PAGE->set_title(get_string('course') . ': ' . $course->fullname);
$PAGE->set_heading($course->fullname);
$PAGE->force_settings_menu(true);

$PAGE->set_pagetype('mod-data-field-' . $newtype);
if (($mode == 'new') && (!empty($newtype)) && confirm_sesskey()) { /// Adding a new field
Expand Down
1 change: 1 addition & 0 deletions mod/data/preset.php
Expand Up @@ -51,6 +51,7 @@
$PAGE->set_url(new moodle_url('/mod/data/preset.php', array('d'=>$data->id)));
$PAGE->set_title(get_string('course') . ': ' . $course->fullname);
$PAGE->set_heading($course->fullname);
$PAGE->force_settings_menu(true);

// fill in missing properties needed for updating of instance
$data->course = $cm->course;
Expand Down
1 change: 1 addition & 0 deletions mod/data/templates.php
Expand Up @@ -103,6 +103,7 @@
$PAGE->set_title($data->name);
$PAGE->set_heading($course->fullname);
$PAGE->set_pagelayout('admin');
$PAGE->force_settings_menu(true);
echo $OUTPUT->header();
echo $OUTPUT->heading(format_string($data->name), 2);
echo $OUTPUT->box(format_module_intro('data', $data, $cm->id), 'generalbox', 'intro');
Expand Down

0 comments on commit ee9c931

Please sign in to comment.