ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilMDEducational Class Reference
+ Inheritance diagram for ilMDEducational:
+ Collaboration diagram for ilMDEducational:

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)
 
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
 __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)
 
 __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 ()
 
 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 ilMDBase
 $rbac_id
 
 $obj_id
 
 $obj_type
 
 $export_mode = false
 
- Protected Attributes inherited from ilMDBase
 $log
 

Detailed Description

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

Member Function Documentation

◆ __getFields() [1/2]

ilMDEducational::__getFields ( )

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

392 {
393 return array('rbac_id' => array('integer',$this->getRBACId()),
394 'obj_id' => array('integer',$this->getObjId()),
395 'obj_type' => array('text',$this->getObjType()),
396 'interactivity_type' => array('text',$this->getInteractivityType()),
397 'learning_resource_type' => array('text',$this->getLearningResourceType()),
398 'interactivity_level' => array('text',$this->getInteractivityLevel()),
399 'semantic_density' => array('text',$this->getSemanticDensity()),
400 'intended_end_user_role' => array('text',$this->getIntendedEndUserRole()),
401 'context' => array('text',$this->getContext()),
402 'difficulty' => array('text',$this->getDifficulty()),
403 'typical_learning_time' => array('text',$this->getTypicalLearningTime()));
404 }

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 346 of file class.ilMDEducational.php.

347 {
348 return array('rbac_id' => $this->getRBACId(),
349 'obj_id' => $this->getObjId(),
350 'obj_type' => ilUtil::prepareDBString($this->getObjType()),
351 'interactivity_type' => ilUtil::prepareDBString($this->getInteractivityType()),
352 'learning_resource_type' => ilUtil::prepareDBString($this->getLearningResourceType()),
353 'interactivity_level' => ilUtil::prepareDBString($this->getInteractivityLevel()),
354 'semantic_density' => ilUtil::prepareDBString($this->getSemanticDensity()),
355 'intended_end_user_role' => ilUtil::prepareDBString($this->getIntendedEndUserRole()),
356 'context' => ilUtil::prepareDBString($this->getContext()),
357 'difficulty' => ilUtil::prepareDBString($this->getDifficulty()),
358 'typical_learning_time' => ilUtil::prepareDBString($this->getTypicalLearningTime()));
359 }
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]

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

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

505 {
506 global $ilDB;
507
508 $query = "SELECT meta_educational_id FROM il_meta_educational ".
509 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,'integer')." ".
510 "AND obj_id = ".$ilDB->quote($a_obj_id ,'integer');
511
512 $res = $ilDB->query($query);
513 while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
514 {
515 return $row->meta_educational_id;
516 }
517 return false;
518 }
global $ilDB

References $ilDB, $query, $res, $row, and ilDBConstants\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 432 of file class.ilMDEducational.php.

433 {
434 global $ilDB;
435
436 $query = "SELECT meta_educational_id FROM il_meta_educational ".
437 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id)." ".
438 "AND obj_id = ".$ilDB->quote($a_obj_id);
439
440 $res = $ilDB->query($query);
441 while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
442 {
443 return $row->meta_educational_id;
444 }
445 return false;
446 }

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

◆ _getTypicalLearningTimeSeconds()

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

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

521 {
522 global $ilDB;
523
524 $a_obj_id = $a_obj_id ? $a_obj_id : $a_rbac_id;
525
526 $query = "SELECT typical_learning_time FROM il_meta_educational ".
527 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,'integer')." ".
528 "AND obj_id = ".$ilDB->quote($a_obj_id ,'integer');
529 $res = $ilDB->query($query);
530 while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
531 {
532 include_once './Services/MetaData/classes/class.ilMDUtils.php';
533
534 $time_arr = ilMDUtils::_LOMDurationToArray($row->typical_learning_time);
535
536 return 60 * 60 * 24 * 30 * $time_arr[0] +
537 60 * 60 * 24 * $time_arr[1] +
538 60 * 60 * $time_arr[2] +
539 60 * $time_arr[3] +
540 $time_arr[4];
541 }
542 return 0;
543 }
static _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 ilDBConstants\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 84 of file class.ilMDEducational.php.

85 {
86 include_once 'Services/MetaData/classes/class.ilMDDescription.php';
87
88 $des = new ilMDDescription($this->getRBACId(),$this->getObjId(),$this->getObjType());
89 $des->setParentId($this->getMetaId());
90 $des->setParentType('meta_educational');
91
92 return $des;
93 }

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 84 of file class.ilMDEducational.php.

85 {
86 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
87
88 $des = new ilMDDescription($this->getRBACId(),$this->getObjId(),$this->getObjType());
89 $des->setParentId($this->getMetaId());
90 $des->setParentType('meta_educational');
91
92 return $des;
93 }

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 113 of file class.ilMDEducational.php.

114 {
115 include_once 'Services/MetaData/classes/class.ilMDLanguage.php';
116
117 $lan = new ilMDLanguage($this->getRBACId(),$this->getObjId(),$this->getObjType());
118 $lan->setParentId($this->getMetaId());
119 $lan->setParentType('meta_educational');
120
121 return $lan;
122 }

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 113 of file class.ilMDEducational.php.

114 {
115 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
116
117 $lan = new ilMDLanguage($this->getRBACId(),$this->getObjId(),$this->getObjType());
118 $lan->setParentId($this->getMetaId());
119 $lan->setParentType('meta_educational');
120
121 return $lan;
122 }

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 55 of file class.ilMDEducational.php.

56 {
57 include_once 'Services/MetaData/classes/class.ilMDTypicalAgeRange.php';
58
59 $typ = new ilMDTypicalAgeRange($this->getRBACId(),$this->getObjId(),$this->getObjType());
60 $typ->setParentId($this->getMetaId());
61 $typ->setParentType('meta_educational');
62
63 return $typ;
64 }

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 55 of file class.ilMDEducational.php.

56 {
57 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDTypicalAgeRange.php';
58
59 $typ = new ilMDTypicalAgeRange($this->getRBACId(),$this->getObjId(),$this->getObjType());
60 $typ->setParentId($this->getMetaId());
61 $typ->setParentType('meta_educational');
62
63 return $typ;
64 }

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 358 of file class.ilMDEducational.php.

359 {
360 global $ilDB;
361
362 if($this->getMetaId())
363 {
364 $query = "DELETE FROM il_meta_educational ".
365 "WHERE meta_educational_id = ".$ilDB->quote($this->getMetaId());
366 $res = $ilDB->manipulate($query);
367
368 foreach($this->getTypicalAgeRangeIds() as $id)
369 {
370 $typ = $this->getTypicalAgeRange($id);
371 $typ->delete();
372 }
373 foreach($this->getDescriptionIds() as $id)
374 {
375 $des = $this->getDescription($id);
376 $des->delete();
377 }
378 foreach($this->getLanguageIds() as $id)
379 {
380 $lan = $this->getLanguage($id);
381 $lan->delete();
382 }
383
384
385 return true;
386 }
387 return false;
388 }
& 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 312 of file class.ilMDEducational.php.

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

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 247 of file class.ilMDEducational.php.

248 {
249 return $this->context;
250 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getContext() [2/2]

ilMDEducational::getContext ( )

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

248 {
249 return $this->context;
250 }

◆ getDescription() [1/2]

& ilMDEducational::getDescription (   $a_description_id)

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

72 {
73 include_once 'Services/MetaData/classes/class.ilMDDescription.php';
74
75 if(!$a_description_id)
76 {
77 return false;
78 }
79 $des = new ilMDDescription();
80 $des->setMetaId($a_description_id);
81
82 return $des;
83 }

Referenced by delete(), and toXML().

+ Here is the caller graph for this function:

◆ getDescription() [2/2]

& ilMDEducational::getDescription (   $a_description_id)

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

72 {
73 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
74
75 if(!$a_description_id)
76 {
77 return false;
78 }
79 $des = new ilMDDescription();
80 $des->setMetaId($a_description_id);
81
82 return $des;
83 }

◆ getDescriptionIds() [1/2]

& ilMDEducational::getDescriptionIds ( )

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

66 {
67 include_once 'Services/MetaData/classes/class.ilMDDescription.php';
68
69 return ilMDDescription::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_educational');
70 }
static _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 65 of file class.ilMDEducational.php.

66 {
67 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
68
69 return ilMDDescription::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_educational');
70 }

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 267 of file class.ilMDEducational.php.

268 {
269 return $this->difficulty;
270 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getDifficulty() [2/2]

ilMDEducational::getDifficulty ( )

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

268 {
269 return $this->difficulty;
270 }

◆ getIntendedEndUserRole() [1/2]

ilMDEducational::getIntendedEndUserRole ( )

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

229 {
230 return $this->intended_end_user_role;
231 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getIntendedEndUserRole() [2/2]

ilMDEducational::getIntendedEndUserRole ( )

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

229 {
230 return $this->intended_end_user_role;
231 }

◆ getInteractivityLevel() [1/2]

ilMDEducational::getInteractivityLevel ( )

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

190 {
191 return $this->interactivity_level;
192 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getInteractivityLevel() [2/2]

ilMDEducational::getInteractivityLevel ( )

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

190 {
191 return $this->interactivity_level;
192 }

◆ getInteractivityType() [1/2]

ilMDEducational::getInteractivityType ( )

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

140 {
141 return $this->interactivity_type;
142 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getInteractivityType() [2/2]

ilMDEducational::getInteractivityType ( )

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

140 {
141 return $this->interactivity_type;
142 }

◆ getLanguage() [1/2]

& ilMDEducational::getLanguage (   $a_language_id)

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

101 {
102 include_once 'Services/MetaData/classes/class.ilMDLanguage.php';
103
104 if(!$a_language_id)
105 {
106 return false;
107 }
108 $lan = new ilMDLanguage();
109 $lan->setMetaId($a_language_id);
110
111 return $lan;
112 }

Referenced by delete(), and toXML().

+ Here is the caller graph for this function:

◆ getLanguage() [2/2]

& ilMDEducational::getLanguage (   $a_language_id)

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

101 {
102 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
103
104 if(!$a_language_id)
105 {
106 return false;
107 }
108 $lan = new ilMDLanguage();
109 $lan->setMetaId($a_language_id);
110
111 return $lan;
112 }

◆ getLanguageIds() [1/2]

& ilMDEducational::getLanguageIds ( )

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

95 {
96 include_once 'Services/MetaData/classes/class.ilMDLanguage.php';
97
98 return ilMDLanguage::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_educational');
99 }
static _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 94 of file class.ilMDEducational.php.

95 {
96 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
97
98 return ilMDLanguage::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_educational');
99 }

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 169 of file class.ilMDEducational.php.

170 {
171 return $this->learning_resource_type;
172 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getLearningResourceType() [2/2]

ilMDEducational::getLearningResourceType ( )

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

170 {
171 return $this->learning_resource_type;
172 }

◆ getSemanticDensity() [1/2]

ilMDEducational::getSemanticDensity ( )

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

210 {
211 return $this->semantic_density;
212 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getSemanticDensity() [2/2]

ilMDEducational::getSemanticDensity ( )

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

210 {
211 return $this->semantic_density;
212 }

◆ getTypicalAgeRange() [1/2]

& ilMDEducational::getTypicalAgeRange (   $a_typical_age_range_id)

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

43 {
44 include_once 'Services/MetaData/classes/class.ilMDTypicalAgeRange.php';
45
46 if(!$a_typical_age_range_id)
47 {
48 return false;
49 }
50 $typ = new ilMDTypicalAgeRange();
51 $typ->setMetaId($a_typical_age_range_id);
52
53 return $typ;
54 }

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 42 of file class.ilMDEducational.php.

43 {
44 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDTypicalAgeRange.php';
45
46 if(!$a_typical_age_range_id)
47 {
48 return false;
49 }
50 $typ = new ilMDTypicalAgeRange();
51 $typ->setMetaId($a_typical_age_range_id);
52
53 return $typ;
54 }

◆ getTypicalAgeRangeIds() [1/2]

& ilMDEducational::getTypicalAgeRangeIds ( )

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

37 {
38 include_once 'Services/MetaData/classes/class.ilMDTypicalAgeRange.php';
39
40 return ilMDTypicalAgeRange::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_educational');
41 }
static _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 36 of file class.ilMDEducational.php.

37 {
38 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDTypicalAgeRange.php';
39
40 return ilMDTypicalAgeRange::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_educational');
41 }

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 313 of file class.ilMDEducational.php.

314 {
315 return $this->typical_learning_time;
316 }

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

+ Here is the caller graph for this function:

◆ getTypicalLearningTime() [2/2]

ilMDEducational::getTypicalLearningTime ( )

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

276 {
277 return $this->typical_learning_time;
278 }

◆ getTypicalLearningTimeSeconds()

ilMDEducational::getTypicalLearningTimeSeconds ( )

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

319 {
320 include_once './Services/MetaData/classes/class.ilMDUtils.php';
321
323
324 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];
325 }

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

+ Here is the call graph for this function:

◆ read() [1/2]

ilMDEducational::read ( )

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

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

References $ilDB, $query, $res, $row, ilDBConstants\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 361 of file class.ilMDEducational.php.

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

References $ilDB, $query, $res, $row, ilDBConstants\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 327 of file class.ilMDEducational.php.

328 {
329 global $ilDB;
330
331 $fields = $this->__getFields();
332 $fields['meta_educational_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_educational'));
333
334 if($this->db->insert('il_meta_educational',$fields))
335 {
336 $this->setMetaId($next_id);
337 return $this->getMetaId();
338 }
339 return false;
340 }
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 281 of file class.ilMDEducational.php.

282 {
283 if($this->db->autoExecute('il_meta_educational',
284 $this->__getFields(),
286 {
287 $this->setMetaId($this->db->getLastInsertId());
288
289 return $this->getMetaId();
290 }
291
292 return false;
293 }

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

+ Here is the call graph for this function:

◆ setContext() [1/2]

ilMDEducational::setContext (   $a_context)

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

233 {
234 switch($a_context)
235 {
236 case 'School':
237 case 'HigherEducation':
238 case 'Training':
239 case 'Other':
240 $this->context = $a_context;
241 return true;
242
243 default:
244 return false;
245 }
246 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setContext() [2/2]

ilMDEducational::setContext (   $a_context)

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

233 {
234 switch($a_context)
235 {
236 case 'School':
237 case 'HigherEducation':
238 case 'Training':
239 case 'Other':
240 $this->context = $a_context;
241 return true;
242
243 default:
244 return false;
245 }
246 }

◆ setDifficulty() [1/2]

ilMDEducational::setDifficulty (   $a_difficulty)

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

252 {
253 switch($a_difficulty)
254 {
255 case 'VeryEasy':
256 case 'Easy':
257 case 'Medium':
258 case 'Difficult':
259 case 'VeryDifficult':
260 $this->difficulty = $a_difficulty;
261 return true;
262
263 default:
264 return false;
265 }
266 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDifficulty() [2/2]

ilMDEducational::setDifficulty (   $a_difficulty)

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

252 {
253 switch($a_difficulty)
254 {
255 case 'VeryEasy':
256 case 'Easy':
257 case 'Medium':
258 case 'Difficult':
259 case 'VeryDifficult':
260 $this->difficulty = $a_difficulty;
261 return true;
262
263 default:
264 return false;
265 }
266 }

◆ setIntendedEndUserRole() [1/2]

ilMDEducational::setIntendedEndUserRole (   $a_ieur)

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

214 {
215 switch($a_ieur)
216 {
217 case 'Teacher':
218 case 'Author':
219 case 'Learner':
220 case 'Manager':
221 $this->intended_end_user_role = $a_ieur;
222 return true;
223
224 default:
225 return false;
226 }
227 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setIntendedEndUserRole() [2/2]

ilMDEducational::setIntendedEndUserRole (   $a_ieur)

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

214 {
215 switch($a_ieur)
216 {
217 case 'Teacher':
218 case 'Author':
219 case 'Learner':
220 case 'Manager':
221 $this->intended_end_user_role = $a_ieur;
222 return true;
223
224 default:
225 return false;
226 }
227 }

◆ setInteractivityLevel() [1/2]

ilMDEducational::setInteractivityLevel (   $a_iat)

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

174 {
175 switch($a_iat)
176 {
177 case 'VeryLow':
178 case 'Low':
179 case 'Medium':
180 case 'High':
181 case 'VeryHigh':
182 $this->interactivity_level = $a_iat;
183 return true;
184
185 default:
186 return false;
187 }
188 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setInteractivityLevel() [2/2]

ilMDEducational::setInteractivityLevel (   $a_iat)

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

174 {
175 switch($a_iat)
176 {
177 case 'VeryLow':
178 case 'Low':
179 case 'Medium':
180 case 'High':
181 case 'VeryHigh':
182 $this->interactivity_level = $a_iat;
183 return true;
184
185 default:
186 return false;
187 }
188 }

◆ setInteractivityType() [1/2]

ilMDEducational::setInteractivityType (   $a_iat)

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

126 {
127 switch($a_iat)
128 {
129 case 'Active':
130 case 'Expositive':
131 case 'Mixed':
132 $this->interactivity_type = $a_iat;
133 return true;
134
135 default:
136 return false;
137 }
138 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setInteractivityType() [2/2]

ilMDEducational::setInteractivityType (   $a_iat)

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

126 {
127 switch($a_iat)
128 {
129 case 'Active':
130 case 'Expositive':
131 case 'Mixed':
132 $this->interactivity_type = $a_iat;
133 return true;
134
135 default:
136 return false;
137 }
138 }

◆ setLearningResourceType() [1/2]

ilMDEducational::setLearningResourceType (   $a_lrt)

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

144 {
145 switch($a_lrt)
146 {
147 case 'Exercise':
148 case 'Simulation':
149 case 'Questionnaire':
150 case 'Diagram':
151 case 'Figure':
152 case 'Graph':
153 case 'Index':
154 case 'Slide':
155 case 'Table':
156 case 'NarrativeText':
157 case 'Exam':
158 case 'Experiment':
159 case 'ProblemStatement':
160 case 'SelfAssessment':
161 case 'Lecture':
162 $this->learning_resource_type = $a_lrt;
163 return true;
164
165 default:
166 return false;
167 }
168 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setLearningResourceType() [2/2]

ilMDEducational::setLearningResourceType (   $a_lrt)

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

144 {
145 switch($a_lrt)
146 {
147 case 'Exercise':
148 case 'Simulation':
149 case 'Questionnaire':
150 case 'Diagram':
151 case 'Figure':
152 case 'Graph':
153 case 'Index':
154 case 'Slide':
155 case 'Table':
156 case 'NarrativeText':
157 case 'Exam':
158 case 'Experiment':
159 case 'ProblemStatement':
160 case 'SelfAssessment':
161 case 'Lecture':
162 $this->learning_resource_type = $a_lrt;
163 return true;
164
165 default:
166 return false;
167 }
168 }

◆ setPhysicalTypicalLearningTime()

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

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

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

References setTypicalLearningTime().

+ Here is the call graph for this function:

◆ setSemanticDensity() [1/2]

ilMDEducational::setSemanticDensity (   $a_sd)

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

194 {
195 switch($a_sd)
196 {
197 case 'VeryLow':
198 case 'Low':
199 case 'Medium':
200 case 'High':
201 case 'VeryHigh':
202 $this->semantic_density = $a_sd;
203 return true;
204
205 default:
206 return false;
207 }
208 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setSemanticDensity() [2/2]

ilMDEducational::setSemanticDensity (   $a_sd)

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

194 {
195 switch($a_sd)
196 {
197 case 'VeryLow':
198 case 'Low':
199 case 'Medium':
200 case 'High':
201 case 'VeryHigh':
202 $this->semantic_density = $a_sd;
203 return true;
204
205 default:
206 return false;
207 }
208 }

◆ setTypicalLearningTime() [1/2]

ilMDEducational::setTypicalLearningTime (   $a_tlt)

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

310 {
311 $this->typical_learning_time = $a_tlt;
312 }

Referenced by read(), and setPhysicalTypicalLearningTime().

+ Here is the caller graph for this function:

◆ setTypicalLearningTime() [2/2]

ilMDEducational::setTypicalLearningTime (   $a_tlt)

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

272 {
273 $this->typical_learning_time = $a_tlt;
274 }

◆ toXML() [1/2]

ilMDEducational::toXML ( $writer)

Reimplemented from ilMDBase.

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

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

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 397 of file class.ilMDEducational.php.

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

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 342 of file class.ilMDEducational.php.

343 {
344 global $ilDB;
345
346 if($this->getMetaId())
347 {
348 if($this->db->update('il_meta_educational',
349 $this->__getFields(),
350 array("meta_educational_id" => array('integer',$this->getMetaId()))))
351 {
352 return true;
353 }
354 }
355 return false;
356 }

References $ilDB, and ilMDBase\getMetaId().

+ Here is the call graph for this function:

◆ update() [2/2]

ilMDEducational::update ( )

Reimplemented from ilMDBase.

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

296 {
297 global $ilDB;
298
299 if($this->getMetaId())
300 {
301 if($this->db->autoExecute('il_meta_educational',
302 $this->__getFields(),
304 "meta_educational_id = ".$ilDB->quote($this->getMetaId())))
305 {
306 return true;
307 }
308 }
309 return false;
310 }

References $ilDB, ilMDBase\getMetaId(), and ilDBConstants\MDB2_AUTOQUERY_UPDATE.

+ Here is the call graph for this function:

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