mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Chat now logs "talk" events ... which also updates last access in the course
so chatters appear in the online users block so Tom is happy. :-) Seriously though, it's good to have talking events in the log.
This commit is contained in:
parent
db7da819d5
commit
2c0d657437
6 changed files with 16 additions and 2 deletions
|
@ -33,6 +33,10 @@ function chat_upgrade($oldversion) {
|
|||
chat_refresh_events();
|
||||
}
|
||||
|
||||
if ($oldversion < 2004043000) {
|
||||
modify_database("", "INSERT INTO prefix_log_display VALUES ('chat', 'talk', 'chat', 'name');");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -58,4 +58,5 @@ INSERT INTO prefix_log_display VALUES ('chat', 'view', 'chat', 'name');
|
|||
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');
|
||||
|
||||
|
|
|
@ -16,6 +16,10 @@ function chat_upgrade($oldversion) {
|
|||
chat_refresh_events();
|
||||
}
|
||||
|
||||
if ($oldversion < 2004043000) {
|
||||
modify_database("", "INSERT INTO prefix_log_display VALUES ('chat', 'talk', 'chat', 'name');");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -55,3 +55,4 @@ INSERT INTO prefix_log_display VALUES ('chat', 'view', 'chat', 'name');
|
|||
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');
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
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!");
|
||||
}
|
||||
}
|
||||
|
@ -45,6 +45,10 @@
|
|||
|
||||
$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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/// 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)?
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue