]> git.mjollnir.org Git - moodle.git/commitdiff
completion: avoid API call for performance reasons
authortjhunt <tjhunt>
Thu, 30 Apr 2009 04:16:35 +0000 (04:16 +0000)
committertjhunt <tjhunt>
Thu, 30 Apr 2009 04:16:35 +0000 (04:16 +0000)
admin/settings/courses.php

index 5bef017b7d02df9af3c2e5e491d918ab33cad83f..a131cf4621eae4c65619a621b14ec88b1ee05d1f 100644 (file)
@@ -112,7 +112,7 @@ if ($hassiteconfig
     $languages += get_list_of_languages();
     $temp->add(new admin_setting_configselect('moodlecourse/lang', get_string('forcelanguage'), '',key($languages),$languages));
 
-    if(completion_info::is_enabled_for_site()) {
+    if(!empty($CFG->enablecompletion)) {
         $temp->add(new admin_setting_heading('progress', get_string('progress','completion'), ''));
         $temp->add(new admin_setting_configselect('moodlecourse/enablecompletion', get_string('completion','completion'), '',
             1,array(0 => get_string('completiondisabled','completion'), 1 => get_string('completionenabled','completion'))));