ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
assQuestionExport Class Reference

Class for question exports. More...

+ Inheritance diagram for assQuestionExport:
+ Collaboration diagram for assQuestionExport:

Public Member Functions

 assQuestionExport (&$a_object)
 assQuestionExport constructor
 exportFeedbackOnly ($a_xml_writer)
 toXML ($a_include_header=true, $a_include_binary=true, $a_shuffle=false, $test_output=false, $force_image_references=false)
 Returns a QTI xml representation of the question.

Data Fields

 $object

Detailed Description

Class for question exports.

exportQuestion is a basis class question exports

Author
Helmut Schottmüller helmu.nosp@m.t.sc.nosp@m.hottm.nosp@m.uell.nosp@m.er@ma.nosp@m.c.co.nosp@m.m
Version
$Id$

Definition at line 34 of file class.assQuestionExport.php.

Member Function Documentation

assQuestionExport::assQuestionExport ( $a_object)

assQuestionExport constructor

Parameters
object$a_objectThe question object public

Definition at line 51 of file class.assQuestionExport.php.

{
$this->object =& $a_object;
}
assQuestionExport::exportFeedbackOnly (   $a_xml_writer)

Definition at line 56 of file class.assQuestionExport.php.

Referenced by assFileUploadExport\toXML(), and assFlashQuestionExport\toXML().

{
$feedback_allcorrect = $this->object->getFeedbackGeneric(1);
$feedback_onenotcorrect = $this->object->getFeedbackGeneric(0);
if (strlen($feedback_allcorrect . $feedback_onenotcorrect))
{
$a_xml_writer->xmlStartTag("resprocessing");
$a_xml_writer->xmlStartTag("outcomes");
$a_xml_writer->xmlStartTag("decvar");
$a_xml_writer->xmlEndTag("decvar");
$a_xml_writer->xmlEndTag("outcomes");
if (strlen($feedback_allcorrect))
{
$attrs = array(
"continue" => "Yes"
);
$a_xml_writer->xmlStartTag("respcondition", $attrs);
// qti conditionvar
$a_xml_writer->xmlStartTag("conditionvar");
$attrs = array(
"respident" => "points"
);
$a_xml_writer->xmlElement("varequal", $attrs, $this->object->getPoints());
$a_xml_writer->xmlEndTag("conditionvar");
// qti displayfeedback
$attrs = array(
"feedbacktype" => "Response",
"linkrefid" => "response_allcorrect"
);
$a_xml_writer->xmlElement("displayfeedback", $attrs);
$a_xml_writer->xmlEndTag("respcondition");
}
if (strlen($feedback_onenotcorrect))
{
$attrs = array(
"continue" => "Yes"
);
$a_xml_writer->xmlStartTag("respcondition", $attrs);
// qti conditionvar
$a_xml_writer->xmlStartTag("conditionvar");
$a_xml_writer->xmlStartTag("not");
$attrs = array(
"respident" => "points"
);
$a_xml_writer->xmlElement("varequal", $attrs, $this->object->getPoints());
$a_xml_writer->xmlEndTag("not");
$a_xml_writer->xmlEndTag("conditionvar");
// qti displayfeedback
$attrs = array(
"feedbacktype" => "Response",
"linkrefid" => "response_onenotcorrect"
);
$a_xml_writer->xmlElement("displayfeedback", $attrs);
$a_xml_writer->xmlEndTag("respcondition");
}
$a_xml_writer->xmlEndTag("resprocessing");
}
if (strlen($feedback_allcorrect))
{
$attrs = array(
"ident" => "response_allcorrect",
"view" => "All"
);
$a_xml_writer->xmlStartTag("itemfeedback", $attrs);
// qti flow_mat
$a_xml_writer->xmlStartTag("flow_mat");
$this->object->addQTIMaterial($a_xml_writer, $feedback_allcorrect);
$a_xml_writer->xmlEndTag("flow_mat");
$a_xml_writer->xmlEndTag("itemfeedback");
}
if (strlen($feedback_onenotcorrect))
{
$attrs = array(
"ident" => "response_onenotcorrect",
"view" => "All"
);
$a_xml_writer->xmlStartTag("itemfeedback", $attrs);
// qti flow_mat
$a_xml_writer->xmlStartTag("flow_mat");
$this->object->addQTIMaterial($a_xml_writer, $feedback_onenotcorrect);
$a_xml_writer->xmlEndTag("flow_mat");
$a_xml_writer->xmlEndTag("itemfeedback");
}
}

+ Here is the caller graph for this function:

assQuestionExport::toXML (   $a_include_header = true,
  $a_include_binary = true,
  $a_shuffle = false,
  $test_output = false,
  $force_image_references = false 
)

Returns a QTI xml representation of the question.

Returns a QTI xml representation of the question and sets the internal domxml variable with the DOM XML representation of the QTI xml representation

Returns
string The QTI xml representation of the question public

Reimplemented in assClozeTestExport, assImagemapQuestionExport, assJavaAppletExport, assMatchingQuestionExport, assMultipleChoiceExport, assNumericExport, assOrderingQuestionExport, assSingleChoiceExport, assTextQuestionExport, assTextSubsetExport, assFileUploadExport, assFlashQuestionExport, assOrderingHorizontalExport, and assErrorTextExport.

Definition at line 153 of file class.assQuestionExport.php.

{
}

Field Documentation

assQuestionExport::$object

Definition at line 43 of file class.assQuestionExport.php.


The documentation for this class was generated from the following file: