[svn r13253] Added silent ignorance of free answers as they are not supported by IMS/QTI apparently

skala
Yannick Warnier 19 years ago
parent 0bc43e95db
commit 389137687b
  1. 24
      main/exercice/export/qti2/qti2_classes.php
  2. 8
      main/exercice/export/qti2/qti2_export.php

@ -57,6 +57,9 @@ class Ims2Question extends Question
case MATCHING :
$answer = new ImsAnswerMatching($this->id);
return $answer;
case FREE_ANSWER :
$answer = new ImsAnswerFree($this->id);
return $answer;
case HOTSPOT :
$answer = new ImsAnswerHotspot($this->id);
return $answer;
@ -437,5 +440,24 @@ class ImsAnswerHotspot extends Answer
return $out;
}
}
}
class ImsAnswerFree extends Answer
{
/**
* TODO implement
* Export the question part as a matrix-choice, with only one possible answer per line.
*/
function imsExportResponses($questionIdent, $questionStatment, $questionDesc='', $questionMedia='')
{
return '';
}
/**
*
*/
function imsExportResponsesDeclaration($questionIdent)
{
return '';
}
}
?>

@ -131,12 +131,11 @@ class ImsAssessmentItem
{
$head = '<?xml version="1.0" encoding="'.$charset.'" standalone="no"?>' . "\n";
}
$res = $head
. $this->start_item()
.$this->answer->imsExportResponsesDeclaration($this->questionIdent)
. $this->start_item_body()
. $this->answer->imsExportResponses($this->questionIdent, $this->question->question, $this->question->description, $this->question->picture)
. $this->answer->imsExportResponses($this->questionIdent, $this->question->question, $this->question->description, $this->question->picture)
. $this->end_item_body()
. $this->add_response_processing()
. $this->end_item()
@ -466,6 +465,11 @@ function export_question($questionId, $standalone=true)
}
$question->id = $qst->id;
$question->type = $qst->type;
$question->question = $qst->question;
$question->description = $qst->description;
$question->weighting=$qst->weighting;
$question->position=$qst->position;
$question->picture=$qst->picture;
$ims = new ImsAssessmentItem($question);
return $ims->export($standalone);

Loading…
Cancel
Save