ILIAS
trunk Revision v11.0_alpha-1715-g7fc467680fb
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Public Member Functions | |
__construct (ilObjExercise $exercise, string $a_xml_data, int $obj_id=-1) | |
setHandlers ($a_xml_parser) | |
handlerBeginTag ($a_xml_parser, string $a_name, array $a_attribs) | |
handler for begin of element More... | |
handlerEndTag ($a_xml_parser, string $a_name) | |
handler for end of element More... | |
handlerCharacterData ($a_xml_parser, string $a_data) | |
handler for character data More... | |
start () | |
starts parsing an changes object by side effect. More... | |
getAssignment () | |
![]() | |
__construct (?string $path_to_file='', ?bool $throw_exception=false) | |
setXMLContent (string $a_xml_content) | |
getXMLContent () | |
getInputType () | |
startParsing () | |
stores xml data in array More... | |
createParser () | |
setHandlers ($a_xml_parser) | |
parse ($a_xml_parser, $a_fp=null) | |
Data Fields | |
ilObjExercise | $exercise |
int | $obj_id |
bool | $result |
int | $mode |
ilExAssignment | $assignment |
![]() | |
string | $xml_file |
bool | $throw_exception = false |
Static Public Attributes | |
static int | $CONTENT_NOT_COMPRESSED = 0 |
static int | $CONTENT_GZ_COMPRESSED = 1 |
static int | $CONTENT_ZLIB_COMPRESSED = 2 |
Protected Member Functions | |
trimAndStripAttribs (array $attribs) | |
trimAndStrip (string $input) | |
![]() | |
openXMLFile () | |
handleError (string $message) | |
setThrowException (bool $throw_exception) | |
Protected Attributes | |
string | $cdata |
string | $mark |
string | $notice |
string | $comment |
string | $file_content |
string | $file_name |
string | $status |
string | $file_action |
int | $usr_id |
string | $usr_action |
![]() | |
ilLanguage | $lng = null |
Private Member Functions | |
updateMember (int $user_id, string $action) | |
update member object according to given action More... | |
updateMarking (int $usr_id) | |
update marking of member More... | |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Exercise XML Parser which completes/updates a given exercise by an xml string.
Definition at line 23 of file class.ilExerciseXMLParser.php.
ilExerciseXMLParser::__construct | ( | ilObjExercise | $exercise, |
string | $a_xml_data, | ||
int | $obj_id = -1 |
||
) |
Definition at line 45 of file class.ilExerciseXMLParser.php.
References $exercise, $obj_id, ILIAS\GlobalScreen\Provider\__construct(), ilExAssignment\getAssignmentDataOfExercise(), ilObject\getId(), and ilSaxParser\setXMLContent().
ilExerciseXMLParser::getAssignment | ( | ) |
Definition at line 263 of file class.ilExerciseXMLParser.php.
References $assignment.
ilExerciseXMLParser::handlerBeginTag | ( | $a_xml_parser, | |
string | $a_name, | ||
array | $a_attribs | ||
) |
handler for begin of element
resource | $a_xml_parser | xml parser |
string | $a_name | element name |
array | $a_attribs | element attributes array |
ilExerciseException | when obj id != - 1 and if it it does not match the id in the xml |
Definition at line 85 of file class.ilExerciseXMLParser.php.
References $CONTENT_GZ_COMPRESSED, $CONTENT_NOT_COMPRESSED, $CONTENT_ZLIB_COMPRESSED, ilExerciseException\$ID_DEFLATE_METHOD_MISMATCH, ilExerciseException\$ID_MISMATCH, ilExerciseXMLWriter\$STATUS_NOT_GRADED, ilExerciseXMLWriter\$STATUS_PASSED, ilUtil\__extractId(), IL_INST_ID, ILIAS\Repository\int(), and trimAndStripAttribs().
Referenced by setHandlers().
ilExerciseXMLParser::handlerCharacterData | ( | $a_xml_parser, | |
string | $a_data | ||
) |
handler for character data
resource | $a_xml_parser | xml parser |
string | $a_data | character data |
Definition at line 194 of file class.ilExerciseXMLParser.php.
Referenced by setHandlers().
ilExerciseXMLParser::handlerEndTag | ( | $a_xml_parser, | |
string | $a_name | ||
) |
handler for end of element
resource | $a_xml_parser | xml parser |
string | $a_name | element name |
Definition at line 142 of file class.ilExerciseXMLParser.php.
References ILIAS\UI\examples\Symbol\Glyph\Comment\comment(), trimAndStrip(), updateMarking(), and updateMember().
Referenced by setHandlers().
ilExerciseXMLParser::setHandlers | ( | $a_xml_parser | ) |
Definition at line 71 of file class.ilExerciseXMLParser.php.
References handlerBeginTag(), handlerCharacterData(), and handlerEndTag().
ilExerciseXMLParser::start | ( | ) |
starts parsing an changes object by side effect.
ilExerciseException | when obj id != - 1 and if it it does not match the id in the xml |
Definition at line 228 of file class.ilExerciseXMLParser.php.
References ilSaxParser\startParsing().
|
protected |
Definition at line 277 of file class.ilExerciseXMLParser.php.
References ilUtil\stripSlashes().
Referenced by handlerEndTag(), and trimAndStripAttribs().
|
protected |
Definition at line 268 of file class.ilExerciseXMLParser.php.
References trimAndStrip().
Referenced by handlerBeginTag().
|
private |
update marking of member
int | $usr_id |
Definition at line 239 of file class.ilExerciseXMLParser.php.
References ILIAS\UI\examples\Symbol\Glyph\Comment\comment(), null, and ilUtil\stripSlashes().
Referenced by handlerEndTag().
|
private |
update member object according to given action
Definition at line 205 of file class.ilExerciseXMLParser.php.
Referenced by handlerEndTag().
ilExAssignment ilExerciseXMLParser::$assignment |
Definition at line 43 of file class.ilExerciseXMLParser.php.
Referenced by getAssignment().
|
protected |
Definition at line 28 of file class.ilExerciseXMLParser.php.
|
protected |
Definition at line 31 of file class.ilExerciseXMLParser.php.
|
static |
Definition at line 26 of file class.ilExerciseXMLParser.php.
Referenced by handlerBeginTag().
|
static |
Definition at line 25 of file class.ilExerciseXMLParser.php.
Referenced by handlerBeginTag().
|
static |
Definition at line 27 of file class.ilExerciseXMLParser.php.
Referenced by handlerBeginTag().
ilObjExercise ilExerciseXMLParser::$exercise |
Definition at line 39 of file class.ilExerciseXMLParser.php.
Referenced by __construct().
|
protected |
Definition at line 35 of file class.ilExerciseXMLParser.php.
|
protected |
Definition at line 32 of file class.ilExerciseXMLParser.php.
|
protected |
Definition at line 33 of file class.ilExerciseXMLParser.php.
|
protected |
Definition at line 29 of file class.ilExerciseXMLParser.php.
int ilExerciseXMLParser::$mode |
Definition at line 42 of file class.ilExerciseXMLParser.php.
|
protected |
Definition at line 30 of file class.ilExerciseXMLParser.php.
int ilExerciseXMLParser::$obj_id |
Definition at line 40 of file class.ilExerciseXMLParser.php.
Referenced by __construct().
bool ilExerciseXMLParser::$result |
Definition at line 41 of file class.ilExerciseXMLParser.php.
|
protected |
Definition at line 34 of file class.ilExerciseXMLParser.php.
|
protected |
Definition at line 37 of file class.ilExerciseXMLParser.php.
|
protected |
Definition at line 36 of file class.ilExerciseXMLParser.php.