ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilIndividualAssessmentDataSet.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */
3 require_once("./Services/DataSet/classes/class.ilDataSet.php");
4 
11 
15  public function getSupportedVersions() {
16  return array('5.2.0');
17  }
18 
19 
26  public function getXmlNamespace($a_entity, $a_schema_version) {
27  return 'http://www.ilias.de/xml/Modules/IndividualAssessment/'.$a_entity;
28  }
29 
38  protected function getTypes($a_entity, $a_version) {
39  switch ($a_entity) {
40  case 'iass':
41  return array(
42  "id" => "integer",
43  "title" => "text",
44  "description" => "text",
45  "content" => "text",
46  "recordTemplate" => "text",
47  );
48  default:
49  return array();
50  }
51  }
52 
63  protected function getDependencies($a_entity, $a_version, $a_rec, $a_ids) {
64  return false;
65  }
66 
74  public function readData($a_entity, $a_version, $a_ids) {
75  $this->data = array();
76  if (!is_array($a_ids)) {
77  $a_ids = array($a_ids);
78  }
79  $this->_readData($a_entity, $a_ids);
80  }
81 
88  protected function _readData($a_entity, $a_ids) {
89  switch ($a_entity) {
90  case 'iass':
91  foreach ($a_ids as $iass_id) {
92  if (ilObject::_lookupType($iass_id) == 'iass') {
93  $obj = new ilObjIndividualAssessment($iass_id, false);
94  $data = array(
95  'id' => $bibl_id,
96  'title' => $obj->getTitle(),
97  'description' => $obj->getDescription(),
98  'content' => $obj->getSettings()->content(),
99  'recordTemplate' => $obj->getSettings()->recordTemplate(),
100  );
101  $this->data[] = $data;
102  }
103  }
104  break;
105  default:
106  }
107  }
108 }
Add some data
For the purpose of streamlining the grading and learning-process status definition outside of tests...
Individual Assessment dataset class.
_readData($a_entity, $a_ids)
Build data array, data is read from cache except iass object itself.
getDependencies($a_entity, $a_version, $a_rec, $a_ids)
Return dependencies form entities to other entities (in our case these are all the DB relations) ...
getTypes($a_entity, $a_version)
Map XML attributes of entities to datatypes (text, integer...)
readData($a_entity, $a_version, $a_ids)
Read data from Cache for a given entity and ID(s)
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
A dataset contains in data in a common structure that can be shared and transformed for different pur...