Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tidy up

  • Loading branch information...
commit 8c4ca06f8831973c0b4d0e910efa4e8f87a8ae62 1 parent 33c34c5
ethem authored
Showing with 8 additions and 26 deletions.
  1. +4 −16 enrol/authorize/config_form.php
  2. +4 −10 enrol/authorize/enrol.php
View
20 enrol/authorize/config_form.php
@@ -69,18 +69,6 @@
</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 @@
<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 @@
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 @@
}
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 @@
</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
14 enrol/authorize/enrol.php
@@ -99,7 +99,6 @@ function print_entry($course) {
if ($course->password) {
$password = '';
- $teacher = get_teacher($course->id);
include($CFG->dirroot.'/enrol/manual/enrol.html');
}
@@ -417,7 +416,7 @@ function config_form($frm)
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)');
}
@@ -527,8 +526,7 @@ function process_config($config)
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;
}
@@ -596,10 +594,7 @@ function cron()
}
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.
}
@@ -727,8 +722,7 @@ function cron_daily()
// 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;
Please sign in to comment.
Something went wrong with that request. Please try again.