4include_once(
"./Services/DataSet/classes/class.ilDataSet.php");
 
   23                return array(
"4.1.0", 
"4.4.0", 
"5.0.0");
 
   34                return "http://www.ilias.de/xml/Modules/Exercise/".$a_entity;
 
   43        protected function getTypes($a_entity, $a_version)
 
   45                if ($a_entity == 
"exc")
 
   55                                                "Description" => 
"text",
 
   57                                                "PassNr" => 
"integer",
 
   58                                                "ShowSubmissions" => 
"integer");
 
   62                if ($a_entity == 
"exc_assignment")
 
   69                                                "ExerciseId" => 
"integer",
 
   71                                                "Instruction" => 
"text",
 
   73                                                "Mandatory" => 
"integer",
 
   74                                                "OrderNr" => 
"integer",
 
   75                                                "Dir" => 
"directory");
 
   80                                                "ExerciseId" => 
"integer",
 
   82                                                "Deadline" => 
"integer",                                        
 
   83                                                "Instruction" => 
"text",
 
   85                                                "Mandatory" => 
"integer",
 
   86                                                "OrderNr" => 
"integer",
 
   90                                                ,
"PeerMin" => 
"integer" 
   91                                                ,
"PeerDeadline" => 
"integer"                                                             
   93                                                ,
"FeedbackFile" => 
"integer" 
   94                                                ,
"FeedbackCron" => 
"integer" 
   95                                                ,
"FeedbackDate" => 
"integer" 
   96                                                ,
"FeedbackDir" => 
"directory" 
  102                                                "ExerciseId" => 
"integer",
 
  104                                                "Deadline" => 
"integer",                                        
 
  105                                                "Instruction" => 
"text",
 
  107                                                "Mandatory" => 
"integer",
 
  108                                                "OrderNr" => 
"integer",
 
  112                                                ,
"PeerMin" => 
"integer" 
  113                                                ,
"PeerDeadline" => 
"integer" 
  114                                                ,
"PeerFile" => 
"integer" 
  115                                                ,
"PeerPersonal" => 
"integer" 
  117                                                ,
"FeedbackFile" => 
"integer" 
  118                                                ,
"FeedbackCron" => 
"integer" 
  119                                                ,
"FeedbackDate" => 
"integer" 
  120                                                ,
"FeedbackDir" => 
"directory" 
  133        function readData($a_entity, $a_version, $a_ids, $a_field = 
"")
 
  137                if (!is_array($a_ids))
 
  139                        $a_ids = array($a_ids);
 
  142                if ($a_entity == 
"exc")
 
  150                                                " pass_mode, pass_nr, show_submissions".
 
  151                                                " FROM exc_data JOIN object_data ON (exc_data.obj_id = object_data.obj_id) ".
 
  153                                                $ilDB->in(
"exc_data.obj_id", $a_ids, 
false, 
"integer"));
 
  158                if ($a_entity == 
"exc_assignment")
 
  164                                                " instruction, title, start_time, mandatory, order_nr".
 
  165                                                " FROM exc_assignment ".
 
  167                                                $ilDB->in(
"exc_id", $a_ids, 
false, 
"integer"));
 
  172                                                " instruction, title, start_time, mandatory, order_nr, peer, peer_min, peer_dl peer_deadline,".
 
  173                                                " fb_file feedback_file, fb_cron feedback_cron, fb_date feedback_date".
 
  174                                                " FROM exc_assignment".
 
  176                                                $ilDB->in(
"exc_id", $a_ids, 
false, 
"integer"));
 
  181                                                " instruction, title, start_time, mandatory, order_nr, peer, peer_min, peer_dl peer_deadline,".
 
  182                                                " peer_file, peer_prsl peer_personal, fb_file feedback_file, fb_cron feedback_cron, fb_date feedback_date".
 
  183                                                " FROM exc_assignment".
 
  185                                                $ilDB->in(
"exc_id", $a_ids, 
false, 
"integer"));
 
  200                if ($a_entity == 
"exc_assignment")
 
  203                        if($a_set[
"StartTime"] != 
"")
 
  208                        if($a_set[
"Deadline"] != 
"")
 
  214                        include_once(
"./Modules/Exercise/classes/class.ilFSStorageExercise.php");
 
  216                        $a_set[
"Dir"] = $fstorage->getPath();
 
  218                        include_once(
"./Modules/Exercise/classes/class.ilFSStorageExercise.php");
 
  220                        $a_set[
"FeedbackDir"] = $fstorage->getGlobalFeedbackPath();
 
  236                                        "exc_assignment" => array(
"ids" => $a_rec[
"Id"])
 
  250        function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
 
  258                                include_once(
"./Modules/Exercise/classes/class.ilObjExercise.php");
 
  260                                if($new_id = $a_mapping->getMapping(
'Services/Container',
'objs',$a_rec[
'Id']))
 
  267                                        $newObj->setType(
"exc");
 
  268                                        $newObj->create(
true);
 
  271                                $newObj->setTitle($a_rec[
"Title"]);
 
  272                                $newObj->setDescription($a_rec[
"Description"]);
 
  273                                $newObj->setPassMode($a_rec[
"PassMode"]);
 
  274                                $newObj->setPassNr($a_rec[
"PassNr"]);
 
  275                                $newObj->setShowSubmissions($a_rec[
"ShowSubmissions"]);
 
  279                                $this->current_exc = $newObj;
 
  281                                $a_mapping->addMapping(
"Modules/Exercise", 
"exc", $a_rec[
"Id"], $newObj->getId());
 
  285                        case "exc_assignment":
 
  286                                $exc_id = $a_mapping->getMapping(
"Modules/Exercise", 
"exc", $a_rec[
"ExerciseId"]);
 
  289                                        if (is_object($this->current_exc) && $this->current_exc->getId() == $exc_id)
 
  291                                                $exc = $this->current_exc;
 
  295                                                include_once(
"./Modules/Exercise/classes/class.ilObjExercise.php");
 
  299                                        include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
 
  302                                        $ass->setExerciseId($exc_id);
 
  304                                        if ($a_rec[
"StartTime"] != 
"")
 
  310                                        if ($a_rec[
"Deadline"] != 
"")
 
  316                                        $ass->setInstruction($a_rec[
"Instruction"]);
 
  317                                        $ass->setTitle($a_rec[
"Title"]);
 
  318                                        $ass->setMandatory($a_rec[
"Mandatory"]);
 
  319                                        $ass->setOrderNr($a_rec[
"OrderNr"]);
 
  322                                        $ass->setType($a_rec[
"Type"]);
 
  325                                        $ass->setPeerReview($a_rec[
"Peer"]);
 
  326                                        $ass->setPeerReviewMin($a_rec[
"PeerMin"]);
 
  327                                        $ass->setPeerReviewDeadline($a_rec[
"PeerDeadline"]);                                    
 
  328                                        $ass->setFeedbackFile($a_rec[
"FeedbackFile"]);
 
  329                                        $ass->setFeedbackCron($a_rec[
"FeedbackCron"]);
 
  330                                        $ass->setFeedbackDate($a_rec[
"FeedbackDate"]);
 
  333                                        $ass->setPeerReviewFileUpload($a_rec[
"PeerFile"]);
 
  334                                        $ass->setPeerReviewPersonalized($a_rec[
"PeerPersonal"]);
 
  338                                        include_once(
"./Modules/Exercise/classes/class.ilFSStorageExercise.php");
 
  343                                        $dir = str_replace(
"..", 
"", $a_rec[
"Dir"]);
 
  347                                                $target_dir = $fstorage->getPath();
 
  352                                        $dir = str_replace(
"..", 
"", $a_rec[
"FeedbackDir"]);
 
  356                                                $target_dir = $fstorage->getGlobalFeedbackPath();
 
  360                                        $a_mapping->addMapping(
"Modules/Exercise", 
"exc_assignment", $a_rec[
"Id"], $ass->getId());
 
A dataset contains in data in a common structure that can be shared and transformed for different pur...
getDirectDataFromQuery($a_query, $a_convert_to_leading_upper=true)
Get data from query.This is a standard procedure, all db field names are directly mapped to abstract ...
getImportDirectory()
Get import directory.
@classDescription Date and time handling
importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
Import record.
getXmlRecord($a_entity, $a_version, $a_set)
Get xml record (export)
getXmlNamespace($a_entity, $a_schema_version)
Get xml namespace.
getDependencies($a_entity, $a_version, $a_rec, $a_ids)
Determine the dependent sets of data.
getTypes($a_entity, $a_version)
Get field types for entity.
readData($a_entity, $a_version, $a_ids, $a_field="")
Read data.
getSupportedVersions()
Get supported versions.
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.