Skip to content

Commit

Permalink
added "$question->usecase = 0;" for JMatch and JQuiz quizzes (other q…
Browse files Browse the repository at this point in the history
…uizzes already set this property)
  • Loading branch information
gbateson committed Sep 9, 2005
1 parent 98ee505 commit 856624f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions mod/quiz/format/hotpot/format.php
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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.