]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed the problem with enrolments not sticking.
authormoodler <moodler>
Tue, 18 Jan 2005 18:28:25 +0000 (18:28 +0000)
committermoodler <moodler>
Tue, 18 Jan 2005 18:28:25 +0000 (18:28 +0000)
Also commented out Smarty stuff for now (for better performance in 1.5)

lib/setup.php

index cabc270f3f1fc56cff806988b5d2bbd914b9e8ce..020098807227258f7a506839b7749ff412825cc0 100644 (file)
@@ -69,10 +69,6 @@ global $THEME;
         die;
     }
     
-    if (!isset($CFG->enrol)) { // This is a hack to fix bug 1598
-        $CFG->enrol = 'internal';
-    }
-
 /// If there are any errors in the standard libraries we want to know!
     error_reporting(E_ALL);
 
@@ -145,6 +141,7 @@ global $THEME;
     }
 
 
+
 /// Set error reporting back to normal
     if (empty($CFG->debug)) {
         $CFG->debug = 7;
@@ -152,6 +149,11 @@ global $THEME;
     error_reporting($CFG->debug);
 
 
+/// Set a default enrolment configuration (see bug 1598)
+    if (!isset($CFG->enrol)) {
+        $CFG->enrol = 'internal';
+    }
+
 /// File permissions on created directories in the $CFG->dataroot
 
     if (empty($CFG->directorypermissions)) {
@@ -159,13 +161,13 @@ global $THEME;
     }
 
 /// Set up smarty template system
-    require_once($CFG->libdir .'/smarty/Smarty.class.php');  
-    $smarty = new Smarty;
-    $smarty->template_dir = $CFG->dirroot .'/templates/'. $CFG->template;
-    if (!file_exists($CFG->dataroot .'/cache')) {
-        make_upload_directory('cache');
-    }
-    $smarty->compile_dir = $CFG->dataroot .'/cache';
+    //require_once($CFG->libdir .'/smarty/Smarty.class.php');  
+    //$smarty = new Smarty;
+    //$smarty->template_dir = $CFG->dirroot .'/templates/'. $CFG->template;
+    //if (!file_exists($CFG->dataroot .'/cache')) {
+    //    make_upload_directory('cache');
+    //}
+    //$smarty->compile_dir = $CFG->dataroot .'/cache';
 
 /// Set up session handling 
     if (empty($CFG->dbsessions)) {   /// File-based sessions