diff --git a/mod/chat/locallib.php b/mod/chat/locallib.php index 45de13b8cae..01cf1ac89dc 100644 --- a/mod/chat/locallib.php +++ b/mod/chat/locallib.php @@ -19,6 +19,7 @@ * 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'); /** @@ -117,7 +118,7 @@ class chat_portfolio_caller extends portfolio_module_caller_base { $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; }