Permalink
Browse files

added "$question->usecase = 0;" for JMatch and JQuiz quizzes (other q…

…uizzes already set this property)
  • Loading branch information...
1 parent 98ee505 commit 856624f9774fb28d8f10667bae351275f2a4a786 gbateson committed Sep 9, 2005
Showing with 13 additions and 0 deletions.
  1. +13 −0 mod/quiz/format/hotpot/format.php
@@ -146,6 +146,7 @@ function process_jmatch(&$xml, &$questions) {
$question->qtype = MATCH;
$question->defaultgrade = 1;
+ $question->usecase = 0; // Ignore case
$question->image = ""; // No images with this format
$question->name = get_hotpotatoes_title($xml, $x);
@@ -216,6 +217,7 @@ function process_jquiz(&$xml, &$questions) {
$question = NULL;
$question->defaultgrade = 1;
+ $question->usecase = 0; // Ignore case
$question->image = ""; // No images with this format
$question->name = get_hotpotatoes_title($xml, $q, true);
@@ -300,4 +302,15 @@ function get_hotpotatoes_reading(&$xml) {
return addslashes($str);
}
+// allow importing in Moodle v1.4 (and less)
+// same core functions but different class name
+if (!class_exists("quiz_file_format")) {
+ class quiz_file_format extends quiz_default_format {
+ function readquestions ($lines) {
+ $format = new quiz_format_hotpot();
+ return $format->readquestions($lines);
+ }
+ }
+}
+
?>

0 comments on commit 856624f

Please sign in to comment.