Deprecating old "upgrade" files. MDL-7214

Merged from MOODLE_17_STABLE
This commit is contained in:
stronk7 2006-10-26 22:46:02 +00:00
parent 3aac1dc9a0
commit 5d0fc5c33d
46 changed files with 315 additions and 247 deletions

View file

@ -1,5 +1,10 @@
<?php // $Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
function assignment_upgrade($oldversion) {
// This function does anything necessary to upgrade
// older versions to match current functionality
@ -175,6 +180,8 @@ function assignment_upgrade($oldversion) {
include_once("$CFG->dirroot/mod/assignment/lib.php");
assignment_upgrade_submodules();
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
return true;
}

View file

@ -1,5 +1,10 @@
<?php // $Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
function chat_upgrade($oldversion) {
// This function does anything necessary to upgrade
// older versions to match current functionality
@ -52,6 +57,8 @@ function chat_upgrade($oldversion) {
modify_database('','ALTER TABLE prefix_chat_users ALTER lang SET NOT NULL');
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
return true;
}

View file

@ -1,5 +1,10 @@
<?php // $Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
function choice_upgrade($oldversion) {
global $CFG;
@ -102,6 +107,9 @@ function choice_upgrade($oldversion) {
if ($oldversion < 2006020900) { //rename release column to showanswers - Release is now reserved word in mySql
table_column('choice', 'release', 'showresults', 'TINYINT', '2', 'unsigned', 0, 'not null');
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
return true;
}

View file

@ -1,5 +1,10 @@
<?php
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
function data_upgrade($oldversion) {
/// This function does anything necessary to upgrade
/// older versions to match current functionality
@ -265,7 +270,9 @@ function data_upgrade($oldversion) {
execute_sql("ALTER TABLE {$CFG->prefix}data_content ALTER COLUMN content4 DROP NOT NULL");
execute_sql("ALTER TABLE {$CFG->prefix}data_content ALTER COLUMN content4 DROP DEFAULT");
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
return true;
}

View file

@ -1,5 +1,10 @@
<?php // $Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
function exercise_upgrade($oldversion) {
// This function does anything necessary to upgrade
// older versions to match current functionality
@ -43,7 +48,9 @@ function exercise_upgrade($oldversion) {
modify_database('','CREATE INDEX prefix_exercise_rubrics_exerciseid_idx ON prefix_exercise_rubrics (exerciseid);');
modify_database('','CREATE INDEX prefix_exercise_grades_exerciseid_idx ON prefix_exercise_grades (exerciseid);');
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
return true;
}

View file

@ -1,5 +1,10 @@
<?php // $Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
function forum_upgrade($oldversion) {
// This function does anything necessary to upgrade
// older versions to match current functionality
@ -232,9 +237,11 @@ function forum_upgrade($oldversion) {
}
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
return true;
}
?>
?>

View file

@ -1,4 +1,10 @@
<?PHP
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
function hotpot_upgrade($oldversion) {
global $CFG;
$ok = true;
@ -59,6 +65,8 @@ function hotpot_upgrade($oldversion) {
$ok = $ok && hotpot_update_to_v2_2();
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
return $ok;
}
?>

View file

@ -1,5 +1,10 @@
<?php // $Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
function journal_upgrade($oldversion) {
// This function does anything necessary to upgrade
// older versions to match current functionality
@ -56,5 +61,7 @@ function journal_upgrade($oldversion) {
table_column('journal_entries', 'comment', 'entrycomment', 'text', '', '', '');
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
return $result;
}

View file

@ -1,5 +1,10 @@
<?php
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
function label_upgrade($oldversion) {
/// This function does anything necessary to upgrade
@ -34,6 +39,8 @@ function label_upgrade($oldversion) {
modify_database('','CREATE INDEX prefix_label_course_idx ON prefix_label (course);');
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
return true;
}

View file

@ -1,5 +1,10 @@
<?PHP
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
function lams_upgrade($oldversion) {
/// This function does anything necessary to upgrade
/// older versions to match current functionality
@ -12,6 +17,8 @@ function lams_upgrade($oldversion) {
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
return true;
}

View file

@ -1,5 +1,10 @@
<?PHP
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
function lesson_upgrade($oldversion) {
/// This function does anything necessary to upgrade
/// older versions to match current functionality
@ -358,6 +363,8 @@ function lesson_upgrade($oldversion) {
table_column('lesson_default', '', 'feedback', 'int', '3', 'unsigned', '1', 'not null', 'nextpagedefault');
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
return true;
}

View file

@ -1,5 +1,10 @@
<?php // $Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
function quiz_upgrade($oldversion) {
// This function does anything necessary to upgrade
// older versions to match current functionality
@ -1466,6 +1471,8 @@ function quiz_upgrade($oldversion) {
$success = $success && table_column('question', 'commentarytext', 'generalfeedback', 'text', '', '', '');
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
return $success;
}

View file

@ -1,5 +1,10 @@
<?php // $Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
function resource_upgrade($oldversion) {
// This function does anything necessary to upgrade
// older versions to match current functionality
@ -61,6 +66,8 @@ function resource_upgrade($oldversion) {
$wtm->update( 'resource','alltext','options' );
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
return true;
}

View file

@ -1,5 +1,10 @@
<?php // $Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
function scorm_upgrade($oldversion) {
// This function does anything necessary to upgrade
// older versions to match current functionality
@ -249,6 +254,8 @@ function scorm_upgrade($oldversion) {
execute_sql("INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('scorm', 'review', 'scorm', 'name');", false);
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
return true;
}
?>

View file

@ -1,5 +1,10 @@
<?php // $Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
function survey_upgrade($oldversion) {
// This function does anything necessary to upgrade
// older versions to match current functionality
@ -44,6 +49,9 @@ function survey_upgrade($oldversion) {
execute_sql('SELECT setval(\''.$CFG->prefix.'survey_id_seq\', (select max(id) from '.$CFG->prefix.'survey))');
execute_sql('SELECT setval(\''.$CFG->prefix.'survey_questions_id_seq\', (select max(id) from '.$CFG->prefix.'survey_questions))');
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
return true;
}

View file

@ -1,5 +1,10 @@
<?PHP
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
function wiki_upgrade($oldversion) {
/// This function does anything necessary to upgrade
/// older versions to match current functionality
@ -196,6 +201,8 @@ CREATE TABLE prefix_wiki_locks
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
return true;
}

View file

@ -1,5 +1,10 @@
<?php // $Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
function workshop_upgrade($oldversion) {
// This function does anything necessary to upgrade
// older versions to match current functionality
@ -245,6 +250,8 @@ function workshop_upgrade($oldversion) {
}
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
return true;
}