ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilPCQuestionGUI 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 ilPCQuestionGUI:
+ Collaboration diagram for ilPCQuestionGUI:

Public Member Functions

 __construct (ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id="")
 
 executeCommand ()
 
 setSelfAssessmentMode (bool $a_selfassessmentmode)
 
 getSelfAssessmentMode ()
 
 setInsertTabs (string $a_active)
 
 insert (string $a_mode="create")
 Insert new question form. More...
 
 create ()
 Create new question. More...
 
 setNewQuestionId (array $a_par)
 Set new question id. More...
 
 edit ()
 edit question More...
 
 feedback ()
 
 createQuestionPool (string $name="Dummy")
 Creates a new questionpool and returns the reference id. More...
 
 setTabs ()
 
 insertFromPool ()
 Insert question from ppol. More...
 
 poolSelection ()
 
 selectPool ()
 
 listPoolQuestions ()
 
 copyQuestion (int $q_id=0)
 
- 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 ()
 
 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...
 

Protected Attributes

ILIAS TestQuestionPool Questions PublicInterface $questioninfo
 
ilPropertyFormGUI $form_gui
 
int $scormlmid
 
bool $selfassessmentmode
 
ilAccessHandler $access
 
ilTabsGUI $tabs
 
ilObjUser $user
 
ilTree $tree
 
ilToolbarGUI $toolbar
 
bool $ipe_for_questions_enabled
 
- Protected Attributes inherited from ilPageContentGUI
ILIAS COPage Editor GUIService $editor_gui
 
ILIAS COPage InternalGUIService $gui
 
EditSessionRepository $edit_repo
 
string $pc_id = ""
 
array $chars
 
ilObjStyleSheet $style = null
 
LOMServices $lom_services
 
ilLogger $log
 
int $styleid = 0
 
EditGUIRequest $request
 
string $sub_command = ""
 
int $requested_ref_id = 0
 
ILIAS GlobalScreen ScreenContext ContextServices $tool_context
 
Style Content CharacteristicManager $char_manager
 

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 = ""
 
DOMDocument $dom
 
array bool null $updated = null
 
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 ()
 
 setEditorToolContext ()
 
 initEditor ()
 
 getEditorScriptTag (string $form_pc_id="", string $form_cname="")
 
- 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 ilPCQuestionGUI Adapter User Interface class for assessment questions

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

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

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented from ilPageContentGUI.

Definition at line 39 of file class.ilPCQuestionGUI.php.

44 {
45 global $DIC;
46
47 $this->ctrl = $DIC->ctrl();
48 $this->access = $DIC->access();
49 $this->tpl = $DIC["tpl"];
50 $this->tabs = $DIC->tabs();
51 $this->lng = $DIC->language();
52 $this->user = $DIC->user();
53 $this->tree = $DIC->repositoryTree();
54 $this->toolbar = $DIC->toolbar();
55 $ilCtrl = $DIC->ctrl();
56 $this->scormlmid = $a_pg_obj->parent_id;
57 $this->questioninfo = $DIC->testQuestion();
58 $this->ipe_for_questions_enabled = (bool) $DIC['ilSetting']->get('enable_tst_page_edit', false);
59 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
60 $ilCtrl->saveParameter($this, array("qpool_ref_id"));
61 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ copyQuestion()

ilPCQuestionGUI::copyQuestion ( int  $q_id = 0)

Definition at line 486 of file class.ilPCQuestionGUI.php.

486 : void
487 {
488 $ilCtrl = $this->ctrl;
489
490 $q_id = ($q_id > 0) ? $q_id : $this->request->getInt("q_id");
491
492 $this->content_obj = new ilPCQuestion($this->getPage());
493 $this->content_obj->create(
494 $this->pg_obj,
495 $this->request->getHierId()
496 );
497
498 $this->content_obj->copyPoolQuestionIntoPage(
499 $q_id,
500 $this->request->getHierId()
501 );
502
503 $this->updated = $this->pg_obj->update();
504
505 $ilCtrl->returnToParent($this);
506 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilPageContentGUI\$ctrl, and ilPageContentGUI\getPage().

+ Here is the call graph for this function:

◆ create()

ilPCQuestionGUI::create ( )

Create new question.

Definition at line 201 of file class.ilPCQuestionGUI.php.

201 : void
202 {
203 global $ilCtrl, $ilTabs;
204
205 $ilTabs->setTabActive('edit_question');
206
207 $this->content_obj = new ilPCQuestion($this->getPage());
208 $this->content_obj->create($this->pg_obj, $this->hier_id);
209
210 $this->updated = $this->pg_obj->update();
211
212 if ($this->updated) {
213 $this->pg_obj->stripHierIDs();
214 $this->pg_obj->addHierIDs();
215 $ilCtrl->setParameter(
216 $this,
217 "q_type",
218 $this->request->getString("q_type")
219 );
220 $ilCtrl->setParameter(
221 $this,
222 "add_quest_cont_edit_mode",
223 $this->request->getString("add_quest_cont_edit_mode")
224 );
225 // $ilCtrl->setParameter($this, "qpool_ref_id", $pool_ref_id);
226 //$ilCtrl->setParameter($this, "hier_id", $hier_id);
227 $ilCtrl->setParameter($this, "hier_id", $this->content_obj->readHierId());
228 $ilCtrl->setParameter($this, "pc_id", $this->content_obj->readPCId());
229
230 $ilCtrl->redirect($this, "edit");
231 }
232
233 $this->insert();
234 }
insert(string $a_mode="create")
Insert new question form.

References ilPageContentGUI\getPage(), and insert().

+ Here is the call graph for this function:

◆ createQuestionPool()

ilPCQuestionGUI::createQuestionPool ( string  $name = "Dummy")

Creates a new questionpool and returns the reference id.

Returns
int Reference id of the newly created questionpool

Definition at line 342 of file class.ilPCQuestionGUI.php.

342 : int
343 {
345 $parent_ref = $tree->getParentId($this->requested_ref_id);
346 $qpl = new ilObjQuestionPool();
347 $qpl->setType("qpl");
348 $qpl->setTitle($name);
349 $qpl->setDescription("");
350 $qpl->create();
351 $qpl->createReference();
352 $qpl->putInTree($parent_ref);
353 $qpl->setPermissions($parent_ref);
354 $qpl->setOnline(1); // must be online to be available
355 $qpl->saveToDb();
356 return $qpl->getRefId();
357 }
getParentId(int $a_node_id)
get parent id of given node

References $tree, and ilTree\getParentId().

+ Here is the call graph for this function:

◆ edit()

ilPCQuestionGUI::edit ( )

edit question

Definition at line 250 of file class.ilPCQuestionGUI.php.

250 : void
251 {
252 $ilCtrl = $this->ctrl;
253 $ilTabs = $this->tabs;
254 $q_id = "";
255
256 $ilTabs->setTabActive('edit_question');
257
258 if ($this->getSelfAssessmentMode()) { // behaviour in content pages, e.g. scorm
259 $q_ref = $this->content_obj->getQuestionReference();
260
261 if ($q_ref != "") {
262 $inst_id = ilInternalLink::_extractInstOfTarget($q_ref);
263 if (!($inst_id > 0)) {
265 }
266 }
267
268 $q_type = $this->request->getString("q_type");
269 $ilCtrl->setParameter($this, "q_type", $q_type);
270
271 if ($q_id == "" && $q_type == "") {
272 $this->insert("edit_empty");
273 return;
274 }
275
276 // create question first-hand (needed for uploads)
277 if ($q_id < 1 && $q_type) {
278 $q_gui = assQuestionGUI::_getQuestionGUI($q_type);
279
280 // feedback editing mode
281 $add_quest_cont_edit_mode = $this->request->getString("add_quest_cont_edit_mode");
282 if ($this->ipe_for_questions_enabled
283 && $add_quest_cont_edit_mode != "") {
284 $addContEditMode = $add_quest_cont_edit_mode;
285 } else {
287 }
288 $q_gui->getObject()->setAdditionalContentEditingMode($addContEditMode);
289
290 //set default tries
291 $q_gui->getObject()->setObjId(0);
292 $q_id = $q_gui->getObject()->createNewQuestion(true);
293 $this->content_obj->setQuestionReference("il__qst_" . $q_id);
294 $this->pg_obj->update();
295 unset($q_gui);
296 }
297 $ilCtrl->setParameterByClass("ilQuestionEditGUI", "q_id", $q_id);
298 $ilCtrl->redirectByClass(array(get_class($this->pg_obj) . "GUI", "ilQuestionEditGUI"), "editQuestion");
299 } else { // behaviour in question pool
300 $q_gui = assQuestionGUI::_getQuestionGUI('', $this->request->getInt('q_id'));
301 $this->ctrl->redirectByClass($q_gui::class, 'editQuestion');
302 }
303 }
static _getQuestionGUI(string $question_type='', int $question_id=-1)
Creates a question gui representation and returns the alias to the question gui.
const ADDITIONAL_CONTENT_EDITING_MODE_RTE
setTabActive(string $a_id)

References ilPageContentGUI\$ctrl, $tabs, ilInternalLink\_extractInstOfTarget(), ilInternalLink\_extractObjIdOfTarget(), assQuestionGUI\_getQuestionGUI(), assQuestion\ADDITIONAL_CONTENT_EDITING_MODE_RTE, ILIAS\Repository\ctrl(), getSelfAssessmentMode(), insert(), and ilTabsGUI\setTabActive().

+ Here is the call graph for this function:

◆ executeCommand()

ilPCQuestionGUI::executeCommand ( )
Returns
mixed
Exceptions
ilCtrlException

Definition at line 67 of file class.ilPCQuestionGUI.php.

67 : mixed
68 {
69 $ilCtrl = $this->ctrl;
70
71 // get current command
72 $cmd = $ilCtrl->getCmd();
73 $next_class = $ilCtrl->getNextClass($this);
74
75 switch ($next_class) {
76 default:
77 //set tabs
78 if ($cmd != "insert") {
79 $this->setTabs();
80 } elseif ($this->sub_command != "") {
81 $cmd = $this->sub_command;
82 }
83
84 $ret = $this->$cmd();
85 }
86
87 return $ret;
88 }
getCmd(?string $fallback_command=null)
@inheritDoc

References ilPageContentGUI\$ctrl, ilPageContentGUI\$sub_command, ilCtrl\getCmd(), and setTabs().

+ Here is the call graph for this function:

◆ feedback()

ilPCQuestionGUI::feedback ( )
Returns
mixed
Exceptions
ilCtrlException

Definition at line 309 of file class.ilPCQuestionGUI.php.

309 : mixed
310 {
311 $ilCtrl = $this->ctrl;
312 $ilTabs = $this->tabs;
313 $q_id = "";
314
315 $ilTabs->setTabActive('feedback');
316
317 $q_ref = $this->content_obj->getQuestionReference();
318
319 if ($q_ref != "") {
320 $inst_id = ilInternalLink::_extractInstOfTarget($q_ref);
321 if (!($inst_id > 0)) {
323 }
324 }
325
326 $edit_gui = new ilQuestionEditGUI();
327 if ($q_id > 0) {
328 $edit_gui->setQuestionId($q_id);
329 }
330 // $edit_gui->setQuestionType("assSingleChoice");
331 $edit_gui->setSelfAssessmentEditingMode(true);
332 $edit_gui->setPageConfig($this->getPageConfig());
333 $ret = $ilCtrl->forwardCommand($edit_gui);
334 $this->tpl->setContent($ret);
335 return $ret;
336 }
Class ilQuestionEditGUI.

References ilPageContentGUI\$ctrl, $tabs, ilInternalLink\_extractInstOfTarget(), ilInternalLink\_extractObjIdOfTarget(), ilPageContentGUI\getPageConfig(), and ilTabsGUI\setTabActive().

+ Here is the call graph for this function:

◆ getSelfAssessmentMode()

ilPCQuestionGUI::getSelfAssessmentMode ( )

Definition at line 95 of file class.ilPCQuestionGUI.php.

95 : bool
96 {
98 }

References $selfassessmentmode.

Referenced by edit(), and setTabs().

+ Here is the caller graph for this function:

◆ insert()

ilPCQuestionGUI::insert ( string  $a_mode = "create")

Insert new question form.

Definition at line 129 of file class.ilPCQuestionGUI.php.

129 : void
130 {
132 $ilCtrl = $this->ctrl;
133
134 $this->setInsertTabs("new_question");
135
136 $this->displayValidationError();
137
138 // get all question types (@todo: we have to check, whether they are
139 // suitable for self assessment or not)
141 $options = array();
142 $all_types = ilArrayUtil::sortArray($all_types, "order", "asc", true, true);
143
144 foreach ($all_types as $k => $v) {
145 $options[$v["type_tag"]] = $k;
146 }
147
148 // new table form (input of rows and columns)
149 $this->form_gui = new ilPropertyFormGUI();
150 $this->form_gui->setFormAction($ilCtrl->getFormAction($this));
151 $this->form_gui->setTitle($lng->txt("cont_ed_insert_pcqst"));
152
153 // Select Question Type
154 $qtype_input = new ilSelectInputGUI($lng->txt("cont_question_type"), "q_type");
155 $qtype_input->setOptions($options);
156 $qtype_input->setRequired(true);
157 $this->form_gui->addItem($qtype_input);
158
159 // additional content editor
160 // assessment
161 if ($this->ipe_for_questions_enabled) {
162 $ri = new ilRadioGroupInputGUI($this->lng->txt("tst_add_quest_cont_edit_mode"), "add_quest_cont_edit_mode");
163
164 $option_rte = new ilRadioOption(
165 $this->lng->txt('tst_add_quest_cont_edit_mode_plain'),
167 );
168 $option_rte->setInfo($this->lng->txt('tst_add_quest_cont_edit_mode_plain_info'));
169 $ri->addOption($option_rte);
170
171 $option_ipe = new ilRadioOption(
172 $this->lng->txt('tst_add_quest_cont_edit_mode_IPE'),
174 );
175 $option_ipe->setInfo($this->lng->txt('tst_add_quest_cont_edit_mode_IPE_info'));
176 $ri->addOption($option_ipe);
177
179
180 $this->form_gui->addItem($ri);
181 } else {
182 $hi = new ilHiddenInputGUI("question_content_editing_type");
184 $this->form_gui->addItem($hi);
185 }
186
187 if ($a_mode == "edit_empty") {
188 $this->form_gui->addCommandButton("edit", $lng->txt("save"));
189 } else {
190 $this->form_gui->addCommandButton("create", $lng->txt("save"));
191 $this->form_gui->addCommandButton("cancelCreate", $lng->txt("cancel"));
192 }
193
194 $this->tpl->setContent($this->form_gui->getHTML());
195 }
const ADDITIONAL_CONTENT_EDITING_MODE_IPE
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
This class represents a hidden form property in a property form.
txt(string|LanguageIdentifier $a_topic, ?int $n=null)
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static & _getSelfAssessmentQuestionTypes($all_tags=false)
setInsertTabs(string $a_active)
This class represents a property form user interface.
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a selection list property in a property form.

References ilPageContentGUI\$ctrl, ilPageContentGUI\$lng, ILIAS\UI\Implementation\Component\Input\Field\$options, ilObjQuestionPool\_getSelfAssessmentQuestionTypes(), assQuestion\ADDITIONAL_CONTENT_EDITING_MODE_IPE, assQuestion\ADDITIONAL_CONTENT_EDITING_MODE_RTE, ilPageContentGUI\displayValidationError(), ILIAS\Repository\lng(), setInsertTabs(), ilArrayUtil\sortArray(), and ilLanguage\txt().

Referenced by create(), and edit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertFromPool()

ilPCQuestionGUI::insertFromPool ( )

Insert question from ppol.

Definition at line 413 of file class.ilPCQuestionGUI.php.

413 : void
414 {
415 $ilAccess = $this->access;
416 if ($this->edit_repo->getQuestionPool() > 0 &&
417 $ilAccess->checkAccess("write", "", $this->edit_repo->getQuestionPool())
418 && ilObject::_lookupType(ilObject::_lookupObjId($this->edit_repo->getQuestionPool())) == "qpl") {
419 $this->listPoolQuestions();
420 } else {
421 $this->poolSelection();
422 }
423 }
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
ilAccessHandler $access

References $access, ilObject\_lookupObjId(), ilObject\_lookupType(), listPoolQuestions(), and poolSelection().

+ Here is the call graph for this function:

◆ listPoolQuestions()

ilPCQuestionGUI::listPoolQuestions ( )

Definition at line 453 of file class.ilPCQuestionGUI.php.

453 : void
454 {
455 $ilToolbar = $this->toolbar;
457 $ilCtrl = $this->ctrl;
459
460 $this->tpl->setOnScreenMessage('info', $lng->txt("cont_cp_question_diff_formats_info"));
461
462 $ilCtrl->setParameter($this, "subCmd", "poolSelection");
463 $ilToolbar->addButton(
464 $lng->txt("cont_select_other_qpool"),
465 $ilCtrl->getLinkTarget($this, "insert")
466 );
467 $ilCtrl->setParameter($this, "subCmd", "");
468
469 $this->setInsertTabs("copy_question");
470
471 $ilCtrl->setParameter($this, "subCmd", "listPoolQuestions");
472 $pool_ref_id = $this->edit_repo->getQuestionPool();
473 $table = $this->gui->pc()->copySelfAssQuestionTableBuilder(
474 $pool_ref_id,
475 \ilObject::_lookupObjId($pool_ref_id),
476 $this,
477 'insert'
478 );
479 if ($table->getTable()->handleCommand()) {
480 return;
481 }
482
483 $tpl->setContent($table->getTable()->render());
484 }
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.

References ilPageContentGUI\$ctrl, ilPageContentGUI\$lng, $toolbar, ilPageContentGUI\$tpl, ilObject\_lookupObjId(), ILIAS\UICore\GlobalTemplate\setContent(), setInsertTabs(), and ilLanguage\txt().

Referenced by insertFromPool().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ poolSelection()

ilPCQuestionGUI::poolSelection ( )

Definition at line 425 of file class.ilPCQuestionGUI.php.

425 : void
426 {
427 $ilCtrl = $this->ctrl;
429
430 $this->setInsertTabs("copy_question");
431
432 $ilCtrl->setParameter($this, "subCmd", "poolSelection");
433 $exp = new ilPoolSelectorGUI($this, "insert");
434
435 // filter
436 $exp->setTypeWhiteList(array("root", "cat", "grp", "fold", "crs", "qpl"));
437 $exp->setClickableTypes(array('qpl'));
438
439 if (!$exp->handleCommand()) {
440 $tpl->setContent($exp->getHTML());
441 }
442 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilPageContentGUI\$ctrl, ilPageContentGUI\$tpl, ILIAS\UICore\GlobalTemplate\setContent(), and setInsertTabs().

Referenced by insertFromPool().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ selectPool()

ilPCQuestionGUI::selectPool ( )

Definition at line 444 of file class.ilPCQuestionGUI.php.

444 : void
445 {
446 $ilCtrl = $this->ctrl;
447
448 $this->edit_repo->setQuestionPool($this->request->getInt("pool_ref_id"));
449 $ilCtrl->setParameter($this, "subCmd", "insertFromPool");
450 $ilCtrl->redirect($this, "insert");
451 }
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
@inheritDoc

References ilPageContentGUI\$ctrl, and ilCtrl\setParameter().

+ Here is the call graph for this function:

◆ setInsertTabs()

ilPCQuestionGUI::setInsertTabs ( string  $a_active)

Definition at line 100 of file class.ilPCQuestionGUI.php.

100 : void
101 {
102 $ilTabs = $this->tabs;
103 $ilCtrl = $this->ctrl;
105
106 // new question
107 $ilTabs->addSubTab(
108 "new_question",
109 $lng->txt("cont_new_question"),
110 $ilCtrl->getLinkTarget($this, "insert")
111 );
112
113 // copy from pool
114 $ilCtrl->setParameter($this, "subCmd", "insertFromPool");
115 $ilTabs->addSubTab(
116 "copy_question",
117 $lng->txt("cont_copy_question_from_pool"),
118 $ilCtrl->getLinkTarget($this, "insert")
119 );
120
121 $ilTabs->activateSubTab($a_active);
122
123 $ilCtrl->setParameter($this, "subCmd", "");
124 }

References ilPageContentGUI\$ctrl, ilPageContentGUI\$lng, $tabs, and ilLanguage\txt().

Referenced by insert(), listPoolQuestions(), and poolSelection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setNewQuestionId()

ilPCQuestionGUI::setNewQuestionId ( array  $a_par)

Set new question id.

Definition at line 239 of file class.ilPCQuestionGUI.php.

239 : void
240 {
241 if ($a_par["new_id"] > 0) {
242 $this->content_obj->setQuestionReference("il__qst_" . $a_par["new_id"]);
243 $this->pg_obj->update();
244 }
245 }

◆ setSelfAssessmentMode()

ilPCQuestionGUI::setSelfAssessmentMode ( bool  $a_selfassessmentmode)

Definition at line 90 of file class.ilPCQuestionGUI.php.

90 : void
91 {
92 $this->selfassessmentmode = $a_selfassessmentmode;
93 }

◆ setTabs()

ilPCQuestionGUI::setTabs ( )

Definition at line 359 of file class.ilPCQuestionGUI.php.

359 : void
360 {
361 $q_ref = "";
362 $q_id = 0;
363
364 if ($this->getSelfAssessmentMode()) {
365 return;
366 }
367
368 $ilTabs = $this->tabs;
369 $ilCtrl = $this->ctrl;
370
371 if (!is_null($this->content_obj)) {
372 $q_ref = $this->content_obj->getQuestionReference();
373 }
374
375 if ($q_ref != "") {
376 $inst_id = ilInternalLink::_extractInstOfTarget($q_ref);
377 if (!($inst_id > 0)) {
379 }
380 }
381
382 $ilTabs->addTarget(
383 "edit_question",
384 $ilCtrl->getLinkTarget($this, "edit"),
385 array("editQuestion", "save", "cancel", "addSuggestedSolution",
386 "cancelExplorer", "linkChilds", "removeSuggestedSolution",
387 "addPair", "addTerm", "delete", "deleteTerms", "editMode", "upload",
388 "saveEdit","uploadingImage", "uploadingImagemap", "addArea",
389 "deletearea", "saveShape", "back", "saveEdit", "changeGapType","createGaps","addItem","addYesNo", "addTrueFalse",
390 "toggleGraphicalAnswers", "setMediaMode"),
391 ""
392 );
393
394 if ($q_id > 0) {
395 if ($this->questioninfo->getGeneralQuestionProperties($q_id)->getClassName() != "assTextQuestion") {
396 $tabCommands = assQuestionGUI::getCommandsFromClassConstants('ilAssQuestionFeedbackEditingGUI');
398 $ilCtrl->getLinkTargetByClass('ilAssQuestionFeedbackEditingGUI', ilAssQuestionFeedbackEditingGUI::CMD_SHOW),
399 "q_id=" . $q_id
400 );
401 $ilTabs->addTarget('feedback', $tabLink, $tabCommands, $ilCtrl->getCmdClass(), '');
402 }
403 }
404 }
static getCommandsFromClassConstants(string $guiClassName, string $cmdConstantNameBegin='CMD_')
static appendUrlParameterString(string $a_url, string $a_par, bool $xml_style=false)

References ilPageContentGUI\$ctrl, $tabs, ilInternalLink\_extractInstOfTarget(), ilInternalLink\_extractObjIdOfTarget(), ilUtil\appendUrlParameterString(), ilAssQuestionFeedbackEditingGUI\CMD_SHOW, assQuestionGUI\getCommandsFromClassConstants(), and getSelfAssessmentMode().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilAccessHandler ilPCQuestionGUI::$access
protected

Definition at line 32 of file class.ilPCQuestionGUI.php.

Referenced by insertFromPool().

◆ $form_gui

ilPropertyFormGUI ilPCQuestionGUI::$form_gui
protected

Definition at line 29 of file class.ilPCQuestionGUI.php.

◆ $ipe_for_questions_enabled

bool ilPCQuestionGUI::$ipe_for_questions_enabled
protected

Definition at line 37 of file class.ilPCQuestionGUI.php.

◆ $questioninfo

ILIAS TestQuestionPool Questions PublicInterface ilPCQuestionGUI::$questioninfo
protected

Definition at line 28 of file class.ilPCQuestionGUI.php.

◆ $scormlmid

int ilPCQuestionGUI::$scormlmid
protected

Definition at line 30 of file class.ilPCQuestionGUI.php.

◆ $selfassessmentmode

bool ilPCQuestionGUI::$selfassessmentmode
protected

Definition at line 31 of file class.ilPCQuestionGUI.php.

Referenced by getSelfAssessmentMode().

◆ $tabs

ilTabsGUI ilPCQuestionGUI::$tabs
protected

Definition at line 33 of file class.ilPCQuestionGUI.php.

Referenced by edit(), feedback(), setInsertTabs(), and setTabs().

◆ $toolbar

ilToolbarGUI ilPCQuestionGUI::$toolbar
protected

Definition at line 36 of file class.ilPCQuestionGUI.php.

Referenced by listPoolQuestions().

◆ $tree

ilTree ilPCQuestionGUI::$tree
protected

Definition at line 35 of file class.ilPCQuestionGUI.php.

Referenced by createQuestionPool().

◆ $user

ilObjUser ilPCQuestionGUI::$user
protected

Definition at line 34 of file class.ilPCQuestionGUI.php.


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