diff --git a/question/category.php b/question/category.php index 24c0358f1bd..e13b358a142 100644 --- a/question/category.php +++ b/question/category.php @@ -62,8 +62,12 @@ include($CFG->dirroot.'/mod/quiz/tabs.php'); } else { print_header_simple(get_string('editcategories', 'quiz'), '', - '-> '.get_string('editquestions', 'quiz').''. + ''.get_string('editquestions', 'quiz').''. ' -> '.get_string('editcategories', 'quiz')); + + // print tabs + $currenttab = 'categories'; + include('tabs.php'); } //========== diff --git a/question/edit.php b/question/edit.php index 3e3913ab2b8..ce5d6074157 100644 --- a/question/edit.php +++ b/question/edit.php @@ -33,7 +33,11 @@ $streditingquestions = get_string('editquestions', "quiz"); print_header_simple($streditingquestions, '', "$streditingquestions"); - print_heading_with_help(get_string('questions', 'quiz'), 'questionbank'); + + // print tabs + $currenttab = 'editq'; + include('tabs.php'); + echo ''; echo '
'; diff --git a/question/export.php b/question/export.php index a373554f7bc..c0bb056d154 100644 --- a/question/export.php +++ b/question/export.php @@ -71,6 +71,9 @@ print_header_simple($strexportquestions, '', "id}\">".get_string('editquestions', 'quiz').''. ' -> '.$strexportquestions); + // print tabs + $currenttab = 'export'; + include('tabs.php'); } if (!empty($format)) { /// Filename diff --git a/question/import.php b/question/import.php index 58658867bb6..e01654baa26 100644 --- a/question/import.php +++ b/question/import.php @@ -72,9 +72,11 @@ include('tabs.php'); } else { print_header_simple($strimportquestions, '', - "id\">".get_string('modulenameplural', 'quiz').''. - '-> '.get_string('editquestions', 'quiz').''. + ''.get_string('editquestions', 'quiz').''. ' -> '.$strimportquestions); + // print tabs + $currenttab = 'import'; + include('tabs.php'); } diff --git a/question/tabs.php b/question/tabs.php new file mode 100644 index 00000000000..dbcdd33169b --- /dev/null +++ b/question/tabs.php @@ -0,0 +1,32 @@ +wwwroot/question/edit.php?courseid=$course->id", get_string('questions', 'quiz'), get_string('editquizquestions', 'quiz')); + $row[] = new tabobject('categories', "$CFG->wwwroot/question/category.php?id=$course->id", get_string('categories', 'quiz'), get_string('editqcats', 'quiz')); + $row[] = new tabobject('import', "$CFG->wwwroot/question/import.php?course=$course->id", get_string('import', 'quiz'), get_string('importquestions', 'quiz')); + $row[] = new tabobject('export', "$CFG->wwwroot/question/export.php?courseid=$course->id", get_string('export', 'quiz'), get_string('exportquestions', 'quiz')); + + $tabs[] = $row; + + print_tabs($tabs, $currenttab, $inactive); + +?>