MDL-73356 mod_chat: Move group selector on page and update title.

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.
This commit is contained in:
Adrian Greeve
2022-01-12 14:16:57 +08:00
parent 0c63990e4f
commit 83172ba682
2 changed files with 5 additions and 7 deletions
+2 -4
View File
@@ -94,9 +94,7 @@ $PAGE->activityheader->set_attrs([
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);
@@ -153,10 +151,10 @@ if ($start and $end and !$confirmdelete) { // Show a full transcript.
// 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.
+3 -3
View File
@@ -103,8 +103,6 @@ if ($currentgroup) {
// 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');
@@ -119,7 +117,7 @@ if (has_capability('mod/chat:chat', $context)) {
$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,
@@ -147,10 +145,12 @@ if (has_capability('mod/chat:chat', $context)) {
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();