ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilExerciseDataSet Class Reference

Exercise data set class. More...

+ Inheritance diagram for ilExerciseDataSet:
+ Collaboration diagram for ilExerciseDataSet:

Public Member Functions

 getSupportedVersions ()
 Get supported versions. More...
 
 getXmlNamespace ($a_entity, $a_schema_version)
 Get xml namespace. More...
 
 readData ($a_entity, $a_version, $a_ids, $a_field="")
 Read data. More...
 
 getXmlRecord ($a_entity, $a_version, $a_set)
 Get xml record (export) More...
 
 importRecord ($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
 Import record. More...
 
- Public Member Functions inherited from ilDataSet
 __construct ()
 Constructor. More...
 
 init ($a_entity, $a_schema_version)
 Init. More...
 
 getSupportedVersions ()
 Get supported version. More...
 
 readData ($a_entity, $a_version, $a_ids)
 Read data from DB. More...
 
 setExportDirectories ($a_relative, $a_absolute)
 Set export directories. More...
 
 setImportDirectory ($a_val)
 Set import directory. More...
 
 getImportDirectory ()
 Get import directory. More...
 
 setDSPrefix ($a_val)
 Set XML dataset namespace prefix. More...
 
 getDSPrefix ()
 Get XML dataset namespace prefix. More...
 
 getDSPrefixString ()
 
 getDirectDataFromQuery ($a_query, $a_convert_to_leading_upper=true, $a_set=true)
 Get data from query.This is a standard procedure, all db field names are directly mapped to abstract fields. More...
 
 convertToLeadingUpper ($a_str)
 Make xyz_abc a XyzAbc string. More...
 
 getJsonRepresentation ()
 Get json representation. More...
 
 getXmlRepresentation ($a_entity, $a_schema_version, $a_ids, $a_field="", $a_omit_header=false, $a_omit_types=false)
 Get xml representation <dataset install_id="123" install_url="..."> <types entity="table_name" version="4.0.1"> <ftype name="field_1" type="text"> <ftype name="field_2" type="date"> <ftype name="field_3" type="integer"> </types> <types ...> ... More...
 
 addRecordsXml ($a_writer, $a_prefixes, $a_entity, $a_schema_version, $a_ids, $a_field="")
 Add records xml. More...
 
 afterXmlRecordWriting ($a_entity, $a_version, $a_set)
 After xml record writing hook record. More...
 
 getNamespaces (&$namespaces, $a_entity, $a_schema_version)
 Get xml namespaces. More...
 
 getXmlRecord ($a_entity, $a_version, $a_set)
 Get xml record for version. More...
 
 getJsonRecord ($a_set)
 Get json record for version. More...
 
 getXmlTypes ($a_entity, $a_version)
 Get xml types. More...
 
 getJsonTypes ($a_entity, $a_version)
 Get json types. More...
 
 getXMLEntityName ($a_entity, $a_version)
 Get entity name for xml (may be overwritten) More...
 
 getXMLEntityTag ($a_entity, $a_schema_version)
 Get entity tag. More...
 
 getJsonEntityName ($a_entity, $a_version)
 Get entity name for json (may be overwritten) More...
 
 setImport ($a_val)
 Set import object. More...
 
 getImport ()
 Get import object. More...
 
 setCurrentInstallationId ($a_val)
 Set current installation id. More...
 
 getCurrentInstallationId ()
 Get current installation id. More...
 

Protected Member Functions

 getTypes ($a_entity, $a_version)
 Get field types for entity. More...
 
 getDependencies ($a_entity, $a_version, $a_rec, $a_ids)
 Determine the dependent sets of data. More...
 
- Protected Member Functions inherited from ilDataSet
 getTypes ($a_entity, $a_version)
 Get (abstract) types for (abstract) field names. More...
 
 getXmlNamespace ($a_entity, $a_schema_version)
 Get xml namespace. More...
 
 createObjectExportId ($a_type, $a_id)
 Build ilias export id. More...
 
 parseObjectExportId ($a_id, $a_fallback_id=NULL)
 Parse export id. More...
 

Additional Inherited Members

- Data Fields inherited from ilDataSet
 $dircnt
 
const EXPORT_NO_INST_ID = 1
 
const EXPORT_ID_ILIAS_LOCAL = 2
 
const EXPORT_ID_ILIAS_LOCAL_INVALID = 3
 
const EXPORT_ID_ILIAS_REMOTE = 4
 
const EXPORT_ID_ILIAS_REMOTE_INVALID = 5
 
const EXPORT_ID = 6
 
const EXPORT_ID_INVALID = 7
 
- Protected Attributes inherited from ilDataSet
 $current_installation_id = ""
 

Detailed Description

Exercise data set class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 13 of file class.ilExerciseDataSet.php.

Member Function Documentation

◆ getDependencies()

ilExerciseDataSet::getDependencies (   $a_entity,
  $a_version,
  $a_rec,
  $a_ids 
)
protected

Determine the dependent sets of data.

Definition at line 381 of file class.ilExerciseDataSet.php.

References array.

382  {
383  switch ($a_entity)
384  {
385  case "exc":
386  return array (
387  "exc_crit_cat" => array("ids" => $a_rec["Id"]),
388  "exc_assignment" => array("ids" => $a_rec["Id"])
389  );
390 
391  case "exc_crit_cat":
392  return array (
393  "exc_crit" => array("ids" => $a_rec["Id"])
394  );
395  }
396 
397  return false;
398  }
Create styles array
The data for the language used.

◆ getSupportedVersions()

ilExerciseDataSet::getSupportedVersions ( )

Get supported versions.

Parameters

Definition at line 21 of file class.ilExerciseDataSet.php.

References array.

22  {
23  return array("4.1.0", "4.4.0", "5.0.0", "5.1.0", "5.2.0");
24  }
Create styles array
The data for the language used.

◆ getTypes()

ilExerciseDataSet::getTypes (   $a_entity,
  $a_version 
)
protected

Get field types for entity.

Parameters

Definition at line 43 of file class.ilExerciseDataSet.php.

References array.

44  {
45  if ($a_entity == "exc")
46  {
47  switch ($a_version)
48  {
49  case "4.1.0":
50  return array(
51  "Id" => "integer",
52  "Title" => "text",
53  "Description" => "text",
54  "PassMode" => "text",
55  "PassNr" => "integer",
56  "ShowSubmissions" => "integer"
57  );
58 
59  case "4.4.0":
60  case "5.0.0":
61  case "5.1.0":
62  return array(
63  "Id" => "integer",
64  "Title" => "text",
65  "Description" => "text",
66  "PassMode" => "text",
67  "PassNr" => "integer",
68  "ShowSubmissions" => "integer",
69  "ComplBySubmission" => "integer"
70  );
71 
72  case "5.2.0":
73  return array(
74  "Id" => "integer",
75  "Title" => "text",
76  "Description" => "text",
77  "PassMode" => "text",
78  "PassNr" => "integer",
79  "ShowSubmissions" => "integer",
80  "ComplBySubmission" => "integer",
81  "Tfeedback" => "integer"
82  );
83  }
84  }
85 
86  if ($a_entity == "exc_assignment")
87  {
88  switch ($a_version)
89  {
90  case "4.1.0":
91  return array(
92  "Id" => "integer",
93  "ExerciseId" => "integer",
94  "Deadline" => "text",
95  "Instruction" => "text",
96  "Title" => "text",
97  "Mandatory" => "integer",
98  "OrderNr" => "integer",
99  "Dir" => "directory");
100 
101  case "4.4.0":
102  return array(
103  "Id" => "integer",
104  "ExerciseId" => "integer",
105  "Type" => "integer",
106  "Deadline" => "integer",
107  "Instruction" => "text",
108  "Title" => "text",
109  "Mandatory" => "integer",
110  "OrderNr" => "integer",
111  "Dir" => "directory"
112  // peer
113  ,"Peer" => "integer"
114  ,"PeerMin" => "integer"
115  ,"PeerDeadline" => "integer"
116  // global feedback
117  ,"FeedbackFile" => "integer"
118  ,"FeedbackCron" => "integer"
119  ,"FeedbackDate" => "integer"
120  ,"FeedbackDir" => "directory"
121  );
122 
123  case "5.0.0":
124  return array(
125  "Id" => "integer",
126  "ExerciseId" => "integer",
127  "Type" => "integer",
128  "Deadline" => "integer",
129  "Instruction" => "text",
130  "Title" => "text",
131  "Mandatory" => "integer",
132  "OrderNr" => "integer",
133  "Dir" => "directory"
134  // peer
135  ,"Peer" => "integer"
136  ,"PeerMin" => "integer"
137  ,"PeerDeadline" => "integer"
138  ,"PeerFile" => "integer"
139  ,"PeerPersonal" => "integer"
140  // global feedback
141  ,"FeedbackFile" => "integer"
142  ,"FeedbackCron" => "integer"
143  ,"FeedbackDate" => "integer"
144  ,"FeedbackDir" => "directory"
145  );
146 
147  case "5.1.0":
148  case "5.2.0":
149  return array(
150  "Id" => "integer",
151  "ExerciseId" => "integer",
152  "Type" => "integer",
153  "Deadline" => "integer",
154  "Deadline2" => "integer",
155  "Instruction" => "text",
156  "Title" => "text",
157  "Mandatory" => "integer",
158  "OrderNr" => "integer",
159  "TeamTutor" => "integer",
160  "MaxFile" => "integer",
161  "Dir" => "directory"
162  // peer
163  ,"Peer" => "integer"
164  ,"PeerMin" => "integer"
165  ,"PeerDeadline" => "integer"
166  ,"PeerFile" => "integer"
167  ,"PeerPersonal" => "integer"
168  ,"PeerChar" => "integer"
169  ,"PeerUnlock" => "integer"
170  ,"PeerValid" => "integer"
171  ,"PeerText" => "integer"
172  ,"PeerRating" => "integer"
173  ,"PeerCritCat" => "integer"
174  // global feedback
175  ,"FeedbackFile" => "integer"
176  ,"FeedbackCron" => "integer"
177  ,"FeedbackDate" => "integer"
178  ,"FeedbackDir" => "directory"
179  );
180  }
181  }
182 
183  if ($a_entity == "exc_cit_cat")
184  {
185  switch ($a_version)
186  {
187  case "5.1.0":
188  case "5.2.0":
189  return array(
190  "Id" => "integer"
191  ,"Parent" => "integer"
192  ,"Title" => "text"
193  ,"Pos" => "integer"
194  );
195  }
196  }
197 
198  if ($a_entity == "exc_cit")
199  {
200  switch ($a_version)
201  {
202  case "5.1.0":
203  case "5.2.0":
204  return array(
205  "Id" => "integer"
206  ,"Parent" => "integer"
207  ,"Type" => "text"
208  ,"Title" => "text"
209  ,"Descr" => "text"
210  ,"Pos" => "integer"
211  ,"Required" => "integer"
212  ,"Def" => "text"
213  ,"DefJson" => "text"
214  );
215  }
216  }
217  }
Create styles array
The data for the language used.

◆ getXmlNamespace()

ilExerciseDataSet::getXmlNamespace (   $a_entity,
  $a_schema_version 
)

Get xml namespace.

Parameters

Definition at line 32 of file class.ilExerciseDataSet.php.

33  {
34  return "http://www.ilias.de/xml/Modules/Exercise/".$a_entity;
35  }

◆ getXmlRecord()

ilExerciseDataSet::getXmlRecord (   $a_entity,
  $a_version,
  $a_set 
)

Get xml record (export)

Parameters
arrayabstract data record
Returns
array xml record

Definition at line 344 of file class.ilExerciseDataSet.php.

References $start, IL_CAL_DATETIME, and IL_CAL_UNIX.

345  {
346  if ($a_entity == "exc_assignment")
347  {
348  // convert server dates to utc
349  if($a_set["StartTime"] != "")
350  {
351  $start = new ilDateTime($a_set["StartTime"], IL_CAL_UNIX);
352  $a_set["StartTime"] = $start->get(IL_CAL_DATETIME,'','UTC');
353  }
354  if($a_set["Deadline"] != "")
355  {
356  $deadline = new ilDateTime($a_set["Deadline"], IL_CAL_UNIX);
357  $a_set["Deadline"] = $deadline->get(IL_CAL_DATETIME,'','UTC');
358  }
359  if($a_set["Deadline2"] != "")
360  {
361  $deadline = new ilDateTime($a_set["Deadline2"], IL_CAL_UNIX);
362  $a_set["Deadline2"] = $deadline->get(IL_CAL_DATETIME,'','UTC');
363  }
364 
365  include_once("./Modules/Exercise/classes/class.ilFSStorageExercise.php");
366  $fstorage = new ilFSStorageExercise($a_set["ExerciseId"], $a_set["Id"]);
367  $a_set["Dir"] = $fstorage->getPath();
368 
369  include_once("./Modules/Exercise/classes/class.ilFSStorageExercise.php");
370  $fstorage = new ilFSStorageExercise($a_set["ExerciseId"], $a_set["Id"]);
371  $a_set["FeedbackDir"] = $fstorage->getGlobalFeedbackPath();
372  }
373 
374  return $a_set;
375  }
const IL_CAL_DATETIME
const IL_CAL_UNIX
Date and time handling

◆ importRecord()

ilExerciseDataSet::importRecord (   $a_entity,
  $a_types,
  $a_rec,
  $a_mapping,
  $a_schema_version 
)

Import record.

Parameters

Definition at line 407 of file class.ilExerciseDataSet.php.

References $start, ilFSStorageExercise\create(), ilDataSet\getImportDirectory(), ilObjectFactory\getInstanceByObjId(), ilExcCriteria\getInstanceByType(), IL_CAL_DATETIME, IL_CAL_UNIX, and ilUtil\rCopy().

408  {
409 //echo $a_entity;
410 //var_dump($a_rec);
411 
412  switch ($a_entity)
413  {
414  case "exc":
415  include_once("./Modules/Exercise/classes/class.ilObjExercise.php");
416 
417  if($new_id = $a_mapping->getMapping('Services/Container','objs',$a_rec['Id']))
418  {
419  $newObj = ilObjectFactory::getInstanceByObjId($new_id,false);
420  }
421  else
422  {
423  $newObj = new ilObjExercise();
424  $newObj->setType("exc");
425  $newObj->create(true);
426  }
427 
428  $newObj->setTitle($a_rec["Title"]);
429  $newObj->setDescription($a_rec["Description"]);
430  $newObj->setPassMode($a_rec["PassMode"]);
431  $newObj->setPassNr($a_rec["PassNr"]);
432  $newObj->setShowSubmissions($a_rec["ShowSubmissions"]);
433  $newObj->setCompletionBySubmission($a_rec["ComplBySubmission"]);
434  $newObj->setTutorFeedback($a_rec["Tfeedback"]);
435  $newObj->update();
436  $newObj->saveData();
437  $this->current_exc = $newObj;
438 
439  $a_mapping->addMapping("Modules/Exercise", "exc", $a_rec["Id"], $newObj->getId());
440  break;
441 
442  case "exc_assignment":
443  $exc_id = $a_mapping->getMapping("Modules/Exercise", "exc", $a_rec["ExerciseId"]);
444  if ($exc_id > 0)
445  {
446  if (is_object($this->current_exc) && $this->current_exc->getId() == $exc_id)
447  {
448  $exc = $this->current_exc;
449  }
450  else
451  {
452  include_once("./Modules/Exercise/classes/class.ilObjExercise.php");
453  $exc = new ilObjExercise($exc_id, false);
454  }
455 
456  include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
457 
458  $ass = new ilExAssignment();
459  $ass->setExerciseId($exc_id);
460 
461  if ($a_rec["StartTime"] != "")
462  {
463  $start = new ilDateTime($a_rec["StartTime"], IL_CAL_DATETIME, "UTC");
464  $ass->setStartTime($start->get(IL_CAL_UNIX));
465  }
466 
467  if ($a_rec["Deadline"] != "")
468  {
469  $deadline = new ilDateTime($a_rec["Deadline"], IL_CAL_DATETIME, "UTC");
470  $ass->setDeadline($deadline->get(IL_CAL_UNIX));
471  }
472 
473  $ass->setInstruction($a_rec["Instruction"]);
474  $ass->setTitle($a_rec["Title"]);
475  $ass->setMandatory($a_rec["Mandatory"]);
476  $ass->setOrderNr($a_rec["OrderNr"]);
477 
478  // 4.2
479  $ass->setType($a_rec["Type"]);
480 
481  // 4.4
482  $ass->setPeerReview($a_rec["Peer"]);
483  $ass->setPeerReviewMin($a_rec["PeerMin"]);
484  $ass->setPeerReviewDeadline($a_rec["PeerDeadline"]);
485  $ass->setFeedbackFile($a_rec["FeedbackFile"]);
486  $ass->setFeedbackCron($a_rec["FeedbackCron"]);
487  $ass->setFeedbackDate($a_rec["FeedbackDate"]);
488 
489  // 5.0
490  $ass->setPeerReviewFileUpload($a_rec["PeerFile"]);
491  $ass->setPeerReviewPersonalized($a_rec["PeerPersonal"]);
492 
493  // 5.1
494  if ($a_rec["Deadline2"] != "")
495  {
496  $deadline = new ilDateTime($a_rec["Deadline2"], IL_CAL_DATETIME, "UTC");
497  $ass->setExtendedDeadline($deadline->get(IL_CAL_UNIX));
498  }
499  $ass->setMaxFile($a_rec["MaxFile"]);
500  $ass->setTeamTutor($a_rec["TeamTutor"]);
501  $ass->setPeerReviewChars($a_rec["PeerChar"]);
502  $ass->setPeerReviewSimpleUnlock($a_rec["PeerUnlock"]);
503  $ass->setPeerReviewValid($a_rec["PeerValid"]);
504  $ass->setPeerReviewText($a_rec["PeerText"]);
505  $ass->setPeerReviewRating($a_rec["PeerRating"]);
506 
507  // criteria catalogue
508  if($a_rec["PeerCritCat"])
509  {
510  $ass->setPeerReviewCriteriaCatalogue($a_mapping->getMapping("Modules/Exercise", "exc_crit_cat", $a_rec["PeerCritCat"]));
511  }
512 
513  $ass->save();
514 
515  include_once("./Modules/Exercise/classes/class.ilFSStorageExercise.php");
516  $fstorage = new ilFSStorageExercise($exc_id, $ass->getId());
517  $fstorage->create();
518 
519  // assignment files
520  $dir = str_replace("..", "", $a_rec["Dir"]);
521  if ($dir != "" && $this->getImportDirectory() != "")
522  {
523  $source_dir = $this->getImportDirectory()."/".$dir;
524  $target_dir = $fstorage->getPath();
525  ilUtil::rCopy($source_dir, $target_dir);
526  }
527 
528  // (4.4) global feedback file
529  $dir = str_replace("..", "", $a_rec["FeedbackDir"]);
530  if ($dir != "" && $this->getImportDirectory() != "")
531  {
532  $source_dir = $this->getImportDirectory()."/".$dir;
533  $target_dir = $fstorage->getGlobalFeedbackPath();
534  ilUtil::rCopy($source_dir, $target_dir);
535  }
536 
537  $a_mapping->addMapping("Modules/Exercise", "exc_assignment", $a_rec["Id"], $ass->getId());
538 
539  }
540 
541  break;
542 
543  case "exc_crit_cat":
544  $exc_id = $a_mapping->getMapping("Modules/Exercise", "exc", $a_rec["Parent"]);
545  if ($exc_id > 0)
546  {
547  include_once("./Modules/Exercise/classes/class.ilExcCriteriaCatalogue.php");
548  $crit_cat = new ilExcCriteriaCatalogue();
549  $crit_cat->setParent($exc_id);
550  $crit_cat->setTitle($a_rec["Title"]);
551  $crit_cat->setPosition($a_rec["Pos"]);
552  $crit_cat->save();
553 
554  $a_mapping->addMapping("Modules/Exercise", "exc_crit_cat", $a_rec["Id"], $crit_cat->getId());
555  }
556  break;
557 
558  case "exc_crit":
559  $crit_cat_id = $a_mapping->getMapping("Modules/Exercise", "exc_crit_cat", $a_rec["Parent"]);
560  if ($crit_cat_id > 0)
561  {
562  include_once("./Modules/Exercise/classes/class.ilExcCriteria.php");
563  $crit = ilExcCriteria::getInstanceByType($a_rec["Type"]);
564  $crit->setParent($crit_cat_id);
565  $crit->setTitle($a_rec["Title"]);
566  $crit->setDescription($a_rec["Descr"]);
567  $crit->setPosition($a_rec["Pos"]);
568  $crit->setRequired($a_rec["Required"]);
569  $crit->importDefinition($a_rec["Def"], $a_rec["DefJson"]);
570  $crit->save();
571  }
572  break;
573  }
574  }
static getInstanceByType($a_type)
Class ilExcCriteriaCatalogue.
Exercise assignment.
const IL_CAL_DATETIME
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
getImportDirectory()
Get import directory.
const IL_CAL_UNIX
Class ilObjExercise.
Date and time handling
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
+ Here is the call graph for this function:

◆ readData()

ilExerciseDataSet::readData (   $a_entity,
  $a_version,
  $a_ids,
  $a_field = "" 
)

Read data.

Parameters

Definition at line 225 of file class.ilExerciseDataSet.php.

References $ilDB, array, data, and ilDataSet\getDirectDataFromQuery().

226  {
227  global $ilDB;
228 
229  if (!is_array($a_ids))
230  {
231  $a_ids = array($a_ids);
232  }
233 
234  if ($a_entity == "exc")
235  {
236  switch ($a_version)
237  {
238  case "4.1.0":
239  $this->getDirectDataFromQuery("SELECT exc_data.obj_id id, title, description,".
240  " pass_mode, pass_nr, show_submissions".
241  " FROM exc_data JOIN object_data ON (exc_data.obj_id = object_data.obj_id)".
242  " WHERE ".$ilDB->in("exc_data.obj_id", $a_ids, false, "integer"));
243  break;
244 
245  case "4.4.0":
246  case "5.0.0":
247  case "5.1.0":
248  $this->getDirectDataFromQuery("SELECT exc_data.obj_id id, title, description,".
249  " pass_mode, pass_nr, show_submissions, compl_by_submission".
250  " FROM exc_data JOIN object_data ON (exc_data.obj_id = object_data.obj_id)".
251  " WHERE ".$ilDB->in("exc_data.obj_id", $a_ids, false, "integer"));
252  break;
253 
254  case "5.2.0":
255  $this->getDirectDataFromQuery("SELECT exc_data.obj_id id, title, description,".
256  " pass_mode, pass_nr, show_submissions, compl_by_submission, tfeedback".
257  " FROM exc_data JOIN object_data ON (exc_data.obj_id = object_data.obj_id)".
258  " WHERE ".$ilDB->in("exc_data.obj_id", $a_ids, false, "integer"));
259  break;
260  }
261  }
262 
263  if ($a_entity == "exc_assignment")
264  {
265  switch ($a_version)
266  {
267  case "4.1.0":
268  $this->getDirectDataFromQuery("SELECT id, exc_id exercise_id, time_stamp deadline, ".
269  " instruction, title, start_time, mandatory, order_nr".
270  " FROM exc_assignment".
271  " WHERE ".$ilDB->in("exc_id", $a_ids, false, "integer"));
272  break;
273 
274  case "4.4.0":
275  $this->getDirectDataFromQuery("SELECT id, exc_id exercise_id, type, time_stamp deadline,".
276  " instruction, title, start_time, mandatory, order_nr, peer, peer_min, peer_dl peer_deadline,".
277  " fb_file feedback_file, fb_cron feedback_cron, fb_date feedback_date".
278  " FROM exc_assignment".
279  " WHERE ".$ilDB->in("exc_id", $a_ids, false, "integer"));
280  break;
281 
282  case "5.0.0":
283  $this->getDirectDataFromQuery("SELECT id, exc_id exercise_id, type, time_stamp deadline,".
284  " instruction, title, start_time, mandatory, order_nr, peer, peer_min, peer_dl peer_deadline,".
285  " peer_file, peer_prsl peer_personal, fb_file feedback_file, fb_cron feedback_cron, fb_date feedback_date".
286  " FROM exc_assignment".
287  " WHERE ".$ilDB->in("exc_id", $a_ids, false, "integer"));
288  break;
289 
290  case "5.1.0":
291  case "5.2.0":
292  $this->getDirectDataFromQuery("SELECT id, exc_id exercise_id, type, time_stamp deadline, deadline2,".
293  " instruction, title, start_time, mandatory, order_nr, team_tutor, max_file, peer, peer_min,".
294  " peer_dl peer_deadline, peer_file, peer_prsl peer_personal, peer_char, peer_unlock, peer_valid,".
295  " peer_text, peer_rating, peer_crit_cat, fb_file feedback_file, fb_cron feedback_cron, fb_date feedback_date".
296  " FROM exc_assignment".
297  " WHERE ".$ilDB->in("exc_id", $a_ids, false, "integer"));
298  break;
299  }
300  }
301 
302  if ($a_entity == "exc_crit_cat")
303  {
304  switch ($a_version)
305  {
306  case "5.1.0":
307  case "5.2.0":
308  $this->getDirectDataFromQuery("SELECT id, parent, title, pos".
309  " FROM exc_crit_cat".
310  " WHERE ".$ilDB->in("parent", $a_ids, false, "integer"));
311  break;
312  }
313  }
314 
315  if ($a_entity == "exc_crit")
316  {
317  switch ($a_version)
318  {
319  case "5.1.0":
320  case "5.2.0":
321  $this->getDirectDataFromQuery("SELECT id, parent, type, title".
322  ", descr, pos, required, def".
323  " FROM exc_crit".
324  " WHERE ".$ilDB->in("parent", $a_ids, false, "integer"));
325  foreach ($this->data as $k => $v)
326  {
327  $this->data[$k]["DefJson"] = "";
328  if ($v["Def"] != "")
329  {
330  $this->data[$k]["DefJson"] = json_encode(unserialize($v["Def"]));
331  }
332  }
333  break;
334  }
335  }
336  }
Add some data
getDirectDataFromQuery($a_query, $a_convert_to_leading_upper=true, $a_set=true)
Get data from query.This is a standard procedure, all db field names are directly mapped to abstract ...
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: