75 $attribs = array(
"obj_id" =>
"il_" .
IL_INST_ID .
"_exc_" . $this->exercise->getId() );
77 if ($this->exercise->getOwner() !== 0) {
78 $attribs [
"owner"] =
"il_" .
IL_INST_ID .
"_usr_" . $this->exercise->getOwner();
84 $this->
xmlElement(
"Title",
null, $this->exercise->getTitle());
85 $this->
xmlElement(
"Description",
null, $this->exercise->getDescription());
93 if (count($assignments) > 0) {
94 foreach ($assignments as $assignment) {
96 $this->
xmlElement(
"Instruction",
null, $assignment [
"instruction"]);
97 $this->
xmlElement(
"DueDate",
null, $assignment [
"deadline"]);
100 if ($this->attachMembers) {
121 $this->
xmlSetDtdDef(
"<!DOCTYPE Exercise PUBLIC \"-//ILIAS//DTD ExerciseAdministration//EN\" \"" . ILIAS_HTTP_PATH .
"/xml/ilias_exercise_4_4.dtd\">");
137 $this->attachMembers = $value;
150 $astatus = $ass->getMemberStatus($user_id)->getStatus();
151 $acomment = $ass->getMemberStatus($user_id)->getComment();
152 $anotice = $ass->getMemberStatus($user_id)->getNotice();
155 if ($astatus ==
"notgraded") {
157 } elseif ($astatus ==
"failed") {
163 $this->
xmlStartTag(
"Marking", array(
"status" => $status ));
166 $this->
xmlElement(
"Comment",
null, $acomment);
174 $this->xmlStartTag(
"Files");
176 $files = $storage->getFiles();
179 foreach ($files as $file) {
180 $this->xmlStartTag(
"File", array(
"size" => $file [
"size"] ));
181 $this->xmlElement(
"Filename",
null, $file [
"name"]);
182 if ($this->attachFileContents) {
186 $attribs = array(
"mode" =>
"PLAIN" );
188 $attribs = array(
"mode" =>
"ZLIB" );
189 $content = gzcompress($content, 9);
191 $attribs = array(
"mode" =>
"GZIP" );
192 $content = gzencode($content, 9);
194 $content = base64_encode($content);
195 $this->xmlElement(
"Content", $attribs, $content);
198 $this->xmlEndTag(
"File");
201 $this->xmlEndTag(
"Files");
211 $this->xmlStartTag(
"Members");
213 if (count($members)) {
214 foreach ($members as $member_id) {
215 $this->xmlStartTag(
"Member", array(
"usr_id" =>
"il_" .
IL_INST_ID .
"_usr_" . $member_id ));
219 $this->xmlElement(
"Firstname", array(),
$name[
'firstname']);
220 $this->xmlElement(
"Lastname", array(),
$name[
'lastname']);
221 $this->xmlElement(
"Login", array(),
$name[
'login']);
222 $this->attachMarking($member_id, $assignment_id);
223 $this->xmlEndTag(
"Member");
226 $this->xmlEndTag(
"Members");
static getAssignmentDataOfExercise(int $a_exc_id)
getMemberStatus(?int $a_user_id=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static int $ID_DEFLATE_METHOD_MISMATCH
static _getMembers(int $a_obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static int $CONTENT_ATTACH_ENCODED
attachMarking(int $user_id, int $assignment_id)
attach marking tag to member for given assignment
setAttachFileContents(int $attachFileContents)
set attachment content mode
handleAssignmentMembers(int $ex_id, int $assignment_id)
create xml for files per assignment
static string $STATUS_PASSED
handleAssignmentFiles(int $ex_id, int $as_id)
setAttachMembers(bool $value)
write access to property attchMarkings
static int $CONTENT_ATTACH_NO
static string $STATUS_FAILED
static int $CONTENT_ATTACH_ZLIB_ENCODED
static int $CONTENT_ATTACH_GZIP_ENCODED
setExercise(ilObjExercise $exercise)
static string $STATUS_NOT_GRADED
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupName(int $a_user_id)
lookup user name
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
xmlSetGenCmt(string $genCmt)
Sets generated comment.
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
xmlHeader()
Writes xml header.
xmlEndTag(string $tag)
Writes an endtag.
xmlSetDtdDef(string $dtdDef)
Sets dtd definition.
xmlDumpMem(bool $format=true)
Returns xml document from memory.
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc