Merge branch 'MDL-70855-master' of https://github.com/dmitriim/moodle
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user