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>
</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">
@ -130,7 +118,7 @@ if (!isset($frm->acceptechecktypes)) {
<tr valign="top">
<td align="right">an_authcode:</td>
<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>
</tr>
@ -148,7 +136,7 @@ if (!isset($frm->acceptechecktypes)) {
foreach ($allpaymentmethods as $key) {
if ($key == AN_METHOD_CC) {
print_checkbox('acceptmethods[]', AN_METHOD_CC, in_array(AN_METHOD_CC, $paymentmethodsenabled), get_string('method'.AN_METHOD_CC,'enrol_authorize'));
echo("<ul>"); // blockquote breaks <span> and <br> tags
echo("<ul>"); // blockquote breaks <span> and <br> tags
$acceptedccs = array_keys(get_list_of_creditcards());
$allccs = get_list_of_creditcards(true);
foreach ($allccs as $key => $val) {
@ -160,7 +148,7 @@ if (!isset($frm->acceptechecktypes)) {
}
elseif ($key == AN_METHOD_ECHECK) {
print_checkbox('acceptmethods[]', AN_METHOD_ECHECK, in_array(AN_METHOD_ECHECK, $paymentmethodsenabled), get_string('method'.AN_METHOD_ECHECK,'enrol_authorize'));
echo("<ul>"); // blockquote breaks <span> and <br> tags
echo("<ul>"); // blockquote breaks <span> and <br> tags
$echecktypesenabled = get_list_of_bank_account_types();
$allechecktypes = get_list_of_bank_account_types(true);
foreach ($allechecktypes as $key) {
@ -175,7 +163,7 @@ if (!isset($frm->acceptechecktypes)) {
</tr>
<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>
<tr valign="top">

View file

@ -96,7 +96,6 @@ class enrolment_plugin_authorize
if ($course->password) {
$password = '';
$teacher = get_teacher($course->id);
include($CFG->dirroot.'/enrol/manual/enrol.html');
}
@ -414,7 +413,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)');
}
@ -524,8 +523,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;
}
@ -593,10 +591,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.
}
@ -724,8 +719,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;