forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmnet_services.html
103 lines (97 loc) · 3.93 KB
/
mnet_services.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
admin_externalpage_print_header();
$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';
$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);
$tabs[] = new tabobject('mnetthemes', 'mnet_themes.php?step=list&hostid='.$mnet_peer->id, $strmnetthemes, $strmnetthemes, false);
if ($mnet_peer->id != $CFG->mnet_all_hosts_id && $mnet_peer->application->name == 'moodle') {
$tabs[] = new tabobject('mnetlog', $logurl, $strmnetlog, $strmnetlog, false);
}
print_tabs(array($tabs), 'mnetservices');
echo $OUTPUT->box_start();
?>
<form method="post" action="mnet_services.php">
<div>
<input type="hidden" name="sesskey" value="<?php echo 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) {
$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>
<?php echo get_string($name.'_description', $version['parent_type'].'_'.$version['parent'], $mnet_peer->name); ?>
<?php
$breakstring = '';
foreach($versions as $version){
if (count($versions) > 1) {
$versionstring = '('.get_string('version','mnet') .' '.$version['apiversion'].')';
} else {
$versionstring = '';
}
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');
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>';
} // end foreach
?>
</td>
</tr>
<?php
} // end foreach
?>
<tr>
<td align="left" valign="top" colspan="2">
<div id="pubTreeLoc"></div>
</td>
</tr>
<tr>
<td align="left" valign="top" colspan="2">
<div id="subTreeLoc"></div>
</td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="<?php print_string("savechanges") ?>" /></td>
</tr>
<tr>
<td align="left" valign="top" colspan="2">
<div id="formElements"><input type="hidden" name="outer" value="4" /></div>
</td>
</tr>
</table>
</div>
</form>
<?php
echo $OUTPUT->box_end();
echo $OUTPUT->footer();
?>