57 if (count($assignments) > 0) {
61 $this->assignment->setExerciseId($exercise->
getId());
62 $this->assignment->save();
67 $this->result =
false;
85 public function handlerBeginTag($a_xml_parser,
string $a_name, array $a_attribs): void
90 if (isset($a_attribs[
"obj_id"])) {
92 if ($this->obj_id != -1 && (
int) $read_obj_id != -1 && $this->obj_id !== (
int) $read_obj_id) {
98 $this->usr_action = $a_attribs[
"action"];
103 $this->file_action = $a_attribs[
"action"];
107 if ($a_attribs[
"mode"] ==
"GZIP") {
108 if (!function_exists(
"gzdecode")) {
113 } elseif ($a_attribs[
"mode"] ==
"ZLIB") {
114 if (!function_exists(
"gzuncompress")) {
122 $this->status = $a_attribs[
"status"];
124 $this->status =
"notgraded";
126 $this->status =
"passed";
128 $this->status =
"failed";
146 $this->result =
true;
149 $this->exercise->setTitle($this->
trimAndStrip((
string) $this->cdata));
150 $this->assignment->setTitle($this->
trimAndStrip((
string) $this->cdata));
153 $this->exercise->setDescription($this->
trimAndStrip((
string) $this->cdata));
156 $this->assignment->setInstruction($this->
trimAndStrip((
string) $this->cdata));
159 $this->assignment->setDeadLine($this->
trimAndStrip((
string) $this->cdata));
167 $this->file_name = $this->
trimAndStrip((
string) $this->cdata);
170 $this->file_content = $this->
trimAndStrip((
string) $this->cdata);
176 $this->notice = $this->
trimAndStrip((
string) $this->cdata);
179 $this->mark = $this->
trimAndStrip((
string) $this->cdata);
196 if ($a_data !=
"\n") {
197 $this->cdata .= $a_data;
207 if (!is_int($user_id) || $user_id <= 0) {
212 if ($action ==
"Attach" && !$memberObject->isAssigned($user_id)) {
213 $memberObject->assignMember($user_id);
216 if ($action ==
"Detach" && $memberObject->isAssigned($user_id)) {
217 $memberObject->deassignMember($user_id);
231 return $this->result > 0;
241 $member_status = $this->assignment->getMemberStatus($usr_id);
242 if (isset($this->mark)) {
248 if (isset($this->status)) {
251 if (isset($this->notice)) {
254 $member_status->update();
258 $this->status =
null;
259 $this->notice =
null;
271 foreach ($attribs as $k => $v) {
__construct(ilObjExercise $exercise, string $a_xml_data, int $obj_id=-1)
static string $STATUS_NOT_GRADED
startParsing()
stores xml data in array
handlerEndTag($a_xml_parser, string $a_name)
handler for end of element
static int $CONTENT_GZ_COMPRESSED
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static int $ID_DEFLATE_METHOD_MISMATCH
trimAndStrip(string $input)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
handlerBeginTag($a_xml_parser, string $a_name, array $a_attribs)
handler for begin of element
static getAssignmentDataOfExercise(int $a_exc_id)
handlerCharacterData($a_xml_parser, string $a_data)
handler for character data
updateMember(int $user_id, string $action)
update member object according to given action
static string $STATUS_PASSED
setHandlers($a_xml_parser)
static int $CONTENT_NOT_COMPRESSED
static __extractId(string $ilias_id, int $inst_id)
extract ref id from role title, e.g.
trimAndStripAttribs(array $attribs)
__construct(Container $dic, ilPlugin $plugin)
ilExAssignment $assignment
static int $CONTENT_ZLIB_COMPRESSED
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
updateMarking(int $usr_id)
update marking of member
start()
starts parsing an changes object by side effect.
setXMLContent(string $a_xml_content)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...