Merged from STABLE. Addition function to find or create category path.
[moodle-linuxchix.git] / question / tabs.php
blob8a64cfbbfa7f71cd2dad439dd7d19ce7c6c8f807
1 <?php // $Id$
2 /**
3 * Sets up the tabs used by the question bank editing page
5 * @version $Id$
6 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
7 * @package question
8 */
10 /// This file to be included so we can assume config.php has already been included.
12 if (!isset($currenttab)) {
13 $currenttab = '';
15 if (!isset($course)) {
16 error('No course specified');
19 $tabs = array();
20 $row = array();
21 $inactive = array();
23 $row[] = new tabobject('questions', "$CFG->wwwroot/question/edit.php?courseid=$course->id", get_string('questions', 'quiz'), get_string('editquizquestions', 'quiz'));
24 $row[] = new tabobject('categories', "$CFG->wwwroot/question/category.php?id=$course->id", get_string('categories', 'quiz'), get_string('editqcats', 'quiz'));
25 $row[] = new tabobject('import', "$CFG->wwwroot/question/import.php?course=$course->id", get_string('import', 'quiz'), get_string('importquestions', 'quiz'));
26 $row[] = new tabobject('export', "$CFG->wwwroot/question/export.php?courseid=$course->id", get_string('export', 'quiz'), get_string('exportquestions', 'quiz'));
28 $tabs[] = $row;
30 print_tabs($tabs, $currenttab, $inactive);