4 include_once
"./Services/Xml/classes/class.ilXmlWriter.php";
5 include_once
"./Modules/Exercise/classes/class.ilExAssignment.php";
96 $attribs = array (
"obj_id" =>
"il_" . IL_INST_ID .
"_exc_" . $this->exercise->getId () );
98 if ($this->exercise->getOwner ())
99 $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());
113 if (count ( $assignments ) > 0) {
114 foreach ( $assignments as $assignment ) {
116 $this->
xmlElement (
"Instruction", null, $assignment [
"instruction"] );
117 $this->
xmlElement (
"DueDate", null, $assignment [
"deadline"] );
120 if ($this->attachMembers)
140 $this->
xmlSetDtdDef (
"<!DOCTYPE Exercise PUBLIC \"-//ILIAS//DTD ExerciseAdministration//EN\" \"" . ILIAS_HTTP_PATH .
"/xml/ilias_exercise_4_4.dtd\">" );
157 $this->attachMembers = $value ?
true :
false;
174 if ($astatus ==
"notgraded") {
176 } elseif ($astatus ==
"failed") {
182 $this->
xmlStartTag (
"Marking", array (
"status" => $status ) );
184 $this->
xmlElement (
"Notice", null, $anotice );
185 $this->
xmlElement (
"Comment", null, $acomment );
191 include_once (
"./Modules/Exercise/classes/class.ilFSStorageExercise.php");
193 $files = $storage->getFiles ();
195 if (count ( $files )) {
196 foreach ( $files as
$file ) {
197 $this->
xmlStartTag (
"File", array (
"size" => $file [
"size"] ) );
198 $this->
xmlElement (
"Filename", null, $file [
"name"] );
199 if ($this->attachFileContents) {
202 $content = @file_get_contents (
$filename );
203 $attribs = array (
"mode" =>
"PLAIN" );
205 $attribs = array (
"mode" =>
"ZLIB" );
206 $content = gzcompress ( $content, 9 );
208 $attribs = array (
"mode" =>
"GZIP" );
209 $content = gzencode ( $content, 9 );
211 $content = base64_encode ( $content );
212 $this->
xmlElement (
"Content", $attribs, $content );
229 include_once (
"./Modules/Exercise/classes/class.ilExerciseMembers.php");
231 if (count ( $members )) {
232 foreach ( $members as $member_id ) {
233 $this->
xmlStartTag (
"Member", array (
"usr_id" =>
"il_" . IL_INST_ID .
"_usr_" . $member_id ) );