ILIAS  Release_4_4_x_branch Revision 61816
 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

Protected Member Functions

 addQtiMetaDataField (ilXmlWriter $a_xml_writer, $fieldLabel, $fieldValue)
 adds a qti meta data field with given name and value to the passed xml writer (xml writer must be in context of opened "qtimetadata" tag)
 addAdditionalContentEditingModeInformation (ilXmlWriter $a_xml_writer)
 adds a qti meta data field for ilias specific information of "additional content editing mode" (xml writer must be in context of opened "qtimetadata" tag)
 addGeneralMetadata (ilXmlWriter $xmlwriter)

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:
class.assQuestionExport.php 44245 2013-08-17 11:15:45Z mbecker

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

Member Function Documentation

assQuestionExport::addAdditionalContentEditingModeInformation ( ilXmlWriter  $a_xml_writer)
finalprotected

adds a qti meta data field for ilias specific information of "additional content editing mode" (xml writer must be in context of opened "qtimetadata" tag)

protected

Parameters
ilXmlWriter$a_xml_writer

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

References addQtiMetaDataField().

Referenced by assErrorTextExport\toXML(), assFlashQuestionExport\toXML(), assOrderingHorizontalExport\toXML(), assFileUploadExport\toXML(), assOrderingQuestionExport\toXML(), assFormulaQuestionExport\toXML(), assNumericExport\toXML(), assMultipleChoiceExport\toXML(), assMatchingQuestionExport\toXML(), assJavaAppletExport\toXML(), assImagemapQuestionExport\toXML(), assTextSubsetExport\toXML(), assClozeTestExport\toXML(), assSingleChoiceExport\toXML(), and assTextQuestionExport\toXML().

{
$a_xml_writer, 'additional_cont_edit_mode', $this->object->getAdditionalContentEditingMode()
);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

assQuestionExport::addQtiMetaDataField ( ilXmlWriter  $a_xml_writer,
  $fieldLabel,
  $fieldValue 
)
finalprotected

adds a qti meta data field with given name and value to the passed xml writer (xml writer must be in context of opened "qtimetadata" tag)

protected

Parameters
ilXmlWriter$a_xml_writer
string$fieldLabel
string$fieldValue

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

References ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

Referenced by addAdditionalContentEditingModeInformation(), and addGeneralMetadata().

{
$a_xml_writer->xmlStartTag("qtimetadatafield");
$a_xml_writer->xmlElement("fieldlabel", NULL, $fieldLabel);
$a_xml_writer->xmlElement("fieldentry", NULL, $fieldValue);
$a_xml_writer->xmlEndTag("qtimetadatafield");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

assQuestionExport::assQuestionExport ( $a_object)

assQuestionExport constructor

Parameters
object$a_objectThe question object public

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

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

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

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

{
$feedback_allcorrect = $this->object->feedbackOBJ->getGenericFeedbackExportPresentation(
$this->object->getId(), true
);
$feedback_onenotcorrect = $this->object->feedbackOBJ->getGenericFeedbackExportPresentation(
$this->object->getId(), false
);
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, assFormulaQuestionExport, assImagemapQuestionExport, assJavaAppletExport, assMatchingQuestionExport, assMultipleChoiceExport, assNumericExport, assOrderingQuestionExport, assSingleChoiceExport, assTextQuestionExport, assTextSubsetExport, assFileUploadExport, assFlashQuestionExport, assOrderingHorizontalExport, and assErrorTextExport.

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

{
}

Field Documentation

assQuestionExport::$object

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


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