-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex_tabs.php
40 lines (32 loc) · 1.28 KB
/
index_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
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
if (empty($currenttab) or empty($course)) {
error('You cannot call this script in that way');
}
$tabs = array();
$inactive = NULL;
$row = array();
$row[] = new tabobject('result', "$CFG->wwwroot/mod/programming/index.php?id=$id", get_string('result','programming'), '', true);
$row[] = new tabobject('resemble', "$CFG->wwwroot/mod/programming/course/resemble.php?id=$id", get_string('resemble','programming'), '', true);
$tabs[] = $row;
/*****************************
* stolen code from quiz report
*****************************/
if ($currenttab == 'templates' and isset($mode)) {
$inactive[] = 'templates';
$templatelist = array ('listtemplate', 'singletemplate', 'addtemplate', 'rsstemplate', 'csstemplate');
$row = array();
$currenttab ='';
foreach ($templatelist as $template) {
$row[] = new tabobject($template, "templates.php?d=$data->id&mode=$template",
get_string($template, 'data'));
if ($template == $mode) {
$currenttab = $template;
}
}
$tabs[] = $row;
}
/// Print out the tabs and continue!
if (!isguest()) {
print_tabs($tabs, $currenttab, $inactive);
}
?>