4 include_once
"./classes/class.ilXmlWriter.php";
97 $attribs =array (
"obj_id" =>
"il_".IL_INST_ID.
"_exc_".$this->exercise->getId());
99 if ($this->exercise->getOwner())
100 $attribs[
"owner"] =
"il_".IL_INST_ID.
"_usr_".$this->exercise->getOwner();
104 $this->
xmlElement(
"Title", null,$this->exercise->getTitle());
105 $this->
xmlElement(
"Description", null,$this->exercise->getDescription());
106 $this->
xmlElement(
"Instruction", null,$this->exercise->getInstruction());
107 $this->
xmlElement(
"DueDate", null,$this->exercise->getTimestamp());
113 $exerciseFileData = $this->exercise->file_obj;
114 $files = $exerciseFileData->getFiles();
119 $this->
xmlStartTag(
"File", array (
"size" => $file[
"size"] ));
120 $this->
xmlElement(
"Filename", null, $file[
"name"]);
121 if ($this->attachFileContents)
126 $content = @file_get_contents(
$filename);
127 $attribs = array (
"mode"=>
"PLAIN");
130 $attribs = array (
"mode"=>
"ZLIB");
131 $content = gzcompress($content, 9);
135 $attribs = array (
"mode"=>
"GZIP");
136 $content = gzencode($content, 9);
138 $content = base64_encode($content);
139 $this->
xmlElement(
"Content",$attribs, $content);
146 if ($this->attachMembers)
149 $members = $this->exercise->getMemberListData();
152 foreach ($members as $member)
155 array (
"usr_id" =>
"il_".IL_INST_ID.
"_usr_".$member[
"usr_id"]));
178 $this->
xmlSetDtdDef(
"<!DOCTYPE Exercise PUBLIC \"-//ILIAS//DTD ExerciseAdministration//EN\" \"".ILIAS_HTTP_PATH.
"/xml/ilias_exercise_3_10.dtd\">");
196 $this->attachMembers = $value ?
true :
false;
206 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
208 $marks =
new ilLPMarks($this->exercise->getId(), $a_member[
"usr_id"]);
209 if ($a_member[
"status"] ==
"notgraded")
212 }
elseif ($a_member[
"status"] ==
"failed")
222 $this->
xmlElement(
"Mark", null, $marks->getMark());
223 $this->
xmlElement(
"Notice", null, $a_member[
"notice"]);
224 $this->
xmlElement(
"Comment", null, $marks->getComment());