ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilMDEducational Class Reference
+ Inheritance diagram for ilMDEducational:
+ Collaboration diagram for ilMDEducational:

Public Member Functions

 ilMDEducational ($a_rbac_id=0, $a_obj_id=0, $a_obj_type='')
 
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)
 
 _getId ($a_rbac_id, $a_obj_id)
 
 _getTypicalLearningTimeSeconds ($a_rbac_id, $a_obj_id=0)
 
 ilMDEducational ($a_rbac_id=0, $a_obj_id=0, $a_obj_type='')
 
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 ()
 
 setTypicalLearningTime ($a_tlt)
 
 getTypicalLearningTime ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
 _getId ($a_rbac_id, $a_obj_id)
 
- Public Member Functions inherited from ilMDBase
 ilMDBase ($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)
 
 ilMDBase ($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 ()
 
 validate ()
 
 update ()
 
 save ()
 
 delete ()
 
 toXML (&$writer)
 

Additional Inherited Members

- Data Fields inherited from ilMDBase
 $rbac_id
 
 $obj_id
 
 $obj_type
 
 $export_mode = false
 

Detailed Description

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

Member Function Documentation

◆ __getFields() [1/2]

ilMDEducational::__getFields ( )

Definition at line 398 of file class.ilMDEducational.php.

399 {
400 return array('rbac_id' => array('integer',$this->getRBACId()),
401 'obj_id' => array('integer',$this->getObjId()),
402 'obj_type' => array('text',$this->getObjType()),
403 'interactivity_type' => array('text',$this->getInteractivityType()),
404 'learning_resource_type' => array('text',$this->getLearningResourceType()),
405 'interactivity_level' => array('text',$this->getInteractivityLevel()),
406 'semantic_density' => array('text',$this->getSemanticDensity()),
407 'intended_end_user_role' => array('text',$this->getIntendedEndUserRole()),
408 'context' => array('text',$this->getContext()),
409 'difficulty' => array('text',$this->getDifficulty()),
410 'typical_learning_time' => array('text',$this->getTypicalLearningTime()));
411 }

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

Referenced by save().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __getFields() [2/2]

ilMDEducational::__getFields ( )

Definition at line 353 of file class.ilMDEducational.php.

354 {
355 return array('rbac_id' => $this->getRBACId(),
356 'obj_id' => $this->getObjId(),
357 'obj_type' => ilUtil::prepareDBString($this->getObjType()),
358 'interactivity_type' => ilUtil::prepareDBString($this->getInteractivityType()),
359 'learning_resource_type' => ilUtil::prepareDBString($this->getLearningResourceType()),
360 'interactivity_level' => ilUtil::prepareDBString($this->getInteractivityLevel()),
361 'semantic_density' => ilUtil::prepareDBString($this->getSemanticDensity()),
362 'intended_end_user_role' => ilUtil::prepareDBString($this->getIntendedEndUserRole()),
363 'context' => ilUtil::prepareDBString($this->getContext()),
364 'difficulty' => ilUtil::prepareDBString($this->getDifficulty()),
365 'typical_learning_time' => ilUtil::prepareDBString($this->getTypicalLearningTime()));
366 }
static prepareDBString($a_str)
prepare a string for db writing (insert/update)

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

+ Here is the call graph for this function:

◆ _getId() [1/2]

ilMDEducational::_getId (   $a_rbac_id,
  $a_obj_id 
)

Definition at line 511 of file class.ilMDEducational.php.

512 {
513 global $ilDB;
514
515 $query = "SELECT meta_educational_id FROM il_meta_educational ".
516 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,'integer')." ".
517 "AND obj_id = ".$ilDB->quote($a_obj_id ,'integer');
518
519 $res = $ilDB->query($query);
520 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
521 {
522 return $row->meta_educational_id;
523 }
524 return false;
525 }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
global $ilDB

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilMD\getEducational().

+ Here is the caller graph for this function:

◆ _getId() [2/2]

ilMDEducational::_getId (   $a_rbac_id,
  $a_obj_id 
)

Definition at line 439 of file class.ilMDEducational.php.

440 {
441 global $ilDB;
442
443 $query = "SELECT meta_educational_id FROM il_meta_educational ".
444 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id)." ".
445 "AND obj_id = ".$ilDB->quote($a_obj_id);
446
447 $res = $ilDB->query($query);
448 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
449 {
450 return $row->meta_educational_id;
451 }
452 return false;
453 }

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

◆ _getTypicalLearningTimeSeconds()

ilMDEducational::_getTypicalLearningTimeSeconds (   $a_rbac_id,
  $a_obj_id = 0 
)

Definition at line 527 of file class.ilMDEducational.php.

528 {
529 global $ilDB;
530
531 $a_obj_id = $a_obj_id ? $a_obj_id : $a_rbac_id;
532
533 $query = "SELECT typical_learning_time FROM il_meta_educational ".
534 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,'integer')." ".
535 "AND obj_id = ".$ilDB->quote($a_obj_id ,'integer');
536 $res = $ilDB->query($query);
537 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
538 {
539 include_once './Services/MetaData/classes/class.ilMDUtils.php';
540
541 $time_arr = ilMDUtils::_LOMDurationToArray($row->typical_learning_time);
542
543 return 60 * 60 * 24 * 30 * $time_arr[0] +
544 60 * 60 * 24 * $time_arr[1] +
545 60 * 60 * $time_arr[2] +
546 60 * $time_arr[3] +
547 $time_arr[4];
548 }
549 return 0;
550 }
_LOMDurationToArray($a_string)
LOM datatype duration is a string like P2M4DT7H18M2S (2 months 4 days 7 hours 18 minutes 2 seconds) T...

References $ilDB, $query, $res, $row, ilMDUtils\_LOMDurationToArray(), and DB_FETCHMODE_OBJECT.

Referenced by ilLearningProgressBaseGUI\__readItemStatusInfo(), ilCourseContentGUI\__renderItem(), ilCourseContentGUI\__renderUserItem(), ilLearningProgressBaseGUI\__showObjectDetails(), ilLPStatusTypicalLearningTime\_getStatusInfo(), ilLPStatusCollectionTLT\_getStatusInfo(), ilLPStatus\_getTypicalLearningTime(), ilLPStatusTypicalLearningTime\determinePercentage(), ilCourseContentGUI\editTimings(), and ilLPCollectionOfLMChapters\getPossibleItems().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addDescription() [1/2]

& ilMDEducational::addDescription ( )

Definition at line 91 of file class.ilMDEducational.php.

92 {
93 include_once 'Services/MetaData/classes/class.ilMDDescription.php';
94
95 $des =& new ilMDDescription($this->getRBACId(),$this->getObjId(),$this->getObjType());
96 $des->setParentId($this->getMetaId());
97 $des->setParentType('meta_educational');
98
99 return $des;
100 }

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

+ Here is the call graph for this function:

◆ addDescription() [2/2]

& ilMDEducational::addDescription ( )

Definition at line 91 of file class.ilMDEducational.php.

92 {
93 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
94
95 $des =& new ilMDDescription($this->getRBACId(),$this->getObjId(),$this->getObjType());
96 $des->setParentId($this->getMetaId());
97 $des->setParentType('meta_educational');
98
99 return $des;
100 }

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

+ Here is the call graph for this function:

◆ addLanguage() [1/2]

& ilMDEducational::addLanguage ( )

Definition at line 120 of file class.ilMDEducational.php.

121 {
122 include_once 'Services/MetaData/classes/class.ilMDLanguage.php';
123
124 $lan =& new ilMDLanguage($this->getRBACId(),$this->getObjId(),$this->getObjType());
125 $lan->setParentId($this->getMetaId());
126 $lan->setParentType('meta_educational');
127
128 return $lan;
129 }

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

+ Here is the call graph for this function:

◆ addLanguage() [2/2]

& ilMDEducational::addLanguage ( )

Definition at line 120 of file class.ilMDEducational.php.

121 {
122 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
123
124 $lan =& new ilMDLanguage($this->getRBACId(),$this->getObjId(),$this->getObjType());
125 $lan->setParentId($this->getMetaId());
126 $lan->setParentType('meta_educational');
127
128 return $lan;
129 }

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

+ Here is the call graph for this function:

◆ addTypicalAgeRange() [1/2]

& ilMDEducational::addTypicalAgeRange ( )

Definition at line 62 of file class.ilMDEducational.php.

63 {
64 include_once 'Services/MetaData/classes/class.ilMDTypicalAgeRange.php';
65
66 $typ =& new ilMDTypicalAgeRange($this->getRBACId(),$this->getObjId(),$this->getObjType());
67 $typ->setParentId($this->getMetaId());
68 $typ->setParentType('meta_educational');
69
70 return $typ;
71 }

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

+ Here is the call graph for this function:

◆ addTypicalAgeRange() [2/2]

& ilMDEducational::addTypicalAgeRange ( )

Definition at line 62 of file class.ilMDEducational.php.

63 {
64 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDTypicalAgeRange.php';
65
66 $typ =& new ilMDTypicalAgeRange($this->getRBACId(),$this->getObjId(),$this->getObjType());
67 $typ->setParentId($this->getMetaId());
68 $typ->setParentType('meta_educational');
69
70 return $typ;
71 }

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

+ Here is the call graph for this function:

◆ delete() [1/2]

ilMDEducational::delete ( )

Reimplemented from ilMDBase.

Definition at line 365 of file class.ilMDEducational.php.

366 {
367 global $ilDB;
368
369 if($this->getMetaId())
370 {
371 $query = "DELETE FROM il_meta_educational ".
372 "WHERE meta_educational_id = ".$ilDB->quote($this->getMetaId());
373 $res = $ilDB->manipulate($query);
374
375 foreach($this->getTypicalAgeRangeIds() as $id)
376 {
377 $typ = $this->getTypicalAgeRange($id);
378 $typ->delete();
379 }
380 foreach($this->getDescriptionIds() as $id)
381 {
382 $des = $this->getDescription($id);
383 $des->delete();
384 }
385 foreach($this->getLanguageIds() as $id)
386 {
387 $lan = $this->getLanguage($id);
388 $lan->delete();
389 }
390
391
392 return true;
393 }
394 return false;
395 }
& getTypicalAgeRange($a_typical_age_range_id)
& getDescription($a_description_id)
& getLanguage($a_language_id)

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

+ Here is the call graph for this function:

◆ delete() [2/2]

ilMDEducational::delete ( )

Reimplemented from ilMDBase.

Definition at line 319 of file class.ilMDEducational.php.

320 {
321 global $ilDB;
322
323 if($this->getMetaId())
324 {
325 $query = "DELETE FROM il_meta_educational ".
326 "WHERE meta_educational_id = ".$ilDB->quote($this->getMetaId());
327
328 $this->db->query($query);
329
330 foreach($this->getTypicalAgeRangeIds() as $id)
331 {
332 $typ =& $this->getTypicalAgeRange($id);
333 $typ->delete();
334 }
335 foreach($this->getDescriptionIds() as $id)
336 {
337 $des =& $this->getDescription($id);
338 $des->delete();
339 }
340 foreach($this->getLanguageIds() as $id)
341 {
342 $lan =& $this->getLanguage($id);
343 $lan->delete();
344 }
345
346
347 return true;
348 }
349 return false;
350 }

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

+ Here is the call graph for this function:

◆ getContext() [1/2]

ilMDEducational::getContext ( )

Definition at line 254 of file class.ilMDEducational.php.

255 {
256 return $this->context;
257 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getContext() [2/2]

ilMDEducational::getContext ( )

Definition at line 254 of file class.ilMDEducational.php.

255 {
256 return $this->context;
257 }

◆ getDescription() [1/2]

& ilMDEducational::getDescription (   $a_description_id)

Definition at line 78 of file class.ilMDEducational.php.

79 {
80 include_once 'Services/MetaData/classes/class.ilMDDescription.php';
81
82 if(!$a_description_id)
83 {
84 return false;
85 }
86 $des =& new ilMDDescription();
87 $des->setMetaId($a_description_id);
88
89 return $des;
90 }

Referenced by delete(), and toXML().

+ Here is the caller graph for this function:

◆ getDescription() [2/2]

& ilMDEducational::getDescription (   $a_description_id)

Definition at line 78 of file class.ilMDEducational.php.

79 {
80 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
81
82 if(!$a_description_id)
83 {
84 return false;
85 }
86 $des =& new ilMDDescription();
87 $des->setMetaId($a_description_id);
88
89 return $des;
90 }

◆ getDescriptionIds() [1/2]

& ilMDEducational::getDescriptionIds ( )

Definition at line 72 of file class.ilMDEducational.php.

73 {
74 include_once 'Services/MetaData/classes/class.ilMDDescription.php';
75
76 return ilMDDescription::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_educational');
77 }
_getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)

References ilMDDescription\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

Referenced by delete(), and toXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDescriptionIds() [2/2]

& ilMDEducational::getDescriptionIds ( )

Definition at line 72 of file class.ilMDEducational.php.

73 {
74 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
75
76 return ilMDDescription::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_educational');
77 }

References ilMDDescription\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

+ Here is the call graph for this function:

◆ getDifficulty() [1/2]

ilMDEducational::getDifficulty ( )

Definition at line 274 of file class.ilMDEducational.php.

275 {
276 return $this->difficulty;
277 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getDifficulty() [2/2]

ilMDEducational::getDifficulty ( )

Definition at line 274 of file class.ilMDEducational.php.

275 {
276 return $this->difficulty;
277 }

◆ getIntendedEndUserRole() [1/2]

ilMDEducational::getIntendedEndUserRole ( )

Definition at line 235 of file class.ilMDEducational.php.

236 {
237 return $this->intended_end_user_role;
238 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getIntendedEndUserRole() [2/2]

ilMDEducational::getIntendedEndUserRole ( )

Definition at line 235 of file class.ilMDEducational.php.

236 {
237 return $this->intended_end_user_role;
238 }

◆ getInteractivityLevel() [1/2]

ilMDEducational::getInteractivityLevel ( )

Definition at line 196 of file class.ilMDEducational.php.

197 {
198 return $this->interactivity_level;
199 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getInteractivityLevel() [2/2]

ilMDEducational::getInteractivityLevel ( )

Definition at line 196 of file class.ilMDEducational.php.

197 {
198 return $this->interactivity_level;
199 }

◆ getInteractivityType() [1/2]

ilMDEducational::getInteractivityType ( )

Definition at line 146 of file class.ilMDEducational.php.

147 {
148 return $this->interactivity_type;
149 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getInteractivityType() [2/2]

ilMDEducational::getInteractivityType ( )

Definition at line 146 of file class.ilMDEducational.php.

147 {
148 return $this->interactivity_type;
149 }

◆ getLanguage() [1/2]

& ilMDEducational::getLanguage (   $a_language_id)

Definition at line 107 of file class.ilMDEducational.php.

108 {
109 include_once 'Services/MetaData/classes/class.ilMDLanguage.php';
110
111 if(!$a_language_id)
112 {
113 return false;
114 }
115 $lan =& new ilMDLanguage();
116 $lan->setMetaId($a_language_id);
117
118 return $lan;
119 }

Referenced by delete(), and toXML().

+ Here is the caller graph for this function:

◆ getLanguage() [2/2]

& ilMDEducational::getLanguage (   $a_language_id)

Definition at line 107 of file class.ilMDEducational.php.

108 {
109 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
110
111 if(!$a_language_id)
112 {
113 return false;
114 }
115 $lan =& new ilMDLanguage();
116 $lan->setMetaId($a_language_id);
117
118 return $lan;
119 }

◆ getLanguageIds() [1/2]

& ilMDEducational::getLanguageIds ( )

Definition at line 101 of file class.ilMDEducational.php.

102 {
103 include_once 'Services/MetaData/classes/class.ilMDLanguage.php';
104
105 return ilMDLanguage::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_educational');
106 }
_getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)

References ilMDLanguage\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

Referenced by delete(), and toXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLanguageIds() [2/2]

& ilMDEducational::getLanguageIds ( )

Definition at line 101 of file class.ilMDEducational.php.

102 {
103 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
104
105 return ilMDLanguage::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_educational');
106 }

References ilMDLanguage\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

+ Here is the call graph for this function:

◆ getLearningResourceType() [1/2]

ilMDEducational::getLearningResourceType ( )

Definition at line 176 of file class.ilMDEducational.php.

177 {
178 return $this->learning_resource_type;
179 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getLearningResourceType() [2/2]

ilMDEducational::getLearningResourceType ( )

Definition at line 176 of file class.ilMDEducational.php.

177 {
178 return $this->learning_resource_type;
179 }

◆ getSemanticDensity() [1/2]

ilMDEducational::getSemanticDensity ( )

Definition at line 216 of file class.ilMDEducational.php.

217 {
218 return $this->semantic_density;
219 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getSemanticDensity() [2/2]

ilMDEducational::getSemanticDensity ( )

Definition at line 216 of file class.ilMDEducational.php.

217 {
218 return $this->semantic_density;
219 }

◆ getTypicalAgeRange() [1/2]

& ilMDEducational::getTypicalAgeRange (   $a_typical_age_range_id)

Definition at line 49 of file class.ilMDEducational.php.

50 {
51 include_once 'Services/MetaData/classes/class.ilMDTypicalAgeRange.php';
52
53 if(!$a_typical_age_range_id)
54 {
55 return false;
56 }
57 $typ =& new ilMDTypicalAgeRange();
58 $typ->setMetaId($a_typical_age_range_id);
59
60 return $typ;
61 }

Referenced by delete(), and toXML().

+ Here is the caller graph for this function:

◆ getTypicalAgeRange() [2/2]

& ilMDEducational::getTypicalAgeRange (   $a_typical_age_range_id)

Definition at line 49 of file class.ilMDEducational.php.

50 {
51 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDTypicalAgeRange.php';
52
53 if(!$a_typical_age_range_id)
54 {
55 return false;
56 }
57 $typ =& new ilMDTypicalAgeRange();
58 $typ->setMetaId($a_typical_age_range_id);
59
60 return $typ;
61 }

◆ getTypicalAgeRangeIds() [1/2]

& ilMDEducational::getTypicalAgeRangeIds ( )

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

44 {
45 include_once 'Services/MetaData/classes/class.ilMDTypicalAgeRange.php';
46
47 return ilMDTypicalAgeRange::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_educational');
48 }
_getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)

References ilMDTypicalAgeRange\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

Referenced by delete(), and toXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTypicalAgeRangeIds() [2/2]

& ilMDEducational::getTypicalAgeRangeIds ( )

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

44 {
45 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDTypicalAgeRange.php';
46
47 return ilMDTypicalAgeRange::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_educational');
48 }

References ilMDTypicalAgeRange\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

+ Here is the call graph for this function:

◆ getTypicalLearningTime() [1/2]

ilMDEducational::getTypicalLearningTime ( )

Definition at line 320 of file class.ilMDEducational.php.

321 {
322 return $this->typical_learning_time;
323 }

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

+ Here is the caller graph for this function:

◆ getTypicalLearningTime() [2/2]

ilMDEducational::getTypicalLearningTime ( )

Definition at line 282 of file class.ilMDEducational.php.

283 {
284 return $this->typical_learning_time;
285 }

◆ getTypicalLearningTimeSeconds()

ilMDEducational::getTypicalLearningTimeSeconds ( )

Definition at line 325 of file class.ilMDEducational.php.

326 {
327 include_once './Services/MetaData/classes/class.ilMDUtils.php';
328
330
331 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];
332 }

References ilMDUtils\_LOMDurationToArray(), and getTypicalLearningTime().

+ Here is the call graph for this function:

◆ ilMDEducational() [1/2]

ilMDEducational::ilMDEducational (   $a_rbac_id = 0,
  $a_obj_id = 0,
  $a_obj_type = '' 
)

Definition at line 35 of file class.ilMDEducational.php.

36 {
37 parent::ilMDBase($a_rbac_id,
38 $a_obj_id,
39 $a_obj_type);
40 }

◆ ilMDEducational() [2/2]

ilMDEducational::ilMDEducational (   $a_rbac_id = 0,
  $a_obj_id = 0,
  $a_obj_type = '' 
)

Definition at line 35 of file class.ilMDEducational.php.

36 {
37 parent::ilMDBase($a_rbac_id,
38 $a_obj_id,
39 $a_obj_type);
40 }

◆ read() [1/2]

ilMDEducational::read ( )

Definition at line 413 of file class.ilMDEducational.php.

414 {
415 global $ilDB;
416
417 if($this->getMetaId())
418 {
419
420 $query = "SELECT * FROM il_meta_educational ".
421 "WHERE meta_educational_id = ".$ilDB->quote($this->getMetaId() ,'integer');
422
423
424 $res = $this->db->query($query);
425 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
426 {
427 $this->setRBACId($row->rbac_id);
428 $this->setObjId($row->obj_id);
429 $this->setObjType($row->obj_type);
430 $this->setInteractivityType($row->interactivity_type);
431 $this->setLearningResourceType($row->learning_resource_type);
432 $this->setInteractivityLevel($row->interactivity_level);
433 $this->setSemanticDensity($row->semantic_density);
434 $this->setIntendedEndUserRole($row->intended_end_user_role);
435 $this->setContext($row->context);
436 $this->setDifficulty($row->difficulty);
437 $this->setTypicalLearningTime($row->typical_learning_time);
438 }
439 return true;
440 }
441 return false;
442 }
setObjId($a_id)
setObjType($a_type)
setRBACId($a_id)
setDifficulty($a_difficulty)

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, ilMDBase\getMetaId(), setContext(), setDifficulty(), setIntendedEndUserRole(), setInteractivityLevel(), setInteractivityType(), setLearningResourceType(), ilMDBase\setObjId(), ilMDBase\setObjType(), ilMDBase\setRBACId(), setSemanticDensity(), and setTypicalLearningTime().

+ Here is the call graph for this function:

◆ read() [2/2]

ilMDEducational::read ( )

Definition at line 368 of file class.ilMDEducational.php.

369 {
370 global $ilDB;
371
372 if($this->getMetaId())
373 {
374
375 $query = "SELECT * FROM il_meta_educational ".
376 "WHERE meta_educational_id = ".$ilDB->quote($this->getMetaId());
377
378
379 $res = $this->db->query($query);
380 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
381 {
382 $this->setRBACId($row->rbac_id);
383 $this->setObjId($row->obj_id);
384 $this->setObjType($row->obj_type);
385 $this->setInteractivityType(ilUtil::stripSlashes($row->interactivity_type));
386 $this->setLearningResourceType(ilUtil::stripSlashes($row->learning_resource_type));
387 $this->setInteractivityLevel(ilUtil::stripSlashes($row->interactivity_level));
388 $this->setSemanticDensity(ilUtil::stripSlashes($row->semantic_density));
389 $this->setIntendedEndUserRole(ilUtil::stripSlashes($row->intended_end_user_role));
390 $this->setContext(ilUtil::stripSlashes($row->context));
391 $this->setDifficulty(ilUtil::stripSlashes($row->difficulty));
392 $this->setTypicalLearningTime(ilUtil::stripSlashes($row->typical_learning_time));
393 }
394 return true;
395 }
396 return false;
397 }
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, ilMDBase\getMetaId(), setContext(), setDifficulty(), setIntendedEndUserRole(), setInteractivityLevel(), setInteractivityType(), setLearningResourceType(), ilMDBase\setObjId(), ilMDBase\setObjType(), ilMDBase\setRBACId(), setSemanticDensity(), setTypicalLearningTime(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ save() [1/2]

ilMDEducational::save ( )

Reimplemented from ilMDBase.

Definition at line 334 of file class.ilMDEducational.php.

335 {
336 global $ilDB;
337
338 $fields = $this->__getFields();
339 $fields['meta_educational_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_educational'));
340
341 if($this->db->insert('il_meta_educational',$fields))
342 {
343 $this->setMetaId($next_id);
344 return $this->getMetaId();
345 }
346 return false;
347 }
setMetaId($a_meta_id, $a_read_data=true)

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

+ Here is the call graph for this function:

◆ save() [2/2]

ilMDEducational::save ( )

Reimplemented from ilMDBase.

Definition at line 288 of file class.ilMDEducational.php.

289 {
290 if($this->db->autoExecute('il_meta_educational',
291 $this->__getFields(),
292 DB_AUTOQUERY_INSERT))
293 {
294 $this->setMetaId($this->db->getLastInsertId());
295
296 return $this->getMetaId();
297 }
298
299 return false;
300 }

References ilMDBase\getMetaId(), and ilMDBase\setMetaId().

+ Here is the call graph for this function:

◆ setContext() [1/2]

ilMDEducational::setContext (   $a_context)

Definition at line 239 of file class.ilMDEducational.php.

240 {
241 switch($a_context)
242 {
243 case 'School':
244 case 'HigherEducation':
245 case 'Training':
246 case 'Other':
247 $this->context = $a_context;
248 return true;
249
250 default:
251 return false;
252 }
253 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setContext() [2/2]

ilMDEducational::setContext (   $a_context)

Definition at line 239 of file class.ilMDEducational.php.

240 {
241 switch($a_context)
242 {
243 case 'School':
244 case 'HigherEducation':
245 case 'Training':
246 case 'Other':
247 $this->context = $a_context;
248 return true;
249
250 default:
251 return false;
252 }
253 }

◆ setDifficulty() [1/2]

ilMDEducational::setDifficulty (   $a_difficulty)

Definition at line 258 of file class.ilMDEducational.php.

259 {
260 switch($a_difficulty)
261 {
262 case 'VeryEasy':
263 case 'Easy':
264 case 'Medium':
265 case 'Difficult':
266 case 'VeryDifficult':
267 $this->difficulty = $a_difficulty;
268 return true;
269
270 default:
271 return false;
272 }
273 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDifficulty() [2/2]

ilMDEducational::setDifficulty (   $a_difficulty)

Definition at line 258 of file class.ilMDEducational.php.

259 {
260 switch($a_difficulty)
261 {
262 case 'VeryEasy':
263 case 'Easy':
264 case 'Medium':
265 case 'Difficult':
266 case 'VeryDifficult':
267 $this->difficulty = $a_difficulty;
268 return true;
269
270 default:
271 return false;
272 }
273 }

◆ setIntendedEndUserRole() [1/2]

ilMDEducational::setIntendedEndUserRole (   $a_ieur)

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

221 {
222 switch($a_ieur)
223 {
224 case 'Teacher':
225 case 'Author':
226 case 'Learner':
227 case 'Manager':
228 $this->intended_end_user_role = $a_ieur;
229 return true;
230
231 default:
232 return false;
233 }
234 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setIntendedEndUserRole() [2/2]

ilMDEducational::setIntendedEndUserRole (   $a_ieur)

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

221 {
222 switch($a_ieur)
223 {
224 case 'Teacher':
225 case 'Author':
226 case 'Learner':
227 case 'Manager':
228 $this->intended_end_user_role = $a_ieur;
229 return true;
230
231 default:
232 return false;
233 }
234 }

◆ setInteractivityLevel() [1/2]

ilMDEducational::setInteractivityLevel (   $a_iat)

Definition at line 180 of file class.ilMDEducational.php.

181 {
182 switch($a_iat)
183 {
184 case 'VeryLow':
185 case 'Low':
186 case 'Medium':
187 case 'High':
188 case 'VeryHigh':
189 $this->interactivity_level = $a_iat;
190 return true;
191
192 default:
193 return false;
194 }
195 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setInteractivityLevel() [2/2]

ilMDEducational::setInteractivityLevel (   $a_iat)

Definition at line 180 of file class.ilMDEducational.php.

181 {
182 switch($a_iat)
183 {
184 case 'VeryLow':
185 case 'Low':
186 case 'Medium':
187 case 'High':
188 case 'VeryHigh':
189 $this->interactivity_level = $a_iat;
190 return true;
191
192 default:
193 return false;
194 }
195 }

◆ setInteractivityType() [1/2]

ilMDEducational::setInteractivityType (   $a_iat)

Definition at line 132 of file class.ilMDEducational.php.

133 {
134 switch($a_iat)
135 {
136 case 'Active':
137 case 'Expositive':
138 case 'Mixed':
139 $this->interactivity_type = $a_iat;
140 return true;
141
142 default:
143 return false;
144 }
145 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setInteractivityType() [2/2]

ilMDEducational::setInteractivityType (   $a_iat)

Definition at line 132 of file class.ilMDEducational.php.

133 {
134 switch($a_iat)
135 {
136 case 'Active':
137 case 'Expositive':
138 case 'Mixed':
139 $this->interactivity_type = $a_iat;
140 return true;
141
142 default:
143 return false;
144 }
145 }

◆ setLearningResourceType() [1/2]

ilMDEducational::setLearningResourceType (   $a_lrt)

Definition at line 150 of file class.ilMDEducational.php.

151 {
152 switch($a_lrt)
153 {
154 case 'Exercise':
155 case 'Simulation':
156 case 'Questionnaire':
157 case 'Diagram':
158 case 'Figure':
159 case 'Graph':
160 case 'Index':
161 case 'Slide':
162 case 'Table':
163 case 'NarrativeText':
164 case 'Exam':
165 case 'Experiment':
166 case 'ProblemStatement':
167 case 'SelfAssessment':
168 case 'Lecture':
169 $this->learning_resource_type = $a_lrt;
170 return true;
171
172 default:
173 return false;
174 }
175 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setLearningResourceType() [2/2]

ilMDEducational::setLearningResourceType (   $a_lrt)

Definition at line 150 of file class.ilMDEducational.php.

151 {
152 switch($a_lrt)
153 {
154 case 'Exercise':
155 case 'Simulation':
156 case 'Questionnaire':
157 case 'Diagram':
158 case 'Figure':
159 case 'Graph':
160 case 'Index':
161 case 'Slide':
162 case 'Table':
163 case 'NarrativeText':
164 case 'Exam':
165 case 'Experiment':
166 case 'ProblemStatement':
167 case 'SelfAssessment':
168 case 'Lecture':
169 $this->learning_resource_type = $a_lrt;
170 return true;
171
172 default:
173 return false;
174 }
175 }

◆ setPhysicalTypicalLearningTime()

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

Definition at line 279 of file class.ilMDEducational.php.

280 {
281 if(!$months and !$days and !$hours and !$minutes and !$seconds)
282 {
283 $this->setTypicalLearningTime('PT00H00M');
284 return true;
285 }
286 $tlt = 'P';
287 if($months)
288 {
289 $tlt .= ($months.'M');
290 }
291 if($days)
292 {
293 $tlt .= ($days.'D');
294 }
295 if($hours or $minutes or $seconds)
296 {
297 $tlt .= 'T';
298 }
299 if($hours)
300 {
301 $tlt .= ($hours.'H');
302 }
303 if($minutes)
304 {
305 $tlt .= ($minutes.'M');
306 }
307 if($seconds)
308 {
309 $tlt .= ($seconds.'S');
310 }
311 $this->setTypicalLearningTime($tlt);
312 return true;
313 }

References setTypicalLearningTime().

+ Here is the call graph for this function:

◆ setSemanticDensity() [1/2]

ilMDEducational::setSemanticDensity (   $a_sd)

Definition at line 200 of file class.ilMDEducational.php.

201 {
202 switch($a_sd)
203 {
204 case 'VeryLow':
205 case 'Low':
206 case 'Medium':
207 case 'High':
208 case 'VeryHigh':
209 $this->semantic_density = $a_sd;
210 return true;
211
212 default:
213 return false;
214 }
215 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setSemanticDensity() [2/2]

ilMDEducational::setSemanticDensity (   $a_sd)

Definition at line 200 of file class.ilMDEducational.php.

201 {
202 switch($a_sd)
203 {
204 case 'VeryLow':
205 case 'Low':
206 case 'Medium':
207 case 'High':
208 case 'VeryHigh':
209 $this->semantic_density = $a_sd;
210 return true;
211
212 default:
213 return false;
214 }
215 }

◆ setTypicalLearningTime() [1/2]

ilMDEducational::setTypicalLearningTime (   $a_tlt)

Definition at line 316 of file class.ilMDEducational.php.

317 {
318 $this->typical_learning_time = $a_tlt;
319 }

Referenced by read(), and setPhysicalTypicalLearningTime().

+ Here is the caller graph for this function:

◆ setTypicalLearningTime() [2/2]

ilMDEducational::setTypicalLearningTime (   $a_tlt)

Definition at line 278 of file class.ilMDEducational.php.

279 {
280 $this->typical_learning_time = $a_tlt;
281 }

◆ toXML() [1/2]

ilMDEducational::toXML ( $writer)

Reimplemented from ilMDBase.

Definition at line 449 of file class.ilMDEducational.php.

450 {
451 $writer->xmlStartTag('Educational',
452 array('InteractivityType' => $this->getInteractivityType()
453 ? $this->getInteractivityType()
454 : 'Active',
455 'LearningResourceType' => $this->getLearningResourceType()
456 ? $this->getLearningResourceType()
457 : 'Exercise',
458 'InteractivityLevel' => $this->getInteractivityLevel()
459 ? $this->getInteractivityLevel()
460 : 'Medium',
461 'SemanticDensity' => $this->getSemanticDensity()
462 ? $this->getSemanticDensity()
463 : 'Medium',
464 'IntendedEndUserRole' => $this->getIntendedEndUserRole()
465 ? $this->getIntendedEndUserRole()
466 : 'Learner',
467 'Context' => $this->getContext()
468 ? $this->getContext()
469 : 'Other',
470 'Difficulty' => $this->getDifficulty()
471 ? $this->getDifficulty()
472 : 'Medium'));
473
474 // TypicalAgeRange
475 $typ_ages = $this->getTypicalAgeRangeIds();
476 foreach($typ_ages as $id)
477 {
478 $key =& $this->getTypicalAgeRange($id);
479
480 // extra test due to bug 5316 (may be due to eLaix import)
481 if (is_object($key))
482 {
483 $key->toXML($writer);
484 }
485 }
486 if(!count($typ_ages))
487 {
488 include_once 'Services/MetaData/classes/class.ilMDTypicalAgeRange.php';
489 $typ = new ilMDTypicalAgeRange($this->getRBACId(),$this->getObjId());
490 $typ->toXML($writer);
491 }
492
493 // TypicalLearningTime
494 $writer->xmlElement('TypicalLearningTime',null,$this->getTypicalLearningTime());
495
496 // Description
497 foreach($this->getDescriptionIds() as $id)
498 {
499 $key =& $this->getDescription($id);
500 $key->toXML($writer);
501 }
502 // Language
503 foreach($this->getLanguageIds() as $id)
504 {
505 $lang =& $this->getLanguage($id);
506 $lang->toXML($writer);
507 }
508 $writer->xmlEndTag('Educational');
509 }

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

+ Here is the call graph for this function:

◆ toXML() [2/2]

ilMDEducational::toXML ( $writer)

Reimplemented from ilMDBase.

Definition at line 404 of file class.ilMDEducational.php.

405 {
406 $writer->xmlStartTag('Educational',
407 array('InteractivityType' => $this->getInteractivityType(),
408 'LearningResourceType' => $this->getLearningResourceType(),
409 'InteractivityLevel' => $this->getInteractivityLevel(),
410 'SemanticDensity' => $this->getSemanticDensity(),
411 'IntendedEndUserRole' => $this->getIntendedEndUserRole(),
412 'Context' => $this->getContext(),
413 'Difficulty' => $this->getDifficulty()));
414
415 // TypicalAgeRange
416 foreach($this->getTypicalAgeRangeIds() as $id)
417 {
418 $key =& $this->getTypicalAgeRange($id);
419 $key->toXML($writer);
420 }
421 // TypicalLearningTime
422 $writer->xmlElement('TypicalLearningTime',null,$this->getTypicalLearningTime());
423
424 // Description
425 foreach($this->getDescriptionIds() as $id)
426 {
427 $key =& $this->getDescription($id);
428 $key->toXML($writer);
429 }
430 // Language
431 foreach($this->getLanguageIds() as $id)
432 {
433 $lang =& $this->getLanguage($id);
434 $lang->toXML($writer);
435 }
436 $writer->xmlEndTag('Educational');
437 }

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

+ Here is the call graph for this function:

◆ update() [1/2]

ilMDEducational::update ( )

Reimplemented from ilMDBase.

Definition at line 349 of file class.ilMDEducational.php.

350 {
351 global $ilDB;
352
353 if($this->getMetaId())
354 {
355 if($this->db->update('il_meta_educational',
356 $this->__getFields(),
357 array("meta_educational_id" => array('integer',$this->getMetaId()))))
358 {
359 return true;
360 }
361 }
362 return false;
363 }

References $ilDB, and ilMDBase\getMetaId().

+ Here is the call graph for this function:

◆ update() [2/2]

ilMDEducational::update ( )

Reimplemented from ilMDBase.

Definition at line 302 of file class.ilMDEducational.php.

303 {
304 global $ilDB;
305
306 if($this->getMetaId())
307 {
308 if($this->db->autoExecute('il_meta_educational',
309 $this->__getFields(),
310 DB_AUTOQUERY_UPDATE,
311 "meta_educational_id = ".$ilDB->quote($this->getMetaId())))
312 {
313 return true;
314 }
315 }
316 return false;
317 }

References $ilDB, and ilMDBase\getMetaId().

+ Here is the call graph for this function:

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