ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilMD5295Educational Class Reference
+ Inheritance diagram for ilMD5295Educational:
+ Collaboration diagram for ilMD5295Educational:

Public Member Functions

getTypicalAgeRangeIds ()
 
getTypicalAgeRange ($a_typical_age_range_id)
 
addTypicalAgeRange ()
 
getDescriptionIds ()
 
getDescription ($a_description_id)
 
addDescription ()
 
getLanguageIds ()
 
getLanguage ($a_language_id)
 
addLanguage ()
 
 setInteractivityType ($a_iat)
 
 getInteractivityType ()
 
 setLearningResourceType ($a_lrt)
 
 getLearningResourceType ()
 
 setInteractivityLevel ($a_iat)
 
 getInteractivityLevel ()
 
 setSemanticDensity ($a_sd)
 
 getSemanticDensity ()
 
 setIntendedEndUserRole ($a_ieur)
 
 getIntendedEndUserRole ()
 
 setContext ($a_context)
 
 getContext ()
 
 setDifficulty ($a_difficulty)
 
 getDifficulty ()
 
 setPhysicalTypicalLearningTime ($months, $days, $hours, $minutes, $seconds)
 
 setTypicalLearningTime ($a_tlt)
 
 getTypicalLearningTime ()
 
 getTypicalLearningTimeSeconds ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
- Public Member Functions inherited from ilMD5295Base
 __construct ( $a_rbac_id=0, $a_obj_id=0, $a_type=0)
 
 setRBACId ($a_id)
 
 getRBACId ()
 
 setObjId ($a_id)
 
 getObjId ()
 
 setObjType ($a_type)
 
 getObjType ()
 
 setMetaId ($a_meta_id, $a_read_data=true)
 
 getMetaId ()
 
 setParentType ($a_parent_type)
 
 getParentType ()
 
 setParentId ($a_id)
 
 getParentId ()
 
 setExportMode ($a_export_mode=true)
 
 getExportMode ()
 
 validate ()
 
 update ()
 
 save ()
 
 delete ()
 
 toXML (&$writer)
 

Static Public Member Functions

static _getId ($a_rbac_id, $a_obj_id)
 
static _getTypicalLearningTimeSeconds ($a_rbac_id, $a_obj_id=0)
 

Additional Inherited Members

- Data Fields inherited from ilMD5295Base
 $rbac_id
 
 $obj_id
 
 $obj_type
 
 $export_mode = false
 
- Protected Attributes inherited from ilMD5295Base
 $log
 

Detailed Description

Definition at line 33 of file class.ilMD5295Educational.php.

Member Function Documentation

◆ __getFields()

ilMD5295Educational::__getFields ( )

Definition at line 375 of file class.ilMD5295Educational.php.

References getContext(), getDifficulty(), getIntendedEndUserRole(), getInteractivityLevel(), getInteractivityType(), getLearningResourceType(), ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), ilMD5295Base\getRBACId(), getSemanticDensity(), and getTypicalLearningTime().

Referenced by save().

376  {
377  return array('rbac_id' => array('integer',$this->getRBACId()),
378  'obj_id' => array('integer',$this->getObjId()),
379  'obj_type' => array('text',$this->getObjType()),
380  'interactivity_type' => array('text',$this->getInteractivityType()),
381  'learning_resource_type' => array('text',$this->getLearningResourceType()),
382  'interactivity_level' => array('text',$this->getInteractivityLevel()),
383  'semantic_density' => array('text',$this->getSemanticDensity()),
384  'intended_end_user_role' => array('text',$this->getIntendedEndUserRole()),
385  'context' => array('text',$this->getContext()),
386  'difficulty' => array('text',$this->getDifficulty()),
387  'typical_learning_time' => array('text',$this->getTypicalLearningTime()));
388  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getId()

static ilMD5295Educational::_getId (   $a_rbac_id,
  $a_obj_id 
)
static

Definition at line 484 of file class.ilMD5295Educational.php.

References $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilMD5295\getEducational().

485  {
486  global $DIC;
487 
488  $ilDB = $DIC['ilDB'];
489 
490  $query = "SELECT meta_educational_id FROM il_meta_educational " .
491  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
492  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer');
493 
494  $res = $ilDB->query($query);
495  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
496  return $row->meta_educational_id;
497  }
498  return false;
499  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ _getTypicalLearningTimeSeconds()

static ilMD5295Educational::_getTypicalLearningTimeSeconds (   $a_rbac_id,
  $a_obj_id = 0 
)
static

Definition at line 501 of file class.ilMD5295Educational.php.

References $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_OBJECT.

502  {
503  global $DIC;
504 
505  $ilDB = $DIC['ilDB'];
506 
507  $a_obj_id = $a_obj_id ? $a_obj_id : $a_rbac_id;
508 
509  $query = "SELECT typical_learning_time FROM il_meta_educational " .
510  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
511  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer');
512  $res = $ilDB->query($query);
513  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
514  include_once './Services/Migration/DBUpdate_5295/classes/class.ilMD5295Utils.php';
515 
516  $time_arr = ilMD5295Utils::_LOMDurationToArray($row->typical_learning_time);
517 
518  return 60 * 60 * 24 * 30 * $time_arr[0] +
519  60 * 60 * 24 * $time_arr[1] +
520  60 * 60 * $time_arr[2] +
521  60 * $time_arr[3] +
522  $time_arr[4];
523  }
524  return 0;
525  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB
$DIC
Definition: xapitoken.php:46

◆ addDescription()

& ilMD5295Educational::addDescription ( )

Definition at line 82 of file class.ilMD5295Educational.php.

References ilMD5295Base\getMetaId(), ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), and ilMD5295Base\getRBACId().

83  {
84  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Description.php';
85 
86  $des = new ilMD5295Description($this->getRBACId(), $this->getObjId(), $this->getObjType());
87  $des->setParentId($this->getMetaId());
88  $des->setParentType('meta_educational');
89 
90  return $des;
91  }
+ Here is the call graph for this function:

◆ addLanguage()

& ilMD5295Educational::addLanguage ( )

Definition at line 110 of file class.ilMD5295Educational.php.

References ilMD5295Base\getMetaId(), ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), and ilMD5295Base\getRBACId().

111  {
112  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Language.php';
113 
114  $lan = new ilMD5295Language($this->getRBACId(), $this->getObjId(), $this->getObjType());
115  $lan->setParentId($this->getMetaId());
116  $lan->setParentType('meta_educational');
117 
118  return $lan;
119  }
+ Here is the call graph for this function:

◆ addTypicalAgeRange()

& ilMD5295Educational::addTypicalAgeRange ( )

Definition at line 54 of file class.ilMD5295Educational.php.

References ilMD5295Base\getMetaId(), ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), and ilMD5295Base\getRBACId().

55  {
56  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295TypicalAgeRange.php';
57 
58  $typ = new ilMD5295TypicalAgeRange($this->getRBACId(), $this->getObjId(), $this->getObjType());
59  $typ->setParentId($this->getMetaId());
60  $typ->setParentType('meta_educational');
61 
62  return $typ;
63  }
+ Here is the call graph for this function:

◆ delete()

ilMD5295Educational::delete ( )

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

References $DIC, $ilDB, $query, $res, getDescription(), getDescriptionIds(), getLanguage(), getLanguageIds(), ilMD5295Base\getMetaId(), getTypicalAgeRange(), and getTypicalAgeRangeIds().

345  {
346  global $DIC;
347 
348  $ilDB = $DIC['ilDB'];
349 
350  if ($this->getMetaId()) {
351  $query = "DELETE FROM il_meta_educational " .
352  "WHERE meta_educational_id = " . $ilDB->quote($this->getMetaId());
353  $res = $ilDB->manipulate($query);
354 
355  foreach ($this->getTypicalAgeRangeIds() as $id) {
356  $typ = $this->getTypicalAgeRange($id);
357  $typ->delete();
358  }
359  foreach ($this->getDescriptionIds() as $id) {
360  $des = $this->getDescription($id);
361  $des->delete();
362  }
363  foreach ($this->getLanguageIds() as $id) {
364  $lan = $this->getLanguage($id);
365  $lan->delete();
366  }
367 
368 
369  return true;
370  }
371  return false;
372  }
& getDescription($a_description_id)
& getTypicalAgeRange($a_typical_age_range_id)
foreach($_POST as $key=> $value) $res
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ getContext()

ilMD5295Educational::getContext ( )

Definition at line 238 of file class.ilMD5295Educational.php.

References $context.

Referenced by __getFields(), and toXML().

239  {
240  return $this->context;
241  }
$context
Definition: webdav.php:26
+ Here is the caller graph for this function:

◆ getDescription()

& ilMD5295Educational::getDescription (   $a_description_id)

Definition at line 70 of file class.ilMD5295Educational.php.

Referenced by delete(), and toXML().

71  {
72  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Description.php';
73 
74  if (!$a_description_id) {
75  return false;
76  }
77  $des = new ilMD5295Description();
78  $des->setMetaId($a_description_id);
79 
80  return $des;
81  }
+ Here is the caller graph for this function:

◆ getDescriptionIds()

& ilMD5295Educational::getDescriptionIds ( )

Definition at line 64 of file class.ilMD5295Educational.php.

References ilMD5295Description\_getIds(), ilMD5295Base\getMetaId(), ilMD5295Base\getObjId(), and ilMD5295Base\getRBACId().

Referenced by delete(), and toXML().

65  {
66  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Description.php';
67 
68  return ilMD5295Description::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_educational');
69  }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDifficulty()

ilMD5295Educational::getDifficulty ( )

Definition at line 257 of file class.ilMD5295Educational.php.

Referenced by __getFields(), and toXML().

258  {
259  return $this->difficulty;
260  }
+ Here is the caller graph for this function:

◆ getIntendedEndUserRole()

ilMD5295Educational::getIntendedEndUserRole ( )

Definition at line 220 of file class.ilMD5295Educational.php.

Referenced by __getFields(), and toXML().

221  {
222  return $this->intended_end_user_role;
223  }
+ Here is the caller graph for this function:

◆ getInteractivityLevel()

ilMD5295Educational::getInteractivityLevel ( )

Definition at line 183 of file class.ilMD5295Educational.php.

Referenced by __getFields(), and toXML().

184  {
185  return $this->interactivity_level;
186  }
+ Here is the caller graph for this function:

◆ getInteractivityType()

ilMD5295Educational::getInteractivityType ( )

Definition at line 135 of file class.ilMD5295Educational.php.

Referenced by __getFields(), and toXML().

136  {
137  return $this->interactivity_type;
138  }
+ Here is the caller graph for this function:

◆ getLanguage()

& ilMD5295Educational::getLanguage (   $a_language_id)

Definition at line 98 of file class.ilMD5295Educational.php.

Referenced by delete(), and toXML().

99  {
100  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Language.php';
101 
102  if (!$a_language_id) {
103  return false;
104  }
105  $lan = new ilMD5295Language();
106  $lan->setMetaId($a_language_id);
107 
108  return $lan;
109  }
+ Here is the caller graph for this function:

◆ getLanguageIds()

& ilMD5295Educational::getLanguageIds ( )

Definition at line 92 of file class.ilMD5295Educational.php.

References ilMD5295Language\_getIds(), ilMD5295Base\getMetaId(), ilMD5295Base\getObjId(), and ilMD5295Base\getRBACId().

Referenced by delete(), and toXML().

93  {
94  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Language.php';
95 
96  return ilMD5295Language::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_educational');
97  }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLearningResourceType()

ilMD5295Educational::getLearningResourceType ( )

Definition at line 164 of file class.ilMD5295Educational.php.

Referenced by __getFields(), and toXML().

165  {
166  return $this->learning_resource_type;
167  }
+ Here is the caller graph for this function:

◆ getSemanticDensity()

ilMD5295Educational::getSemanticDensity ( )

Definition at line 202 of file class.ilMD5295Educational.php.

Referenced by __getFields(), and toXML().

203  {
204  return $this->semantic_density;
205  }
+ Here is the caller graph for this function:

◆ getTypicalAgeRange()

& ilMD5295Educational::getTypicalAgeRange (   $a_typical_age_range_id)

Definition at line 42 of file class.ilMD5295Educational.php.

Referenced by delete(), and toXML().

43  {
44  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295TypicalAgeRange.php';
45 
46  if (!$a_typical_age_range_id) {
47  return false;
48  }
49  $typ = new ilMD5295TypicalAgeRange();
50  $typ->setMetaId($a_typical_age_range_id);
51 
52  return $typ;
53  }
+ Here is the caller graph for this function:

◆ getTypicalAgeRangeIds()

& ilMD5295Educational::getTypicalAgeRangeIds ( )

Definition at line 36 of file class.ilMD5295Educational.php.

References ilMD5295TypicalAgeRange\_getIds(), ilMD5295Base\getMetaId(), ilMD5295Base\getObjId(), and ilMD5295Base\getRBACId().

Referenced by delete(), and toXML().

37  {
38  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295TypicalAgeRange.php';
39 
40  return ilMD5295TypicalAgeRange::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_educational');
41  }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTypicalLearningTime()

ilMD5295Educational::getTypicalLearningTime ( )

Definition at line 296 of file class.ilMD5295Educational.php.

Referenced by __getFields(), getTypicalLearningTimeSeconds(), and toXML().

297  {
298  return $this->typical_learning_time;
299  }
+ Here is the caller graph for this function:

◆ getTypicalLearningTimeSeconds()

ilMD5295Educational::getTypicalLearningTimeSeconds ( )

Definition at line 301 of file class.ilMD5295Educational.php.

References getTypicalLearningTime().

302  {
303  include_once './Services/Migration/DBUpdate_5295/classes/class.ilMD5295Utils.php';
304 
305  $time_arr = ilMD5295Utils::_LOMDurationToArray($this->getTypicalLearningTime());
306 
307  return 60 * 60 * 24 * 30 * $time_arr[0] + 60 * 60 * 24 * $time_arr[1] + 60 * 60 * $time_arr[2] + 60 * $time_arr[3] + $time_arr[4];
308  }
+ Here is the call graph for this function:

◆ read()

ilMD5295Educational::read ( )

Definition at line 390 of file class.ilMD5295Educational.php.

References $DIC, $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, ilMD5295Base\getMetaId(), setContext(), setDifficulty(), setIntendedEndUserRole(), setInteractivityLevel(), setInteractivityType(), setLearningResourceType(), ilMD5295Base\setObjId(), ilMD5295Base\setObjType(), ilMD5295Base\setRBACId(), setSemanticDensity(), and setTypicalLearningTime().

391  {
392  global $DIC;
393 
394  $ilDB = $DIC['ilDB'];
395 
396  if ($this->getMetaId()) {
397  $query = "SELECT * FROM il_meta_educational " .
398  "WHERE meta_educational_id = " . $ilDB->quote($this->getMetaId(), 'integer');
399 
400 
401  $res = $this->db->query($query);
402  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
403  $this->setRBACId($row->rbac_id);
404  $this->setObjId($row->obj_id);
405  $this->setObjType($row->obj_type);
406  $this->setInteractivityType($row->interactivity_type);
407  $this->setLearningResourceType($row->learning_resource_type);
408  $this->setInteractivityLevel($row->interactivity_level);
409  $this->setSemanticDensity($row->semantic_density);
410  $this->setIntendedEndUserRole($row->intended_end_user_role);
411  $this->setContext($row->context);
412  $this->setDifficulty($row->difficulty);
413  $this->setTypicalLearningTime($row->typical_learning_time);
414  }
415  return true;
416  }
417  return false;
418  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ save()

ilMD5295Educational::save ( )

Definition at line 310 of file class.ilMD5295Educational.php.

References $DIC, $ilDB, __getFields(), ilMD5295Base\getMetaId(), and ilMD5295Base\setMetaId().

311  {
312  global $DIC;
313 
314  $ilDB = $DIC['ilDB'];
315 
316  $fields = $this->__getFields();
317  $fields['meta_educational_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_educational'));
318 
319  if ($this->db->insert('il_meta_educational', $fields)) {
320  $this->setMetaId($next_id);
321  return $this->getMetaId();
322  }
323  return false;
324  }
global $ilDB
$DIC
Definition: xapitoken.php:46
setMetaId($a_meta_id, $a_read_data=true)
+ Here is the call graph for this function:

◆ setContext()

ilMD5295Educational::setContext (   $a_context)

Definition at line 224 of file class.ilMD5295Educational.php.

Referenced by read().

225  {
226  switch ($a_context) {
227  case 'School':
228  case 'HigherEducation':
229  case 'Training':
230  case 'Other':
231  $this->context = $a_context;
232  return true;
233 
234  default:
235  return false;
236  }
237  }
+ Here is the caller graph for this function:

◆ setDifficulty()

ilMD5295Educational::setDifficulty (   $a_difficulty)

Definition at line 242 of file class.ilMD5295Educational.php.

Referenced by read().

243  {
244  switch ($a_difficulty) {
245  case 'VeryEasy':
246  case 'Easy':
247  case 'Medium':
248  case 'Difficult':
249  case 'VeryDifficult':
250  $this->difficulty = $a_difficulty;
251  return true;
252 
253  default:
254  return false;
255  }
256  }
+ Here is the caller graph for this function:

◆ setIntendedEndUserRole()

ilMD5295Educational::setIntendedEndUserRole (   $a_ieur)

Definition at line 206 of file class.ilMD5295Educational.php.

Referenced by read().

207  {
208  switch ($a_ieur) {
209  case 'Teacher':
210  case 'Author':
211  case 'Learner':
212  case 'Manager':
213  $this->intended_end_user_role = $a_ieur;
214  return true;
215 
216  default:
217  return false;
218  }
219  }
+ Here is the caller graph for this function:

◆ setInteractivityLevel()

ilMD5295Educational::setInteractivityLevel (   $a_iat)

Definition at line 168 of file class.ilMD5295Educational.php.

Referenced by read().

169  {
170  switch ($a_iat) {
171  case 'VeryLow':
172  case 'Low':
173  case 'Medium':
174  case 'High':
175  case 'VeryHigh':
176  $this->interactivity_level = $a_iat;
177  return true;
178 
179  default:
180  return false;
181  }
182  }
+ Here is the caller graph for this function:

◆ setInteractivityType()

ilMD5295Educational::setInteractivityType (   $a_iat)

Definition at line 122 of file class.ilMD5295Educational.php.

Referenced by read().

123  {
124  switch ($a_iat) {
125  case 'Active':
126  case 'Expositive':
127  case 'Mixed':
128  $this->interactivity_type = $a_iat;
129  return true;
130 
131  default:
132  return false;
133  }
134  }
+ Here is the caller graph for this function:

◆ setLearningResourceType()

ilMD5295Educational::setLearningResourceType (   $a_lrt)

Definition at line 139 of file class.ilMD5295Educational.php.

Referenced by read().

140  {
141  switch ($a_lrt) {
142  case 'Exercise':
143  case 'Simulation':
144  case 'Questionnaire':
145  case 'Diagram':
146  case 'Figure':
147  case 'Graph':
148  case 'Index':
149  case 'Slide':
150  case 'Table':
151  case 'NarrativeText':
152  case 'Exam':
153  case 'Experiment':
154  case 'ProblemStatement':
155  case 'SelfAssessment':
156  case 'Lecture':
157  $this->learning_resource_type = $a_lrt;
158  return true;
159 
160  default:
161  return false;
162  }
163  }
+ Here is the caller graph for this function:

◆ setPhysicalTypicalLearningTime()

ilMD5295Educational::setPhysicalTypicalLearningTime (   $months,
  $days,
  $hours,
  $minutes,
  $seconds 
)

Definition at line 262 of file class.ilMD5295Educational.php.

References setTypicalLearningTime().

263  {
264  if (!$months and !$days and !$hours and !$minutes and !$seconds) {
265  $this->setTypicalLearningTime('PT00H00M');
266  return true;
267  }
268  $tlt = 'P';
269  if ($months) {
270  $tlt .= ($months . 'M');
271  }
272  if ($days) {
273  $tlt .= ($days . 'D');
274  }
275  if ($hours or $minutes or $seconds) {
276  $tlt .= 'T';
277  }
278  if ($hours) {
279  $tlt .= ($hours . 'H');
280  }
281  if ($minutes) {
282  $tlt .= ($minutes . 'M');
283  }
284  if ($seconds) {
285  $tlt .= ($seconds . 'S');
286  }
287  $this->setTypicalLearningTime($tlt);
288  return true;
289  }
+ Here is the call graph for this function:

◆ setSemanticDensity()

ilMD5295Educational::setSemanticDensity (   $a_sd)

Definition at line 187 of file class.ilMD5295Educational.php.

Referenced by read().

188  {
189  switch ($a_sd) {
190  case 'VeryLow':
191  case 'Low':
192  case 'Medium':
193  case 'High':
194  case 'VeryHigh':
195  $this->semantic_density = $a_sd;
196  return true;
197 
198  default:
199  return false;
200  }
201  }
+ Here is the caller graph for this function:

◆ setTypicalLearningTime()

ilMD5295Educational::setTypicalLearningTime (   $a_tlt)

Definition at line 292 of file class.ilMD5295Educational.php.

Referenced by read(), and setPhysicalTypicalLearningTime().

293  {
294  $this->typical_learning_time = $a_tlt;
295  }
+ Here is the caller graph for this function:

◆ toXML()

ilMD5295Educational::toXML ( $writer)

Definition at line 425 of file class.ilMD5295Educational.php.

References $lang, getContext(), getDescription(), getDescriptionIds(), getDifficulty(), getIntendedEndUserRole(), getInteractivityLevel(), getInteractivityType(), getLanguage(), getLanguageIds(), getLearningResourceType(), ilMD5295Base\getObjId(), ilMD5295Base\getRBACId(), getSemanticDensity(), getTypicalAgeRange(), getTypicalAgeRangeIds(), and getTypicalLearningTime().

426  {
427  $writer->xmlStartTag(
428  'Educational',
429  array('InteractivityType' => $this->getInteractivityType()
430  ? $this->getInteractivityType()
431  : 'Active',
432  'LearningResourceType' => $this->getLearningResourceType()
433  ? $this->getLearningResourceType()
434  : 'Exercise',
435  'InteractivityLevel' => $this->getInteractivityLevel()
436  ? $this->getInteractivityLevel()
437  : 'Medium',
438  'SemanticDensity' => $this->getSemanticDensity()
439  ? $this->getSemanticDensity()
440  : 'Medium',
441  'IntendedEndUserRole' => $this->getIntendedEndUserRole()
442  ? $this->getIntendedEndUserRole()
443  : 'Learner',
444  'Context' => $this->getContext()
445  ? $this->getContext()
446  : 'Other',
447  'Difficulty' => $this->getDifficulty()
448  ? $this->getDifficulty()
449  : 'Medium')
450  );
451 
452  // TypicalAgeRange
453  $typ_ages = $this->getTypicalAgeRangeIds();
454  foreach ($typ_ages as $id) {
455  $key = &$this->getTypicalAgeRange($id);
456 
457  // extra test due to bug 5316 (may be due to eLaix import)
458  if (is_object($key)) {
459  $key->toXML($writer);
460  }
461  }
462  if (!count($typ_ages)) {
463  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295TypicalAgeRange.php';
464  $typ = new ilMD5295TypicalAgeRange($this->getRBACId(), $this->getObjId());
465  $typ->toXML($writer);
466  }
467 
468  // TypicalLearningTime
469  $writer->xmlElement('TypicalLearningTime', null, $this->getTypicalLearningTime());
470 
471  // Description
472  foreach ($this->getDescriptionIds() as $id) {
473  $key = &$this->getDescription($id);
474  $key->toXML($writer);
475  }
476  // Language
477  foreach ($this->getLanguageIds() as $id) {
478  $lang = &$this->getLanguage($id);
479  $lang->toXML($writer);
480  }
481  $writer->xmlEndTag('Educational');
482  }
& getDescription($a_description_id)
& getTypicalAgeRange($a_typical_age_range_id)
$lang
Definition: xapiexit.php:8
+ Here is the call graph for this function:

◆ update()

ilMD5295Educational::update ( )

Definition at line 326 of file class.ilMD5295Educational.php.

References $DIC, $ilDB, and ilMD5295Base\getMetaId().

327  {
328  global $DIC;
329 
330  $ilDB = $DIC['ilDB'];
331 
332  if ($this->getMetaId()) {
333  if ($this->db->update(
334  'il_meta_educational',
335  $this->__getFields(),
336  array("meta_educational_id" => array('integer',$this->getMetaId()))
337  )) {
338  return true;
339  }
340  }
341  return false;
342  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

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