5 include_once(
"./Services/Form/classes/class.ilFormPropertyGUI.php");
32 $this->lng->loadLanguageModule(
"meta");
34 parent::__construct($a_title, $a_postvar);
35 $this->
setType(
"typical_learntime");
46 $this->value = $a_value;
56 $this->lom_duration = $a_value;
59 include_once
'Services/MetaData/classes/class.ilMDUtils.php';
113 if ($this->
getRequired() && $v[0] == 0 && $v[1] == 0 &&
114 $v[2] == 0 && $v[3] == 0 && (
int) $v[4] == 0) {
124 for (
$i = 0;
$i <= 24;
$i++) {
133 for (
$i = 0;
$i <= 31;
$i++) {
144 $ttpl =
new ilTemplate(
"tpl.prop_typical_learning_time.html",
true,
true,
"Services/MetaData");
147 $ttpl->setVariable(
"TXT_MONTH", $this->lng->txt(
'md_months'));
151 $ttpl->setVariable(
"TXT_DAYS", $this->lng->txt(
'md_days'));
152 $ttpl->setVariable(
"TXT_TIME", $this->lng->txt(
'md_time'));
156 $val[4] ?
false :
true,
162 $ttpl->setVariable(
"TLT_HINT", $tlt[4] ?
'(hh:mm:ss)' :
'(hh:mm)');
165 $ttpl->setCurrentBlock(
"tlt_not_valid");
166 $ttpl->setVariable(
"TXT_CURRENT_VAL", $this->lng->txt(
'meta_current_value'));
167 $ttpl->setVariable(
"TLT", $this->lom_duration);
168 $ttpl->setVariable(
"INFO_TLT_NOT_VALID", $this->lng->txt(
'meta_info_tlt_not_valid'));
169 $ttpl->parseCurrentBlock();
172 $a_tpl->setCurrentBlock(
"prop_generic");
173 $a_tpl->setVariable(
"PROP_GENERIC", $ttpl->get());
174 $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...
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
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.