mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
Added a second row of tabs to the Edit tab: Questions, Categories, Import, Export, Settings
Added phpdoc header to some files Improved language string and help file for decimal digits on grades
This commit is contained in:
parent
4eedc50cbc
commit
c4adc2c493
7 changed files with 195 additions and 40 deletions
|
@ -1,4 +1,12 @@
|
|||
<?php // $Id$
|
||||
/**
|
||||
* Sets up the tabs used by the quiz pages for teachers.
|
||||
*
|
||||
* @version $Id$
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
|
||||
* @package quiz
|
||||
*/
|
||||
|
||||
/// This file to be included so we can assume config.php has already been included.
|
||||
|
||||
if (empty($quiz)) {
|
||||
|
@ -22,11 +30,10 @@
|
|||
|
||||
$row[] = new tabobject('info', "view.php?q=$quiz->id", get_string('info', 'quiz'));
|
||||
$row[] = new tabobject('reports', "report.php?q=$quiz->id", get_string('reports', 'quiz'));
|
||||
$row[] = new tabobject('preview', "attempt.php?q=$quiz->id", get_string('preview', 'quiz'));
|
||||
$row[] = new tabobject('preview', "attempt.php?q=$quiz->id", get_string('preview', 'quiz'), get_string('previewquiz', 'quiz', format_string($quiz->name)));
|
||||
if (isteacheredit($course->id)) {
|
||||
$row[] = new tabobject('edit', "edit.php?quizid=$quiz->id", get_string('editquiz', 'quiz'));
|
||||
$row[] = new tabobject('edit', "edit.php?quizid=$quiz->id", get_string('edit'), get_string('editquizquestions', 'quiz'));
|
||||
$row[] = new tabobject('manualgrading', "grading.php?quizid=$quiz->id", get_string("manualgrading", "quiz"));
|
||||
//$row[] = new tabobject('update', "$CFG->wwwroot/course/mod.php?update=$cm->id&sesskey=$USER->sesskey", get_string('updatethis', '', get_string('modulename', 'quiz')));
|
||||
}
|
||||
|
||||
$tabs[] = $row;
|
||||
|
@ -54,6 +61,21 @@
|
|||
$tabs[] = $row;
|
||||
}
|
||||
|
||||
if ($currenttab == 'edit' and isset($mode)) {
|
||||
$inactive[] = 'edit';
|
||||
|
||||
$row = array();
|
||||
$currenttab = $mode;
|
||||
|
||||
$row[] = new tabobject('editq', "edit.php?quizid=$quiz->id", get_string('questions', 'quiz'), get_string('editquizquestions', 'quiz'));
|
||||
$row[] = new tabobject('categories', "category.php?id=$course->id", get_string('categories', 'quiz'), get_string('editqcats', 'quiz'));
|
||||
$row[] = new tabobject('import', "import.php", get_string('import', 'quiz'), get_string('importquestions', 'quiz'));
|
||||
$row[] = new tabobject('export', "export.php?courseid=$course->id", get_string('export', 'quiz'), get_string('exportquestions', 'quiz'));
|
||||
$row[] = new tabobject('update', "$CFG->wwwroot/course/mod.php?update=$cm->id&sesskey=$USER->sesskey", get_string('settings'), get_string('updatesettings'));
|
||||
|
||||
$tabs[] = $row;
|
||||
}
|
||||
|
||||
print_tabs($tabs, $currenttab, $inactive);
|
||||
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue