Permalink
Browse files

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

Thanks Eloy!
  • Loading branch information...
1 parent f8f63ec commit 4899c66789272c58332b588604e03ca8804da1c7 moodler committed Feb 17, 2004
@@ -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;
}
@@ -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');
@@ -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;
}
@@ -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');
@@ -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
@@ -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;

0 comments on commit 4899c66

Please sign in to comment.