4require_once(
"./Services/COPage/classes/class.ilPCQuestionOverview.php");
5require_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
23 public function __construct(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id =
"")
27 $this->ctrl =
$DIC->ctrl();
28 $this->tpl =
$DIC[
"tpl"];
29 $this->lng =
$DIC->language();
30 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
40 $next_class = $this->ctrl->getNextClass($this);
43 $cmd = $this->ctrl->getCmd();
45 switch ($next_class) {
65 public function edit($a_insert =
false)
74 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
78 $form->setTitle($this->lng->txt(
"cont_ed_insert_qover"));
80 $form->setTitle($this->lng->txt(
"cont_edit_qover"));
85 $cb->setInfo($this->lng->txt(
"cont_qover_short_message_info"));
87 $cb->setChecked($this->content_obj->getShortMessage());
89 $cb->setChecked(
true);
94 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_qover_list_wrong_q"),
"wrong_questions");
95 $cb->setInfo($this->lng->txt(
"cont_qover_list_wrong_q_info"));
97 $cb->setChecked($this->content_obj->getListWrongQuestions());
103 $form->addCommandButton(
"create_qover",
$lng->txt(
"save"));
104 $form->addCommandButton(
"cancelCreate",
$lng->txt(
"cancel"));
106 $form->addCommandButton(
"update",
$lng->txt(
"save"));
107 $form->addCommandButton(
"cancelUpdate",
$lng->txt(
"cancel"));
120 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
123 $this->updated = $this->pg_obj->update();
124 if ($this->updated ===
true) {
125 $this->ctrl->returnToParent($this,
"jump" . $this->hier_id);
138 $this->updated = $this->pg_obj->update();
139 if ($this->updated ===
true) {
140 $this->ctrl->returnToParent($this,
"jump" . $this->hier_id);
142 $this->pg_obj->addHierIDs();
An exception for terminatinating execution or to throw for unit testing.
Class ilPCQuestionOverviewGUI.
insert()
Insert new question overview.
edit($a_insert=false)
Edit question overview form.
__construct(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id="")
Constructor.
update()
Update question overview.
executeCommand()
Execute command.
create()
Create new question overview.
Question overview page content element.
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
displayValidationError()
display validation errors
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
if(isset($_POST['submit'])) $form