MDL-78559 mod_chat: Fix chat report loading with TeX filter

This commit is contained in:
Rodrigo Mady 2023-07-05 10:51:09 -03:00
parent 614563082b
commit 961c7ef3e0

View File

@ -51,12 +51,11 @@ if (! $course = $DB->get_record('course', array('id' => $chat->course))) {
throw new \moodle_exception('coursemisconf');
}
require_login($course, false, $cm);
$context = context_module::instance($cm->id);
$PAGE->set_context($context);
$PAGE->set_heading($course->fullname);
require_login($course, false, $cm);
if (empty($chat->studentlogs) && !has_capability('mod/chat:readlog', $context)) {
notice(get_string('nopermissiontoseethechatlog', 'chat'));
}