mirror of
https://github.com/moodle/moodle.git
synced 2025-02-21 01:48:45 +01:00
Merged changes from 1.5
This commit is contained in:
parent
cdf4e40668
commit
e8d2c01660
@ -7,18 +7,22 @@
|
||||
}
|
||||
}
|
||||
if (empty($subquestions) and empty($subanswers)) {
|
||||
for ($i=0 ; $i < QUIZ_MAX_NUMBER_ANSWERS ; $i++) {
|
||||
$subquestions = array();
|
||||
$subanswers = array();
|
||||
if (!empty($oldsubquestions)) {
|
||||
foreach ($oldsubquestions as $oldsubquestion) {
|
||||
$subquestions[] = $oldsubquestion->questiontext; // insert questions into slots
|
||||
$subanswers[] = $oldsubquestion->answertext; // insert answers into slots
|
||||
}
|
||||
}
|
||||
|
||||
$i = count($subquestions);
|
||||
$limit = QUIZ_MAX_NUMBER_ANSWERS;
|
||||
$limit = $limit <= $i ? $i+1 : $limit;
|
||||
for (; $i < $limit; $i++) {
|
||||
$subquestions[] = ""; // Make question slots, default as blank
|
||||
$subanswers[] = ""; // Make answer slots, default as blank
|
||||
}
|
||||
if (!empty($oldsubquestions)) {
|
||||
$i=0;
|
||||
foreach ($oldsubquestions as $oldsubquestion) {
|
||||
$subquestions[$i] = $oldsubquestion->questiontext; // insert questions into slots
|
||||
$subanswers[$i] = $oldsubquestion->answertext; // insert answers into slots
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
print_heading_with_help(get_string("editingmatch", "quiz"), "match", "quiz");
|
||||
require("$CFG->dirroot/mod/quiz/questiontypes/match/match.html");
|
||||
|
Loading…
x
Reference in New Issue
Block a user