5 include_once(
"./Services/Form/classes/class.ilFormPropertyGUI.php");
30 $this->lng->loadLanguageModule(
"meta");
32 parent::__construct($a_title, $a_postvar);
33 $this->
setType(
"typical_learntime");
44 $this->value = $a_value;
54 $this->lom_duration = $a_value;
57 include_once
'Services/MetaData/classes/class.ilMDUtils.php';
115 if ($this->
getRequired() && $v[0] == 0 && $v[1] == 0 &&
116 $v[2] == 0 && $v[3] == 0 && (
int) $v[4] == 0)
118 $this->
setAlert($lng->txt(
"msg_input_is_required"));
127 for($i = 0;$i <= 24;$i++)
137 for($i = 0;$i <= 31;$i++)
149 $ttpl =
new ilTemplate(
"tpl.prop_typical_learning_time.html",
true,
true,
"Services/MetaData");
152 $ttpl->setVariable(
"TXT_MONTH",$this->lng->txt(
'md_months'));
156 $ttpl->setVariable(
"TXT_DAYS",$this->lng->txt(
'md_days'));
157 $ttpl->setVariable(
"TXT_TIME",$this->lng->txt(
'md_time'));
160 $val[2],$val[3],$val[4],
162 $ttpl->setVariable(
"TLT_HINT",$tlt[4] ?
'(hh:mm:ss)' :
'(hh:mm)');
166 $ttpl->setCurrentBlock(
"tlt_not_valid");
167 $ttpl->setVariable(
"TXT_CURRENT_VAL",$this->lng->txt(
'meta_current_value'));
168 $ttpl->setVariable(
"TLT", $this->lom_duration);
169 $ttpl->setVariable(
"INFO_TLT_NOT_VALID",$this->lng->txt(
'meta_info_tlt_not_valid'));
170 $ttpl->parseCurrentBlock();
173 $a_tpl->setCurrentBlock(
"prop_generic");
174 $a_tpl->setVariable(
"PROP_GENERIC", $ttpl->get());
175 $a_tpl->parseCurrentBlock();
static makeTimeSelect($prefix, $short=true, $hour="", $minute="", $second="", $a_use_default=true, $a_further_options=array())
Creates a combination of HTML selects for time inputs.
static _LOMDurationToArray($a_string)
LOM datatype duration is a string like P2M4DT7H18M2S (2 months 4 days 7 hours 18 minutes 2 seconds) T...
if(!is_array($argv)) $options
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
special template class to simplify handling of ITX/PEAR
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Create styles array
The data for the language used.