MDL-41611 format_singleactivity: Ignore unsupported modules

This commit is contained in:
Frederic Massart
2013-10-04 18:21:13 +08:00
parent 56cc9b387e
commit 640ef17790
2 changed files with 21 additions and 4 deletions
+2 -2
View File
@@ -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;
}
}