removing redundant string fetches
This commit is contained in:
+4
-6
@@ -32,7 +32,7 @@ if (has_capability('mod/quiz:view', $context)) {
|
||||
$row[] = new tabobject('info', "$CFG->wwwroot/mod/quiz/view.php?q=$quiz->id", get_string('info', 'quiz'));
|
||||
}
|
||||
if (has_capability('mod/quiz:viewreports', $context)) {
|
||||
$row[] = new tabobject('reports', "$CFG->wwwroot/mod/quiz/report.php?q=$quiz->id", get_string('results', 'quiz'));
|
||||
$row[] = new tabobject('reports', "$CFG->wwwroot/mod/quiz/report.php?q=$quiz->id", get_string('results', 'quiz'));
|
||||
}
|
||||
if (has_capability('mod/quiz:preview', $context)) {
|
||||
$row[] = new tabobject('preview', "$CFG->wwwroot/mod/quiz/attempt.php?q=$quiz->id", get_string('preview', 'quiz'));
|
||||
@@ -50,7 +50,7 @@ if ($currenttab == 'info' && count($row) == 1) {
|
||||
if ($currenttab == 'reports' and isset($mode)) {
|
||||
$inactive[] = 'reports';
|
||||
$activated[] = 'reports';
|
||||
|
||||
|
||||
$allreports = get_list_of_plugins("mod/quiz/report");
|
||||
$reportlist = array ('overview', 'regrade', 'grading', 'analysis'); // Standard reports we want to show first
|
||||
|
||||
@@ -79,17 +79,15 @@ if ($currenttab == 'edit' and isset($mode)) {
|
||||
$row = array();
|
||||
$currenttab = $mode;
|
||||
|
||||
$strquizzes = get_string('modulenameplural', 'quiz');
|
||||
$strquiz = get_string('modulename', 'quiz');
|
||||
$streditingquiz = get_string("editinga", "moodle", $strquiz);
|
||||
$strupdate = get_string('updatethis', 'moodle', $strquiz);
|
||||
|
||||
|
||||
if ($contexts->have_one_edit_tab_cap('editq')) {
|
||||
$row[] = new tabobject('editq', "$CFG->wwwroot/mod/quiz/edit.php?".$thispageurl->get_query_string(), $strquiz, $streditingquiz);
|
||||
}
|
||||
questionbank_navigation_tabs($row, $contexts, $thispageurl->get_query_string());
|
||||
$tabs[] = $row;
|
||||
|
||||
|
||||
}
|
||||
|
||||
print_tabs($tabs, $currenttab, $inactive, $activated);
|
||||
|
||||
Reference in New Issue
Block a user