-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtabs.php
More file actions
45 lines (38 loc) · 1.41 KB
/
tabs.php
File metadata and controls
45 lines (38 loc) · 1.41 KB
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
<?php // $Id: tabs.php,v 1.8 2008/12/01 13:21:24 jamiesensei Exp $
/**
* Sets up the tabs used by the quiz pages based on the users capabilites.
*
* @author Tim Hunt and others.
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package quiz
*/
if (empty($qcreate)) {
error('You cannot call this script in that way');
}
if (!isset($currenttab)) {
$currenttab = '';
}
$tabs = array();
$row = array();
$row[] = new tabobject('overview', "$CFG->wwwroot/mod/qcreate/overview.php?".$thispageurl->get_query_string(),
get_string('overview', 'qcreate'), get_string('overview', 'qcreate'));
if ($contexts->have_one_edit_tab_cap('questions')) {
$row[] = new tabobject('editq', "$CFG->wwwroot/mod/qcreate/edit.php?".$thispageurl->get_query_string(),
get_string('grading', 'qcreate'), get_string('gradequestions', 'qcreate'));
}
questionbank_navigation_tabs($row, $contexts, $thispageurl->get_query_string());
// no export tab here
foreach ($row as $key => $tab){
if ($tab->id == 'export'){
unset($row[$key]);
}
}
/*
if ($contexts->have_one_edit_tab_cap('export')) {
$row[] = new tabobject('exportgood', "$CFG->wwwroot/mod/qcreate/exportgood.php?".$thispageurl->get_query_string(),
get_string('export', 'quiz'), get_string('exportgoodquestions', 'qcreate'));
}
*/
$tabs[] = $row;
print_tabs($tabs, $mode);
?>