Merge branch 'MDL-42767-24' of git://github.com/ankitagarwal/moodle into MOODLE_24_STABLE

This commit is contained in:
Marina Glancy
2013-11-20 13:24:29 +11:00
3 changed files with 19 additions and 1 deletions
+14
View File
@@ -1849,5 +1849,19 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2012120306.09);
}
if ($oldversion < 2012120307.02) {
// Delete notes of deleted courses.
$sql = "DELETE FROM {post}
WHERE NOT EXISTS (SELECT {course}.id FROM {course}
WHERE {course}.id = {post}.courseid)
AND {post}.module = ?";
$DB->execute($sql, array('notes'));
// Main savepoint reached.
upgrade_main_savepoint(true, 2012120307.02);
}
return true;
}
+4
View File
@@ -4624,6 +4624,7 @@ function remove_course_contents($courseid, $showfeedback = true, array $options
require_once($CFG->dirroot.'/tag/coursetagslib.php');
require_once($CFG->dirroot.'/comment/lib.php');
require_once($CFG->dirroot.'/rating/lib.php');
require_once($CFG->dirroot.'/notes/lib.php');
// NOTE: these concatenated strings are suboptimal, but it is just extra info...
$strdeleted = get_string('deleted').' - ';
@@ -4783,6 +4784,9 @@ function remove_course_contents($courseid, $showfeedback = true, array $options
// filters be gone!
filter_delete_all_for_context($coursecontext->id);
// Notes, you shall not pass!
note_delete_all($course->id);
// die comments!
comment::delete_comments($coursecontext->id);
+1 -1
View File
@@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2012120307.01; // 20121203 = branching date YYYYMMDD - do not modify!
$version = 2012120307.02; // 20121203 = branching date YYYYMMDD - do not modify!
// RR = release increments - 00 in DEV branches
// .XX = incremental changes