chat_refresh_events();
}
+ if ($oldversion < 2004043000) {
+ modify_database("", "INSERT INTO prefix_log_display VALUES ('chat', 'talk', 'chat', 'name');");
+ }
+
return true;
}
INSERT INTO prefix_log_display VALUES ('chat', 'add', 'chat', 'name');
INSERT INTO prefix_log_display VALUES ('chat', 'update', 'chat', 'name');
INSERT INTO prefix_log_display VALUES ('chat', 'report', 'chat', 'name');
+INSERT INTO prefix_log_display VALUES ('chat', 'talk', 'chat', 'name');
chat_refresh_events();
}
+ if ($oldversion < 2004043000) {
+ modify_database("", "INSERT INTO prefix_log_display VALUES ('chat', 'talk', 'chat', 'name');");
+ }
+
return true;
}
INSERT INTO prefix_log_display VALUES ('chat', 'add', 'chat', 'name');
INSERT INTO prefix_log_display VALUES ('chat', 'update', 'chat', 'name');
INSERT INTO prefix_log_display VALUES ('chat', 'report', 'chat', 'name');
+INSERT INTO prefix_log_display VALUES ('chat', 'talk', 'chat', 'name');
require_login($chat->course);
if ($groupid) {
- if (!isteacheredit($course->id) and !ismember($groupid)) {
+ if (!isteacheredit($chat->course) and !ismember($groupid)) {
error("You can't chat here!");
}
}
$chatuser->lastmessageping = time();
update_record("chat_users", $chatuser);
+
+ if ($cm = get_coursemodule_from_instance("chat", $chat->id, $chat->course)) {
+ add_to_log($chat->course, "chat", "talk", "view.php?id=$cm->id", $chat->id, $cm->id);
+ }
}
/// Go back to the other page
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
/////////////////////////////////////////////////////////////////////////////////
-$module->version = 2004042500; // The (date) version of this module
+$module->version = 2004043000; // The (date) version of this module
$module->requires = 2004013101; // Requires this Moodle version
$module->cron = 300; // How often should cron check this module (seconds)?