mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
HotPot module: differentiate between "guesses-correct" (JCloze) and "guess-correct" (JCross, JMatch, JMix, JQuiz) in HotPot xml files and fix PreloadImages function for multiple images
This commit is contained in:
parent
37828f7ee9
commit
8b32c9da25
1 changed files with 13 additions and 3 deletions
|
@ -227,7 +227,7 @@ class hotpot_xml_quiz_template extends hotpot_xml_template_default {
|
|||
}
|
||||
|
||||
// convert to comma delimited string
|
||||
$this->PreloadImageList = empty($list) ? '' : "'".implode(',', $list)."'";
|
||||
$this->PreloadImageList = empty($list) ? '' : "'".implode("','", $list)."'";
|
||||
}
|
||||
return $this->PreloadImageList;
|
||||
}
|
||||
|
@ -1064,10 +1064,20 @@ class hotpot_xml_quiz_template extends hotpot_xml_template_default {
|
|||
}
|
||||
}
|
||||
function v6_expand_Correct() {
|
||||
return $this->js_value('hotpot-config-file,'.$this->parent->quiztype.',guesses-correct');
|
||||
if ($this->parent->quiztype=='jcloze') {
|
||||
$tag = 'guesses-correct';
|
||||
} else {
|
||||
$tag = 'guess-correct';
|
||||
}
|
||||
return $this->js_value('hotpot-config-file,'.$this->parent->quiztype.','.$tag);
|
||||
}
|
||||
function v6_expand_Incorrect() {
|
||||
return $this->js_value('hotpot-config-file,'.$this->parent->quiztype.',guesses-incorrect');
|
||||
if ($this->parent->quiztype=='jcloze') {
|
||||
$tag = 'guesses-incorrect';
|
||||
} else {
|
||||
$tag = 'guess-incorrect';
|
||||
}
|
||||
return $this->js_value('hotpot-config-file,'.$this->parent->quiztype.','.$tag);
|
||||
}
|
||||
function v6_expand_GiveHint() {
|
||||
return $this->js_value('hotpot-config-file,'.$this->parent->quiztype.',next-correct-letter');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue