24 require_once(
"./Services/COPage/classes/class.ilPCVerification.php");
25 require_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
49 public function __construct(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id =
"")
53 $this->tpl = $DIC[
"tpl"];
54 $this->ctrl = $DIC->ctrl();
55 $this->
user = $DIC->user();
56 $this->lng = $DIC->language();
57 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
66 $next_class = $this->ctrl->getNextClass($this);
69 $cmd = $this->ctrl->getCmd();
71 switch ($next_class) {
94 $tpl->setContent($a_form->getHTML());
111 $tpl->setContent($a_form->getHTML());
126 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
130 $form->setTitle($this->lng->txt(
"cont_insert_verification"));
132 $form->setTitle($this->lng->txt(
"cont_update_verification"));
135 $lng->loadLanguageModule(
"wsp");
137 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
142 foreach ($tree->getSubTree($root) as $node) {
143 if (in_array($node[
"type"],
array(
"excv",
"tstv",
"crsv",
"scov"))) {
144 $options[$node[
"obj_id"]] = $node[
"title"] .
" (" .
$lng->txt(
"wsp_type_" . $node[
"type"]) .
")";
149 $obj =
new ilSelectInputGUI($this->lng->txt(
"cont_verification_object"),
"object");
152 $form->addItem($obj);
155 $form->addCommandButton(
"create_verification", $this->lng->txt(
"save"));
156 $form->addCommandButton(
"cancelCreate", $this->lng->txt(
"cancel"));
158 $data = $this->content_obj->getData();
159 $obj->setValue(
$data[
"id"]);
161 $form->addCommandButton(
"update", $this->lng->txt(
"save"));
162 $form->addCommandButton(
"cancelUpdate", $this->lng->txt(
"cancel"));
174 if (
$form->checkInput()) {
178 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
179 $this->content_obj->setData(
$type,
$form->getInput(
"object"));
180 $this->updated = $this->pg_obj->update();
181 if ($this->updated ===
true) {
182 $this->ctrl->returnToParent($this,
"jump" . $this->hier_id);
196 if (
$form->checkInput()) {
199 $this->content_obj->setData(
$type,
$form->getInput(
"object"));
200 $this->updated = $this->pg_obj->update();
201 if ($this->updated ===
true) {
202 $this->ctrl->returnToParent($this,
"jump" . $this->hier_id);
207 $this->pg_obj->addHierIDs();
__construct(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id="")
Constructor public.
insert(ilPropertyFormGUI $a_form=null)
Insert new verification form.
Tree handler for personal workspace.
Class ilPCVerificationGUI.
update()
Update verification.
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
if(isset($_POST['submit'])) $form
getRootId()
get the root id of tree public
getNodeData($a_node_id, $a_tree_pk=null)
get all information of a node.
initForm($a_insert=false)
Init verification form.
create()
Create new verification.
displayValidationError()
display validation errors
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
edit(ilPropertyFormGUI $a_form=null)
Edit verification form.
executeCommand()
execute command
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options