Fixing wrong HOTSPOT constant see #5286

skala
Julio Montoya 13 years ago
parent 83033700a5
commit baf31f0102
  1. 2
      main/exercice/export/qti2/qti2_classes.php
  2. 4
      main/exercice/export/scorm/scorm_classes.php
  3. 2
      main/exercice/question.class.php
  4. 11
      tests/main/exercice/export/qti2/qti2_classes.test.php
  5. 17
      tests/main/exercice/export/scorm/scorm_classes.test.php

@ -62,7 +62,7 @@ class Ims2Question extends Question
case FREE_ANSWER :
$answer = new ImsAnswerFree($this->id);
return $answer;
case HOTSPOT :
case HOT_SPOT :
$answer = new ImsAnswerHotspot($this->id);
return $answer;
default :

@ -67,7 +67,7 @@ class ScormQuestion extends Question
$this->answer = new ScormAnswerFree($this->id);
$this->answer->questionJSId = $this->js_id;
break;
case HOTSPOT:
case HOT_SPOT:
$this->answer = new ScormAnswerHotspot($this->id);
$this->answer->questionJSId = $this->js_id;
break;
@ -142,7 +142,7 @@ class ScormQuestion extends Question
//$id = $this->id;
$w = $this->selectWeighting();
$s = 'questions.push('.$this->js_id.');'."\n";
if($this->type == FREE_ANSWER or $this->type == HOTSPOT)
if($this->type == FREE_ANSWER or $this->type == HOT_SPOT)
{ //put the max score to 0 to avoid discounting the points of
//non-exported quiz types in the SCORM
$w=0;

@ -13,7 +13,7 @@
if(!class_exists('Question')):
// Answer types
// Question types
define('UNIQUE_ANSWER', 1);
define('MULTIPLE_ANSWER', 2);
define('FILL_IN_BLANKS', 3);

@ -1,6 +1,7 @@
<?php
require_once(api_get_path(SYS_CODE_PATH).'/exercice/answer.class.php');
require_once(api_get_path(SYS_CODE_PATH).'/exercice/question.class.php');
require_once(api_get_path(SYS_CODE_PATH).'/exercice/exercise.class.php');
require_once(api_get_path(SYS_CODE_PATH).'/exercice/hotspot.class.php');
require_once(api_get_path(SYS_CODE_PATH).'/exercice/unique_answer.class.php');
@ -8,16 +9,6 @@ require_once(api_get_path(SYS_CODE_PATH).'/exercice/multiple_answer.class.php');
require_once(api_get_path(SYS_CODE_PATH).'/exercice/matching.class.php');
require_once(api_get_path(SYS_CODE_PATH).'/exercice/freeanswer.class.php');
require_once(api_get_path(SYS_CODE_PATH).'/exercice/fill_blanks.class.php');
define('UNIQUE_ANSWER', 1);
define('MCUA', 1);
define('TF', 1);
define('MULTIPLE_ANSWER', 2);
define('MCMA', 2);
define('FILL_IN_BLANKS', 3);
define('FIB', 3);
define('MATCHING', 4);
define('FREE_ANSWER', 5);
define('HOTSPOT', 6);
class TestQti2 extends UnitTestCase {

@ -1,7 +1,7 @@
<?php
require_once(api_get_path(SYS_CODE_PATH).'exercice/exercise.class.php');
require_once(api_get_path(SYS_CODE_PATH).'exercice/question.class.php');
require_once(api_get_path(SYS_CODE_PATH).'exercice/exercise.class.php');
require_once(api_get_path(SYS_CODE_PATH).'exercice/unique_answer.class.php');
require_once(api_get_path(SYS_CODE_PATH).'exercice/multiple_answer.class.php');
require_once(api_get_path(SYS_CODE_PATH).'exercice/multiple_answer_combination.class.php');
@ -11,21 +11,6 @@ require_once(api_get_path(SYS_CODE_PATH).'exercice/hotspot.class.php');
require_once(api_get_path(SYS_CODE_PATH).'exercice/matching.class.php');
require_once(api_get_path(SYS_CODE_PATH).'exercice/hotspot.class.php');
// answer types
define('UNIQUE_ANSWER', 1);
define('MCUA', 1);
define('TF', 1);
define('MULTIPLE_ANSWER', 2);
define('MCMA', 2);
define('FILL_IN_BLANKS', 3);
define('FIB', 3);
define('MATCHING', 4);
define('FREE_ANSWER', 5);
define('HOTSPOT', 6);
define('HOT_SPOT_ORDER', 7);
define('HOT_SPOT_DELINEATION', 8);
define('MULTIPLE_ANSWER_COMBINATION', 9);
class TestScormClasses extends UnitTestCase {
public $sScormAnswerFillInBlanks;

Loading…
Cancel
Save