MDL-41611 format_singleactivity: Ignore unsupported modules
This commit is contained in:
@@ -42,11 +42,11 @@ class format_singleactivity_admin_setting_activitytype extends admin_setting_con
|
||||
*/
|
||||
public function load_choices() {
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot. '/course/lib.php');
|
||||
require_once($CFG->dirroot. '/course/format/singleactivity/lib.php');
|
||||
if (is_array($this->choices)) {
|
||||
return true;
|
||||
}
|
||||
$this->choices = get_module_types_names();
|
||||
$this->choices = format_singleactivity::get_supported_activities();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user