Skip to content

Commit

Permalink
MDL-41693 group: Use standard layout for group related pages
Browse files Browse the repository at this point in the history
  • Loading branch information
FMCorz committed Jan 10, 2014
1 parent 2f4e0db commit f196f42
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
8 changes: 5 additions & 3 deletions group/autogroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
$strparticipants = get_string('participants');
$strautocreategroups = get_string('autocreategroups', 'group');

$PAGE->set_title($strgroups);
$PAGE->set_heading($course->fullname. ': '.$strgroups);
$PAGE->set_pagelayout('standard');
navigation_node::override_active_url(new moodle_url('/group/index.php', array('id' => $courseid)));

// Print the page and form
$preview = '';
$error = '';
Expand Down Expand Up @@ -233,9 +238,6 @@
$PAGE->navbar->add($strgroups, new moodle_url('/group/index.php', array('id'=>$courseid)));
$PAGE->navbar->add($strautocreategroups);

/// Print header
$PAGE->set_title($strgroups);
$PAGE->set_heading($course->fullname. ': '.$strgroups);
echo $OUTPUT->header();
echo $OUTPUT->heading($strautocreategroups);

Expand Down
1 change: 1 addition & 0 deletions group/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
$confirm = optional_param('confirm', 0, PARAM_BOOL);

$PAGE->set_url('/group/delete.php', array('courseid'=>$courseid,'groups'=>$groupids));
$PAGE->set_pagelayout('standard');

// Make sure course is OK and user has access to manage groups
if (!$course = $DB->get_record('course', array('id' => $courseid))) {
Expand Down
8 changes: 6 additions & 2 deletions group/group.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@
$context = context_course::instance($course->id);
require_capability('moodle/course:managegroups', $context);

$strgroups = get_string('groups');
$PAGE->set_title($strgroups);
$PAGE->set_heading($course->fullname . ': '.$strgroups);
$PAGE->set_pagelayout('standard');
navigation_node::override_active_url(new moodle_url('/group/index.php', array('id' => $course->id)));

$returnurl = $CFG->wwwroot.'/group/index.php?id='.$course->id.'&group='.$id;

// Prepare the description editor: We do support files for group descriptions
Expand Down Expand Up @@ -123,8 +129,6 @@
$PAGE->navbar->add($strheading);

/// Print header
$PAGE->set_title($strgroups);
$PAGE->set_heading($course->fullname . ': '.$strgroups);
echo $OUTPUT->header();
echo '<div id="grouppicture">';
if ($id) {
Expand Down
11 changes: 6 additions & 5 deletions group/grouping.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,13 @@
$context = context_course::instance($course->id);
require_capability('moodle/course:managegroups', $context);

$returnurl = $CFG->wwwroot.'/group/groupings.php?id='.$course->id;
$strgroupings = get_string('groupings', 'group');
$PAGE->set_title($strgroupings);
$PAGE->set_heading($course->fullname. ': '.$strgroupings);
$PAGE->set_pagelayout('standard');
navigation_node::override_active_url(new moodle_url('/group/index.php', array('id' => $course->id)));

$returnurl = $CFG->wwwroot.'/group/groupings.php?id='.$course->id;

if ($id and $delete) {
if (!empty($grouping->idnumber) && !has_capability('moodle/course:changeidnumber', $context)) {
Expand Down Expand Up @@ -126,9 +131,7 @@

}

$strgroupings = get_string('groupings', 'group');
$strparticipants = get_string('participants');

if ($id) {
$strheading = get_string('editgroupingsettings', 'group');
} else {
Expand All @@ -140,8 +143,6 @@
$PAGE->navbar->add($strheading);

/// Print header
$PAGE->set_title($strgroupings);
$PAGE->set_heading($course->fullname. ': '.$strgroupings);
echo $OUTPUT->header();
echo $OUTPUT->heading($strheading);
$editform->display();
Expand Down
2 changes: 1 addition & 1 deletion group/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
/// Print header
$PAGE->set_title($strgroups);
$PAGE->set_heading($course->fullname);
$PAGE->set_pagelayout('admin');
$PAGE->set_pagelayout('standard');
echo $OUTPUT->header();

// Add tabs
Expand Down

0 comments on commit f196f42

Please sign in to comment.