]> git.mjollnir.org Git - moodle.git/commitdiff
fixed whitespace
authorskodak <skodak>
Thu, 9 Jul 2009 19:54:54 +0000 (19:54 +0000)
committerskodak <skodak>
Thu, 9 Jul 2009 19:54:54 +0000 (19:54 +0000)
admin/settings/courses.php
lib/db/upgrade.php

index a6b9073fb56184c30a9cd8eae440262e13959a56..5287a55d334d62128d259ff91011a5327b61b156 100644 (file)
@@ -112,10 +112,10 @@ if ($hassiteconfig
     $languages += get_list_of_languages();
     $temp->add(new admin_setting_configselect('moodlecourse/lang', get_string('forcelanguage'), '',key($languages),$languages));
 
-    if(!empty($CFG->enablecompletion)) {
+    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'))));
+            1, array(0 => get_string('completiondisabled','completion'), 1 => get_string('completionenabled','completion'))));
     }
     $ADMIN->add('courses', $temp);
 
index 65f9adf90462c468070d89fb779ffe1f8a247e58..6bdeca63c7c2839378798b5b65f5d99f44cba495 100644 (file)
@@ -23,7 +23,7 @@ function xmldb_main_upgrade($oldversion) {
     global $CFG, $THEME, $USER, $DB;
 
     require_once($CFG->libdir.'/db/upgradelib.php'); // Core Upgrade-related functions
-    
+
     $result = true;
 
     $dbman = $DB->get_manager(); // loads ddl manager and xmldb classes
@@ -1168,13 +1168,14 @@ function xmldb_main_upgrade($oldversion) {
 
     /// Changes to modinfo mean we need to rebuild course cache
         require_once($CFG->dirroot . '/course/lib.php');
-        rebuild_course_cache(0,true);
+        rebuild_course_cache(0, true);
 
     /// For developer upgrades, turn on the conditional activities and completion
     /// features automatically (to gain more testing)
-        if(debugging('',DEBUG_DEVELOPER)) {
-            set_config('enableavailability',1);
-            set_config('enablecompletion',1);
+//TODO: remove before 2.0 final!
+        if (debugging('', DEBUG_DEVELOPER)) {
+            set_config('enableavailability', 1);
+            set_config('enablecompletion', 1);
         }
 
     /// Main savepoint reached
@@ -2228,7 +2229,7 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
     }
 
     if ($result && $oldversion < 2009061704) {
-        // change component string in capability records to new "_" format 
+        // change component string in capability records to new "_" format
         if ($caps = $DB->get_records('capabilities')) {
             foreach ($caps as $cap) {
                 $cap->component = str_replace('/', '_', $cap->component);
@@ -2240,7 +2241,7 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
     }
 
     if ($result && $oldversion < 2009061705) {
-        // change component string in events_handlers records to new "_" format 
+        // change component string in events_handlers records to new "_" format
         if ($handlers = $DB->get_records('events_handlers')) {
             foreach ($handlers as $handler) {
                 $handler->handlermodule = str_replace('/', '_', $handler->handlermodule);
@@ -2252,7 +2253,7 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
     }
 
     if ($result && $oldversion < 2009061706) {
-        // change component string in message_providers records to new "_" format 
+        // change component string in message_providers records to new "_" format
         if ($mps = $DB->get_records('message_providers')) {
             foreach ($mps as $mp) {
                 $mp->component = str_replace('/', '_', $mp->component);
@@ -2262,7 +2263,7 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
         unset($caps);
         upgrade_main_savepoint($result, 2009061706);
     }
-    
+
     if ($result && $oldversion < 2009063000) {
         // upgrade format of _with_advanced settings - quiz only
         // note: this can be removed later, not needed for upgrades from 1.9.x
@@ -2275,10 +2276,10 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
                 set_config($newname, $value, 'quiz');
                 unset_config($name, 'quiz');
             }
-        } 
+        }
         upgrade_main_savepoint($result, 2009063000);
     }
-    
+
     if ($result && $oldversion < 2009070100) {
         // MDL-19677 Change $CFG->bloglevel to BLOG_SITE_LEVEL if BLOG_COURSE_LEVEL or BLOG_GROUP_LEVEL
         $current_bloglevel = get_config(null, 'bloglevel');
@@ -2291,3 +2292,5 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
     return $result;
 }
 
+//TODO: before 2.0 release
+// 1/ remove the automatic enabling of completion lib if debug enabled
\ No newline at end of file