This commit is contained in:
ethem 2008-01-15 10:58:24 +00:00
parent 7bf7c697d3
commit 5580a59ba7
2 changed files with 8 additions and 26 deletions

View file

@ -69,18 +69,6 @@ if (!isset($frm->acceptechecktypes)) {
</td> </td>
</tr> </tr>
<?php if (substr($CFG->wwwroot, 0, 5) !== 'https') { /* https && loginhttps */ ?>
<tr valign="top">
<td align="right">loginhttps:</td>
<td><?php
echo (empty($CFG->loginhttps) ? "<span style=\"color:red\"><b>off</b></span>" : "<font color=\"green\">on</font>");
$a->url = "$CFG->wwwroot/$CFG->admin/settings.php?section=httpsecurity";
echo '<br />'; print_string("logindesc", "enrol_authorize", $a);
?>
</td>
</tr>
<?php } /* end: https && loginhttps */ ?>
<tr valign="top"><td colspan="2"><h4><?php print_string("adminauthorizesettings", "enrol_authorize") ?></h4></td></tr> <tr valign="top"><td colspan="2"><h4><?php print_string("adminauthorizesettings", "enrol_authorize") ?></h4></td></tr>
<tr valign="top"> <tr valign="top">
@ -130,7 +118,7 @@ if (!isset($frm->acceptechecktypes)) {
<tr valign="top"> <tr valign="top">
<td align="right">an_authcode:</td> <td align="right">an_authcode:</td>
<td><?php print_checkbox('an_authcode', '1', !empty($frm->an_authcode)) ?> <td><?php print_checkbox('an_authcode', '1', !empty($frm->an_authcode)) ?>
<?php helpbutton('authcode', '', 'enrol/authorize'); ?><br /> <?php helpbutton('authcode', 'authcode', 'enrol/authorize'); ?><br />
<?php print_string("adminauthcode", "enrol_authorize") ?></td> <?php print_string("adminauthcode", "enrol_authorize") ?></td>
</tr> </tr>
@ -175,7 +163,7 @@ if (!isset($frm->acceptechecktypes)) {
</tr> </tr>
<tr valign="top"><td colspan="2"><h4><?php print_string("adminauthorizeccapture", "enrol_authorize") ?> <tr valign="top"><td colspan="2"><h4><?php print_string("adminauthorizeccapture", "enrol_authorize") ?>
<?php helpbutton('orderreview', '', 'enrol/authorize'); ?> <?php helpbutton('orderreview', 'orderreview', 'enrol/authorize'); ?>
</h4></td></tr> </h4></td></tr>
<tr valign="top"> <tr valign="top">

View file

@ -96,7 +96,6 @@ class enrolment_plugin_authorize
if ($course->password) { if ($course->password) {
$password = ''; $password = '';
$teacher = get_teacher($course->id);
include($CFG->dirroot.'/enrol/manual/enrol.html'); include($CFG->dirroot.'/enrol/manual/enrol.html');
} }
@ -524,8 +523,7 @@ class enrolment_plugin_authorize
set_config('an_sorttype', $sorttype); set_config('an_sorttype', $sorttype);
// https and openssl library is required // https and openssl library is required
if ((substr($CFG->wwwroot, 0, 5) !== 'https' and empty($CFG->loginhttps)) or if ((substr($CFG->wwwroot, 0, 5) !== 'https' and empty($CFG->loginhttps)) or !check_openssl_loaded()) {
!check_openssl_loaded()) {
return false; return false;
} }
@ -593,10 +591,7 @@ class enrolment_plugin_authorize
} }
mtrace(" scheduled capture", ": "); mtrace(" scheduled capture", ": ");
if (empty($CFG->an_review) or if (empty($CFG->an_review) or (!empty($CFG->an_test)) or (intval($CFG->an_capture_day) < 1) or (!check_openssl_loaded())) {
(!empty($CFG->an_test)) or
(intval($CFG->an_capture_day) < 1) or
(!check_openssl_loaded())) {
mtrace("disabled"); mtrace("disabled");
return; // order review disabled or test mode or manual capture or openssl wasn't loaded. return; // order review disabled or test mode or manual capture or openssl wasn't loaded.
} }
@ -724,8 +719,7 @@ class enrolment_plugin_authorize
// get_users_by_capability() does not handling user level resolving // get_users_by_capability() does not handling user level resolving
// After user resolving, get_admin() to get_users_by_capability() // After user resolving, get_admin() to get_users_by_capability()
$adminuser = get_admin(); $adminuser = get_admin();
$select = "status IN(".AN_STATUS_UNDERREVIEW.",".AN_STATUS_APPROVEDREVIEW.") " . $select = "status IN(".AN_STATUS_UNDERREVIEW.",".AN_STATUS_APPROVEDREVIEW.") AND (timecreated<'$onepass') AND (timecreated>'$timediff60')";
"AND (timecreated<'$onepass') AND (timecreated>'$timediff60')";
$count = count_records_select('enrol_authorize', $select); $count = count_records_select('enrol_authorize', $select);
if ($count) { if ($count) {
$a = new stdClass; $a = new stdClass;