4 include_once
"./Services/Form/classes/class.ilSubEnabledFormPropertyGUI.php";
29 parent::__construct($a_title, $a_postvar);
40 $this->options = $a_options;
60 $this->value = $a_value;
80 $this->intlink = $a_value;
100 $this->intlinktext = $a_value;
120 $this->addCommand = $a_add_command;
130 return ($this->addCommand) ? $this->addCommand :
"addInternalLink";
155 $this->
setAlert($lng->txt(
"msg_input_is_required"));
171 $template =
new ilTemplate(
"tpl.prop_suggestedsolutionselector.html",
true,
true,
"Modules/TestQuestionPool");
173 foreach ($this->
getOptions() as $option_value => $option_text) {
174 $template->setCurrentBlock(
"prop_intlink_select_option");
175 $template->setVariable(
"VAL_SELECT_OPTION", $option_value);
176 if ($option_value == $this->
getValue()) {
179 'selected="selected"' 182 $template->setVariable(
"TXT_SELECT_OPTION", $option_text);
186 $template->setCurrentBlock(
"delete_internallink");
187 $template->setVariable(
"TEXT_DELETE_INTERNALLINK", $lng->txt(
"remove_solution"));
190 $template->setCurrentBlock(
"internal_link");
195 $template->setCurrentBlock(
"prop_internallink_selector");
200 " disabled=\"disabled\"" 203 $template->setVariable(
"TEXT_ADD_INTERNALLINK", ($this->
getInternalLink()) ? $lng->txt(
"change") : $lng->txt(
"add"));
206 $a_tpl->setCurrentBlock(
"prop_generic");
207 $a_tpl->setVariable(
"PROP_GENERIC",
$template->get());
208 $a_tpl->parseCurrentBlock();
This class represents a selection list property in a property form.
getInternalLink()
Get internal linnk.
getInternalLinkText()
Get internal link text.
insert(&$a_tpl)
Insert property html.
setValue($a_value)
Set Value.
setAddCommand($a_add_command)
Set add command.
getAddCommand()
Get add command.
special template class to simplify handling of ITX/PEAR
setOptions($a_options)
Set Options.
__construct($a_title="", $a_postvar="")
Constructor.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
setInternalLinkText($a_value)
Set internal link.text.
checkInput()
Check input, strip slashes etc.
setValueByArray($a_values)
Set value by array.
setInternalLink($a_value)
Set internal link.