Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

enrol/mnet: fix a warning, do not list the sitecourse

  • Loading branch information...
commit 9b0633ac3d1b0ac0037cf85766d50c0e7a1ba72b 1 parent 68ea70b
martinlanghoff authored
Showing with 6 additions and 1 deletion.
  1. +1 −0  enrol/mnet/allowed_courses.php
  2. +5 −1 enrol/mnet/config.html
View
1  enrol/mnet/allowed_courses.php
@@ -102,6 +102,7 @@
}
$courses = array();
if ($courses = get_records('course', '', '', 'shortname', 'id, shortname')) {
+ unset($courses[SITEID]); // never list or offer the siteid
$allowedcourses = array();
if (empty($CFG->enrol_mnet_allowed_courses)) {
$potentialcourses = $courses;
View
6 enrol/mnet/config.html
@@ -4,6 +4,10 @@
print_box(get_string('mnetdisabled','mnet'));
}
+$servercount = 0;
+if (is_array($mnethosts)) {
+ $servercount = count(array_keys($mnethosts));
+}
?>
<table cellspacing="0" cellpadding="5" border="0" align="center">
@@ -13,7 +17,7 @@
<tr valign="top">
<td align="left" colspan="3">
<a href="<?php echo $CFG->wwwroot .'/enrol/mnet/remote_hosts.php?sesskey=' . sesskey(); ?>" >Manage Moodle Network Enrolments.</a><br/>
- Servers configured: <?php echo count(array_keys($mnethosts)); ?>
+ Servers configured: <?php echo $servercount; ?>
</td>
</tr>
Please sign in to comment.
Something went wrong with that request. Please try again.