function questionbank_navigation_tabs in Quiz 6.6
Same name and namespace in other branches
- 6.5 includes/moodle/lib/questionlib.php \questionbank_navigation_tabs()
Parameters
array $row tab objects:
question_edit_contexts $contexts object representing contexts available from this context:
string $querystring to append to urls:
File
- includes/
moodle/ lib/ questionlib.php, line 739
Code
function questionbank_navigation_tabs(&$row, $contexts, $querystring) {
global $CFG, $QUESTION_EDITTABCAPS;
$tabs = array(
'questions' => array(
"{$CFG->wwwroot}/question/edit.php?{$querystring}",
get_string('questions', 'quiz'),
get_string('editquestions', 'quiz'),
),
'categories' => array(
"{$CFG->wwwroot}/question/category.php?{$querystring}",
get_string('categories', 'quiz'),
get_string('editqcats', 'quiz'),
),
'import' => array(
"{$CFG->wwwroot}/question/import.php?{$querystring}",
get_string('import', 'quiz'),
get_string('importquestions', 'quiz'),
),
'export' => array(
"{$CFG->wwwroot}/question/export.php?{$querystring}",
get_string('export', 'quiz'),
get_string('exportquestions', 'quiz'),
),
);
foreach ($tabs as $tabname => $tabparams) {
if ($contexts
->have_one_edit_tab_cap($tabname)) {
$row[] = new tabobject($tabname, $tabparams[0], $tabparams[1], $tabparams[2]);
}
}
}