ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
XML writer class. More...
Public Member Functions | |
__construct () | |
constructor More... | |
setExercise ($exercise) | |
set exercise object More... | |
setAttachFileContents ($attachFileContents) | |
set attachment content mode More... | |
start () | |
getXML () | |
__buildHeader () | |
__buildFooter () | |
setAttachMembers ($value) | |
write access to property attchMarkings More... | |
Public Member Functions inherited from ilXmlWriter | |
__construct ($version="1.0", $outEnc="utf-8", $inEnc="utf-8") | |
constructor More... | |
_ilXmlWriter () | |
destructor public More... | |
xmlSetDtdDef ($dtdDef) | |
Sets dtd definition. More... | |
xmlSetStSheet ($stSheet) | |
Sets stylesheet. More... | |
xmlSetGenCmt ($genCmt) | |
Sets generated comment. More... | |
xmlEncodeData ($data) | |
Encodes text from input encoding into output encoding. More... | |
xmlFormatData ($data) | |
Indents text for better reading. More... | |
xmlFormatElement ($array) | |
Callback function for xmlFormatData; do not invoke directly. More... | |
xmlHeader () | |
Writes xml header public. More... | |
xmlStartTag ($tag, $attrs=null, $empty=false, $encode=true, $escape=true) | |
Writes a starttag. More... | |
xmlEndTag ($tag) | |
Writes an endtag. More... | |
xmlComment ($comment) | |
Writes a comment. More... | |
xmlData ($data, $encode=true, $escape=true) | |
Writes data. More... | |
xmlElement ($tag, $attrs=null, $data=null, $encode=true, $escape=true) | |
Writes a basic element (no children, just textual content) More... | |
xmlDumpFile ($file, $format=true) | |
Dumps xml document from memory into a file. More... | |
xmlDumpMem ($format=true) | |
Returns xml document from memory. More... | |
appendXML ($a_str) | |
append xml string to document More... | |
xmlClear () | |
clears xmlStr public More... | |
Data Fields | |
$attachFileContents | |
$attachMembers | |
$exercise | |
Data Fields inherited from ilXmlWriter | |
$xmlStr | |
$version | |
$outEnc | |
$inEnc | |
$dtdDef = "" | |
$stSheet = "" | |
$genCmt = "Generated by ILIAS XmlWriter" | |
Static Public Attributes | |
static | $CONTENT_ATTACH_NO = 0 |
static | $CONTENT_ATTACH_ENCODED = 1 |
static | $CONTENT_ATTACH_ZLIB_ENCODED = 2 |
static | $CONTENT_ATTACH_GZIP_ENCODED = 3 |
static | $STATUS_NOT_GRADED = "NOT_GRADED" |
static | $STATUS_PASSED = "PASSED" |
static | $STATUS_FAILED = "FAILED" |
Private Member Functions | |
attachMarking ($user_id, $assignment_id) | |
attach marking tag to member for given assignment More... | |
handleAssignmentFiles ($ex_id, $as_id) | |
handleAssignmentMembers ($ex_id, $assignment_id) | |
create xml for files per assignment More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from ilXmlWriter | |
static | _xmlEscapeData ($data) |
Escapes reserved characters. More... | |
XML writer class.
Class to simplify manual writing of xml documents. It only supports writing xml sequentially, because the xml document is saved in a string with no additional structure information. The author is responsible for well-formedness and validity of the xml document.
Definition at line 21 of file class.ilExerciseXMLWriter.php.
ilExerciseXMLWriter::__construct | ( | ) |
constructor
string | xml version |
string | output encoding |
string | input encoding public |
Definition at line 59 of file class.ilExerciseXMLWriter.php.
References $CONTENT_ATTACH_NO.
ilExerciseXMLWriter::__buildFooter | ( | ) |
Definition at line 153 of file class.ilExerciseXMLWriter.php.
Referenced by start().
ilExerciseXMLWriter::__buildHeader | ( | ) |
Definition at line 144 of file class.ilExerciseXMLWriter.php.
References ilXmlWriter\xmlHeader(), ilXmlWriter\xmlSetDtdDef(), and ilXmlWriter\xmlSetGenCmt().
Referenced by start().
|
private |
attach marking tag to member for given assignment
int | $user_id | |
int | $assignment_id |
Definition at line 173 of file class.ilExerciseXMLWriter.php.
References $STATUS_FAILED, $STATUS_NOT_GRADED, $STATUS_PASSED, array, ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
Referenced by handleAssignmentMembers().
ilExerciseXMLWriter::getXML | ( | ) |
Definition at line 139 of file class.ilExerciseXMLWriter.php.
References ilXmlWriter\xmlDumpMem().
|
private |
Definition at line 198 of file class.ilExerciseXMLWriter.php.
References $CONTENT_ATTACH_GZIP_ENCODED, $CONTENT_ATTACH_ZLIB_ENCODED, $file, $filename, $files, array, ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
Referenced by start().
|
private |
create xml for files per assignment
integer | $ex_id | exercise id |
array | $assignments | assignment id |
Definition at line 237 of file class.ilExerciseXMLWriter.php.
References $name, ilExerciseMembers\_getMembers(), ilObjUser\_lookupName(), array, attachMarking(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
Referenced by start().
ilExerciseXMLWriter::setAttachFileContents | ( | $attachFileContents | ) |
set attachment content mode
int | $attachFileContents |
ilExerciseException | if mode is not supported |
Definition at line 84 of file class.ilExerciseXMLWriter.php.
References $attachFileContents, $CONTENT_ATTACH_GZIP_ENCODED, $CONTENT_ATTACH_ZLIB_ENCODED, and ilExerciseException\$ID_DEFLATE_METHOD_MISMATCH.
ilExerciseXMLWriter::setAttachMembers | ( | $value | ) |
write access to property attchMarkings
boolean | $value |
Definition at line 162 of file class.ilExerciseXMLWriter.php.
ilExerciseXMLWriter::setExercise | ( | $exercise | ) |
set exercise object
ilObjExercise | $exercise |
Definition at line 73 of file class.ilExerciseXMLWriter.php.
References $exercise.
ilExerciseXMLWriter::start | ( | ) |
Definition at line 96 of file class.ilExerciseXMLWriter.php.
References __buildFooter(), __buildHeader(), array, ilExAssignment\getAssignmentDataOfExercise(), handleAssignmentFiles(), handleAssignmentMembers(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
ilExerciseXMLWriter::$attachFileContents |
Definition at line 36 of file class.ilExerciseXMLWriter.php.
Referenced by setAttachFileContents().
ilExerciseXMLWriter::$attachMembers |
Definition at line 43 of file class.ilExerciseXMLWriter.php.
|
static |
Definition at line 24 of file class.ilExerciseXMLWriter.php.
|
static |
Definition at line 26 of file class.ilExerciseXMLWriter.php.
Referenced by handleAssignmentFiles(), and setAttachFileContents().
|
static |
Definition at line 23 of file class.ilExerciseXMLWriter.php.
Referenced by __construct().
|
static |
Definition at line 25 of file class.ilExerciseXMLWriter.php.
Referenced by handleAssignmentFiles(), and setAttachFileContents().
ilExerciseXMLWriter::$exercise |
Definition at line 50 of file class.ilExerciseXMLWriter.php.
Referenced by setExercise().
|
static |
Definition at line 30 of file class.ilExerciseXMLWriter.php.
Referenced by attachMarking().
|
static |
Definition at line 28 of file class.ilExerciseXMLWriter.php.
Referenced by attachMarking(), and ilExerciseXMLParser\handlerBeginTag().
|
static |
Definition at line 29 of file class.ilExerciseXMLWriter.php.
Referenced by attachMarking(), and ilExerciseXMLParser\handlerBeginTag().