ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilMDUtilSelect Class Reference
+ Collaboration diagram for ilMDUtilSelect:

Static Public Member Functions

static _getLanguageSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta data language selector. More...
 
static _getStructureSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta general structure selector. More...
 
static _getStatusSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta lifecycle status selector. More...
 
static _getRoleSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta lifecycle status selector. More...
 
static _getOperatingSystemSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta technical os selector. More...
 
static _getBrowserSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta technical browser selector. More...
 
static _getFormatSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta technical format selector All possible entries in meta_format are shown. More...
 
static _getDurationSelect (string $a_selected, string $a_name, array $prepend=array())
 Prepare a meta technical duration selector All possible entries in meta_format are shown. More...
 
static _getInteractivityTypeSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta educational interactivity type All possible entries in meta_format are shown. More...
 
static _getLearningResourceTypeSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta educational learning resource type All possible entries in meta_format are shown. More...
 
static _getInteractivityLevelSelect ( $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta educational interactivity level All possible entries in meta_format are shown. More...
 
static _getSemanticDensitySelect ( $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta educational semantic density All possible entries in meta_format are shown. More...
 
static _getIntendedEndUserRoleSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta educational intended end user role All possible entries in meta_format are shown. More...
 
static _getContextSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta context. More...
 
static _getLocationTypeSelect (string $a_selected, string $a_name, array $prepend=array())
 Prepare a meta location type. More...
 
static _getDifficultySelect ( $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta educational difficulty All possible entries in meta_format are shown. More...
 
static _getTypicalAgeRangeSelect (string $a_selected, string $a_name, array $prepend=array())
 Prepare a meta educational typical age range All possible entries in meta_format are shown. More...
 
static _getTypicalLearningTimeSelect (string $a_selected, string $a_name, array $prepend=array())
 Prepare a meta educational typical learning time All possible entries in meta_format are shown. More...
 
static _getCostsSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta rights costs All possible entries in meta_format are shown. More...
 
static _getCopyrightAndOtherRestrictionsSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta rights copyright and other restrictions All possible entries in meta_format are shown. More...
 
static _getPurposeSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta rights copyright and other restrictions All possible entries in meta_format are shown. More...
 

Detailed Description

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

Member Function Documentation

◆ _getBrowserSelect()

static ilMDUtilSelect::_getBrowserSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta technical browser selector.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

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

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

240  { // END PATCH Lucene Search
241  global $DIC;
242 
243  $lng = $DIC['lng'];
244 
245  $items = array('Any', 'NetscapeCommunicator', 'MS-InternetExplorer', 'Opera', 'Amaya', 'Mozilla');
246 
247  foreach ($prepend as $value => $translation) {
248  $options[$value] = $translation;
249  }
250 
251  foreach ($items as $item) {
252  $options[$item] = $item;
253  }
254  // BEGIN PATCH Lucene search
255  return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
256  $a_selected,
257  $a_name,
258  $options,
259  false,
260  true
261  );
262  // END PATCH Lucene Search
263  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ _getContextSelect()

static ilMDUtilSelect::_getContextSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta context.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 556 of file class.ilMDUtilSelect.php.

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

561  { // END PATCH Lucene Search
562  global $DIC;
563 
564  $lng = $DIC['lng'];
565 
566  $items = array('School', 'HigherEducation', 'Training', 'Other');
567 
568  foreach ($prepend as $value => $translation) {
569  $options[$value] = $translation;
570  }
571 
572  foreach ($items as $item) {
573  $options[$item] = $item;
574  }
575  // BEGIN PATCH Lucene search
576  return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
577  $a_selected,
578  $a_name,
579  $options,
580  false,
581  true
582  );
583  // END PATCH Lucene Search
584  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ _getCopyrightAndOtherRestrictionsSelect()

static ilMDUtilSelect::_getCopyrightAndOtherRestrictionsSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta rights copyright and other restrictions All possible entries in meta_format are shown.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 753 of file class.ilMDUtilSelect.php.

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

758  { // END PATCH Lucene Search
759  global $DIC;
760 
761  $lng = $DIC['lng'];
762 
763  $items = array('Yes', 'No');
764 
765  foreach ($prepend as $value => $translation) {
766  $options[$value] = $translation;
767  }
768 
769  foreach ($items as $item) {
770  $options[$item] = $item;
771  }
772  // BEGIN PATCH Lucene search
773  return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
774  $a_selected,
775  $a_name,
776  $options,
777  false,
778  true
779  );
780  // END PATCH Lucene Search
781  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ _getCostsSelect()

static ilMDUtilSelect::_getCostsSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta rights costs All possible entries in meta_format are shown.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 716 of file class.ilMDUtilSelect.php.

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

721  { // END PATCH Lucene Search
722  global $DIC;
723 
724  $lng = $DIC['lng'];
725 
726  $items = array('Yes', 'No');
727 
728  foreach ($prepend as $value => $translation) {
729  $options[$value] = $translation;
730  }
731 
732  foreach ($items as $item) {
733  $options[$item] = $item;
734  }
735  // BEGIN PATCH Lucene search
736  return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
737  $a_selected,
738  $a_name,
739  $options,
740  false,
741  true
742  );
743  // END PATCH Lucene Search
744  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ _getDifficultySelect()

static ilMDUtilSelect::_getDifficultySelect (   $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta educational difficulty All possible entries in meta_format are shown.

Parameters
mixed$a_selected
string$a_name
array$prepend
bool$a_options_only
Returns
array|string

Definition at line 617 of file class.ilMDUtilSelect.php.

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

622  { // END PATCH Lucene Search
623  global $DIC;
624 
625  $lng = $DIC['lng'];
626 
627  $items = array(1 => 'VeryEasy', 2 => 'Easy', 3 => 'Medium', 4 => 'Difficult', 5 => 'VeryDifficult');
628 
629  foreach ($prepend as $value => $translation) {
630  $options[$value] = $translation;
631  }
632 
633  foreach ($items as $key => $item) {
634  $options[$key] = $item;
635  }
636  // BEGIN PATCH Lucene search
637  return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
638  $a_selected,
639  $a_name,
640  $options,
641  false,
642  true
643  );
644  // END PATCH Lucene Search
645  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ _getDurationSelect()

static ilMDUtilSelect::_getDurationSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array() 
)
static

Prepare a meta technical duration selector All possible entries in meta_format are shown.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')

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

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

318  : string
319  {
320  global $DIC;
321 
322  $lng = $DIC['lng'];
323 
324  foreach ($prepend as $value => $translation) {
325  $options[$value] = $translation;
326  }
327 
328  $items = array(
329  15 => '15 ' . $lng->txt('minutes'),
330  30 => '30 ' . $lng->txt('minutes'),
331  45 => '45 ' . $lng->txt('minutes'),
332  60 => '1 ' . $lng->txt('hour'),
333  90 => '1 ' . $lng->txt('hour') . ' 30 ' . $lng->txt('minutes'),
334  120 => '2 ' . $lng->txt('hours'),
335  180 => '3 ' . $lng->txt('hours'),
336  240 => '4 ' . $lng->txt('hours')
337  );
338 
339  foreach ($items as $key => $item) {
340  $options[$key] = $item;
341  }
342  return ilLegacyFormElementsUtil::formSelect($a_selected, $a_name, $options, false, true);
343  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ _getFormatSelect()

static ilMDUtilSelect::_getFormatSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta technical format selector All possible entries in meta_format are shown.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

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

References $DIC, $ilDB, $lng, $res, ilDBConstants\FETCHMODE_OBJECT, and ilLegacyFormElementsUtil\formSelect().

276  { // END PATCH Lucene Search
277  global $DIC;
278 
279  $lng = $DIC['lng'];
280  $ilDB = $DIC['ilDB'];
281 
282  $options = [];
283  foreach ($prepend as $value => $translation) {
284  $options[$value] = $translation;
285  }
286 
287  $ilDB->setLimit(200, 0);
288  // In case an index is defined on field il_meta_format, this group by
289  // statement takes advantage of it to improve the performance of the query.
290  $query = "SELECT format AS forma from il_meta_format GROUP BY format";
291  $res = $ilDB->query($query);
292  if (!$res->numRows()) {
293  return '';
294  }
295 
296  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
297  if (is_string($row->forma) && $row->forma !== '') {
298  $options[$row->forma] = substr($row->forma, 0, 48);
299  }
300  }
301 
302  // BEGIN PATCH Lucene search
303  return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
304  $a_selected,
305  $a_name,
306  $options,
307  false,
308  true
309  );
310  // END PATCH Lucene Search
311  }
$res
Definition: ltiservices.php:66
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ _getIntendedEndUserRoleSelect()

static ilMDUtilSelect::_getIntendedEndUserRoleSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta educational intended end user role All possible entries in meta_format are shown.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

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

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

525  { // END PATCH Lucene Search
526  global $DIC;
527 
528  $lng = $DIC['lng'];
529 
530  $items = array('Teacher', 'Author', 'Learner', 'Manager');
531 
532  foreach ($prepend as $value => $translation) {
533  $options[$value] = $translation;
534  }
535 
536  foreach ($items as $item) {
537  $options[$item] = $item;
538  }
539  // BEGIN PATCH Lucene search
540  return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
541  $a_selected,
542  $a_name,
543  $options,
544  false,
545  true
546  );
547  // END PATCH Lucene Search
548  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ _getInteractivityLevelSelect()

static ilMDUtilSelect::_getInteractivityLevelSelect (   $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta educational interactivity level All possible entries in meta_format are shown.

Parameters
mixed$a_selected
string$a_name
array$prepend
bool$a_options_only
Returns
array|string

Definition at line 444 of file class.ilMDUtilSelect.php.

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

449  {
450  global $DIC;
451 
452  $lng = $DIC['lng'];
453 
454  $items = array(1 => 'VeryLow', 2 => 'Low', 3 => 'Medium', 4 => 'High', 5 => 'VeryHigh');
455 
456  foreach ($prepend as $value => $translation) {
457  $options[$value] = $translation;
458  }
459 
460  foreach ($items as $key => $item) {
461  $options[$key] = $item;
462  }
463  // BEGIN PATCH Lucene search
464  return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
465  $a_selected,
466  $a_name,
467  $options,
468  false,
469  true
470  );
471  // END PATCH Lucene Search
472  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ _getInteractivityTypeSelect()

static ilMDUtilSelect::_getInteractivityTypeSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta educational interactivity type All possible entries in meta_format are shown.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 352 of file class.ilMDUtilSelect.php.

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

357  { // END PATCH Lucene Search
358  global $DIC;
359 
360  $lng = $DIC['lng'];
361 
362  $items = array('Actice', 'Expositive', 'Mixed');
363 
364  foreach ($prepend as $value => $translation) {
365  $options[$value] = $translation;
366  }
367 
368  foreach ($items as $item) {
369  $options[$item] = $item;
370  }
371  // BEGIN PATCH Lucene search
372  return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
373  $a_selected,
374  $a_name,
375  $options,
376  false,
377  true
378  );
379  // END PATCH Lucene Search
380  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ _getLanguageSelect()

static ilMDUtilSelect::_getLanguageSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta data language selector.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

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

References $DIC, $lng, ilMDLanguageItem\_getPossibleLanguageCodes(), and ilLegacyFormElementsUtil\formSelect().

41  { // END PATCH Lucene Search
42  global $DIC;
43 
44  $lng = $DIC['lng'];
45 
46  foreach (ilMDLanguageItem::_getPossibleLanguageCodes() as $code) {
47  $tmp_options[$code] = $lng->txt('meta_l_' . $code);
48  }
49  asort($tmp_options, SORT_STRING);
50 
51  $options = [];
52  foreach ($prepend as $value => $translation) {
53  $options[$value] = $translation;
54  }
55  $options = array_merge($options, $tmp_options);
56  // BEGIN PATCH Lucene search
57  return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
58  $a_selected,
59  $a_name,
60  $options,
61  false,
62  true
63  );
64  // END PATCH Lucene Search
65  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ _getLearningResourceTypeSelect()

static ilMDUtilSelect::_getLearningResourceTypeSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta educational learning resource type All possible entries in meta_format are shown.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 389 of file class.ilMDUtilSelect.php.

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

394  { // END PATCH Lucene Search
395  global $DIC;
396 
397  $lng = $DIC['lng'];
398 
399  $items = array(
400  'Exercise',
401  'Simulation',
402  'Questionnaire',
403  'Diagram',
404  'Figure',
405  'Graph',
406  'Index',
407  'Slide',
408  'Table',
409  'NarrativeText',
410  'Exam',
411  'Experiment',
412  'ProblemStatement',
413  'SelfAssessment',
414  'Lecture'
415  );
416 
417  foreach ($prepend as $value => $translation) {
418  $options[$value] = $translation;
419  }
420 
421  foreach ($items as $item) {
422  $options[$item] = $item;
423  }
424  // BEGIN PATCH Lucene search
425  return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
426  $a_selected,
427  $a_name,
428  $options,
429  false,
430  true
431  );
432  // END PATCH Lucene Search
433  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ _getLocationTypeSelect()

static ilMDUtilSelect::_getLocationTypeSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array() 
)
static

Prepare a meta location type.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')

Definition at line 590 of file class.ilMDUtilSelect.php.

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

590  : string
591  {
592  global $DIC;
593 
594  $lng = $DIC['lng'];
595 
596  $items = array('LocalFile', 'Reference');
597 
598  foreach ($prepend as $value => $translation) {
599  $options[$value] = $translation;
600  }
601 
602  foreach ($items as $item) {
603  $options[$item] = $item;
604  }
605  return ilLegacyFormElementsUtil::formSelect($a_selected, $a_name, $options, false, true);
606  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ _getOperatingSystemSelect()

static ilMDUtilSelect::_getOperatingSystemSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta technical os selector.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 199 of file class.ilMDUtilSelect.php.

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

204  { // END PATCH Lucene Search
205  global $DIC;
206 
207  $lng = $DIC['lng'];
208 
209  $items = array('PC-DOS', 'MS-Windows', 'MAC-OS', 'Unix', 'Multi-OS', 'None');
210 
211  foreach ($prepend as $value => $translation) {
212  $options[$value] = $translation;
213  }
214 
215  foreach ($items as $item) {
216  $options[$item] = $item;
217  }
218  // BEGIN PATCH Lucene search
219  return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
220  $a_selected,
221  $a_name,
222  $options,
223  false,
224  true
225  );
226  // END PATCH Lucene Search
227  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ _getPurposeSelect()

static ilMDUtilSelect::_getPurposeSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta rights copyright and other restrictions All possible entries in meta_format are shown.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 790 of file class.ilMDUtilSelect.php.

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

795  { // END PATCH Lucene Search
796  global $DIC;
797 
798  $lng = $DIC['lng'];
799 
800  $items = array(
801  'Discipline',
802  'Idea',
803  'Prerequisite',
804  'EducationalObjective',
805  'AccessibilityRestrictions',
806  'EducationalLevel',
807  'SkillLevel',
808  'SecurityLevel',
809  'Competency'
810  );
811 
812  foreach ($prepend as $value => $translation) {
813  $options[$value] = $translation;
814  }
815 
816  foreach ($items as $item) {
817  $options[$item] = $item;
818  }
819  // BEGIN PATCH Lucene search
820  return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
821  $a_selected,
822  $a_name,
823  $options,
824  false,
825  true
826  );
827  // END PATCH Lucene Search
828  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ _getRoleSelect()

static ilMDUtilSelect::_getRoleSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta lifecycle status selector.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 145 of file class.ilMDUtilSelect.php.

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

150  { // END PATCH Lucene Search
151  global $DIC;
152 
153  $lng = $DIC['lng'];
154 
155  $items = array(
156  'Author',
157  'Publisher',
158  'Unknown',
159  'Initiator',
160  'Terminator',
161  'Editor',
162  'GraphicalDesigner',
163  'TechnicalImplementer',
164  'ContentProvider',
165  'TechnicalValidator',
166  'EducationalValidator',
167  'ScriptWriter',
168  'InstructionalDesigner',
169  'SubjectMatterExpert',
170  'Creator',
171  'Validator',
172  'PointOfContact'
173  );
174 
175  foreach ($prepend as $value => $translation) {
176  $options[$value] = $translation;
177  }
178 
179  foreach ($items as $item) {
180  $options[$item] = $lng->txt('meta_' . strtolower($item));
181  }
182  // BEGIN PATCH Lucene search
183  return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
184  $a_selected,
185  $a_name,
186  $options,
187  false,
188  true
189  );
190  // END PATCH Lucene Search
191  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ _getSemanticDensitySelect()

static ilMDUtilSelect::_getSemanticDensitySelect (   $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta educational semantic density All possible entries in meta_format are shown.

Parameters
mixed$a_selected
string$a_name
array$prepend
bool$a_options_only
Returns
array|string

Definition at line 483 of file class.ilMDUtilSelect.php.

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

488  { // END PATCH Lucene Search
489  global $DIC;
490 
491  $lng = $DIC['lng'];
492 
493  $items = array(1 => 'VeryLow', 2 => 'Low', 3 => 'Medium', 4 => 'High', 5 => 'VeryHigh');
494 
495  foreach ($prepend as $value => $translation) {
496  $options[$value] = $translation;
497  }
498 
499  foreach ($items as $key => $item) {
500  $options[$key] = $item;
501  }
502  // BEGIN PATCH Lucene search
503  return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
504  $a_selected,
505  $a_name,
506  $options,
507  false,
508  true
509  );
510  // END PATCH Lucene Search
511  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ _getStatusSelect()

static ilMDUtilSelect::_getStatusSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta lifecycle status selector.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 109 of file class.ilMDUtilSelect.php.

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

114  { // END PATCH Lucene Search
115  global $DIC;
116 
117  $lng = $DIC['lng'];
118 
119  $items = array('Draft', 'Final', 'Revised', 'Unavailable');
120 
121  foreach ($prepend as $value => $translation) {
122  $options[$value] = $translation;
123  }
124 
125  foreach ($items as $item) {
126  $options[$item] = $lng->txt('meta_' . strtolower($item));
127  }
128  // BEGIN PATCH Lucene search
129  return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
130  $a_selected,
131  $a_name,
132  $options,
133  false,
134  true
135  );
136  // END PATCH Lucene Search
137  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ _getStructureSelect()

static ilMDUtilSelect::_getStructureSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta general structure selector.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

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

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

78  { // END PATCH Lucene Search
79  global $DIC;
80 
81  $lng = $DIC['lng'];
82 
83  $items = array('Atomic', 'Collection', 'Networked', 'Hierarchical', 'Linear');
84 
85  foreach ($prepend as $value => $translation) {
86  $options[$value] = $translation;
87  }
88 
89  foreach ($items as $item) {
90  $options[$item] = $lng->txt('meta_' . strtolower($item));
91  }
92  // BEGIN PATCH Lucene search
93  return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
94  $a_selected,
95  $a_name,
96  $options,
97  false,
98  true
99  );
100  // END PATCH Lucene Search
101  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ _getTypicalAgeRangeSelect()

static ilMDUtilSelect::_getTypicalAgeRangeSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array() 
)
static

Prepare a meta educational typical age range All possible entries in meta_format are shown.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')

Definition at line 652 of file class.ilMDUtilSelect.php.

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

656  : string {
657  global $DIC;
658 
659  $lng = $DIC['lng'];
660 
661  $options = [];
662  foreach ($prepend as $value => $translation) {
663  $options[$value] = $translation;
664  }
665  $items = [];
666  for ($i = 1; $i < 100; $i++) {
667  $items[$i] = $i;
668  }
669  foreach ($items as $key => $item) {
670  $options[$key] = $item;
671  }
672  return ilLegacyFormElementsUtil::formSelect($a_selected, $a_name, $options, false, true);
673  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ _getTypicalLearningTimeSelect()

static ilMDUtilSelect::_getTypicalLearningTimeSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array() 
)
static

Prepare a meta educational typical learning time All possible entries in meta_format are shown.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')

Definition at line 680 of file class.ilMDUtilSelect.php.

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

684  : string {
685  global $DIC;
686 
687  $lng = $DIC['lng'];
688 
689  foreach ($prepend as $value => $translation) {
690  $options[$value] = $translation;
691  }
692  $items = array(
693  15 => '15 ' . $lng->txt('minutes'),
694  30 => '30 ' . $lng->txt('minutes'),
695  45 => '45 ' . $lng->txt('minutes'),
696  60 => '1 ' . $lng->txt('hour'),
697  90 => '1 ' . $lng->txt('hour') . ' 30 ' . $lng->txt('minutes'),
698  120 => '2 ' . $lng->txt('hours'),
699  180 => '3 ' . $lng->txt('hours'),
700  240 => '4 ' . $lng->txt('hours')
701  );
702 
703  foreach ($items as $key => $item) {
704  $options[$key] = $item;
705  }
706  return ilLegacyFormElementsUtil::formSelect($a_selected, $a_name, $options, false, true);
707  }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

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