mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00

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
139 lines
4.8 KiB
HTML
139 lines
4.8 KiB
HTML
<?php
|
|
$logurl = $CFG->wwwroot.
|
|
'/course/report/log/index.php?chooselog=1&showusers=1&showcourses=1&host_course='.$mnet_peer->id.
|
|
'%2F1&user='.'0'.
|
|
'&date=0'.
|
|
'&modid=&modaction=0&logformat=showashtml';
|
|
|
|
admin_externalpage_print_header();
|
|
|
|
if (isset($mnet_peer->id) && $mnet_peer->id > 0) {
|
|
$tabs[] = new tabobject('mnetdetails', 'peers.php?step=update&hostid='.$mnet_peer->id, $strmnetedithost, $strmnetedithost, false);
|
|
$tabs[] = new tabobject('mnetservices', 'mnet_services.php?step=list&hostid='.$mnet_peer->id, $strmnetservices, $strmnetservices, false);
|
|
if ($mnet_peer->application->name == 'moodle') {
|
|
$tabs[] = new tabobject('mnetlog', $logurl, $strmnetlog, $strmnetlog, false);
|
|
}
|
|
} else {
|
|
$tabs[] = new tabobject('mnetdetails', '#', $strmnetedithost, $strmnetedithost, false);
|
|
}
|
|
print_tabs(array($tabs), 'mnetdetails');
|
|
|
|
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; ?>" />
|
|
<input type="hidden" name="id" value="<?php echo isset($mnet_peer->id)? $mnet_peer->id : '0' ; ?>" />
|
|
<input type="hidden" name="applicationid" value="<?php echo isset($mnet_peer->applicationid)? $mnet_peer->applicationid : '0' ; ?>" />
|
|
<input type="hidden" name="applicationname" value="<?php echo isset($mnet_peer->application->name)? $mnet_peer->application->name : '' ; ?>" />
|
|
<table cellpadding="9" cellspacing="0" width="635">
|
|
|
|
<tr>
|
|
<td align="right" valign="top"><?php print_string('site'); ?>:</td>
|
|
<td valign="top"><input type="text" name="name" size="30" value="<?php echo $mnet_peer->name; ?>" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="right" valign="top"><?php print_string('hostname', 'mnet'); ?>:</td>
|
|
<td valign="top"><input type="text" name="wwwroot" size="30" value="<?php echo $mnet_peer->wwwroot; ?>" /></td>
|
|
</tr>
|
|
<?php
|
|
if (empty($mnet_peer->public_key)) $mnet_peer->public_key = '';
|
|
?>
|
|
<tr>
|
|
<td align="right" valign="top"><?php
|
|
print_string('publickey', 'mnet');
|
|
echo ': <br />';
|
|
helpbutton("publickey", get_string('publickey', 'mnet'), "mnet", true, true);
|
|
?></td>
|
|
<?php
|
|
|
|
|
|
|
|
if (isset($mnet_peer->deleted) && $mnet_peer->deleted > 0) {
|
|
$key = mnet_get_public_key($mnet_peer->wwwroot, $mnet_peer->application->xmlrpc_server_url);
|
|
$mnet_peer->public_key = clean_param($key, PARAM_PEM);
|
|
}
|
|
?>
|
|
<td valign="top">
|
|
<?php
|
|
if (empty($mnet_peer->public_key)) {
|
|
print_string('nopubkey', 'mnet');
|
|
}
|
|
?><br />
|
|
<textarea rows="17" cols="65" name="public_key" style="font-size: 8px;"><?php echo $mnet_peer->public_key; ?></textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="right" valign="top"><?php print_string('expires', 'mnet'); ?>:</td>
|
|
<td valign="top">
|
|
<?php
|
|
if($mnet_peer->public_key_expires < time()) {
|
|
print_string('expired', 'mnet');
|
|
echo ' ';
|
|
}
|
|
echo userdate($mnet_peer->public_key_expires);
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
|
|
if(!empty($currentkey)) {
|
|
?>
|
|
<tr>
|
|
<td align="right" valign="top"></td>
|
|
<td valign="top"><?php print_string('keymismatch', 'mnet'); ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="right" valign="top"><?php print_string('currentkey', 'mnet'); ?>:</td>
|
|
<td valign="top"><pre style="font-size: 8px;"><?php echo $currentkey;?></pre></td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
if (isset($mnet_peer->deleted) && $mnet_peer->deleted > 0){
|
|
?>
|
|
<tr>
|
|
<td align="right" valign="top"><?php print_string('deleted'); ?>:</td>
|
|
<td valign="top">
|
|
<input type="radio" name="deleted" value="0" checked="checked" /> <?php print_string('reenableserver','mnet'); ?><br />
|
|
<input type="radio" name="deleted" value="1" /> <?php print_string('yes'); ?><br />
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
|
|
if (isset($mnet_peer->ip_address) && '' != $mnet_peer->ip_address){
|
|
?>
|
|
<tr>
|
|
<td align="right" valign="top"><?php print_string('ipaddress', 'mnet');
|
|
echo ': <br />';
|
|
helpbutton("ipaddress", get_string('ipaddress', 'mnet'), "mnet", true, true);
|
|
?>:</td>
|
|
<td valign="top"><?php echo $mnet_peer->ip_address; ?></td>
|
|
</tr>
|
|
|
|
<?php
|
|
}
|
|
?>
|
|
<tr>
|
|
<td></td>
|
|
<td><input type="submit" value="<?php print_string("savechanges"); ?>" /></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</form>
|
|
<?php
|
|
print_simple_box_end();
|
|
admin_externalpage_print_footer();
|
|
?>
|