print_heading(get_string('mnetsettings', 'mnet'));
?>
-<center>
- <table align="center" class="generalbox" border="0" cellpadding="5" cellspacing="0">
+<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
+ <table class="generalbox standard" border="0" cellpadding="5" cellspacing="0">
<tr>
<td class="generalboxcontent">
<table cellpadding="9" cellspacing="0" >
<td colspan="2" class="header" cellpadding="0"><span><?php print_string('deleteaserver', 'mnet'); ?>Deleting a Server</span></td>
</tr>
<?php
- if (count($warn) > 0):
+ if (count($warn) > 0){
?>
<tr valign="top">
<td align="right" colspan="2"><?php print_string('receivedwarnings','mnet'); ?>:<br />
</td>
</tr>
<?php
- endif;
+ }
?>
<tr valign="top">
<td colspan="2"><?php print_string('reallydeleteserver','mnet'); ?>: "<?php echo $mnet_peer->name; ?>"?</td>
<form id="assignform" method="post" action="">
+<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
<input type="hidden" name="previoussearch" value="<?php p($previoussearch) ?>" />
<input type="hidden" name="courseid" value="<?php p($courseid) ?>" />
<input type="hidden" name="host" value="<?php p($mnet_peer->id) ?>" />
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
- <table align="center" border="0" cellpadding="5" cellspacing="0">
+ <table class="generaltable" border="0" cellpadding="5" cellspacing="0">
<tr>
<td valign="top">
<?php print_string('existingusers', 'role', count($mnetenrolledusers)); ?>
<td valign="top"></td>
</tr>
</table>
+ </div>
</form>
print_box('<strong>' . s($host->name) . ' </strong><br />'
. get_string("enrolcourses_desc", "mnet"));
- echo "<hr />";
+ echo '<hr />';
- print ('<table align="center" >');
+ echo '<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->'
+ . '<table class="generaltable">';
$icon = "<img src=\"$CFG->pixpath/i/course.gif\"".
" class=\"icon\" alt=\"".get_string("course")."\" />";
foreach ($courses as $course) {
$link = $CFG->wwwroot . '/admin/mnet/enr_course_enrol.php?'
. "host={$mnethost}&courseid={$course->id}&sesskey={$USER->sesskey}";
- print ('<tr>'
+ echo '<tr>'
. "<td>$icon</td>"
. "<td><a href=\"$link\">".format_string($course->fullname). "</a></td>"
. '</tr><tr>'
. '</tr><tr>'
. '<td></td>'
. "<td align=\"left\" >{$course->summary}</td>"
- . '</tr>');
+ . '</tr>';
}
- print ('</table>');
+ echo '</table></div>';
admin_externalpage_print_footer($adminroot);
print_box(get_string("remoteenrolhosts_desc", "mnet"));
- echo "<hr />";
+ echo '<hr />';
if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict') {
print_box(get_string('mnetdisabled','mnet'));
}
- print ('<table align="center" cellspacing="0" cellpadding="5" width="500" id="hosts" class="generaltable generalbox" >'
+ echo '<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->'
+ . '<table cellspacing="0" cellpadding="5" id="hosts" class="generaltable generalbox" >'
. '<tr>'
. '<th class="header c0"> '.get_string('host', 'mnet').' </th>'
. '<th class="header c1"> '.get_string('enrolments', 'mnet').' </th>'
. '<th class="header c2"> '.get_string('courses', 'mnet').' </th>'
// . '<th class="header c3"> </th>'
- . '</tr>');
+ . '</tr>';
$hosts = $enrolment->list_remote_servers();
foreach ($hosts as $host) {
$coursesurl = "{$CFG->wwwroot}/admin/mnet/enr_courses.php?host={$host->id}&sesskey={$USER->sesskey}";
}
$enrolcount = get_field_sql("SELECT count(id) FROM {$CFG->prefix}mnet_enrol_assignments WHERE hostid={$host->id}");
- print ('<tr>'
+ echo '<tr>'
. "<td><a href=\"{$coursesurl}\">{$host->name}</a></td>"
. "<td align=\"center\" >$enrolcount</td>"
. "<td align=\"center\" >$coursecount - <a href=\"{$coursesurl}\">".get_string('editenrolments', 'mnet')."</a></td>"
// TODO: teach report/log/index.php to show per-host-logs
// . '<td align="center" ><a href="{$CFG->wwwroot}/admin/report/log/index.php?course_host={$host->id}">'
// . get_string('logs', 'mnet').'</a> </td>'
- . '</tr>');
+ . '</tr>';
}
- print ('</table>');
+ echo '</table>'
+ . '</div>';
admin_externalpage_print_footer($adminroot);
print_simple_box_start("center", "");
?>
<form method="post" action="peers.php">
+<div>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="step" value="commit" />
<input type="hidden" name="last_connect_time" value="<?php echo $mnet_peer->last_connect_time; ?>" />
</tr>
<?php
-if(!empty($currentkey)):
+if(!empty($currentkey)) {
?>
<tr>
<td align="right" valign="top"></td>
<td valign="top"><pre style="font-size: 8px;"><?php echo $currentkey;?></pre></td>
</tr>
<?php
-endif;
+}
-if (isset($mnet_peer->id) && $mnet_peer->id > 0):
+if (isset($mnet_peer->id) && $mnet_peer->id > 0) {
?>
<tr>
<td align="right" valign="top"><?php print_string('last_connect_time', 'mnet'); ?>:</td>
<td valign="top"><?php echo ($mnet_peer->last_connect_time == 0)? get_string('never','mnet') : date('H:i:s d/m/Y',$mnet_peer->last_connect_time);?></td>
</tr>
<?php
-endif;
+}
-if (isset($mnet_peer->deleted) && $mnet_peer->deleted > 0):
+if (isset($mnet_peer->deleted) && $mnet_peer->deleted > 0){
?>
<tr>
<td align="right" valign="top"><?php print_string('deleted'); ?>:</td>
</td>
</tr>
<?php
-endif;
+}
-if (isset($mnet_peer->ip_address) && '' != $mnet_peer->ip_address):
+if (isset($mnet_peer->ip_address) && '' != $mnet_peer->ip_address){
?>
<tr>
<td align="right" valign="top"><?php print_string('ipaddress', 'mnet');
</tr>
<?php
-endif;
+}
?>
<tr>
<td></td>
<td><input type="submit" value="<?php print_string("savechanges"); ?>" /></td>
</tr>
</table>
+</div>
</form>
<?php
print_simple_box_end();
?>
<form method="post" action="mnet_services.php">
+<div>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="step" value="<?php echo $mnet_peer->nextstep; ?>" />
<input type="hidden" name="hostid" value="<?php echo ($mnet_peer->id)? $mnet_peer->id : '0' ; ?>" />
<table cellpadding="9" cellspacing="0" >
<?php
- foreach($myservices as $name => $versions):
+ foreach($myservices as $name => $versions) {
$version = current($versions);
?>
<tr>
<td align="left" valign="top" colspan="2">
<h3><?php echo get_string($name.'_name', $version['parent_type'].'_'.$version['parent'] , $mnet_peer->name); ?></h3>
- <p><?php echo get_string($name.'_description', $version['parent_type'].'_'.$version['parent'], $mnet_peer->name); ?></p>
+ <?php echo get_string($name.'_description', $version['parent_type'].'_'.$version['parent'], $mnet_peer->name); ?>
<?php
$breakstring = '';
- foreach($versions as $version):
+ foreach($versions as $version){
if (count($versions) > 1) {
$versionstring = '('.get_string('version','mnet') .' '.$version['apiversion'].')';
} else {
echo $breakstring;
?>
<input type="hidden" name="exists[<?php echo $version['serviceid']; ?>]" value="1" />
- <input type="checkbox" name="publish[<?php echo $version['serviceid']; ?>]" <?php echo (!empty($version['I_publish']))? 'checked="checked" ': '' ; ?>/><?php print_string('publish','mnet'); ?><?php echo $versionstring; if (!empty($version['hostsubscribes'])) echo '<a href="#" title="'.get_string('issubscribed','mnet', $mnet_peer->name).'">√</a> '; if (!empty($version['allhosts_publish'])) print_string("enabled_for_all",'mnet',!empty($version['I_publish'])); ?><br />
- <input type="checkbox" name="subscribe[<?php echo $version['serviceid']; ?>]" <?php echo (!empty($version['I_subscribe']))? 'checked="checked" ': '' ; ?>/><?php print_string('subscribe','mnet'); ?><?php echo $versionstring; if (!empty($version['hostpublishes'])) echo '<a href="#" title="'.get_string('ispublished','mnet', $mnet_peer->name).'">√</a> '; if (!empty($version['allhosts_subscribe'])) print_string("enabled_for_all",'mnet',!empty($version['I_subscribe'])); ?><br />
-<?php
+ <input type="checkbox" name="publish[<?php echo $version['serviceid']; ?>]" <?php echo (!empty($version['I_publish']))? 'checked="checked" ': '' ; ?>/>
+<?php
+ print_string('publish','mnet');
+ echo $versionstring;
+ if (!empty($version['hostsubscribes'])) {
+ echo '<a href="#" title="'.get_string('issubscribed','mnet', $mnet_peer->name).'">√</a> ';
+ }
+ if (!empty($version['allhosts_publish'])) {
+ print_string("enabled_for_all",'mnet',!empty($version['I_publish']));
+ }
+ echo '<br />';
+?>
+ <input type="checkbox" name="subscribe[<?php echo $version['serviceid']; ?>]" <?php echo (!empty($version['I_subscribe']))? 'checked="checked" ': '' ; ?>/>
+<?php
+ print_string('subscribe','mnet');
+ echo $versionstring;
+ if (!empty($version['hostpublishes'])) {
+ echo '<a href="#" title="'.get_string('ispublished','mnet', $mnet_peer->name).'">√</a> ';
+ }
+ if (!empty($version['allhosts_subscribe'])) {
+ print_string("enabled_for_all",'mnet',!empty($version['I_subscribe']));
+ }
+
+ echo '<br />';
$breakstring = '. . . . . . . . . . . . . . . . . . . . . . . . <br>';
- endforeach;
+ } // end foreach
?>
</td>
</tr>
<?php
- endforeach;
+ } // end foreach
?>
<tr>
<td align="left" valign="top" colspan="2">
</td>
</tr>
</table>
+</div>
</form>
<?php
print_simple_box_end();
print_box(get_string('mnetdisabled','mnet'));
}
?>
-<center>
-<form method="post" action="peers.php">
-<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
-<input type="hidden" name="updateregisterall" value="1" />
-<table cellspacing="0" cellpadding="5" width="500" id="hosts" class="generaltable generalbox" >
- <tr>
- <th class="header c0" nowrap="nowrap" colspan="2"><?php print_string('registerallhosts', 'mnet'); ?></th>
- </tr>
- <tr>
- <td class="cell c1" colspan="2"><?php print_string('registerallhostsexplain', 'mnet'); ?></td>
- </tr>
- <tr>
- <td class="cell c1"><input type="checkbox" name="registerallhosts" <?php if (!empty($CFG->mnet_register_allhosts)) echo 'checked="checked" '; ?>/></td>
- <td class="cell c1"> <?php print_string('registerallhosts', 'mnet'); ?> </td>
- </tr>
- <tr>
- <td align="right" colspan="2"><input type="submit" name="submit" value="<?php print_string('savechanges'); ?>" /></td>
- </tr>
-</table>
-</form>
-<table cellspacing="0" cellpadding="5" id="hosts" class="generaltable generalbox" >
- <tr>
- <th class="header c0" nowrap="nowrap"><?php print_string('site'); ?></th>
- <th class="header c1" nowrap="nowrap"><?php print_string('system','mnet'); ?></th>
- <th class="header c2" nowrap="nowrap"><?php print_string('last_connect_time', 'mnet'); ?></th>
- <th class="header c3" nowrap="nowrap"></th>
- </tr>
+<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
+ <form method="post" action="peers.php">
+ <div>
+ <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
+ <input type="hidden" name="updateregisterall" value="1" />
+ <table cellspacing="0" cellpadding="5" class="generaltable generalbox" >
+ <tr>
+ <th class="header c0" colspan="2"><?php print_string('registerallhosts', 'mnet'); ?></th>
+ </tr>
+ <tr>
+ <td class="cell c1" colspan="2"><?php print_string('registerallhostsexplain', 'mnet'); ?></td>
+ </tr>
+ <tr>
+ <td class="cell c1"><input type="checkbox" name="registerallhosts" <?php if (!empty($CFG->mnet_register_allhosts)) echo 'checked="checked" '; ?>/></td>
+ <td class="cell c1"> <?php print_string('registerallhosts', 'mnet'); ?> </td>
+ </tr>
+ <tr>
+ <td align="right" colspan="2"><input type="submit" name="submit" value="<?php print_string('savechanges'); ?>" /></td>
+ </tr>
+ </table>
+ </div>
+ </form>
+ <table cellspacing="0" cellpadding="5" class="generaltable generalbox standard" >
+ <tr>
+ <th class="header c0"><?php print_string('site'); ?></th>
+ <th class="header c1"><?php print_string('system','mnet'); ?></th>
+ <th class="header c2"><?php print_string('last_connect_time', 'mnet'); ?></th>
+ <th class="header c3"></th>
+ </tr>
<?php
- foreach($hosts as $host):
+ foreach($hosts as $host) {
if ($host->last_connect_time == 0) {
$last_connect = get_string('never');
<tr>
<td class="cell c0"><a href="peers.php?step=update&hostid=<?php echo $host->id; ?>"><?php echo $host->name; ?></a></td>
<td class="cell c1"><a href="peers.php?step=update&hostid=<?php echo $host->id; ?>"><?php echo $host->wwwroot; ?></a></td>
- <td class="cell c2" nowrap="nowrap"><?php if ($host->id != $CFG->mnet_all_hosts_id) echo $last_connect; ?></td>
+ <td class="cell c2"><?php if ($host->id != $CFG->mnet_all_hosts_id) echo $last_connect; ?></td>
<td class="cell c3">
-<?php if ($host->id != $CFG->mnet_all_hosts_id): ?>
+<?php if ($host->id != $CFG->mnet_all_hosts_id){ ?>
<form method="post" action="delete.php">
+ <div>
<input type="hidden" name="hostid" value="<?php echo $host->id; ?>" />
<input type="hidden" name="step" value="verify" />
<input type="submit" name="submit" value="<?php print_string('delete'); ?>"/>
+ </div>
</form>
-<?php endif; ?>
+<?php } ?>
</td>
</tr>
<?php
- endforeach;
+ }
?>
- <tr>
- <td class="cell c4" colspan="4"> </td>
- </tr>
+ </table>
<form method="post" action="peers.php">
- <tr>
- <th class="header c4" nowrap="nowrap" colspan="4">
- <?php print_string('addnewhost', 'mnet'); ?>
- <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
- <input type="hidden" name="step" value="input" />
- </th>
- </tr>
- <tr>
- <td class="cell c0"></td>
- <td class="cell c1"><input type="text" name="wwwroot" value="" /></td>
- <td class="cell c2"></td>
- <td class="cell c3"></td>
- </tr>
- <tr>
- <td class="cell c4" align="right" colspan="4"><input type="submit" value="<?php print_string('addhost','mnet'); ?>" /></td>
- </tr>
+ <table cellspacing="0" cellpadding="5" class="generaltable generalbox standard" >
+
+ <tr>
+ <th class="header c4" colspan="4">
+ <?php print_string('addnewhost', 'mnet'); ?>
+ <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
+ <input type="hidden" name="step" value="input" />
+ </th>
+ </tr>
+ <tr>
+ <td class="cell c0"></td>
+ <td class="cell c1"><input type="text" name="wwwroot" value="" /></td>
+ <td class="cell c2"></td>
+ <td class="cell c3"></td>
+ </tr>
+ <tr>
+ <td class="cell c4" align="right" colspan="4"><input type="submit" value="<?php print_string('addhost','mnet'); ?>" /></td>
+ </tr>
+
+ </table>
</form>
-</table>
-</center>
+</div>
<?php
admin_externalpage_print_footer($adminroot);
-?>
\ No newline at end of file
+?>
<?php
admin_externalpage_print_header($adminroot);
?>
-<center>
-<table cellspacing="0" cellpadding="5" width="500" id="hosts" class="generaltable generalbox" >
+<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
+<table cellspacing="0" cellpadding="5" class="generaltable generalbox" >
<tr>
- <th class="header c0" nowrap="nowrap" colspan="2"><?php print_string('trustedhosts', 'mnet'); ?></th>
+ <th class="header c0" colspan="2"><?php print_string('trustedhosts', 'mnet'); ?></th>
</tr>
<tr>
<td class="cell c1" colspan="2"><?php print_string('trustedhostsexplain', 'mnet'); ?></td>
</tr>
<tr>
- <td class="cell c1" colspan="2"><form method="post" action="trustedhosts.php">
- <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
- <textarea name="hostlist" cols="40" rows="20"><?php echo $trusted_hosts; ?></textarea><br />
- <input type="submit" value="<?php print_string('savechanges'); ?>" />
+ <td class="cell c1" colspan="2">
+ <form method="post" action="trustedhosts.php">
+ <div>
+ <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
+ <textarea name="hostlist" cols="40" rows="20"><?php echo $trusted_hosts; ?></textarea><br />
+ <input type="submit" value="<?php print_string('savechanges'); ?>" />
+ </div>
</form>
</td>
</tr>
</table>
-<table cellspacing="0" cellpadding="5" width="500" id="hosts" class="generaltable generalbox" >
+<table cellspacing="0" cellpadding="5" class="generaltable generalbox" >
<tr>
- <th class="header c0" nowrap="nowrap" colspan="2"><?php print_string('testtrustedhosts', 'mnet'); ?></th>
+ <th class="header c0" colspan="2"><?php print_string('testtrustedhosts', 'mnet'); ?></th>
</tr>
<?php
if (!empty($test_ip_address)):
<?php
if ($in_range) {
print_string('is_in_range', 'mnet', $test_ip_address);
- echo '<br>';
+ echo '<br />';
print_string('validated_by', 'mnet', $validated_by);
} else {
print_string('not_in_range', 'mnet', $test_ip_address);
endif;
?>
<tr>
- <td class="cell c1" colspan="2"><form method="get" action="trustedhosts.php">
- <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
- <input type="text" name="testipaddress" value="<?php echo $test_ip_address; ?>" />
- <input type="submit" value="<?php print_string('go'); ?>" />
+ <td class="cell c1" colspan="2">
+ <form method="get" action="trustedhosts.php">
+ <div>
+ <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
+ <input type="text" name="testipaddress" value="<?php echo $test_ip_address; ?>" />
+ <input type="submit" value="<?php print_string('go'); ?>" />
+ </div>
</form>
</td>
</tr>
</table>
-</center>
+</div>
<?php
admin_externalpage_print_footer($adminroot);
-?>
\ No newline at end of file
+?>
}
?>
-<table cellspacing="0" cellpadding="5" border="0" align="center">
+<div id="mnetconfig">
+<table cellspacing="0" cellpadding="5">
<tr valign="top" class="required">
<td align="right"><?php print_string('rpc_negotiation_timeout', 'auth'); ?>: </td>
<td colspan="3"><?php print_string('auth_mnet_roamin', 'auth'); ?>: </td>
</tr>
<?php
-foreach($id_providers as $host):
+foreach($id_providers as $host) {
?>
<tr valign="top" class="required">
<td align="right"><?php echo $host['name']; ?>: </td>
<td colspan="2"><?php echo $host['wwwroot']; ?> </td>
</tr>
<?php
-endforeach;
+}
?>
<tr valign="top" class="required">
<td colspan="3"><?php print_string('auth_mnet_roamout', 'auth'); ?>: </td>
</tr>
<?php
-foreach($service_providers as $host):
+foreach($service_providers as $host) {
?>
<tr valign="top" class="required">
<td align="right"><?php echo $host['name']; ?>: </td>
<td colspan="2"><?php echo $host['wwwroot']; ?> </td>
</tr>
<?php
-endforeach;
+}
// print_auth_lock_options('mnet', $user_fields, get_string('auth_fieldlocks_help', 'auth'), false, false);
?>
</table>
+</div>
echo '<tr class="r'.$row.'">';
if ($course->id == SITEID) {
echo "<td class=\"cell c0\">\n";
- echo " <a href=\"{$CFG->wwwroot}/course/view.php?id={$log->course}\">".$courses[$log->course]."</a>\n";
+ echo " <a href=\"{$CFG->wwwroot}/course/view.php?id={$log->course}\">". format_string($courses[$log->course])."</a>\n";
echo "</td>\n";
}
echo "<td class=\"cell c1\" align=\"right\">".userdate($log->time, '%a').
<td align="left" colspan="2">enrol_flatfilemapping:</td>
</tr>
-<?php foreach ($frm->enrol_flatfilemapping as $id => $record):
+<?php foreach ($frm->enrol_flatfilemapping as $id => $record) {
list($name, $mapping) = $record; ?>
<tr valign="top">
<td align="right"><?php echo htmlspecialchars($name, ENT_COMPAT, 'UTF-8'); ?></td>
<td><input type="text" size="20" name="enrol_flatfilemapping_<?php echo $id; ?>" value="<?php echo htmlspecialchars($mapping, ENT_COMPAT, 'UTF-8'); ?>" /></td>
</tr>
-<?php endforeach; ?>
+<?php } ?>
</table>
<th><?php print_string('enrol_ldap_contexts', 'enrol_ldap'); ?></th>
<th><?php print_string('enrol_ldap_memberattribute', 'enrol_ldap'); ?></th>
</tr>
-<?php foreach ($roles as $role): ?>
+<?php foreach ($roles as $role) { ?>
<tr>
<td><?php echo htmlspecialchars($role->name, ENT_COMPAT, 'UTF-8'); ?></td>
<td><input type="text" size="30" name="enrol_ldap_contexts_role<?php echo $role->id; ?>" value="<?php echo htmlspecialchars($frm->{'enrol_ldap_contexts_role'.$role->id}); ?>" /></td>
<td><input type="text" size="30" name="enrol_ldap_memberattribute_role<?php echo $role->id; ?>" value="<?php echo htmlspecialchars($frm->{'enrol_ldap_memberattribute_role'.$role->id}); ?>" /></td>
</tr>
-<?php endforeach; ?>
+<?php } ?>
</table>
</td>
</tr>
float: none;
}
+#trustedhosts .generaltable {
+ margin-left: auto;
+ margin-right: auto;
+ width: 500px;
+}
+
+#trustedhosts .standard {
+ width: auto;
+}
+
+#mnetconfig table {
+ margin-left: auto;
+ margin-right: auto;
+}
/***
*** Blocks