ILIAS  release_8 Revision v8.24
ilPCQuestionOverviewGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilPCQuestionOverviewGUI:
+ Collaboration diagram for ilPCQuestionOverviewGUI:

Public Member Functions

 __construct (ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id="")
 
 executeCommand ()
 
 insert ()
 
 edit (bool $a_insert=false)
 
 create ()
 Create new question overview. More...
 
 update ()
 Update question overview. More...
 
- Public Member Functions inherited from ilPageContentGUI
 __construct (ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id="", string $a_pc_id="0")
 
 setContentObject (ilPageContent $a_val)
 
 getContentObject ()
 
 setPage (ilPageObject $a_val)
 
 getPage ()
 
 setPageConfig (ilPageConfig $a_val)
 
 getPageConfig ()
 
 setStyleId (int $a_styleid)
 
 getStyleId ()
 
 getStyle ()
 
 getCharacteristicsOfCurrentStyle (array $a_type)
 Get characteristics of current style and call setCharacteristics, if style is given. More...
 
 setCharacteristics (array $a_chars)
 
 getCharacteristics ()
 
 getHierId ()
 
 setHierId (string $a_hier_id)
 set hierarchical id in dom object More...
 
 delete ()
 
 moveAfter ()
 move content element after another element More...
 
 moveBefore ()
 move content element before another element More...
 
 splitPage ()
 split page to new page at specified position More...
 
 splitPageNext ()
 split page to next page at specified position More...
 
 displayValidationError ()
 
 cancelCreate ()
 cancel creating page content More...
 
 cancelUpdate ()
 cancel update More...
 
 cancel ()
 Cancel. More...
 
 deactivate ()
 gui function set enabled if is not enabled and vice versa More...
 
 cut ()
 Cut single element. More...
 
 copy ()
 Copy single element. More...
 
 getTemplateOptions (string $a_type="")
 Get table templates. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageContentGUI
static _getCommonBBButtons ()
 
- Data Fields inherited from ilPageContentGUI
ilPageContent $content_obj
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilPageObject $pg_obj
 
string $hier_id = ""
 
php4DOMDocument $dom
 
 $updated
 
string $target_script = ""
 
string $return_location = ""
 
ilPageConfig $page_config = null
 
- Static Public Attributes inherited from ilPageContentGUI
static string $style_selector_reset = "margin-top:2px; margin-bottom:2px; text-indent:0px; position:static; float:none; width: auto;"
 
- Protected Member Functions inherited from ilPageContentGUI
 redirectToParent (string $hier_id="")
 
 getParentReturn (string $hier_id="")
 
 updateAndReturn ()
 
 setCurrentTextLang (string $lang_key)
 
 getCurrentTextLang ()
 
- Protected Attributes inherited from ilPageContentGUI
EditSessionRepository $edit_repo
 
string $pc_id = ""
 
array $chars
 
ilObjStyleSheet $style = null
 
ilLogger $log
 
int $styleid = 0
 
EditGUIRequest $request
 
string $sub_command = ""
 
int $requested_ref_id = 0
 
Style Content CharacteristicManager $char_manager
 
- Static Protected Attributes inherited from ilPageContentGUI
static array $common_bb_buttons
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilPCQuestionOverviewGUI User Interface for question overview editing

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 24 of file class.ilPCQuestionOverviewGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilPCQuestionOverviewGUI::__construct ( ilPageObject  $a_pg_obj,
?ilPageContent  $a_content_obj,
string  $a_hier_id,
string  $a_pc_id = "" 
)

Reimplemented from ilPageContentGUI.

Definition at line 26 of file class.ilPCQuestionOverviewGUI.php.

31 {
32 global $DIC;
33
34 $this->ctrl = $DIC->ctrl();
35 $this->tpl = $DIC["tpl"];
36 $this->lng = $DIC->language();
37 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
38 }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilPCQuestionOverviewGUI::create ( )

Create new question overview.

Definition at line 111 of file class.ilPCQuestionOverviewGUI.php.

111 : void
112 {
113 $this->content_obj = new ilPCQuestionOverview($this->getPage());
114 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
115 $this->content_obj->setShortMessage(
116 $this->request->getString("short")
117 );
118 $this->content_obj->setListWrongQuestions(
119 $this->request->getString("wrong_questions")
120 );
121 $this->updated = $this->pg_obj->update();
122 if ($this->updated === true) {
123 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
124 } else {
125 $this->insert();
126 }
127 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ edit()

ilPCQuestionOverviewGUI::edit ( bool  $a_insert = false)

Definition at line 60 of file class.ilPCQuestionOverviewGUI.php.

62 : void {
63 $ilCtrl = $this->ctrl;
66
68
69 // edit form
70 $form = new ilPropertyFormGUI();
71 $form->setFormAction($ilCtrl->getFormAction($this));
72 if ($a_insert) {
73 $form->setTitle($this->lng->txt("cont_ed_insert_qover"));
74 } else {
75 $form->setTitle($this->lng->txt("cont_edit_qover"));
76 }
77
78 // short message
79 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_qover_short_message"), "short");
80 $cb->setInfo($this->lng->txt("cont_qover_short_message_info"));
81 if (!$a_insert) {
82 $cb->setChecked($this->content_obj->getShortMessage());
83 } else {
84 $cb->setChecked(true);
85 }
86 $form->addItem($cb);
87
88 // list wrong questions
89 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_qover_list_wrong_q"), "wrong_questions");
90 $cb->setInfo($this->lng->txt("cont_qover_list_wrong_q_info"));
91 if (!$a_insert) {
92 $cb->setChecked($this->content_obj->getListWrongQuestions());
93 }
94 $form->addItem($cb);
95
96 // save/cancel buttons
97 if ($a_insert) {
98 $form->addCommandButton("create_qover", $lng->txt("save"));
99 $form->addCommandButton("cancelCreate", $lng->txt("cancel"));
100 } else {
101 $form->addCommandButton("update", $lng->txt("save"));
102 $form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
103 }
104 $html = $form->getHTML();
105 $tpl->setContent($html);
106 }
This class represents a checkbox property in a property form.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
ilGlobalTemplateInterface $tpl
This class represents a property form user interface.
setContent(string $a_html)
Sets content for standard template.

Referenced by insert().

+ Here is the caller graph for this function:

◆ executeCommand()

ilPCQuestionOverviewGUI::executeCommand ( )

Definition at line 40 of file class.ilPCQuestionOverviewGUI.php.

40 : void
41 {
42 // get next class that processes or forwards current command
43 $next_class = $this->ctrl->getNextClass($this);
44
45 // get current command
46 $cmd = $this->ctrl->getCmd();
47
48 switch ($next_class) {
49 default:
50 $this->$cmd();
51 break;
52 }
53 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ insert()

ilPCQuestionOverviewGUI::insert ( )

Definition at line 55 of file class.ilPCQuestionOverviewGUI.php.

55 : void
56 {
57 $this->edit(true);
58 }

References edit().

+ Here is the call graph for this function:

◆ update()

ilPCQuestionOverviewGUI::update ( )

Update question overview.

Definition at line 132 of file class.ilPCQuestionOverviewGUI.php.

132 : void
133 {
134 $this->content_obj->setShortMessage(
135 $this->request->getString("short")
136 );
137 $this->content_obj->setListWrongQuestions(
138 $this->request->getString("wrong_questions")
139 );
140 $this->updated = $this->pg_obj->update();
141 if ($this->updated === true) {
142 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
143 } else {
144 $this->pg_obj->addHierIDs();
145 $this->edit();
146 }
147 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: