* Library of functions for chat outside of the core api
*/
+require_once($CFG->dirroot . '/mod/chat/lib.php');
require_once($CFG->libdir . '/portfolio/caller.php');
/**
$sessiongap = 5 * 60; // 5 minutes silence means a new session
foreach ($this->messages as $message) { // We are walking FORWARDS through messages
$m = clone $message; // grrrrrr - this causes the sha1 to change as chat_format_message changes what it's passed.
- $formatmessage = chat_format_message($m, $this->course->id, $this->user);
+ $formatmessage = chat_format_message($m, $this->cm->course, $this->user);
if (!isset($formatmessage->html)) {
continue;
}