mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-72413 chat: Use the common module for setting the header
This commit is contained in:
parent
dd9ee99064
commit
c2c12a7b15
2 changed files with 8 additions and 16 deletions
|
@ -84,6 +84,12 @@ $navlinks = array();
|
||||||
$canexportsess = has_capability('mod/chat:exportsession', $context);
|
$canexportsess = has_capability('mod/chat:exportsession', $context);
|
||||||
$canviewfullnames = has_capability('moodle/site:viewfullnames', $context);
|
$canviewfullnames = has_capability('moodle/site:viewfullnames', $context);
|
||||||
|
|
||||||
|
$PAGE->activityheader->set_attrs([
|
||||||
|
'title' => '',
|
||||||
|
'description' => '',
|
||||||
|
'hidecompletion' => true,
|
||||||
|
'hideoverflow' => true,
|
||||||
|
]);
|
||||||
// Print a session if one has been specified.
|
// Print a session if one has been specified.
|
||||||
|
|
||||||
if ($start and $end and !$confirmdelete) { // Show a full transcript.
|
if ($start and $end and !$confirmdelete) { // Show a full transcript.
|
||||||
|
|
|
@ -84,9 +84,6 @@ $PAGE->set_url('/mod/chat/view.php', array('id' => $cm->id));
|
||||||
$PAGE->set_title($title);
|
$PAGE->set_title($title);
|
||||||
$PAGE->set_heading($course->fullname);
|
$PAGE->set_heading($course->fullname);
|
||||||
|
|
||||||
// Print the page header.
|
|
||||||
echo $OUTPUT->header();
|
|
||||||
|
|
||||||
// Check to see if groups are being used here.
|
// Check to see if groups are being used here.
|
||||||
$groupmode = groups_get_activity_groupmode($cm);
|
$groupmode = groups_get_activity_groupmode($cm);
|
||||||
$currentgroup = groups_get_activity_group($cm, true);
|
$currentgroup = groups_get_activity_group($cm, true);
|
||||||
|
@ -102,19 +99,8 @@ if ($currentgroup) {
|
||||||
$groupparam = "";
|
$groupparam = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$PAGE->has_secondary_navigation()) {
|
// Print the page header.
|
||||||
echo $OUTPUT->heading(format_string($chat->name), 2);
|
echo $OUTPUT->header();
|
||||||
}
|
|
||||||
|
|
||||||
// Render the activity information.
|
|
||||||
$cminfo = cm_info::create($cm);
|
|
||||||
$completiondetails = \core_completion\cm_completion_details::get_instance($cminfo, $USER->id);
|
|
||||||
$activitydates = \core\activity_dates::get_dates_for_module($cminfo, $USER->id);
|
|
||||||
echo $OUTPUT->activity_information($cminfo, $completiondetails, $activitydates);
|
|
||||||
|
|
||||||
if ($chat->intro) {
|
|
||||||
echo $OUTPUT->box(format_module_intro('chat', $chat, $cm->id), 'generalbox', 'intro');
|
|
||||||
}
|
|
||||||
|
|
||||||
groups_print_activity_menu($cm, $CFG->wwwroot . "/mod/chat/view.php?id=$cm->id");
|
groups_print_activity_menu($cm, $CFG->wwwroot . "/mod/chat/view.php?id=$cm->id");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue