MDL-30995 Completion Fixedup some more PHP DOC issues
[moodle.git] / admin / mnet / tabs.php
blobefc0118cc075a1e46b7e0a1fc760527e5c661fc9
1 <?php
3 // This file is part of Moodle - http://moodle.org/
4 //
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.
9 //
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/>.
19 /**
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
24 * @package core
25 * @subpackage mnet
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&amp;showusers=1&amp;showcourses=1&amp;host_course='.$mnet_peer->id.
42 '%2F1&amp;user='.'0'.
43 '&amp;date=0'.
44 '&amp;modid=&amp;modaction=0&amp;logformat=showashtml';
45 $tabs = array();
46 if (isset($mnet_peer->id) && $mnet_peer->id > 0) {
47 $tabs[] = new tabobject('mnetdetails', 'peers.php?step=update&amp;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);
53 } else {
54 $tabs[] = new tabobject('mnetdetails', '#', $strmnetedithost, $strmnetedithost, false);
56 print_tabs(array($tabs), $currenttab);