Commit 471819e5 authored by Sara Arjona's avatar Sara Arjona
Browse files

Merge branch 'MDL-70855-master' of https://github.com/dmitriim/moodle

parents 323b3ca3 e99e0bb5
......@@ -379,6 +379,8 @@ abstract class moodleform_mod extends moodleform {
// Freeze admin defaults if required (and not different from default)
$this->apply_admin_locked_flags();
$this->plugin_extend_coursemodule_definition_after_data();
}
// form verification
......@@ -896,6 +898,18 @@ abstract class moodleform_mod extends moodleform {
}
}
/**
* Plugins can extend the coursemodule settings form after the data is set.
*/
protected function plugin_extend_coursemodule_definition_after_data() {
$callbacks = get_plugins_with_function('coursemodule_definition_after_data', 'lib.php');
foreach ($callbacks as $type => $plugins) {
foreach ($plugins as $plugin => $pluginfunction) {
$pluginfunction($this, $this->_form);
}
}
}
/**
* Can be overridden to add custom completion rules if the module wishes
* them. If overriding this, you should also override completion_rule_enabled.
......
This files describes API changes in /course/*,
information provided here is intended especially for developers.
=== 3.11 ===
* A new callback xxx_coursemodule_definition_after_data that allows plugins to extend activity forms after the data is set.
=== 3.10 ===
* The function make_categories_options() has now been deprecated. Please use \core_course_category::make_categories_list() instead.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment