ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilMDEducational Class Reference
+ Inheritance diagram for ilMDEducational:
+ Collaboration diagram for ilMDEducational:

Public Member Functions

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

Static Public Member Functions

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

Private Attributes

string $interactivity_type = ''
 
string $learning_resource_type = ''
 
string $interactivity_level = ''
 
string $semantic_density = ''
 
string $intended_end_user_role = ''
 
string $context = ''
 
string $difficulty = ''
 
string $typical_learning_time = ''
 

Additional Inherited Members

- Protected Attributes inherited from ilMDBase
ilLogger $log
 
ilDBInterface $db
 

Detailed Description

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

Member Function Documentation

◆ __getFields()

ilMDEducational::__getFields ( )
Returns
array<string, array<string, mixed>>

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

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

Referenced by save(), and update().

382  : array
383  {
384  return array(
385  'rbac_id' => array('integer', $this->getRBACId()),
386  'obj_id' => array('integer', $this->getObjId()),
387  'obj_type' => array('text', $this->getObjType()),
388  'interactivity_type' => array('text', $this->getInteractivityType()),
389  'learning_resource_type' => array('text', $this->getLearningResourceType()),
390  'interactivity_level' => array('text', $this->getInteractivityLevel()),
391  'semantic_density' => array('text', $this->getSemanticDensity()),
392  'intended_end_user_role' => array('text', $this->getIntendedEndUserRole()),
393  'context' => array('text', $this->getContext()),
394  'difficulty' => array('text', $this->getDifficulty()),
395  'typical_learning_time' => array('text', $this->getTypicalLearningTime())
396  );
397  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getId()

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

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

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

Referenced by ilMD\getEducational().

471  : int
472  {
473  global $DIC;
474 
475  $ilDB = $DIC->database();
476 
477  $query = "SELECT meta_educational_id FROM il_meta_educational " .
478  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
479  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer');
480 
481  $res = $ilDB->query($query);
482  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
483  return (int) $row->meta_educational_id;
484  }
485  return 0;
486  }
$res
Definition: ltiservices.php:69
global $DIC
Definition: feed.php:28
$query
+ Here is the caller graph for this function:

◆ _getTypicalLearningTimeSeconds()

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

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

References $DIC, $ilDB, $query, $res, ilMDUtils\_LOMDurationToArray(), and ilDBConstants\FETCHMODE_OBJECT.

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

488  : int
489  {
490  global $DIC;
491 
492  $ilDB = $DIC->database();
493 
494  $a_obj_id = $a_obj_id ?: $a_rbac_id;
495 
496  $query = "SELECT typical_learning_time FROM il_meta_educational " .
497  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
498  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer');
499  $res = $ilDB->query($query);
500  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
501  $time_arr = ilMDUtils::_LOMDurationToArray((string) $row->typical_learning_time);
502  if (!count($time_arr)) {
503  return 0;
504  }
505  return 60 * 60 * 24 * 30 * $time_arr[0] +
506  60 * 60 * 24 * $time_arr[1] +
507  60 * 60 * $time_arr[2] +
508  60 * $time_arr[3] +
509  $time_arr[4];
510  }
511  return 0;
512  }
$res
Definition: ltiservices.php:69
static _LOMDurationToArray(string $a_string)
LOM datatype duration is a string like P2M4DT7H18M2S (2 months 4 days 7 hours 18 minutes 2 seconds) T...
global $DIC
Definition: feed.php:28
$query
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addDescription()

ilMDEducational::addDescription ( )

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

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

90  {
91  $des = new ilMDDescription($this->getRBACId(), $this->getObjId(), $this->getObjType());
92  $des->setParentId($this->getMetaId());
93  $des->setParentType('meta_educational');
94 
95  return $des;
96  }
+ Here is the call graph for this function:

◆ addLanguage()

ilMDEducational::addLanguage ( )

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

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

117  : ilMDLanguage
118  {
119  $lan = new ilMDLanguage($this->getRBACId(), $this->getObjId(), $this->getObjType());
120  $lan->setParentId($this->getMetaId());
121  $lan->setParentType('meta_educational');
122 
123  return $lan;
124  }
+ Here is the call graph for this function:

◆ addTypicalAgeRange()

ilMDEducational::addTypicalAgeRange ( )

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

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

62  {
63  $typ = new ilMDTypicalAgeRange($this->getRBACId(), $this->getObjId(), $this->getObjType());
64  $typ->setParentId($this->getMetaId());
65  $typ->setParentType('meta_educational');
66 
67  return $typ;
68  }
+ Here is the call graph for this function:

◆ delete()

ilMDEducational::delete ( )

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

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

354  : bool
355  {
356  if ($this->getMetaId()) {
357  $query = "DELETE FROM il_meta_educational " .
358  "WHERE meta_educational_id = " . $this->db->quote($this->getMetaId(), ilDBConstants::T_INTEGER);
359  $res = $this->db->manipulate($query);
360 
361  foreach ($this->getTypicalAgeRangeIds() as $id) {
362  $typ = $this->getTypicalAgeRange($id);
363  $typ->delete();
364  }
365  foreach ($this->getDescriptionIds() as $id) {
366  $des = $this->getDescription($id);
367  $des->delete();
368  }
369  foreach ($this->getLanguageIds() as $id) {
370  $lan = $this->getLanguage($id);
371  $lan->delete();
372  }
373 
374  return true;
375  }
376  return false;
377  }
$res
Definition: ltiservices.php:69
getTypicalAgeRange(int $a_typical_age_range_id)
getDescription(int $a_description_id)
$query
getLanguage(int $a_language_id)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:

◆ getContext()

ilMDEducational::getContext ( )

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

References $context.

Referenced by __getFields(), and toXML().

254  : string
255  {
256  return $this->context;
257  }
+ Here is the caller graph for this function:

◆ getDescription()

ilMDEducational::getDescription ( int  $a_description_id)

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

Referenced by delete(), and toXML().

79  {
80  if (!$a_description_id) {
81  return null;
82  }
83  $des = new ilMDDescription();
84  $des->setMetaId($a_description_id);
85 
86  return $des;
87  }
+ Here is the caller graph for this function:

◆ getDescriptionIds()

ilMDEducational::getDescriptionIds ( )
Returns
int[]

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

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

Referenced by delete(), and toXML().

73  : array
74  {
75  return ilMDDescription::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_educational');
76  }
static _getIds(int $a_rbac_id, int $a_obj_id, int $a_parent_id, string $a_parent_type)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDifficulty()

ilMDEducational::getDifficulty ( )

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

References $difficulty.

Referenced by __getFields(), and toXML().

275  : string
276  {
277  return $this->difficulty;
278  }
+ Here is the caller graph for this function:

◆ getIntendedEndUserRole()

ilMDEducational::getIntendedEndUserRole ( )

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

References $intended_end_user_role.

Referenced by __getFields(), and toXML().

234  : string
235  {
237  }
+ Here is the caller graph for this function:

◆ getInteractivityLevel()

ilMDEducational::getInteractivityLevel ( )

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

References $interactivity_level.

Referenced by __getFields(), and toXML().

193  : string
194  {
196  }
+ Here is the caller graph for this function:

◆ getInteractivityType()

ilMDEducational::getInteractivityType ( )

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

References $interactivity_type.

Referenced by __getFields(), and toXML().

141  : string
142  {
144  }
+ Here is the caller graph for this function:

◆ getLanguage()

ilMDEducational::getLanguage ( int  $a_language_id)

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

Referenced by delete(), and toXML().

106  : ?ilMDLanguage
107  {
108  if (!$a_language_id) {
109  return null;
110  }
111  $lan = new ilMDLanguage();
112  $lan->setMetaId($a_language_id);
113 
114  return $lan;
115  }
+ Here is the caller graph for this function:

◆ getLanguageIds()

ilMDEducational::getLanguageIds ( )
Returns
int[]

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

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

Referenced by delete(), and toXML().

101  : array
102  {
103  return ilMDLanguage::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_educational');
104  }
static _getIds(int $a_rbac_id, int $a_obj_id, int $a_parent_id, string $a_parent_type)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLearningResourceType()

ilMDEducational::getLearningResourceType ( )

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

References $learning_resource_type.

Referenced by __getFields(), and toXML().

172  : string
173  {
175  }
+ Here is the caller graph for this function:

◆ getSemanticDensity()

ilMDEducational::getSemanticDensity ( )

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

References $semantic_density.

Referenced by __getFields(), and toXML().

214  : string
215  {
217  }
+ Here is the caller graph for this function:

◆ getTypicalAgeRange()

ilMDEducational::getTypicalAgeRange ( int  $a_typical_age_range_id)

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

Referenced by delete(), and toXML().

51  {
52  if (!$a_typical_age_range_id) {
53  return null;
54  }
55  $typ = new ilMDTypicalAgeRange();
56  $typ->setMetaId($a_typical_age_range_id);
57 
58  return $typ;
59  }
+ Here is the caller graph for this function:

◆ getTypicalAgeRangeIds()

ilMDEducational::getTypicalAgeRangeIds ( )
Returns
int[]

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

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

Referenced by delete(), and toXML().

40  : array
41  {
43  $this->getRBACId(),
44  $this->getObjId(),
45  $this->getMetaId(),
46  'meta_educational'
47  );
48  }
static _getIds(int $a_rbac_id, int $a_obj_id, int $a_parent_id, string $a_parent_type)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTypicalLearningTime()

ilMDEducational::getTypicalLearningTime ( )

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

References $typical_learning_time.

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

319  : string
320  {
322  }
+ Here is the caller graph for this function:

◆ getTypicalLearningTimeSeconds()

ilMDEducational::getTypicalLearningTimeSeconds ( )

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

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

324  : int
325  {
327  if ($time_arr === []) {
328  return 0;
329  }
330  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];
331  }
static _LOMDurationToArray(string $a_string)
LOM datatype duration is a string like P2M4DT7H18M2S (2 months 4 days 7 hours 18 minutes 2 seconds) T...
+ Here is the call graph for this function:

◆ read()

ilMDEducational::read ( )

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

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

399  : bool
400  {
401  if ($this->getMetaId()) {
402  $query = "SELECT * FROM il_meta_educational " .
403  "WHERE meta_educational_id = " . $this->db->quote($this->getMetaId(), 'integer');
404 
405  $res = $this->db->query($query);
406  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
407  $this->setRBACId((int) $row->rbac_id);
408  $this->setObjId((int) $row->obj_id);
409  $this->setObjType((string) $row->obj_type);
410  $this->setInteractivityType((string) $row->interactivity_type);
411  $this->setLearningResourceType((string) $row->learning_resource_type);
412  $this->setInteractivityLevel((string) $row->interactivity_level);
413  $this->setSemanticDensity((string) $row->semantic_density);
414  $this->setIntendedEndUserRole((string) $row->intended_end_user_role);
415  $this->setContext((string) $row->context);
416  $this->setDifficulty((string) $row->difficulty);
417  $this->setTypicalLearningTime((string) $row->typical_learning_time);
418  }
419  return true;
420  }
421  return false;
422  }
$res
Definition: ltiservices.php:69
setTypicalLearningTime(string $a_tlt)
setIntendedEndUserRole(string $a_ieur)
setInteractivityLevel(string $a_iat)
setRBACId(int $a_id)
setObjId(int $a_id)
setInteractivityType(string $a_iat)
setContext(string $a_context)
setDifficulty(string $a_difficulty)
$query
setLearningResourceType(string $a_lrt)
setSemanticDensity(string $a_sd)
setObjType(string $a_type)
+ Here is the call graph for this function:

◆ save()

ilMDEducational::save ( )

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

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

333  : int
334  {
335  $fields = $this->__getFields();
336  $fields['meta_educational_id'] = array('integer', $next_id = $this->db->nextId('il_meta_educational'));
337 
338  if ($this->db->insert('il_meta_educational', $fields)) {
339  $this->setMetaId($next_id);
340  return $this->getMetaId();
341  }
342  return 0;
343  }
setMetaId(int $a_meta_id, bool $a_read_data=true)
+ Here is the call graph for this function:

◆ setContext()

ilMDEducational::setContext ( string  $a_context)

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

Referenced by read().

239  : bool
240  {
241  switch ($a_context) {
242  case 'School':
243  case 'HigherEducation':
244  case 'Training':
245  case 'Other':
246  $this->context = $a_context;
247  return true;
248 
249  default:
250  return false;
251  }
252  }
+ Here is the caller graph for this function:

◆ setDifficulty()

ilMDEducational::setDifficulty ( string  $a_difficulty)

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

Referenced by read().

259  : bool
260  {
261  switch ($a_difficulty) {
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  }
+ Here is the caller graph for this function:

◆ setIntendedEndUserRole()

ilMDEducational::setIntendedEndUserRole ( string  $a_ieur)

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

Referenced by read().

219  : bool
220  {
221  switch ($a_ieur) {
222  case 'Teacher':
223  case 'Author':
224  case 'Learner':
225  case 'Manager':
226  $this->intended_end_user_role = $a_ieur;
227  return true;
228 
229  default:
230  return false;
231  }
232  }
+ Here is the caller graph for this function:

◆ setInteractivityLevel()

ilMDEducational::setInteractivityLevel ( string  $a_iat)

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

Referenced by read().

177  : bool
178  {
179  switch ($a_iat) {
180  case 'VeryLow':
181  case 'Low':
182  case 'Medium':
183  case 'High':
184  case 'VeryHigh':
185  $this->interactivity_level = $a_iat;
186  return true;
187 
188  default:
189  return false;
190  }
191  }
+ Here is the caller graph for this function:

◆ setInteractivityType()

ilMDEducational::setInteractivityType ( string  $a_iat)

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

Referenced by read().

127  : bool
128  {
129  switch ($a_iat) {
130  case 'Active':
131  case 'Expositive':
132  case 'Mixed':
133  $this->interactivity_type = $a_iat;
134  return true;
135 
136  default:
137  return false;
138  }
139  }
+ Here is the caller graph for this function:

◆ setLearningResourceType()

ilMDEducational::setLearningResourceType ( string  $a_lrt)

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

Referenced by read().

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

◆ setPhysicalTypicalLearningTime()

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

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

References setTypicalLearningTime().

286  : bool {
287  if (!$months && !$days && !$hours && !$minutes && !$seconds) {
288  $this->setTypicalLearningTime('PT00H00M');
289  return true;
290  }
291  $tlt = 'P';
292  if ($months) {
293  $tlt .= ($months . 'M');
294  }
295  if ($days) {
296  $tlt .= ($days . 'D');
297  }
298  if ($hours || $minutes || $seconds) {
299  $tlt .= 'T';
300  }
301  if ($hours) {
302  $tlt .= ($hours . 'H');
303  }
304  if ($minutes) {
305  $tlt .= ($minutes . 'M');
306  }
307  if ($seconds) {
308  $tlt .= ($seconds . 'S');
309  }
310  $this->setTypicalLearningTime($tlt);
311  return true;
312  }
setTypicalLearningTime(string $a_tlt)
+ Here is the call graph for this function:

◆ setSemanticDensity()

ilMDEducational::setSemanticDensity ( string  $a_sd)

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

Referenced by read().

198  : bool
199  {
200  switch ($a_sd) {
201  case 'VeryLow':
202  case 'Low':
203  case 'Medium':
204  case 'High':
205  case 'VeryHigh':
206  $this->semantic_density = $a_sd;
207  return true;
208 
209  default:
210  return false;
211  }
212  }
+ Here is the caller graph for this function:

◆ setTypicalLearningTime()

ilMDEducational::setTypicalLearningTime ( string  $a_tlt)

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

Referenced by read(), and setPhysicalTypicalLearningTime().

314  : void
315  {
316  $this->typical_learning_time = $a_tlt;
317  }
+ Here is the caller graph for this function:

◆ toXML()

ilMDEducational::toXML ( ilXmlWriter  $writer)

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

References $id, ILIAS\LTI\ToolProvider\$key, $lang, getContext(), getDescription(), getDescriptionIds(), getDifficulty(), getIntendedEndUserRole(), getInteractivityLevel(), getInteractivityType(), getLanguage(), getLanguageIds(), getLearningResourceType(), ilMDBase\getObjId(), ilMDBase\getRBACId(), getSemanticDensity(), getTypicalAgeRange(), getTypicalAgeRangeIds(), getTypicalLearningTime(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

424  : void
425  {
426  $writer->xmlStartTag(
427  'Educational',
428  array(
429  'InteractivityType' => $this->getInteractivityType() ?: 'Active',
430  'LearningResourceType' => $this->getLearningResourceType() ?: 'Exercise',
431  'InteractivityLevel' => $this->getInteractivityLevel() ?: 'Medium',
432  'SemanticDensity' => $this->getSemanticDensity() ?: 'Medium',
433  'IntendedEndUserRole' => $this->getIntendedEndUserRole() ?: 'Learner',
434  'Context' => $this->getContext() ?: 'Other',
435  'Difficulty' => $this->getDifficulty() ?: 'Medium'
436  )
437  );
438 
439  // TypicalAgeRange
440  $typ_ages = $this->getTypicalAgeRangeIds();
441  foreach ($typ_ages as $id) {
442  $key = $this->getTypicalAgeRange($id);
443 
444  // extra test due to bug 5316 (may be due to eLaix import)
445  if (is_object($key)) {
446  $key->toXML($writer);
447  }
448  }
449  if (!count($typ_ages)) {
450  $typ = new ilMDTypicalAgeRange($this->getRBACId(), $this->getObjId());
451  $typ->toXML($writer);
452  }
453 
454  // TypicalLearningTime
455  $writer->xmlElement('TypicalLearningTime', null, $this->getTypicalLearningTime());
456 
457  // Description
458  foreach ($this->getDescriptionIds() as $id) {
459  $key = $this->getDescription($id);
460  $key->toXML($writer);
461  }
462  // Language
463  foreach ($this->getLanguageIds() as $id) {
464  $lang = $this->getLanguage($id);
465  $lang->toXML($writer);
466  }
467  $writer->xmlEndTag('Educational');
468  }
getTypicalAgeRange(int $a_typical_age_range_id)
getDescription(int $a_description_id)
xmlEndTag(string $tag)
Writes an endtag.
string $key
Consumer key/client ID value.
Definition: System.php:193
getLanguage(int $a_language_id)
$lang
Definition: xapiexit.php:26
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
+ Here is the call graph for this function:

◆ update()

ilMDEducational::update ( )

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

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

345  : bool
346  {
347  return $this->getMetaId() && $this->db->update(
348  'il_meta_educational',
349  $this->__getFields(),
350  array("meta_educational_id" => array('integer', $this->getMetaId()))
351  );
352  }
+ Here is the call graph for this function:

Field Documentation

◆ $context

string ilMDEducational::$context = ''
private

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

Referenced by getContext().

◆ $difficulty

string ilMDEducational::$difficulty = ''
private

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

Referenced by getDifficulty().

◆ $intended_end_user_role

string ilMDEducational::$intended_end_user_role = ''
private

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

Referenced by getIntendedEndUserRole().

◆ $interactivity_level

string ilMDEducational::$interactivity_level = ''
private

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

Referenced by getInteractivityLevel().

◆ $interactivity_type

string ilMDEducational::$interactivity_type = ''
private

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

Referenced by getInteractivityType().

◆ $learning_resource_type

string ilMDEducational::$learning_resource_type = ''
private

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

Referenced by getLearningResourceType().

◆ $semantic_density

string ilMDEducational::$semantic_density = ''
private

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

Referenced by getSemanticDensity().

◆ $typical_learning_time

string ilMDEducational::$typical_learning_time = ''
private

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

Referenced by getTypicalLearningTime().


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