// before removing devs will be warned with a debugging message first,
// then we will add error message and only after that we can remove the functions
// completely.
-/**
- * Populate context.path and context.depth where missing.
- *
- * @deprecated since 2.2, use context_helper::build_all_paths() instead
- * @param bool $force force a complete rebuild of the path and depth fields, defaults to false
- * @return void
- */
-function build_context_path($force = false) {
- context_helper::build_all_paths($force);
-}
-
/**
* Rebuild all related context depth and path caches
*
context_helper::cleanup_instances();
return true;
}
+
+/**
+ * Populate context.path and context.depth where missing.
+ *
+ * @see context_helper::build_all_paths()
+ * @deprecated since 2.2
+ * @param bool $force force a complete rebuild of the path and depth fields, defaults to false
+ * @return void
+ */
+function build_context_path($force = false) {
+ debugging('build_context_path() is deprecated, please use context_helper::build_all_paths() instead.', DEBUG_DEVELOPER);
+ context_helper::build_all_paths($force);
+}
$DB->set_field('context', 'depth', 0, array('contextlevel'=>CONTEXT_BLOCK));
build_context_path();
+ $this->assertDebuggingCalled('build_context_path() is deprecated, please use context_helper::build_all_paths() instead.', DEBUG_DEVELOPER);
$this->assertFalse($DB->record_exists('context', array('depth'=>0)));
$lastcourse = $DB->get_field_sql("SELECT MAX(id) FROM {course}");
* get_child_contexts() is deprecated, please use $context->get_child_contexts().
* create_contexts() is deprecated, please use context_helper::create_instances().
* cleanup_contexts() is deprecated, please use context_helper::cleanup_instances().
+* build_context_path() is deprecated, please use context_helper::build_all_paths().
=== 2.5.1 ===