mirrored from git://git.moodle.org/moodle.git
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
/
config_instance_tabs.php
27 lines (20 loc) · 1.15 KB
/
config_instance_tabs.php
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
<?php // $Id$
/// This file to be included so we can assume config.php has already been included.
/// We also assume that $inactive, $activetab and $currentaction have been set
global $USER;
$tabs = $row = array();
$context = get_context_instance(CONTEXT_BLOCK, $this->instance->id);
if (has_capability('moodle/site:manageblocks', $context)) {
$script = $page->url_get_full(array('instanceid' => $this->instance->id, 'sesskey' => $USER->sesskey, 'blockaction' => 'config', 'currentaction' => 'configblock', 'id' => $id, 'section' => 'rss'));
$row[] = new tabobject('configblock', $script,
get_string('configblock', 'block_rss_client'));
}
$script = $page->url_get_full(array('instanceid' => $this->instance->id, 'sesskey' => $USER->sesskey, 'blockaction' => 'config', 'currentaction' => 'managefeeds', 'id' => $id, 'section' => 'rss'));
$row[] = new tabobject('managefeeds', $script,
get_string('managefeeds', 'block_rss_client'));
$tabs[] = $row;
/// Print out the tabs and continue!
print "\n".'<div class="tabs">'."\n";
print_tabs($tabs, $currentaction);
print '</div>' . print_location_comment(__FILE__, __LINE__, true);
?>