Merge branch 'MDL-78559-master' of https://github.com/rmady/moodle

This commit is contained in:
Sara Arjona 2023-08-08 13:01:56 +02:00
commit f4c4aad52b
No known key found for this signature in database

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'));
}