mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
2520258128
changelog follows [MNET-manual] added version.php, install.xml and upgrade.php patches Route remote users back to their home server without going through jump.php and land.php Display app-specific strings in the user view Display the application icon in the Remote Host block Hide the 'logs' tab if the application under review is not Moodle Hide the 'logs' tab if the application under review is not Moodle Update user record to note that picture == 1 once a picture has been transferred. Change 2 to uri - is this fluid? Add application paramter to bootstrap function Find the application Workaround for PHP5.2.2 bug: http://bugs.php.net/bug.php?id=41293 $HTTP_RAW_POST_DATA was not being populated Ensure we get an application for our Peer Update the URI to use for MNET The default 'wantsurl' should be empty Use the appropriate 'land' url for the remote application Add hidden form elements for 'application' Add awareness of new Application concept Add awareness of new Application concept Add awareness of new Application concept Add awareness of new Application concept Add awareness of new Application concept Add awareness of new Application concept Add awareness of new Application concept
102 lines
4.2 KiB
HTML
102 lines
4.2 KiB
HTML
<?php
|
|
admin_externalpage_print_header();
|
|
|
|
if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict') {
|
|
print_box(get_string('mnetdisabled','mnet'));
|
|
}
|
|
?>
|
|
<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) {
|
|
|
|
if ($host->last_connect_time == 0) {
|
|
$last_connect = get_string('never');
|
|
} else {
|
|
$last_connect = date('H:i:s d/m/Y', $host->last_connect_time);
|
|
}
|
|
|
|
?>
|
|
<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"><?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){ ?>
|
|
<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 } ?>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
?>
|
|
</table>
|
|
<form method="post" action="peers.php">
|
|
<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">
|
|
<select name="applicationid">
|
|
<?php
|
|
foreach($applications as $application) {
|
|
echo ' <option value="'.$application->id.'">'.$application->display_name."</option>\n";
|
|
}
|
|
?>
|
|
</select>
|
|
</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>
|
|
</div>
|
|
<?php
|
|
admin_externalpage_print_footer();
|
|
?>
|