]> git.mjollnir.org Git - moodle.git/commitdiff
Tidy up
authorethem <ethem>
Tue, 15 Jan 2008 10:16:27 +0000 (10:16 +0000)
committerethem <ethem>
Tue, 15 Jan 2008 10:16:27 +0000 (10:16 +0000)
enrol/authorize/enrol.php

index 1829147e0ac0c793d0c618f2155476fdc62253cf..3510e24781c29d769b167b76dccf7b70b7927850 100755 (executable)
@@ -100,7 +100,6 @@ class enrolment_plugin_authorize
 
         if ($course->password) {
             $password = '';
-            $teacher = get_teacher($course->id);
             include($CFG->dirroot.'/enrol/manual/enrol.html');
         }
 
@@ -418,7 +417,7 @@ class enrolment_plugin_authorize
         global $CFG;
         $mconfig = get_config('enrol/authorize');
 
-        if (! check_openssl_loaded()) {
+        if (!check_openssl_loaded()) {
             notify('PHP must be compiled with SSL support (--with-openssl)');
         }
 
@@ -528,8 +527,7 @@ class enrolment_plugin_authorize
         set_config('an_sorttype', $sorttype);
 
         // https and openssl library is required
-        if ((substr($CFG->wwwroot, 0, 5) !== 'https' and empty($CFG->loginhttps)) or
-            !check_openssl_loaded()) {
+        if ((substr($CFG->wwwroot, 0, 5) !== 'https' and empty($CFG->loginhttps)) or !check_openssl_loaded()) {
             return false;
         }
 
@@ -597,10 +595,7 @@ class enrolment_plugin_authorize
         }
 
         mtrace("    scheduled capture", ": ");
-        if (empty($CFG->an_review) or
-           (!empty($CFG->an_test)) or
-           (intval($CFG->an_capture_day) < 1) or
-           (!check_openssl_loaded())) {
+        if (empty($CFG->an_review) or (!empty($CFG->an_test)) or (intval($CFG->an_capture_day) < 1) or (!check_openssl_loaded())) {
             mtrace("disabled");
             return; // order review disabled or test mode or manual capture or openssl wasn't loaded.
         }
@@ -728,8 +723,7 @@ class enrolment_plugin_authorize
         // get_users_by_capability() does not handling user level resolving
         // After user resolving, get_admin() to get_users_by_capability()
         $adminuser = get_admin();
-        $select = "status IN(".AN_STATUS_UNDERREVIEW.",".AN_STATUS_APPROVEDREVIEW.") " .
-                  "AND (timecreated<'$onepass') AND (timecreated>'$timediff60')";
+        $select = "status IN(".AN_STATUS_UNDERREVIEW.",".AN_STATUS_APPROVEDREVIEW.") AND (timecreated<'$onepass') AND (timecreated>'$timediff60')";
         $count = count_records_select('enrol_authorize', $select);
         if ($count) {
             $a = new stdClass;