4include_once 
'classes/class.ilSaxParser.php';
 
    5include_once 
'Services/Tracking/classes/class.ilChangeEvent.php';
 
    6include_once 
'Modules/Exercise/classes/class.ilExerciseException.php';
 
    7include_once 
'Modules/Exercise/classes/class.ilExerciseXMLWriter.php';
 
   80                parent::ilSaxParser();
 
   84                if (count ($assignments) > 0) {
 
   88                        $this->assignment->setExerciseId(
$exercise->getId());
 
   89                        $this->assignment->save();
 
   92                include_once (
"./Modules/Exercise/classes/class.ilFSStorageExercise.php");
 
   93                $this->storage = 
new ilFSStorageExercise ( $this->exercise->getId(), $this->assignment->getId());
 
   94                $this->storage->create();
 
   95                $this->storage->init();
 
   99                $this->result = 
false;
 
  111                xml_set_object($a_xml_parser,$this);
 
  112                xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
 
  113                xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
 
  131                            if (isset($a_attribs[
"obj_id"]))
 
  134                               if ($this->obj_id != -1 && (
int) $read_obj_id  != -1 && (
int) $this->obj_id != (
int) $read_obj_id)
 
  141                            $this->usr_action = $a_attribs[
"action"];
 
  146                $this->file_action = $a_attribs[
"action"];
 
  150                            if ($a_attribs[
"mode"] == 
"GZIP")
 
  152                    if (!function_exists(
"gzdecode"))
 
  156                            } elseif ($a_attribs[
"mode"] == 
"ZLIB")
 
  158                    if (!function_exists(
"gzuncompress"))
 
  165                             $this->status = $a_attribs[
"status"];
 
  167                                 $this->status = 
"notgraded";
 
  169                                 $this->status = 
"passed";
 
  171                                 $this->status = 
"failed";
 
  190                $this->result = 
true;
 
  193                            $this->exercise->setTitle(trim($this->cdata));
 
  194                            $this->assignment->setTitle(trim($this->cdata));
 
  197                            $this->exercise->setDescription(trim($this->cdata));
 
  200                                $this->assignment->setInstruction(trim($this->cdata));
 
  203                                $this->assignment->setDeadLine(trim($this->cdata));
 
  211                            $this->file_name = trim($this->cdata);
 
  214                            $this->file_content = trim($this->cdata);
 
  217                $this->
updateFile($this->file_name, $this->file_content, $this->file_action);
 
  220                             $this->comment = trim($this->cdata);
 
  223                             $this->notice = trim($this->cdata);
 
  226                             $this->mark = trim($this->cdata);
 
  248                        $this->cdata .= $a_data;
 
  260       if (!is_int($user_id) || $user_id <= 0) {
 
  265           if ($action == 
"Attach" && !$memberObject->isAssigned($user_id))
 
  267            $memberObject->assignMember ($user_id);
 
  270       if ($action == 
"Detach" && $memberObject->isAssigned($user_id))
 
  272            $memberObject->deassignMember ($user_id);
 
  290            if ($action == 
"Attach")
 
  292           $content = base64_decode((
string) $b64encodedContent);
 
  294                $content = gzdecode($content);
 
  296                $content = gzuncompress($content);
 
  300               $this->storage->writeToFile($content, 
$filename);
 
  303        if ($action == 
"Detach")
 
  318            return $this->result > 0;
 
  327            if (isset($this->mark)) 
 
  331                if (isset($this->comment))
 
  338            if (isset ( $this->status )){
 
  342            if (isset($this->notice)){
 
  347            $this->status = 
null;
 
  348            $this->notice = 
null;
 
  349            $this->comment = 
null;
 
updateNoticeForUser($a_ass_id, $a_user_id, $a_notice)
was: setNoticeForMember($a_member_id,$a_notice)
updateStatusOfUser($a_ass_id, $a_user_id, $a_status)
was: setStatusForMember($a_member_id,$a_status)
static getAssignmentDataOfExercise($a_exc_id)
Get assignments data of an exercise in an array.
updateMarkOfUser($a_ass_id, $a_user_id, $a_value)
Update mark.
updateCommentForUser($a_ass_id, $a_user_id, $a_value)
Update comment.
Class to report exception.
static $ID_DEFLATE_METHOD_MISMATCH
Exercise XML Parser which completes/updates a given exercise by an xml string.
static $CONTENT_ZLIB_COMPRESSED
ilExerciseXMLParser(& $exercise, $a_xml_data, $obj_id=-1)
Constructor.
static $CONTENT_GZ_COMPRESSED
start()
starts parsing an changes object by side effect.
updateMember($user_id, $action)
update member object according to given action
handlerCharacterData($a_xml_parser, $a_data)
handler for character data
updateMarking($usr_id)
update marking of member
handlerEndTag($a_xml_parser, $a_name)
handler for end of element
handlerBeginTag($a_xml_parser, $a_name, $a_attribs)
handler for begin of element
updateFile($filename, $b64encodedContent, $action)
update file according to filename
static $CONTENT_NOT_COMPRESSED
setHandlers($a_xml_parser)
set event handlers
static $STATUS_NOT_GRADED
Base class for sax-based expat parsing extended classes need to overwrite the method setHandlers and ...
setXMLContent($a_xml_content)
startParsing()
stores xml data in array
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static __extractId($ilias_id, $inst_id)
extract ref id from role title, e.g.