40 include_once
"./classes/class.ilXmlWriter.php";
119 $attribs =array (
"obj_id" =>
"il_".IL_INST_ID.
"_exc_".$this->exercise->getId());
121 if ($this->exercise->getOwner())
122 $attribs[
"owner"] =
"il_".IL_INST_ID.
"_usr_".$this->exercise->getOwner();
126 $this->
xmlElement(
"Title", null,$this->exercise->getTitle());
127 $this->
xmlElement(
"Description", null,$this->exercise->getDescription());
128 $this->
xmlElement(
"Instruction", null,$this->exercise->getInstruction());
129 $this->
xmlElement(
"DueDate", null,$this->exercise->getTimestamp());
135 $exerciseFileData = $this->exercise->file_obj;
136 $files = $exerciseFileData->getFiles();
141 $this->
xmlStartTag(
"File", array (
"size" => $file[
"size"] ));
142 $this->
xmlElement(
"Filename", null, $file[
"name"]);
143 if ($this->attachFileContents)
148 $content = @file_get_contents(
$filename);
149 $attribs = array (
"mode"=>
"PLAIN");
152 $attribs = array (
"mode"=>
"ZLIB");
153 $content = gzcompress($content, 9);
157 $attribs = array (
"mode"=>
"GZIP");
158 $content = gzencode($content, 9);
160 $content = base64_encode($content);
161 $this->
xmlElement(
"Content",$attribs, $content);
168 if ($this->attachMembers)
171 $members = $this->exercise->getMemberListData();
174 foreach ($members as $member)
177 array (
"usr_id" =>
"il_".IL_INST_ID.
"_usr_".$member[
"usr_id"]));
200 $this->
xmlSetDtdDef(
"<!DOCTYPE Exercise PUBLIC \"-//ILIAS//DTD ExerciseAdministration//EN\" \"".ILIAS_HTTP_PATH.
"/xml/ilias_exercise_3_10.dtd\">");
218 $this->attachMembers = $value ?
true :
false;
228 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
230 $marks =
new ilLPMarks($this->exercise->getId(), $a_member[
"usr_id"]);
231 if ($a_member[
"status"] ==
"notgraded")
234 } elseif ($a_member[
"status"] ==
"failed")
244 $this->
xmlElement(
"Mark", null, $marks->getMark());
245 $this->
xmlElement(
"Notice", null, $a_member[
"notice"]);
246 $this->
xmlElement(
"Comment", null, $marks->getComment());