Skip to content

Commit

Permalink
MDL-73356 mod_chat: Move group selector on page and update title.
Browse files Browse the repository at this point in the history
The group selector is now below the tertiary navigation. The title
for reports now does not contain the activity name. This is present
further up the page.
  • Loading branch information
abgreeve committed Jan 12, 2022
1 parent 0c63990 commit 83172ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions mod/chat/report.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@

if ($start and $end and !$confirmdelete) { // Show a full transcript.
$PAGE->navbar->add($strchatreport);
$PAGE->set_title(format_string($chat->name).": $strchatreport");
echo $OUTPUT->header();
echo $OUTPUT->heading(format_string($chat->name), 2);

// Check to see if groups are being used here.
$groupmode = groups_get_activity_groupmode($cm);
Expand Down Expand Up @@ -153,10 +151,10 @@

// Print the Sessions display.
$PAGE->navbar->add($strchatreport);
$PAGE->set_title(format_string($chat->name).": $strchatreport");
$PAGE->set_title($strchatreport);
echo $OUTPUT->header();

echo $OUTPUT->heading(format_string($chat->name).': '.get_string('sessions', 'chat'), 2);
echo $OUTPUT->heading(get_string('sessions', 'chat'), 2);

// Check to see if groups are being used here
if ($groupmode = groups_get_activity_groupmode($cm)) { // Groups are being used.
Expand Down
6 changes: 3 additions & 3 deletions mod/chat/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@
// Print the page header.
echo $OUTPUT->header();

groups_print_activity_menu($cm, $CFG->wwwroot . "/mod/chat/view.php?id=$cm->id");

if (has_capability('mod/chat:chat', $context)) {
// Print the main part of the page.
echo $OUTPUT->box_start('generalbox', 'enterlink');
Expand All @@ -119,7 +117,7 @@

$params['id'] = $chat->id;
$chattarget = new moodle_url("/mod/chat/gui_$CFG->chat_method/index.php", $params);
echo html_writer::start_div('container-fluid');
echo html_writer::start_div('container-fluid mb-2');
echo html_writer::start_div('row');
echo html_writer::start_div('col-xs-6 mr-3');
echo $OUTPUT->action_link($chattarget,
Expand Down Expand Up @@ -147,10 +145,12 @@
echo '</p>';
}
}
groups_print_activity_menu($cm, $CFG->wwwroot . "/mod/chat/view.php?id=$cm->id");

echo $OUTPUT->box_end();

} else {
groups_print_activity_menu($cm, $CFG->wwwroot . "/mod/chat/view.php?id=$cm->id");
echo $OUTPUT->box_start('generalbox', 'notallowenter');
echo '<p>'.get_string('notallowenter', 'chat').'</p>';
echo $OUTPUT->box_end();
Expand Down

0 comments on commit 83172ba

Please sign in to comment.