|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
Functions | |
| if(!isset($CFG)) | online_assignment_cleanup ($output=false) |
| if (!isset($CFG)) online_assignment_cleanup | ( | $ | output = false | ) |
We don't want to run this code if we are doing an upgrade from an assignment version earlier than 2005041400 because the assignment type field will not exist
get the module id for assignments from db
get a list of all courses on this site
cycle through each course
retrieve a list of sections beyond what is currently being shown
cycle through each of the xtra sections
grab any module instances from the sequence field
cycle through the instances
is this an instance of an online assignment
if record exists then we need to move instance to it's correct section
check the new section id the journal update erroneously stored it in course_sections->section
double check the new section
get the record for section 0 for this course
grab the section record
explode the sequence
add instance to correct section
implode the sequence
now we need to remove the instance from the old sequence
grab the old section record
explode the sequence
remove the old value from the array
implode the sequence
if the summary and sequence are empty then remove this section
Definition at line 18 of file oacleanup.php.
