FIxed up logging when viewing submissions (database truncation in logs)

Thanks Eloy!
This commit is contained in:
moodler 2004-02-17 12:25:01 +00:00
parent f8f63ecdd5
commit 4899c66789
6 changed files with 10 additions and 4 deletions

View File

@ -91,6 +91,9 @@ function assignment_upgrade($oldversion) {
if ($oldversion < 2002122300) {
execute_sql("ALTER TABLE `assignment_submissions` CHANGE `user` `userid` INT(10) UNSIGNED DEFAULT '0' NOT NULL ");
}
if ($oldversion < 2004021700) {
set_field("log_display", "action", "view submission", "module", "assignment", "action", "view submissions");
}
return true;
}

View File

@ -42,6 +42,6 @@ CREATE TABLE `prefix_assignment_submissions` (
INSERT INTO prefix_log_display VALUES ('assignment', 'view', 'assignment', 'name');
INSERT INTO prefix_log_display VALUES ('assignment', 'add', 'assignment', 'name');
INSERT INTO prefix_log_display VALUES ('assignment', 'update', 'assignment', 'name');
INSERT INTO prefix_log_display VALUES ('assignment', 'view submissions', 'assignment', 'name');
INSERT INTO prefix_log_display VALUES ('assignment', 'view submission', 'assignment', 'name');
INSERT INTO prefix_log_display VALUES ('assignment', 'upload', 'assignment', 'name');

View File

@ -88,6 +88,9 @@ function assignment_upgrade($oldversion) {
table_column("assignment", "", "resubmit", "integer", "2", "unsigned", "0", "", "format");
}
if ($oldversion < 2004021700) {
set_field("log_display", "action", "view submission", "module", "assignment", "action", "view submissions");
}
return true;
}

View File

@ -40,6 +40,6 @@ CREATE TABLE prefix_assignment_submissions (
INSERT INTO prefix_log_display VALUES ('assignment', 'view', 'assignment', 'name');
INSERT INTO prefix_log_display VALUES ('assignment', 'add', 'assignment', 'name');
INSERT INTO prefix_log_display VALUES ('assignment', 'update', 'assignment', 'name');
INSERT INTO prefix_log_display VALUES ('assignment', 'view submissions', 'assignment', 'name');
INSERT INTO prefix_log_display VALUES ('assignment', 'view submission', 'assignment', 'name');
INSERT INTO prefix_log_display VALUES ('assignment', 'upload', 'assignment', 'name');

View File

@ -136,7 +136,7 @@
add_to_log($course->id, "assignment", "update grades", "submissions.php?id=$assignment->id", "$count users", $cm->id);
notify(get_string("feedbackupdated", "assignment", $count));
} else {
add_to_log($course->id, "assignment", "view submissions", "submissions.php?id=$assignment->id", "$assignment->id", $cm->id);
add_to_log($course->id, "assignment", "view submission", "submissions.php?id=$assignment->id", "$assignment->id", $cm->id);
}
// Submission sorting

View File

@ -5,7 +5,7 @@
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
$module->version = 2004020500;
$module->version = 2004021700;
$module->requires = 2004013101; // Requires this Moodle version
$module->cron = 60;