mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Tidy up
This commit is contained in:
parent
7bf7c697d3
commit
5580a59ba7
2 changed files with 8 additions and 26 deletions
|
@ -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>
|
||||
|
||||
|
@ -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">
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue