19 declare(strict_types=1);
32 public const COMPLETED =
'http://adlnet.gov/expapi/verbs/completed';
33 public const PASSED =
'http://adlnet.gov/expapi/verbs/passed';
34 public const FAILED =
'http://adlnet.gov/expapi/verbs/failed';
35 public const SATISFIED =
'http://adlnet.gov/expapi/verbs/satisfied';
36 public const PROGRESSED =
'http://adlnet.gov/expapi/verbs/progressed';
37 public const EXPERIENCED =
'http://adlnet.gov/expapi/verbs/experienced';
40 'http://adlnet.gov/expapi/verbs/abandoned',
41 'http://adlnet.gov/expapi/verbs/answered',
42 'http://adlnet.gov/expapi/verbs/asked',
43 'http://adlnet.gov/expapi/verbs/attempted',
44 'http://adlnet.gov/expapi/verbs/attended',
45 'http://adlnet.gov/expapi/verbs/commented',
46 'http://adlnet.gov/expapi/verbs/completed',
47 'http://adlnet.gov/expapi/verbs/exited',
48 'http://adlnet.gov/expapi/verbs/experienced',
49 'http://adlnet.gov/expapi/verbs/failed',
50 'http://adlnet.gov/expapi/verbs/imported',
51 'http://adlnet.gov/expapi/verbs/initialized',
52 'http://adlnet.gov/expapi/verbs/interacted',
53 'http://adlnet.gov/expapi/verbs/launched',
54 'http://adlnet.gov/expapi/verbs/mastered',
55 'http://adlnet.gov/expapi/verbs/passed',
56 'http://adlnet.gov/expapi/verbs/preferred',
57 'http://adlnet.gov/expapi/verbs/progressed',
58 'http://adlnet.gov/expapi/verbs/registered',
59 'http://adlnet.gov/expapi/verbs/responded',
60 'http://adlnet.gov/expapi/verbs/resumed',
61 'http://adlnet.gov/expapi/verbs/satisfied',
62 'http://adlnet.gov/expapi/verbs/scored',
63 'http://adlnet.gov/expapi/verbs/shared',
64 'http://adlnet.gov/expapi/verbs/suspended',
65 'http://adlnet.gov/expapi/verbs/terminated',
66 'http://adlnet.gov/expapi/verbs/voided' 76 return 'http://adlnet.gov/expapi/verbs/' . $verb;
84 '' => $DIC->language()->txt(
'cmix_all_verbs')
87 if (is_array($verbs)) {
88 foreach ($verbs as $verb) {
90 $options[urlencode($verb)] = self::getVerbTranslation(
108 '' => $DIC->language()->txt(
'cmix_all_verbs')
111 foreach ($this->verbs as $verb) {
112 $options[urlencode($verb)] = self::getVerbTranslation(
123 $verbMatch = preg_match(
'/\/([^\/]+)$/', $verb, $matches);
124 $shortVerb = $matches[1];
125 $langVar = preg_replace(
'/http(s)?:\/\//',
'', $verb);
126 $langVar = str_replace(
'.',
'', $langVar);
127 $langVar = str_replace(
'/',
'_', $langVar);
128 $langVar =
'cmix_' . $langVar;
129 $translatedVerb = $lng->
txt($langVar);
131 if (strpos($translatedVerb,
'-cmix_') === 0) {
134 return $translatedVerb;
isValidVerb(string $verb)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static getVerbTranslation(ilLanguage $lng, string $verb)
getDynamicSelectOptions(?array $verbs)