4 include_once
"./Services/Xml/classes/class.ilXmlWriter.php";
5 include_once
"./Modules/Exercise/classes/class.ilExAssignment.php";
62 parent::__construct();
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;
170 $amark = $ass->getMemberStatus($user_id)->getMark();
171 $astatus = $ass->getMemberStatus($user_id)->getStatus();
172 $acomment = $ass->getMemberStatus($user_id)->getComment();
173 $anotice = $ass->getMemberStatus($user_id)->getNotice();
176 if ($astatus ==
"notgraded") {
178 } elseif ($astatus ==
"failed") {
186 $this->
xmlElement (
"Notice", null, $anotice );
187 $this->
xmlElement (
"Comment", null, $acomment );
193 include_once (
"./Modules/Exercise/classes/class.ilFSStorageExercise.php");
195 $files = $storage->getFiles ();
200 $this->
xmlElement (
"Filename", null, $file [
"name"] );
201 if ($this->attachFileContents) {
204 $content = @file_get_contents (
$filename );
205 $attribs =
array (
"mode" =>
"PLAIN" );
207 $attribs =
array (
"mode" =>
"ZLIB" );
208 $content = gzcompress ( $content, 9 );
210 $attribs =
array (
"mode" =>
"GZIP" );
211 $content = gzencode ( $content, 9 );
213 $content = base64_encode ( $content );
214 $this->
xmlElement (
"Content", $attribs, $content );
231 include_once (
"./Modules/Exercise/classes/class.ilExerciseMembers.php");
233 if (count ( $members )) {
234 foreach ( $members as $member_id ) {
235 $this->
xmlStartTag (
"Member",
array (
"usr_id" =>
"il_" . IL_INST_ID .
"_usr_" . $member_id ) );
static _lookupName($a_user_id)
lookup user name
static $CONTENT_ATTACH_ENCODED
static $ID_DEFLATE_METHOD_MISMATCH
xmlSetGenCmt($genCmt)
Sets generated comment.
static getAssignmentDataOfExercise($a_exc_id)
Get assignments data of an exercise in an array.
xmlSetDtdDef($dtdDef)
Sets dtd definition.
setAttachMembers($value)
write access to property attchMarkings
handleAssignmentMembers($ex_id, $assignment_id)
create xml for files per assignment
xmlStartTag($tag, $attrs=NULL, $empty=FALSE, $encode=TRUE, $escape=TRUE)
Writes a starttag.
xmlElement($tag, $attrs=NULL, $data=Null, $encode=TRUE, $escape=TRUE)
Writes a basic element (no children, just textual content)
static $CONTENT_ATTACH_GZIP_ENCODED
static $STATUS_NOT_GRADED
handleAssignmentFiles($ex_id, $as_id)
xmlEndTag($tag)
Writes an endtag.
static $CONTENT_ATTACH_ZLIB_ENCODED
attachMarking($user_id, $assignment_id)
attach marking tag to member for given assignment
xmlHeader()
Writes xml header public.
setAttachFileContents($attachFileContents)
set attachment content mode
Create styles array
The data for the language used.
static $CONTENT_ATTACH_NO
setExercise($exercise)
set exercise object
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
static _getMembers($a_obj_id)
xmlDumpMem($format=TRUE)
Returns xml document from memory.
Class to report exception.