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

This commit is contained in:
Marina Glancy
2013-11-20 13:23:57 +11:00
3 changed files with 19 additions and 1 deletions
+14
View File
@@ -2267,5 +2267,19 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2013051402.12);
}
if ($oldversion < 2013051403.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, 2013051403.02);
}
return true;
}
+4
View File
@@ -4781,6 +4781,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');
// Handle course badges.
badges_handle_course_deletion($courseid);
@@ -4943,6 +4944,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 = 2013051403.01; // 20130514 = branching date YYYYMMDD - do not modify!
$version = 2013051403.02; // 20130514 = branching date YYYYMMDD - do not modify!
// RR = release increments - 00 in DEV branches
// .XX = incremental changes