add_to_log($course->id, "course", "move", "edit.php?id=$course->id", $course->id);
$context = context_course::instance($course->id);
- context_moved($context, $newparent);
+ $context->update_moved($newparent);
}
}
fix_course_sortorder();
if ($movecat) {
$newparent = context_coursecat::instance($course->category);
- context_moved($context, $newparent);
+ $context->update_moved($newparent);
}
fix_course_sortorder();
}
}
-/**
- * Update the path field of the context and all dep. subcontexts that follow
- *
- * Update the path field of the context and
- * all the dependent subcontexts that follow
- * the move.
- *
- * The most important thing here is to be as
- * DB efficient as possible. This op can have a
- * massive impact in the DB.
- *
- * @deprecated since 2.2
- * @param context $context context obj
- * @param context $newparent new parent obj
- * @return void
- */
-function context_moved(context $context, context $newparent) {
- $context->update_moved($newparent);
-}
-
/**
* Remove a context record and any dependent entries,
* removes context from static context cache too
debugging('preload_course_contexts() is deprecated, please use context_helper::preload_course() instead.', DEBUG_DEVELOPER);
context_helper::preload_course($courseid);
}
+
+/**
+ * Update the path field of the context and all dep. subcontexts that follow
+ *
+ * Update the path field of the context and
+ * all the dependent subcontexts that follow
+ * the move.
+ *
+ * The most important thing here is to be as
+ * DB efficient as possible. This op can have a
+ * massive impact in the DB.
+ *
+ * @deprecated since Moodle 2.2
+ * @see context::update_moved()
+ * @param context $context context obj
+ * @param context $newparent new parent obj
+ * @return void
+ */
+function context_moved(context $context, context $newparent) {
+ debugging('context_moved() is deprecated, please use context::update_moved() instead.', DEBUG_DEVELOPER);
+ $context->update_moved($newparent);
+}
\ No newline at end of file
$course->category = $miscid;
$DB->update_record('course', $course);
context_moved($context, $categorycontext);
+ $this->assertDebuggingCalled('context_moved() is deprecated, please use context::update_moved() instead.', DEBUG_DEVELOPER);
$context = context_course::instance($course->id);
$this->assertEquals($context->get_parent_context(), $categorycontext);
* build_context_path() is deprecated, please use context_helper::build_all_paths().
* rebuild_contexts() is deprecated, please use $context->reset_paths().
* preload_course_contexts() is deprecated, please use context_helper::preload_course().
+* context_moved() is deprecated, please use context::update_moved().
=== 2.5.1 ===