31 include_once
'class.ilMDBase.php';
38 include_once
'Services/MetaData/classes/class.ilMDTypicalAgeRange.php';
44 include_once
'Services/MetaData/classes/class.ilMDTypicalAgeRange.php';
46 if(!$a_typical_age_range_id)
51 $typ->setMetaId($a_typical_age_range_id);
57 include_once
'Services/MetaData/classes/class.ilMDTypicalAgeRange.php';
61 $typ->setParentType(
'meta_educational');
67 include_once
'Services/MetaData/classes/class.ilMDDescription.php';
73 include_once
'Services/MetaData/classes/class.ilMDDescription.php';
75 if(!$a_description_id)
80 $des->setMetaId($a_description_id);
86 include_once
'Services/MetaData/classes/class.ilMDDescription.php';
90 $des->setParentType(
'meta_educational');
96 include_once
'Services/MetaData/classes/class.ilMDLanguage.php';
102 include_once
'Services/MetaData/classes/class.ilMDLanguage.php';
109 $lan->setMetaId($a_language_id);
115 include_once
'Services/MetaData/classes/class.ilMDLanguage.php';
119 $lan->setParentType(
'meta_educational');
132 $this->interactivity_type = $a_iat;
141 return $this->interactivity_type;
149 case 'Questionnaire':
156 case 'NarrativeText':
159 case 'ProblemStatement':
160 case 'SelfAssessment':
162 $this->learning_resource_type = $a_lrt;
171 return $this->learning_resource_type;
182 $this->interactivity_level = $a_iat;
191 return $this->interactivity_level;
202 $this->semantic_density = $a_sd;
211 return $this->semantic_density;
221 $this->intended_end_user_role = $a_ieur;
230 return $this->intended_end_user_role;
237 case 'HigherEducation':
240 $this->context = $a_context;
249 return $this->context;
253 switch($a_difficulty)
259 case 'VeryDifficult':
260 $this->difficulty = $a_difficulty;
269 return $this->difficulty;
274 if(!$months
and !$days
and !$hours
and !$minutes
and !$seconds)
282 $tlt .= ($months.
'M');
288 if($hours
or $minutes
or $seconds)
294 $tlt .= ($hours.
'H');
298 $tlt .= ($minutes.
'M');
302 $tlt .= ($seconds.
'S');
311 $this->typical_learning_time = $a_tlt;
315 return $this->typical_learning_time;
320 include_once
'./Services/MetaData/classes/class.ilMDUtils.php';
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];
332 $fields[
'meta_educational_id'] =
array(
'integer',$next_id = $ilDB->nextId(
'il_meta_educational'));
334 if($this->db->insert(
'il_meta_educational',$fields))
348 if($this->db->update(
'il_meta_educational',
349 $this->__getFields(),
364 $query =
"DELETE FROM il_meta_educational ".
365 "WHERE meta_educational_id = ".$ilDB->quote($this->
getMetaId());
413 $query =
"SELECT * FROM il_meta_educational ".
414 "WHERE meta_educational_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
444 $writer->xmlStartTag(
'Educational',
469 foreach($typ_ages as $id)
476 $key->toXML($writer);
479 if(!count($typ_ages))
481 include_once
'Services/MetaData/classes/class.ilMDTypicalAgeRange.php';
483 $typ->toXML($writer);
493 $key->toXML($writer);
499 $lang->toXML($writer);
501 $writer->xmlEndTag(
'Educational');
504 static function _getId($a_rbac_id,$a_obj_id)
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');
515 return $row->meta_educational_id;
524 $a_obj_id = $a_obj_id ? $a_obj_id : $a_rbac_id;
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');
532 include_once
'./Services/MetaData/classes/class.ilMDUtils.php';
536 return 60 * 60 * 24 * 30 * $time_arr[0] +
537 60 * 60 * 24 * $time_arr[1] +
538 60 * 60 * $time_arr[2] +
setInteractivityType($a_iat)
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
& getLanguage($a_language_id)
& getTypicalAgeRangeIds()
static _getTypicalLearningTimeSeconds($a_rbac_id, $a_obj_id=0)
setDifficulty($a_difficulty)
& getDescription($a_description_id)
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
getTypicalLearningTimeSeconds()
setInteractivityLevel($a_iat)
getLearningResourceType()
& getTypicalAgeRange($a_typical_age_range_id)
static _LOMDurationToArray($a_string)
LOM datatype duration is a string like P2M4DT7H18M2S (2 months 4 days 7 hours 18 minutes 2 seconds) T...
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
setMetaId($a_meta_id, $a_read_data=true)
setLearningResourceType($a_lrt)
setTypicalLearningTime($a_tlt)
static _getId($a_rbac_id, $a_obj_id)
Create styles array
The data for the language used.
setSemanticDensity($a_sd)
setPhysicalTypicalLearningTime($months, $days, $hours, $minutes, $seconds)
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
setIntendedEndUserRole($a_ieur)