It is now possible to base new questions on existing ones, see get_string('editingquestion', 'quiz');
This commit is contained in:
@@ -53,6 +53,8 @@ $string['choices'] = 'Available choices';
|
||||
$string['choosedatasetproperties'] = 'Choose dataset properties';
|
||||
$string['close'] = 'Close preview';
|
||||
$string['confirmstartattempt'] = 'The Quiz has a time limit. Are you sure that you wish to start?';
|
||||
$string['copyingfrom'] = 'Creating a copy of the question \'$a\'';
|
||||
$string['copyingquestion'] = 'Copying a question';
|
||||
$string['correctanswer'] = 'Correct answer';
|
||||
$string['correctanswerformula'] = 'Correct Answer Formula';
|
||||
$string['correctanswerlength'] = 'Significant Figures';
|
||||
|
||||
@@ -1197,6 +1197,7 @@ function quiz_print_cat_question_list($categoryid, $quizselected=true, $recurse=
|
||||
$strquestionname = get_string("questionname", "quiz");
|
||||
$strdelete = get_string("delete");
|
||||
$stredit = get_string("edit");
|
||||
$strcopy = get_string("copy");
|
||||
$straddselectedtoquiz = get_string("addselectedtoquiz", "quiz");
|
||||
$strtype = get_string("type", "quiz");
|
||||
$strcreatemultiple = get_string("createmultiple", "quiz");
|
||||
@@ -1296,7 +1297,9 @@ function quiz_print_cat_question_list($categoryid, $quizselected=true, $recurse=
|
||||
echo "<a title=\"$strpreview\" href=\"#\" onClick=\"openpopup('/mod/quiz/preview.php?id=$question->id','$strpreview','scrollbars=yes,resizable=yes,width=700,height=480', false)\"><img
|
||||
src=\"../../pix/t/preview.gif\" border=\"0\" alt=\"$strpreview\" /></a> ";
|
||||
echo "<a title=\"$stredit\" href=\"question.php?id=$question->id\"><img
|
||||
src=\"../../pix/t/edit.gif\" border=\"0\" alt=\"$stredit\" /></a>";
|
||||
src=\"../../pix/t/edit.gif\" border=\"0\" alt=\"$stredit\" /></a> ";
|
||||
echo "<a title=\"$strcopy\" href=\"question.php?id=$question->id&copy=true\"><img
|
||||
src=\"../../pix/t/copy.gif\" border=\"0\" alt=\"$strcopy\" /></a>";
|
||||
echo "</td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
+11
-2
@@ -9,6 +9,8 @@
|
||||
|
||||
optional_variable($qtype);
|
||||
optional_variable($category);
|
||||
|
||||
optional_variable($copy, false); // true if a copy of the question should be created
|
||||
|
||||
if ($id) {
|
||||
if (! $question = get_record("quiz_questions", "id", $id)) {
|
||||
@@ -55,7 +57,7 @@
|
||||
}
|
||||
|
||||
$strquizzes = get_string('modulenameplural', 'quiz');
|
||||
$streditingquestion = get_string('editingquestion', 'quiz');
|
||||
$streditingquestion = ($copy) ? get_string('copyingquestion', 'quiz') : get_string('editingquestion', 'quiz');
|
||||
if (isset($SESSION->modform->instance)) {
|
||||
$strediting = '<a href="edit.php">'.get_string('editingquiz', 'quiz').'</a> -> '.
|
||||
$streditingquestion;
|
||||
@@ -64,7 +66,7 @@
|
||||
get_string("editquestions", "quiz").'</a> -> '.$streditingquestion;
|
||||
}
|
||||
|
||||
print_header_simple("$streditingquestion", "$streditingquestion",
|
||||
print_header_simple("$streditingquestion", "",
|
||||
"<a href=\"$CFG->wwwroot/mod/quiz/index.php?id=$course->id\">$strquizzes</a>".
|
||||
" -> ".$strediting);
|
||||
|
||||
@@ -177,6 +179,13 @@
|
||||
} else {
|
||||
$defaultformat = FORMAT_MOODLE;
|
||||
}
|
||||
|
||||
if ($copy) {
|
||||
print_heading(get_string('copyingfrom', 'quiz', $question->name));
|
||||
// clear question id so that the data is saved to a new question
|
||||
$question->id = '';
|
||||
$question->name .= '_copy';
|
||||
}
|
||||
|
||||
require('questiontypes/'.$QUIZ_QTYPES[$qtype]->name().'/editquestion.php');
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 869 B |
Reference in New Issue
Block a user