From 9d162c650f4cb23a9c12e71ed85ebad331cb7840 Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 5 Feb 2004 08:32:49 +0000 Subject: [PATCH] Removing log upgrades from here (too slow) --- mod/assignment/db/mysql.php | 14 -------------- mod/assignment/db/postgres7.php | 13 ------------- 2 files changed, 27 deletions(-) diff --git a/mod/assignment/db/mysql.php b/mod/assignment/db/mysql.php index f579beed47..62267350f2 100644 --- a/mod/assignment/db/mysql.php +++ b/mod/assignment/db/mysql.php @@ -92,20 +92,6 @@ function assignment_upgrade($oldversion) { execute_sql("ALTER TABLE `assignment_submissions` CHANGE `user` `userid` INT(10) UNSIGNED DEFAULT '0' NOT NULL "); } - if ($oldversion < 2004020500) { - if ($assignments = get_records("assignment")) { - foreach ($assignments as $assignment) { - if ($cm = get_coursemodule_from_instance("assignment", $assignment->id, $assignment->course)) { - execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id' - WHERE module = 'assignment' AND url = 'submissions.php?id=$assignment->id'"); - - execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id' - WHERE module = 'assignment' AND url = 'view.php?a=$assignment->id'"); - } - } - } - } - return true; } diff --git a/mod/assignment/db/postgres7.php b/mod/assignment/db/postgres7.php index 122ff021f7..b8b25556cc 100644 --- a/mod/assignment/db/postgres7.php +++ b/mod/assignment/db/postgres7.php @@ -88,19 +88,6 @@ function assignment_upgrade($oldversion) { table_column("assignment", "", "resubmit", "integer", "2", "unsigned", "0", "", "format"); } - if ($oldversion < 2004020500) { - if ($assignments = get_records("assignment")) { - foreach ($assignments as $assignment) { - if ($cm = get_coursemodule_from_instance("assignment", $assignment->id, $assignment->course)) { - execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id' - WHERE module = 'assignment' AND url = 'submissions.php?id=$assignment->id'"); - - execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id' - WHERE module = 'assignment' AND url = 'view.php?a=$assignment->id'"); - } - } - } - } return true; } -- 2.39.5