3 // This file is part of Moodle - http://moodle.org/
5 // Moodle is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
10 // Moodle is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
20 * Tabs to be included on the pages for configuring a single host
21 * $mnet_peer object must be set and bootstrapped
22 * $currenttab string must be set
26 * @copyright 2007 Donal McMullan
27 * @copyright 2007 Martin Langhoff
28 * @copyright 2010 Penny Leach
29 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
32 if (!defined('MOODLE_INTERNAL')) {
33 die('Direct access to this script is forbidden.'); // It must be included from a Moodle page
36 $strmnetservices = get_string('mnetservices', 'mnet');
37 $strmnetlog = get_string('mnetlog', 'mnet');
38 $strmnetedithost = get_string('reviewhostdetails', 'mnet');
40 $logurl = $CFG->wwwroot
.
41 '/report/log/index.php?chooselog=1&showusers=1&showcourses=1&host_course='.$mnet_peer->id
.
44 '&modid=&modaction=0&logformat=showashtml';
46 if (isset($mnet_peer->id
) && $mnet_peer->id
> 0) {
47 $tabs[] = new tabobject('mnetdetails', 'peers.php?step=update&hostid='.$mnet_peer->id
, $strmnetedithost, $strmnetedithost, false);
48 $tabs[] = new tabobject('mnetservices', 'services.php?hostid='.$mnet_peer->id
, $strmnetservices, $strmnetservices, false);
49 if ($mnet_peer->application
->name
== 'moodle' && $mnet_peer->id
!= $CFG->mnet_all_hosts_id
) {
50 $tabs[] = new tabobject('mnetlog', $logurl, $strmnetlog, $strmnetlog, false);
52 $tabs[] = new tabobject('mnetprofilefields', 'profilefields.php?hostid=' . $mnet_peer->id
, get_string('profilefields', 'mnet'), get_string('profilefields', 'mnet'), false);
54 $tabs[] = new tabobject('mnetdetails', '#', $strmnetedithost, $strmnetedithost, false);
56 print_tabs(array($tabs), $currenttab);