removed empty bullet point
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?PHP // $Id$
|
||||
|
||||
function assignment_upgrade($oldversion) {
|
||||
// This function does anything necessary to upgrade
|
||||
@@ -97,50 +97,6 @@ function assignment_upgrade($oldversion) {
|
||||
assignment_refresh_events();
|
||||
}
|
||||
|
||||
if ($oldversion < 2004111200) {
|
||||
execute_sql("DROP INDEX {$CFG->prefix}assignment_course_idx;",false);
|
||||
execute_sql("DROP INDEX {$CFG->prefix}assignment_submissions_assignment_idx;",false);
|
||||
execute_sql("DROP INDEX {$CFG->prefix}assignment_submissions_userid_idx;",false);
|
||||
execute_sql("DROP INDEX {$CFG->prefix}assignment_submissions_mailed_idx;",false);
|
||||
execute_sql("DROP INDEX {$CFG->prefix}assignment_submissions_timemarked_idx;",false);
|
||||
|
||||
modify_database('','CREATE INDEX prefix_assignment_course_idx ON prefix_assignment (course);');
|
||||
modify_database('','CREATE INDEX prefix_assignment_submissions_assignment_idx ON prefix_assignment_submissions (assignment);');
|
||||
modify_database('','CREATE INDEX prefix_assignment_submissions_userid_idx ON prefix_assignment_submissions (userid);');
|
||||
modify_database('','CREATE INDEX prefix_assignment_submissions_mailed_idx ON prefix_assignment_submissions (mailed);');
|
||||
modify_database('','CREATE INDEX prefix_assignment_submissions_timemarked_idx ON prefix_assignment_submissions (timemarked);');
|
||||
}
|
||||
|
||||
if ($oldversion < 2005010500) {
|
||||
table_column('assignment', '', 'emailteachers', 'integer', '2', 'unsigned', 0, 'not null', 'resubmit');
|
||||
}
|
||||
|
||||
if ($oldversion < 2005041100) { // replace wiki-like with markdown
|
||||
include_once( "$CFG->dirroot/lib/wiki_to_markdown.php" );
|
||||
$wtm = new WikiToMarkdown();
|
||||
$wtm->update( 'assignment','description','format' );
|
||||
}
|
||||
|
||||
if ($oldversion < 2005041400) { // Add new fields for the new refactored version of assignment
|
||||
table_column('assignment', '', 'timeavailable', 'integer', '10', 'unsigned', 0, 'not null', 'timedue');
|
||||
table_column('assignment', '', 'assignmenttype', 'varchar', '50', '', '', 'not null', 'format');
|
||||
execute_sql("UPDATE {$CFG->prefix}assignment SET assignmenttype = 'offline' WHERE type = '0';",false);
|
||||
execute_sql("UPDATE {$CFG->prefix}assignment SET assignmenttype = 'uploadsingle' WHERE type = '1';",false);
|
||||
execute_sql('ALTER TABLE '.$CFG->prefix.'assignment DROP type;');
|
||||
}
|
||||
|
||||
if ($oldversion < 2005041501) { // Add two new fields for general data handling,
|
||||
// so most assignment types won't need new fields and backups stay simple
|
||||
table_column('assignment_submissions', '', 'data2', 'TEXT', '', '', '', 'not null', 'numfiles');
|
||||
table_column('assignment_submissions', '', 'data1', 'TEXT', '', '', '', 'not null', 'numfiles');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// These lines ALWAYS need to be here at the end of this file. Don't mess with them. :-)
|
||||
include_once("$CFG->dirroot/mod/assignment/lib.php");
|
||||
assignment_upgrade_submodules();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user