Everyone can still see chat sessions...

Re: Everyone can still see chat sessions...

by Chris Lewis -
Number of replies: 0

Hello, I know this post is very old but we had this problem here and I added 3 lines to mod/chat/report.php to correct the problem.

if (!has_capability('moodle/grade:edit', get_context_instance(CONTEXT_COURSE, $course->id)) && $chat->studentlogs==0) { 
error('Sorry, you do not have permission to view the chat session logs.');
}

The capability check is to ensure they are an instructor in the course and the error function can be swapped out with the print_error function (and a few more variables).