ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ilLOEditorGUI Class Reference

Class ilLOEditorGUI. More...

+ Collaboration diagram for ilLOEditorGUI:

Public Member Functions

 __construct (ilObjCourseGUI $parent_gui)
 
 executeCommand ()
 
 getParentObject ()
 
 getParentGUI ()
 
 getSettings ()
 
 setTestType (int $a_type)
 
 getTestType ()
 

Data Fields

const int TEST_TYPE_UNDEFINED = 0
 
const int TEST_TYPE_IT = 1
 
const int TEST_TYPE_QT = 2
 
const int TEST_NEW = 1
 
const int TEST_ASSIGN = 2
 

Protected Member Functions

 initObjectiveIdFromQuery ()
 
 initObjectiveIdsFromPost ()
 
 initTestTypeFromQuery ()
 
 returnFromObjectives ()
 
 settings (?ilPropertyFormGUI $form=null)
 
 deleteAssignments (int $a_type)
 
 updateTestAssignments (ilLOSettings $settings)
 
 saveSettings ()
 
 initSettingsForm ()
 Init settings form. More...
 
 materials ()
 
 testsOverview ()
 
 testsOverviewInitial ()
 
 testsOverviewQualified ()
 
 testOverview ()
 Show test overview. More...
 
 testOverviewInitial ()
 
 testOverviewQualified ()
 
 testAssignment (?ilPropertyFormGUI $form=null)
 
 testSettings (?ilPropertyFormGUI $form=null)
 
 updateStartObjects ()
 
 saveMultiTestAssignment ()
 
 updateMaterialAssignments (ilObjTest $test)
 
 saveTest ()
 
 listObjectives ()
 
 showObjectiveCreation (?ilPropertyFormGUI $form=null)
 
 initSimpleObjectiveForm ()
 
 saveObjectiveCreation ()
 
 saveSorting ()
 
 askDeleteObjectives ()
 
 activateObjectives ()
 
 deactivateObjectives ()
 
 deleteObjectives ()
 
 showStatus (int $a_section)
 
 setTabs (string $a_section='')
 

Protected Attributes

ilGlobalTemplateInterface $main_tpl
 
ilToolbarGUI $toolbar
 
GlobalHttpState $http
 
Factory $refinery
 
ilUIServices $ui_services
 
ilDBInterface $db
 

Private Attributes

ilLogger $logger
 
ilObject $parent_obj
 
ilObjCourseGUI $parent_gui
 
ilLOSettings $settings
 
ilLanguage $lng
 
ilCtrlInterface $ctrl
 
ilTabsGUI $tabs
 
ilGlobalTemplateInterface $tpl
 
ObjectFacade $content_style_domain
 
int $test_type = self::TEST_TYPE_UNDEFINED
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilLOEditorGUI::__construct ( ilObjCourseGUI  $parent_gui)

Definition at line 61 of file class.ilLOEditorGUI.php.

62 {
63 global $DIC;
64
65 $this->main_tpl = $DIC->ui()->mainTemplate();
66 $this->parent_obj = $parent_gui->getObject();
67 $this->parent_gui = $parent_gui;
69
70 $cs = $DIC->contentStyle();
71 $this->content_style_domain = $cs->domain()->styleForRefId($this->parent_obj->getRefId());
72
73 $this->lng = $DIC->language();
74 $this->ctrl = $DIC->ctrl();
75 $this->tpl = $DIC->ui()->mainTemplate();
76 $this->tabs = $DIC->tabs();
77 $this->toolbar = $DIC->toolbar();
78 $this->logger = $DIC->logger()->crs();
79 $this->http = $DIC->http();
80 $this->refinery = $DIC->refinery();
81 $this->ui_services = $DIC->ui();
82 $this->db = $DIC->database();
83 }
settings(?ilPropertyFormGUI $form=null)
ilObjCourseGUI $parent_gui
static getInstanceByObjId(int $a_obj_id)
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:26

References $DIC, $parent_gui, ILIAS\Repository\ctrl(), ILIAS\Survey\Mode\getId(), ilLOSettings\getInstanceByObjId(), ilObjectGUI\getObject(), getParentObject(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), ILIAS\Repository\refinery(), settings(), ILIAS\Repository\tabs(), and ILIAS\Repository\toolbar().

+ Here is the call graph for this function:

Member Function Documentation

◆ activateObjectives()

ilLOEditorGUI::activateObjectives ( )
protected

Definition at line 973 of file class.ilLOEditorGUI.php.

973 : void
974 {
975 $enabled = $this->initObjectiveIdsFromPost();
977 foreach ($objectives as $objective_id) {
978 $objective = new ilCourseObjective($this->getParentObject(), $objective_id);
979 if (in_array($objective_id, $enabled)) {
980 $objective->setActive(true);
981 $objective->update();
982 }
983 }
985 $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
986 $this->ctrl->redirect($this, 'listObjectives');
987 }
class ilcourseobjective
static _getObjectiveIds(int $course_id, bool $a_activated_only=false)
static _refreshStatus(int $a_obj_id, ?array $a_users=null)
$objectives

References $objectives, ilCourseObjective\_getObjectiveIds(), ilLPStatusWrapper\_refreshStatus(), ILIAS\Repository\ctrl(), ILIAS\Survey\Mode\getId(), getParentObject(), initObjectiveIdsFromPost(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ askDeleteObjectives()

ilLOEditorGUI::askDeleteObjectives ( )
protected

Definition at line 940 of file class.ilLOEditorGUI.php.

940 : void
941 {
942 $this->tabs->activateSubTab('objectives');
943
944 $confirm = new ilConfirmationGUI();
945 $confirm->setFormAction($this->ctrl->getFormAction($this));
946 $confirm->setHeaderText($this->lng->txt('crs_delete_objectve_sure'));
947 $confirm->setConfirm($this->lng->txt('delete'), 'deleteObjectives');
948 $confirm->setCancel($this->lng->txt('cancel'), 'listObjectives');
949
950 $objective_ids = [];
951 if ($this->http->wrapper()->post()->has('objective')) {
952 $objective_ids = $this->http->wrapper()->post()->retrieve(
953 'objective',
954 $this->refinery->kindlyTo()->dictOf(
955 $this->refinery->kindlyTo()->int()
956 )
957 );
958 }
959 foreach ($objective_ids as $objective_id) {
960 $obj = new ilCourseObjective($this->getParentObject(), $objective_id);
961 $name = $obj->getTitle();
962
963 $confirm->addItem(
964 'objective_ids[]',
965 (string) $objective_id,
966 $name
967 );
968 }
969 $this->tpl->setContent($confirm->getHTML());
971 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
showStatus(int $a_section)

References ILIAS\Repository\ctrl(), getParentObject(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), ilLOEditorStatus\SECTION_OBJECTIVES, showStatus(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

◆ deactivateObjectives()

ilLOEditorGUI::deactivateObjectives ( )
protected

Definition at line 989 of file class.ilLOEditorGUI.php.

989 : void
990 {
991 $disabled = $this->initObjectiveIdsFromPost();
993 foreach ($objectives as $objective_id) {
994 $objective = new ilCourseObjective($this->getParentObject(), $objective_id);
995 if (in_array($objective_id, $disabled)) {
996 $objective->setActive(false);
997 $objective->update();
998 }
999 }
1001 $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
1002 $this->ctrl->redirect($this, 'listObjectives');
1003 }

References $objectives, ilCourseObjective\_getObjectiveIds(), ilLPStatusWrapper\_refreshStatus(), ILIAS\Repository\ctrl(), ILIAS\Survey\Mode\getId(), getParentObject(), initObjectiveIdsFromPost(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ deleteAssignments()

ilLOEditorGUI::deleteAssignments ( int  $a_type)
protected

Definition at line 266 of file class.ilLOEditorGUI.php.

266 : void
267 {
268 $assignments = ilLOTestAssignments::getInstance($this->getParentObject()->getId());
269 foreach ($assignments->getAssignmentsByType($a_type) as $assignment) {
270 $assignment->delete();
271 }
272 }
static getInstance(int $a_container_id)

References ILIAS\Survey\Mode\getId(), ilLOTestAssignments\getInstance(), and getParentObject().

Referenced by updateTestAssignments().

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

◆ deleteObjectives()

ilLOEditorGUI::deleteObjectives ( )
protected

Definition at line 1005 of file class.ilLOEditorGUI.php.

1005 : void
1006 {
1007 $objective_ids = [];
1008 if ($this->http->wrapper()->post()->has('objective_ids')) {
1009 $objective_ids = $this->http->wrapper()->post()->retrieve(
1010 'objective_ids',
1011 $this->refinery->kindlyTo()->dictOf(
1012 $this->refinery->kindlyTo()->int()
1013 )
1014 );
1015 }
1016 foreach ($objective_ids as $objective_id) {
1017 $objective_obj = new ilCourseObjective($this->getParentObject(), $objective_id);
1018 $objective_obj->delete();
1019 }
1021 $this->tpl->setOnScreenMessage('success', $this->lng->txt('crs_objectives_deleted'), true);
1022 $this->ctrl->redirect($this, 'listObjectives');
1023 }

References ilLPStatusWrapper\_refreshStatus(), ILIAS\Repository\ctrl(), ILIAS\Survey\Mode\getId(), getParentObject(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ executeCommand()

ilLOEditorGUI::executeCommand ( )

Definition at line 85 of file class.ilLOEditorGUI.php.

85 : void
86 {
87 $next_class = $this->ctrl->getNextClass($this);
88 $cmd = $this->ctrl->getCmd();
89
90
91
92 $this->setTabs();
93 switch ($next_class) {
94 case 'ilcourseobjectivesgui':
95
96 $this->ctrl->setReturn($this, 'returnFromObjectives');
97 $this->tabs->clearTargets();
98 $this->tabs->setBackTarget(
99 $this->lng->txt('back'),
100 $this->ctrl->getLinkTarget($this, 'listObjectives')
101 );
102
103 $reg_gui = new ilCourseObjectivesGUI($this->getParentObject()->getRefId());
104 $this->ctrl->forwardCommand($reg_gui);
105 break;
106
107 case 'ilcontainerstartobjectsgui':
108
109 $stgui = new ilContainerStartObjectsGUI($this->getParentObject());
110 $ret = $this->ctrl->forwardCommand($stgui);
111
112 $this->tabs->activateSubTab('start');
113 $this->tabs->removeSubTab('manage');
114 break;
115
116 case 'ilconditionhandlergui':
117
118 $this->ctrl->saveParameterByClass('ilconditionhandlergui', 'objective_id');
119
120 $this->tabs->clearTargets();
121 $this->tabs->setBackTarget(
122 $this->lng->txt('back'),
123 $this->ctrl->getLinkTarget($this, 'listObjectives')
124 );
125
126 $cond = new ilConditionHandlerGUI();
127 $cond->setBackButtons(array());
128 $cond->setAutomaticValidation(false);
129 $cond->setTargetType("lobj");
130 $cond->setTargetRefId($this->getParentObject()->getRefId());
131 $cond->setTargetId($this->initObjectiveIdFromQuery());
132
133 // objective
134 $obj = new ilCourseObjective($this->getParentObject(), $this->initObjectiveIdFromQuery());
135 $cond->setTargetTitle($obj->getTitle());
136 $this->ctrl->forwardCommand($cond);
137 break;
138
139 case 'illopagegui':
140 $this->ctrl->saveParameterByClass('illopagegui', 'objective_id');
141
142 $this->tabs->clearTargets();
143 $this->tabs->setBackTarget(
144 $this->lng->txt('back'),
145 $this->ctrl->getLinkTarget($this, 'listObjectives')
146 );
147
148 $objtv_id = $this->initObjectiveIdFromQuery();
149
150 if (!ilLOPage::_exists('lobj', $objtv_id)) {
151 // doesn't exist -> create new one
152 $new_page_object = new ilLOPage();
153 $new_page_object->setParentId($objtv_id);
154 $new_page_object->setId($objtv_id);
155 $new_page_object->createFromXML();
156 unset($new_page_object);
157 }
158
159 $this->ctrl->setReturn($this, 'listObjectives');
160 $pgui = new ilLOPageGUI($objtv_id);
161 $pgui->setPresentationTitle(ilCourseObjective::lookupObjectiveTitle($objtv_id));
162
163 $pgui->setStyleId($this->content_style_domain->getEffectiveStyleId());
164
165 // #14895
166 $this->tpl->setCurrentBlock("ContentStyle");
167 $this->tpl->setVariable(
168 "LOCATION_CONTENT_STYLESHEET",
169 ilObjStyleSheet::getContentStylePath($this->content_style_domain->getEffectiveStyleId())
170 );
171 $this->tpl->parseCurrentBlock();
172
173 $ret = $this->ctrl->forwardCommand($pgui);
174 if ($ret) {
175 $this->tpl->setContent($ret);
176 }
177 break;
178
179 default:
180 if (!$cmd) {
181 // get first unaccomplished step
182 $cmd = ilLOEditorStatus::getInstance($this->getParentObject())->getFirstFailedStep();
183 }
184 $this->$cmd();
185
186 break;
187 }
188 }
class ilConditionHandlerGUI
Class ilContainerStartObjectsGUI.
static lookupObjectiveTitle(int $a_objective_id, bool $a_add_description=false)
class ilobjcourseobjectivesgui
setTabs(string $a_section='')
static getInstance(ilObject $a_parent)
(Course) learning objective page GUI class
(Course) learning objective page object
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.

References ilPageObject\_exists(), ILIAS\Repository\ctrl(), ilObjStyleSheet\getContentStylePath(), ilLOEditorStatus\getInstance(), getParentObject(), initObjectiveIdFromQuery(), ILIAS\Repository\lng(), ilCourseObjective\lookupObjectiveTitle(), setTabs(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

◆ getParentGUI()

ilLOEditorGUI::getParentGUI ( )

Definition at line 236 of file class.ilLOEditorGUI.php.

237 {
238 return $this->parent_gui;
239 }
Class ilObjCourseGUI.

References $parent_gui.

◆ getParentObject()

◆ getSettings()

ilLOEditorGUI::getSettings ( )

Definition at line 241 of file class.ilLOEditorGUI.php.

242 {
243 return $this->settings;
244 }
ilLOSettings $settings
Settings for LO courses.

References $settings.

Referenced by initSettingsForm(), saveTest(), and updateStartObjects().

+ Here is the caller graph for this function:

◆ getTestType()

ilLOEditorGUI::getTestType ( )

Definition at line 251 of file class.ilLOEditorGUI.php.

251 : int
252 {
253 return $this->test_type;
254 }

References $test_type.

Referenced by saveMultiTestAssignment(), saveTest(), testAssignment(), testOverview(), testSettings(), and testsOverview().

+ Here is the caller graph for this function:

◆ initObjectiveIdFromQuery()

ilLOEditorGUI::initObjectiveIdFromQuery ( )
protected

Definition at line 190 of file class.ilLOEditorGUI.php.

190 : int
191 {
192 if ($this->http->wrapper()->query()->has('objective_id')) {
193 return $this->http->wrapper()->query()->retrieve(
194 'objective_id',
195 $this->refinery->kindlyTo()->int()
196 );
197 }
198 return 0;
199 }

References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

Referenced by executeCommand().

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

◆ initObjectiveIdsFromPost()

ilLOEditorGUI::initObjectiveIdsFromPost ( )
protected

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

201 : array
202 {
203 if ($this->http->wrapper()->post()->has('objective')) {
204 return $this->http->wrapper()->post()->retrieve(
205 'objective',
206 $this->refinery->kindlyTo()->listOf(
207 $this->refinery->kindlyTo()->int()
208 )
209 );
210 }
211 return [];
212 }

References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

Referenced by activateObjectives(), and deactivateObjectives().

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

◆ initSettingsForm()

ilLOEditorGUI::initSettingsForm ( )
protected

Init settings form.

Definition at line 375 of file class.ilLOEditorGUI.php.

376 {
377 $form = new ilPropertyFormGUI();
378 $form->setFormAction($this->ctrl->getFormAction($this));
379 $form->setTitle($this->lng->txt('crs_loc_settings_tbl'));
380
381 // initial test
382 $type_selector = new ilRadioGroupInputGUI($this->lng->txt('crs_loc_settings_it_type'), 'ittype');
383 $type_selector->setRequired(true);
384 $type_selector->setValue((string) $this->getSettings()->getInitialTestType());
385
386 $type_ipa = new ilRadioOption(
387 $this->lng->txt('crs_loc_settings_type_it_placement_all'),
389 );
390 $type_ipa->setInfo($this->lng->txt('crs_loc_settings_type_it_placement_all_info'));
391 $type_selector->addOption($type_ipa);
392
393 $start_ip = new ilCheckboxInputGUI($this->lng->txt('crs_loc_settings_it_start_object'), 'start_ip');
394 $start_ip->setValue((string) 1);
395 $start_ip->setChecked($this->getSettings()->isInitialTestStart());
396 $type_ipa->addSubItem($start_ip);
397
398 $type_ips = new ilRadioOption(
399 $this->lng->txt('crs_loc_settings_type_it_placement_sel'),
401 );
402 $type_ips->setInfo($this->lng->txt('crs_loc_settings_type_it_placement_sel_info'));
403 $type_selector->addOption($type_ips);
404
405 $type_iqa = new ilRadioOption(
406 $this->lng->txt('crs_loc_settings_type_it_qualifying_all'),
408 );
409 $type_iqa->setInfo($this->lng->txt('crs_loc_settings_type_it_qualifying_all_info'));
410 $type_selector->addOption($type_iqa);
411
412 $start_iq = new ilCheckboxInputGUI($this->lng->txt('crs_loc_settings_it_start_object'), 'start_iq');
413 $start_iq->setValue('1');
414 $start_iq->setChecked($this->getSettings()->isInitialTestStart());
415 $type_iqa->addSubItem($start_iq);
416
417 $type_iqs = new ilRadioOption(
418 $this->lng->txt('crs_loc_settings_type_it_qualifying_sel'),
420 );
421 $type_iqs->setInfo($this->lng->txt('crs_loc_settings_type_it_qualifying_sel_info'));
422 $type_selector->addOption($type_iqs);
423
424 $type_ino = new ilRadioOption(
425 $this->lng->txt('crs_loc_settings_type_it_none'),
427 );
428 $type_ino->setInfo($this->lng->txt('crs_loc_settings_type_it_none_info'));
429 $type_selector->addOption($type_ino);
430
431 $form->addItem($type_selector);
432
433 // qualifying test
434 $qt_selector = new ilRadioGroupInputGUI($this->lng->txt('crs_loc_settings_qt_all'), 'qttype');
435 $qt_selector->setRequired(true);
436 $qt_selector->setValue((string) $this->getSettings()->getQualifyingTestType());
437
438 $type_qa = new ilRadioOption(
439 $this->lng->txt('crs_loc_settings_type_q_all'),
441 );
442 $type_qa->setInfo($this->lng->txt('crs_loc_settings_type_q_all_info'));
443 $qt_selector->addOption($type_qa);
444
445 $start_q = new ilCheckboxInputGUI($this->lng->txt('crs_loc_settings_qt_start_object'), 'start_q');
446 $start_q->setValue('1');
447 $start_q->setChecked($this->getSettings()->isQualifyingTestStart());
448 $type_qa->addSubItem($start_q);
449
450 $passed_mode = new ilRadioGroupInputGUI($this->lng->txt('crs_loc_settings_passed_mode'), 'passed_mode');
451 $passed_mode->setValue(
452 (string) ($this->getSettings()->getPassedObjectiveMode() ?: ilLOSettings::HIDE_PASSED_OBJECTIVE_QST)
453 );
454
455 $passed_mode->addOption(
456 new ilRadioOption(
457 $this->lng->txt('crs_loc_settings_passed_mode_hide'),
459 )
460 );
461 $passed_mode->addOption(
462 new ilRadioOption(
463 $this->lng->txt('crs_loc_settings_passed_mode_mark'),
465 )
466 );
467 $type_qa->addSubItem($passed_mode);
468
469 $type_qs = new ilRadioOption(
470 $this->lng->txt('crs_loc_settings_type_q_selected'),
472 );
473 $type_qs->setInfo($this->lng->txt('crs_loc_settings_type_q_selected_info'));
474 $qt_selector->addOption($type_qs);
475
476 $form->addItem($qt_selector);
477
478 // reset results
479 $reset = new ilCheckboxInputGUI($this->lng->txt('crs_loc_settings_reset'), 'reset');
480 $reset->setValue('1');
481 $reset->setChecked($this->getSettings()->isResetResultsEnabled());
482 $reset->setOptionTitle($this->lng->txt('crs_loc_settings_reset_enable'));
483 $reset->setInfo($this->lng->txt('crs_loc_settings_reset_enable_info'));
484 $form->addItem($reset);
485
486 $form->addCommandButton('saveSettings', $this->lng->txt('save'));
487 return $form;
488 }
This class represents a checkbox property in a property form.
const TYPE_INITIAL_QUALIFYING_ALL
const TYPE_INITIAL_PLACEMENT_SELECTED
const HIDE_PASSED_OBJECTIVE_QST
const TYPE_INITIAL_PLACEMENT_ALL
const MARK_PASSED_OBJECTIVE_QST
const TYPE_QUALIFYING_SELECTED
const TYPE_INITIAL_QUALIFYING_SELECTED
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.

References ILIAS\Repository\ctrl(), getSettings(), ilLOSettings\HIDE_PASSED_OBJECTIVE_QST, ILIAS\Repository\lng(), ilLOSettings\MARK_PASSED_OBJECTIVE_QST, ilLOSettings\TYPE_INITIAL_NONE, ilLOSettings\TYPE_INITIAL_PLACEMENT_ALL, ilLOSettings\TYPE_INITIAL_PLACEMENT_SELECTED, ilLOSettings\TYPE_INITIAL_QUALIFYING_ALL, ilLOSettings\TYPE_INITIAL_QUALIFYING_SELECTED, ilLOSettings\TYPE_QUALIFYING_ALL, and ilLOSettings\TYPE_QUALIFYING_SELECTED.

Referenced by saveSettings(), and settings().

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

◆ initSimpleObjectiveForm()

ilLOEditorGUI::initSimpleObjectiveForm ( )
protected

Definition at line 887 of file class.ilLOEditorGUI.php.

888 {
889 $form = new ilPropertyFormGUI();
890 $form->setTitle($this->lng->txt('crs_loc_form_create_objectives'));
891 $form->setFormAction($this->ctrl->getFormAction($this));
892
893 $txt = new ilTextWizardInputGUI($this->lng->txt('crs_objectives'), 'objectives');
894 $txt->setValues(array(0 => ''));
895 $txt->setRequired(true);
896 $form->addItem($txt);
897
898 $form->addCommandButton('saveObjectiveCreation', $this->lng->txt('save'));
899 return $form;
900 }
This class represents a text wizard property in a property form.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by saveObjectiveCreation(), and showObjectiveCreation().

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

◆ initTestTypeFromQuery()

ilLOEditorGUI::initTestTypeFromQuery ( )
protected

Definition at line 214 of file class.ilLOEditorGUI.php.

214 : int
215 {
216 if ($this->http->wrapper()->query()->has('tt')) {
217 return $this->http->wrapper()->query()->retrieve(
218 'tt',
219 $this->refinery->kindlyTo()->int()
220 );
221 }
222 return 0;
223 }

References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

Referenced by saveMultiTestAssignment(), saveTest(), testAssignment(), testOverview(), and testsOverview().

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

◆ listObjectives()

ilLOEditorGUI::listObjectives ( )
protected

Definition at line 849 of file class.ilLOEditorGUI.php.

849 : void
850 {
852 $this->tabs->activateSubTab('objectives');
853
855 $this->getParentObject()->getId(),
856 false
857 );
858
859 if ($objectives === []) {
860 $this->showObjectiveCreation();
861 return;
862 }
863
864 $this->toolbar->addButton(
865 $this->lng->txt('crs_add_objective'),
866 $this->ctrl->getLinkTargetByClass('ilcourseobjectivesgui', "create")
867 );
868
869 $table = new ilCourseObjectivesTableGUI($this, $this->getParentObject());
870 $table->setTitle($this->lng->txt('crs_objectives'), '', $this->lng->txt('crs_objectives'));
871 $table->parse($objectives);
872 $this->tpl->setContent($table->getHTML());
873
875 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
showObjectiveCreation(?ilPropertyFormGUI $form=null)
static set(string $a_var, $a_val)
Set a value.

References $objectives, ilCourseObjective\_getObjectiveIds(), ILIAS\Survey\Mode\getId(), getParentObject(), ILIAS\Repository\lng(), ilCourseObjectivesGUI\MODE_UNDEFINED, ilLOEditorStatus\SECTION_OBJECTIVES, ilSession\set(), showObjectiveCreation(), showStatus(), ILIAS\Repository\tabs(), and ILIAS\Repository\toolbar().

Referenced by returnFromObjectives(), and saveSorting().

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

◆ materials()

ilLOEditorGUI::materials ( )
protected

Definition at line 490 of file class.ilLOEditorGUI.php.

490 : void
491 {
492 $this->tabs->activateSubTab('materials');
493
494 $this->parent_gui->renderAddNewItem('itgr');
495
496 $this->tpl->setOnScreenMessage(
497 'info',
498 $this->lng->txt('crs_objective_status_materials_info')
499 );
500
502 }

References ILIAS\Repository\lng(), ilLOEditorStatus\SECTION_MATERIALS, showStatus(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

◆ returnFromObjectives()

ilLOEditorGUI::returnFromObjectives ( )
protected

Definition at line 225 of file class.ilLOEditorGUI.php.

225 : void
226 {
228 $this->listObjectives();
229 }

References listObjectives(), ilCourseObjectivesGUI\MODE_UNDEFINED, and ilSession\set().

+ Here is the call graph for this function:

◆ saveMultiTestAssignment()

ilLOEditorGUI::saveMultiTestAssignment ( )
protected

Definition at line 713 of file class.ilLOEditorGUI.php.

713 : void
714 {
715 $this->ctrl->setParameter($this, 'tt', $this->initTestTypeFromQuery());
716 $this->setTestType($this->initTestTypeFromQuery());
717
719
720 $form_helper = new ilLOTestAssignmentForm($this, $this->getParentObject(), $this->getTestType());
721 $form = $form_helper->initForm(true);
722
723 if ($form->checkInput()) {
724 $mode = $form->getInput('mode');
725
726 if ($mode == self::TEST_NEW) {
727 $tst = new ilObjTest();
728 $tst->setType('tst');
729 $tst->setTitle($form->getInput('title'));
730 $tst->setDescription($form->getInput('desc'));
731 $tst->create();
732 $tst->saveToDb();
733 $tst->createReference();
734 $tst->putInTree($this->getParentObject()->getRefId());
735 $tst->setPermissions($this->getParentObject()->getRefId());
736 $general_settings = $tst->getMainSettings()->getGeneralSettings()->withQuestionSetType($form->getInput('qtype'));
737 $tst->getMainSettingsRepository()->store(
738 $tst->getMainSettings()->withGeneralSettings($general_settings)
739 );
740
741 $assignment = new ilLOTestAssignment();
742 $assignment->setContainerId($this->getParentObject()->getId());
743 $assignment->setAssignmentType($this->getTestType());
744 $assignment->setObjectiveId((int) $form->getInput('objective'));
745 $assignment->setTestRefId($tst->getRefId());
746 $assignment->save();
747 } else {
748 $assignment = new ilLOTestAssignment();
749 $assignment->setContainerId($this->getParentObject()->getId());
750 $assignment->setAssignmentType($this->getTestType());
751 $assignment->setObjectiveId((int) $form->getInput('objective'));
752 $assignment->setTestRefId((int) $form->getInput('tst'));
753 $assignment->save();
754
755 $tst = new ilObjTest((int) $form->getInput('tst'), true);
756 $tst->saveToDb();
757 }
758
759 // deassign as objective material
760 if ($tst instanceof ilObjTest) {
761 $this->updateMaterialAssignments($tst);
762 }
763 $this->updateStartObjects();
764
765 $this->main_tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'));
766 $this->ctrl->redirect($this, 'testsOverview');
767 }
768
769 // Error
770 $this->main_tpl->setOnScreenMessage('failure', $this->lng->txt('err_check_input'));
771 $form->setValuesByPost();
772 $this->testAssignment($form);
773 }
updateMaterialAssignments(ilObjTest $test)
setTestType(int $a_type)
testAssignment(?ilPropertyFormGUI $form=null)
Settings for LO courses.

References ILIAS\Repository\ctrl(), ILIAS\Survey\Mode\getId(), ilLOSettings\getInstanceByObjId(), getParentObject(), getTestType(), initTestTypeFromQuery(), ILIAS\Repository\lng(), setTestType(), testAssignment(), updateMaterialAssignments(), and updateStartObjects().

+ Here is the call graph for this function:

◆ saveObjectiveCreation()

ilLOEditorGUI::saveObjectiveCreation ( )
protected

Definition at line 902 of file class.ilLOEditorGUI.php.

902 : void
903 {
904 $form = $this->initSimpleObjectiveForm();
905 if ($form->checkInput()) {
906 foreach ((array) $form->getInput('objectives') as $title) {
907 $obj = new ilCourseObjective($this->getParentObject());
908 $obj->setActive(true);
909 $obj->setTitle($title);
910 $obj->add();
911 }
912 $this->main_tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
913 $this->ctrl->redirect($this, '');
914 }
915
916 $form->setValuesByPost();
917 $this->tabs->activateSubTab('objectives');
919 $this->showObjectiveCreation($form);
920 }

References ILIAS\Repository\ctrl(), getParentObject(), initSimpleObjectiveForm(), ILIAS\Repository\lng(), ilLOEditorStatus\SECTION_OBJECTIVES, showObjectiveCreation(), showStatus(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

◆ saveSettings()

ilLOEditorGUI::saveSettings ( )
protected

Definition at line 306 of file class.ilLOEditorGUI.php.

306 : void
307 {
308 $form = $this->initSettingsForm();
309 if ($form->checkInput()) {
311 $settings->setInitialTestType((int) $form->getInput('ittype'));
312 switch ($settings->getInitialTestType()) {
314 $settings->setInitialTestAsStart((bool) $form->getInput('start_ip'));
315 break;
316
319 break;
320
322 $settings->setInitialTestAsStart((bool) $form->getInput('start_iq'));
323 break;
324
327 break;
328
331 break;
332 }
333
334 $settings->setQualifyingTestType((int) $form->getInput('qttype'));
335 switch ($settings->getQualifyingTestType()) {
337 $settings->setQualifyingTestAsStart((bool) $form->getInput('start_q'));
338 break;
339
342 break;
343 }
344
345 $settings->resetResults((bool) $form->getInput('reset'));
346 $settings->setPassedObjectiveMode((int) $form->getInput('passed_mode'));
347
348 if (
351 ) {
353 $this->main_tpl->setOnScreenMessage('info', $this->lng->txt('crs_loc_settings_err_qstart'), true);
354 }
355
356 $settings->update();
357 $this->updateStartObjects();
359
361
362 $this->main_tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
363 $this->ctrl->redirect($this, 'settings');
364 }
365
366 // Error
367 $this->main_tpl->setOnScreenMessage('failure', $this->lng->txt('err_check_input'));
368 $form->setValuesByPost();
369 $this->settings($form);
370 }
updateTestAssignments(ilLOSettings $settings)
initSettingsForm()
Init settings form.
setQualifyingTestAsStart(bool $a_type)
setQualifyingTestType(int $a_type)
resetResults(bool $a_status)
setInitialTestType(int $a_type)
setInitialTestAsStart(bool $a_type)
setPassedObjectiveMode(int $a_mode)

References $settings, ilLPStatusWrapper\_refreshStatus(), ILIAS\Repository\ctrl(), ILIAS\Survey\Mode\getId(), ilLOSettings\getInitialTestType(), ilLOSettings\getInstanceByObjId(), getParentObject(), ilLOSettings\getQualifyingTestType(), initSettingsForm(), ilLOSettings\isQualifyingTestStart(), ILIAS\Repository\lng(), ilLOSettings\resetResults(), ilLOSettings\setInitialTestAsStart(), ilLOSettings\setInitialTestType(), ilLOSettings\setPassedObjectiveMode(), ilLOSettings\setQualifyingTestAsStart(), ilLOSettings\setQualifyingTestType(), settings(), ilLOSettings\TYPE_INITIAL_NONE, ilLOSettings\TYPE_INITIAL_PLACEMENT_ALL, ilLOSettings\TYPE_INITIAL_PLACEMENT_SELECTED, ilLOSettings\TYPE_INITIAL_QUALIFYING_ALL, ilLOSettings\TYPE_INITIAL_QUALIFYING_SELECTED, ilLOSettings\TYPE_QUALIFYING_ALL, ilLOSettings\TYPE_QUALIFYING_SELECTED, ilLOSettings\update(), updateStartObjects(), and updateTestAssignments().

+ Here is the call graph for this function:

◆ saveSorting()

ilLOEditorGUI::saveSorting ( )
protected

Definition at line 922 of file class.ilLOEditorGUI.php.

922 : void
923 {
924 $post_position = $this->http->wrapper()->post()->retrieve(
925 'position',
926 $this->refinery->kindlyTo()->dictOf(
927 $this->refinery->kindlyTo()->string()
928 )
929 );
930 asort($post_position, SORT_NUMERIC);
931 $counter = 1;
932 foreach ($post_position as $objective_id => $position) {
933 $objective = new ilCourseObjective($this->getParentObject(), $objective_id);
934 $objective->writePosition($counter++);
935 }
936 $this->main_tpl->setOnScreenMessage('success', $this->lng->txt('crs_objective_saved_sorting'));
937 $this->listObjectives();
938 }
$counter

References $counter, getParentObject(), ILIAS\FileDelivery\http(), listObjectives(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ saveTest()

ilLOEditorGUI::saveTest ( )
protected

Definition at line 787 of file class.ilLOEditorGUI.php.

787 : void
788 {
789 $this->ctrl->setParameter($this, 'tt', $this->initTestTypeFromQuery());
790 $this->setTestType($this->initTestTypeFromQuery());
791
793
794 $form_helper = new ilLOTestAssignmentForm($this, $this->getParentObject(), $this->getTestType());
795 $form = $form_helper->initForm(false);
796
797 if ($form->checkInput()) {
798 $mode = $form->getInput('mode');
799
800 if ($mode == self::TEST_NEW) {
801 $tst = new ilObjTest();
802 $tst->setType('tst');
803 $tst->setTitle($form->getInput('title'));
804 $tst->setDescription($form->getInput('desc'));
805 $tst->create();
806 $tst->saveToDb();
807 $tst->createReference();
808 $tst->putInTree($this->getParentObject()->getRefId());
809 $tst->setPermissions($this->getParentObject()->getRefId());
810 $general_settings = $tst->getMainSettings()->getGeneralSettings()->withQuestionSetType($form->getInput('qtype'));
811 $tst->getMainSettingsRepository()->store(
812 $tst->getMainSettings()->withGeneralSettings($general_settings)
813 );
814
815 if ($this->getTestType() == self::TEST_TYPE_IT) {
816 $this->getSettings()->setInitialTest($tst->getRefId());
817 } else {
818 $this->getSettings()->setQualifiedTest($tst->getRefId());
819 }
820 $this->getSettings()->update();
821 } else {
822 if ($this->getTestType() == self::TEST_TYPE_IT) {
823 $this->getSettings()->setInitialTest((int) $form->getInput('tst'));
824 } else {
825 $this->getSettings()->setQualifiedTest((int) $form->getInput('tst'));
826 }
827
828 $this->getSettings()->update();
829 $tst = new ilObjTest($settings->getTestByType($this->getTestType()), true);
830 $tst->saveToDb();
831 }
832
833 // deassign as objective material
834 if ($tst instanceof ilObjTest) {
835 $this->updateMaterialAssignments($tst);
836 }
837 $this->updateStartObjects();
838
839 $this->main_tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'));
840 $this->ctrl->redirect($this, 'testOverview');
841 }
842
843 // Error
844 $this->main_tpl->setOnScreenMessage('failure', $this->lng->txt('err_check_input'));
845 $form->setValuesByPost();
846 $this->testSettings($form);
847 }
testSettings(?ilPropertyFormGUI $form=null)
getTestByType(int $a_type)

References $settings, ILIAS\Repository\ctrl(), ILIAS\Survey\Mode\getId(), ilLOSettings\getInstanceByObjId(), getParentObject(), getSettings(), ilLOSettings\getTestByType(), getTestType(), initTestTypeFromQuery(), ILIAS\Repository\lng(), setTestType(), testSettings(), updateMaterialAssignments(), and updateStartObjects().

+ Here is the call graph for this function:

◆ setTabs()

ilLOEditorGUI::setTabs ( string  $a_section = '')
protected

Definition at line 1033 of file class.ilLOEditorGUI.php.

1033 : void
1034 {
1035 // objective settings
1036 $this->tabs->addSubTab(
1037 'settings',
1038 $this->lng->txt('settings'),
1039 $this->ctrl->getLinkTarget($this, 'settings')
1040 );
1041 // learning objectives
1042 $this->tabs->addSubTab(
1043 'objectives',
1044 $this->lng->txt('crs_loc_tab_objectives'),
1045 $this->ctrl->getLinkTarget($this, 'listObjectives')
1046 );
1047 // materials
1048 // tests
1051 if (
1054 ) {
1055 $this->ctrl->setParameter($this, 'tt', ilLOSettings::TYPE_TEST_INITIAL);
1056 $this->tabs->addSubTab(
1057 'itest',
1058 $this->lng->txt('crs_loc_tab_itest'),
1059 $this->ctrl->getLinkTarget($this, 'testOverview')
1060 );
1061 } else {
1062 $this->ctrl->setParameter($this, 'tt', ilLOSettings::TYPE_TEST_INITIAL);
1063 $this->tabs->addSubTab(
1064 'itests',
1065 $this->lng->txt('crs_loc_tab_itests'),
1066 $this->ctrl->getLinkTarget($this, 'testsOverview')
1067 );
1068 }
1069 }
1070
1072 $this->ctrl->setParameter($this, 'tt', ilLOSettings::TYPE_TEST_QUALIFIED);
1073 $this->tabs->addSubTab(
1074 'qtest',
1075 $this->lng->txt('crs_loc_tab_qtest'),
1076 $this->ctrl->getLinkTarget($this, 'testOverview')
1077 );
1078 } else {
1079 $this->ctrl->setParameter($this, 'tt', ilLOSettings::TYPE_TEST_QUALIFIED);
1080 $this->tabs->addSubTab(
1081 'qtests',
1082 $this->lng->txt('crs_loc_tab_qtests'),
1083 $this->ctrl->getLinkTarget($this, 'testsOverview')
1084 );
1085 }
1086
1088 $this->tabs->addSubTab(
1089 'start',
1090 $this->lng->txt('crs_loc_tab_start'),
1091 $this->ctrl->getLinkTargetByClass('ilcontainerstartobjectsgui', '')
1092 );
1093 }
1094
1095 // Member view
1096 #ilMemberViewGUI::showMemberViewSwitch($this->getParentObject()->getRefId());
1097 }
worksWithStartObjects()
Check if start objects are enabled.
worksWithInitialTest()
Check if the loc is configured for initial tests.

References $settings, ILIAS\Repository\ctrl(), ILIAS\Survey\Mode\getId(), ilLOSettings\getInitialTestType(), ilLOSettings\getInstanceByObjId(), getParentObject(), ilLOSettings\getQualifyingTestType(), ILIAS\Repository\lng(), ILIAS\Repository\tabs(), ilLOSettings\TYPE_INITIAL_PLACEMENT_ALL, ilLOSettings\TYPE_INITIAL_QUALIFYING_ALL, ilLOSettings\TYPE_QUALIFYING_ALL, ilLOSettings\TYPE_TEST_INITIAL, ilLOSettings\TYPE_TEST_QUALIFIED, ilLOSettings\worksWithInitialTest(), and ilLOSettings\worksWithStartObjects().

Referenced by executeCommand().

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

◆ setTestType()

ilLOEditorGUI::setTestType ( int  $a_type)

Definition at line 246 of file class.ilLOEditorGUI.php.

246 : void
247 {
248 $this->test_type = $a_type;
249 }

Referenced by saveMultiTestAssignment(), saveTest(), testAssignment(), testOverview(), testOverviewInitial(), testOverviewQualified(), testsOverview(), testsOverviewInitial(), and testsOverviewQualified().

+ Here is the caller graph for this function:

◆ settings()

ilLOEditorGUI::settings ( ?ilPropertyFormGUI  $form = null)
protected

Definition at line 256 of file class.ilLOEditorGUI.php.

256 : void
257 {
258 if (!$form instanceof ilPropertyFormGUI) {
259 $form = $this->initSettingsForm();
260 }
261 $this->tabs->activateSubTab('settings');
262 $this->tpl->setContent($form->getHTML());
264 }

References initSettingsForm(), ilLOEditorStatus\SECTION_SETTINGS, showStatus(), and ILIAS\Repository\tabs().

Referenced by __construct(), and saveSettings().

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

◆ showObjectiveCreation()

ilLOEditorGUI::showObjectiveCreation ( ?ilPropertyFormGUI  $form = null)
protected

Definition at line 877 of file class.ilLOEditorGUI.php.

877 : void
878 {
879 $this->tabs->activateSubTab('objectives');
880 if (!$form instanceof ilPropertyFormGUI) {
881 $form = $this->initSimpleObjectiveForm();
882 }
883 $this->tpl->setContent($form->getHTML());
885 }

References initSimpleObjectiveForm(), ilLOEditorStatus\SECTION_OBJECTIVES_NEW, showStatus(), and ILIAS\Repository\tabs().

Referenced by listObjectives(), and saveObjectiveCreation().

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

◆ showStatus()

ilLOEditorGUI::showStatus ( int  $a_section)
protected

Definition at line 1025 of file class.ilLOEditorGUI.php.

1025 : void
1026 {
1027 $status = new ilLOEditorStatus($this->getParentObject());
1028 $status->setSection($a_section);
1029 $status->setCmdClass($this);
1030 $this->tpl->setRightContent($status->getHTML());
1031 }
Presentation of the status of single steps during the configuration process.

References getParentObject().

Referenced by askDeleteObjectives(), listObjectives(), materials(), saveObjectiveCreation(), settings(), showObjectiveCreation(), testAssignment(), testOverview(), testSettings(), and testsOverview().

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

◆ testAssignment()

ilLOEditorGUI::testAssignment ( ?ilPropertyFormGUI  $form = null)
protected

Definition at line 652 of file class.ilLOEditorGUI.php.

652 : void
653 {
655 $this->setTestType($this->initTestTypeFromQuery());
656 }
657 $this->ctrl->setParameter($this, 'tt', $this->getTestType());
658
659 switch ($this->getTestType()) {
661 $this->tabs->activateSubTab('itests');
662 break;
663
665 $this->tabs->activateSubTab('qtests');
666 break;
667 }
668 if (!$form instanceof ilPropertyFormGUI) {
669 $form_helper = new ilLOTestAssignmentForm($this, $this->getParentObject(), $this->getTestType());
670 $form = $form_helper->initForm(true);
671 }
672 $this->tpl->setContent($form->getHTML());
673
674 $this->showStatus(
675 ($this->getTestType() == self::TEST_TYPE_IT) ?
678 );
679 }

References ILIAS\Repository\ctrl(), getParentObject(), getTestType(), initTestTypeFromQuery(), ilLOEditorStatus\SECTION_ITES, ilLOEditorStatus\SECTION_QTEST, setTestType(), showStatus(), ILIAS\Repository\tabs(), ilLOSettings\TYPE_TEST_INITIAL, ilLOSettings\TYPE_TEST_QUALIFIED, and ilLOSettings\TYPE_TEST_UNDEFINED.

Referenced by saveMultiTestAssignment().

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

◆ testOverview()

ilLOEditorGUI::testOverview ( )
protected

Show test overview.

Definition at line 580 of file class.ilLOEditorGUI.php.

580 : void
581 {
583 $this->setTestType($this->initTestTypeFromQuery());
584 }
585 $this->ctrl->setParameter($this, 'tt', $this->getTestType());
586
588 switch ($this->getTestType()) {
590 $this->tabs->activateSubTab('itest');
591 break;
592
594 $this->tabs->activateSubTab('qtest');
595 break;
596 }
597
598 // Check if test is assigned
599 if (!$settings->getTestByType($this->getTestType())) {
600 $this->testSettings();
601 return;
602 }
603
604 try {
605 $data_retrieval = new ilLOTestAssignmentTableDataRetrieval(
606 $this->lng,
607 $this->db,
608 $this->ui_services,
609 $this->ctrl,
611 );
612 $data_retrieval->parseSingleAssignment(
613 ilLOSettings::getInstanceByObjId($this->getParentObject()->getId())->getTestByType($this->getTestType())
614 );
615 $table = new ilLOTestAssignmentTableGUI(
617 $this->getTestType(),
618 $this->getParentObject()->getId(),
619 $this->lng,
620 $this->ui_services,
621 $this->http,
622 $data_retrieval,
623 $this->refinery,
624 $this->ctrl,
625 $this->getParentObject()
626 );
627 $table->handleCommands();
628 $this->tpl->setContent($table->getHTML());
629 $this->showStatus(
633 );
635 $this->logger->debug(': Show new assignment screen because of : ' . $ex->getMessage());
636 $this->testSettings();
637 }
638 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilLOTestAssignmentTableGUI.

References ILIAS\Repository\ctrl(), ILIAS\Survey\Mode\getId(), ilLOSettings\getInstanceByObjId(), getParentObject(), ilLOSettings\getTestByType(), getTestType(), ILIAS\FileDelivery\http(), initTestTypeFromQuery(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), ILIAS\Repository\refinery(), ilLOEditorStatus\SECTION_ITES, ilLOEditorStatus\SECTION_QTEST, setTestType(), showStatus(), ILIAS\Repository\tabs(), TEST_TYPE_IT, testSettings(), ilLOTestAssignmentTableGUI\TYPE_SINGLE_ASSIGNMENTS, ilLOSettings\TYPE_TEST_INITIAL, ilLOSettings\TYPE_TEST_QUALIFIED, and ilLOSettings\TYPE_TEST_UNDEFINED.

Referenced by testOverviewInitial(), and testOverviewQualified().

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

◆ testOverviewInitial()

ilLOEditorGUI::testOverviewInitial ( )
protected

Definition at line 640 of file class.ilLOEditorGUI.php.

640 : void
641 {
643 $this->testOverview();
644 }
testOverview()
Show test overview.

References setTestType(), testOverview(), and ilLOSettings\TYPE_TEST_INITIAL.

+ Here is the call graph for this function:

◆ testOverviewQualified()

ilLOEditorGUI::testOverviewQualified ( )
protected

Definition at line 646 of file class.ilLOEditorGUI.php.

646 : void
647 {
649 $this->testOverview();
650 }

References setTestType(), testOverview(), and ilLOSettings\TYPE_TEST_QUALIFIED.

+ Here is the call graph for this function:

◆ testSettings()

ilLOEditorGUI::testSettings ( ?ilPropertyFormGUI  $form = null)
protected

Definition at line 681 of file class.ilLOEditorGUI.php.

681 : void
682 {
683 $this->ctrl->setParameter($this, 'tt', $this->getTestType());
684 switch ($this->getTestType()) {
686 $this->tabs->activateSubTab('itest');
687 break;
688
690 $this->tabs->activateSubTab('qtest');
691 break;
692 }
693
694 if (!$form instanceof ilPropertyFormGUI) {
695 $form_helper = new ilLOTestAssignmentForm($this, $this->getParentObject(), $this->getTestType());
696 $form = $form_helper->initForm(false);
697 }
698 $this->tpl->setContent($form->getHTML());
699
700 $this->showStatus(
701 ($this->getTestType() == self::TEST_TYPE_IT) ?
704 );
705 }

References ILIAS\Repository\ctrl(), getParentObject(), getTestType(), ilLOEditorStatus\SECTION_ITES, ilLOEditorStatus\SECTION_QTEST, showStatus(), ILIAS\Repository\tabs(), ilLOSettings\TYPE_TEST_INITIAL, and ilLOSettings\TYPE_TEST_QUALIFIED.

Referenced by saveTest(), testOverview(), and testsOverview().

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

◆ testsOverview()

ilLOEditorGUI::testsOverview ( )
protected

Definition at line 504 of file class.ilLOEditorGUI.php.

504 : void
505 {
507 $this->setTestType($this->initTestTypeFromQuery());
508 }
509 $this->ctrl->setParameter($this, 'tt', $this->getTestType());
510
511 $this->toolbar->setFormAction($this->ctrl->getFormAction($this));
512 $this->toolbar->addButton(
513 $this->lng->txt('crs_loc_btn_new_assignment'),
514 $this->ctrl->getLinkTarget($this, 'testAssignment')
515 );
516
518 switch ($this->getTestType()) {
520 $this->tabs->activateSubTab('itests');
521 break;
522
524 $this->tabs->activateSubTab('qtests');
525 break;
526 }
527
528 try {
529 $data_retrieval = new ilLOTestAssignmentTableDataRetrieval(
530 $this->lng,
531 $this->db,
532 $this->ui_services,
533 $this->ctrl,
535 );
536 $data_retrieval->parseMultipleAssignments(
537 $this->getParentObject()->getId(),
538 $this->getTestType()
539 );
540 $table = new ilLOTestAssignmentTableGUI(
542 $this->getTestType(),
543 $this->getParentObject()->getId(),
544 $this->lng,
545 $this->ui_services,
546 $this->http,
547 $data_retrieval,
548 $this->refinery,
549 $this->ctrl,
550 $this->getParentObject()
551 );
552 $table->handleCommands();
553 $this->tpl->setContent($table->getHTML());
554 $this->showStatus(
558 );
560 $this->logger->debug(': Show new assignment screen because of : ' . $ex->getMessage());
561 $this->testSettings();
562 }
563 }

References $settings, ILIAS\Repository\ctrl(), ILIAS\Survey\Mode\getId(), ilLOSettings\getInstanceByObjId(), getParentObject(), getTestType(), ILIAS\FileDelivery\http(), initTestTypeFromQuery(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), ILIAS\Repository\refinery(), ilLOEditorStatus\SECTION_ITES, ilLOEditorStatus\SECTION_QTEST, setTestType(), showStatus(), ILIAS\Repository\tabs(), TEST_TYPE_IT, testSettings(), ILIAS\Repository\toolbar(), ilLOTestAssignmentTableGUI\TYPE_MULTIPLE_ASSIGNMENTS, ilLOSettings\TYPE_TEST_INITIAL, ilLOSettings\TYPE_TEST_QUALIFIED, and ilLOSettings\TYPE_TEST_UNDEFINED.

Referenced by testsOverviewInitial(), and testsOverviewQualified().

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

◆ testsOverviewInitial()

ilLOEditorGUI::testsOverviewInitial ( )
protected

Definition at line 565 of file class.ilLOEditorGUI.php.

565 : void
566 {
568 $this->testsOverview();
569 }

References setTestType(), testsOverview(), and ilLOSettings\TYPE_TEST_INITIAL.

+ Here is the call graph for this function:

◆ testsOverviewQualified()

ilLOEditorGUI::testsOverviewQualified ( )
protected

Definition at line 571 of file class.ilLOEditorGUI.php.

571 : void
572 {
574 $this->testsOverview();
575 }

References setTestType(), testsOverview(), and ilLOSettings\TYPE_TEST_QUALIFIED.

+ Here is the call graph for this function:

◆ updateMaterialAssignments()

ilLOEditorGUI::updateMaterialAssignments ( ilObjTest  $test)
protected

Definition at line 775 of file class.ilLOEditorGUI.php.

775 : void
776 {
777 foreach (ilCourseObjective::_getObjectiveIds($this->getParentObject()->getId()) as $objective_id) {
778 $materials = new ilCourseObjectiveMaterials($objective_id);
779 foreach ($materials->getMaterials() as $material) {
780 if ($material['ref_id'] == $test->getRefId()) {
781 $materials->delete($material['lm_ass_id']);
782 }
783 }
784 }
785 }
class ilCourseObjectiveMaterials

References ilCourseObjective\_getObjectiveIds(), ILIAS\Survey\Mode\getId(), getParentObject(), and ilObject\getRefId().

Referenced by saveMultiTestAssignment(), and saveTest().

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

◆ updateStartObjects()

ilLOEditorGUI::updateStartObjects ( )
protected

Definition at line 707 of file class.ilLOEditorGUI.php.

707 : void
708 {
709 $start = new ilContainerStartObjects(0, $this->getParentObject()->getId());
710 $this->getSettings()->updateStartObjects($start);
711 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ILIAS\Survey\Mode\getId(), getParentObject(), and getSettings().

Referenced by saveMultiTestAssignment(), saveSettings(), and saveTest().

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

◆ updateTestAssignments()

ilLOEditorGUI::updateTestAssignments ( ilLOSettings  $settings)
protected

Definition at line 274 of file class.ilLOEditorGUI.php.

References $settings, deleteAssignments(), ilLOSettings\getInitialTestType(), ilLOSettings\getQualifyingTestType(), ilLOSettings\setInitialTest(), ilLOSettings\setQualifiedTest(), ilLOSettings\TYPE_INITIAL_NONE, ilLOSettings\TYPE_INITIAL_PLACEMENT_ALL, ilLOSettings\TYPE_INITIAL_PLACEMENT_SELECTED, ilLOSettings\TYPE_INITIAL_QUALIFYING_ALL, ilLOSettings\TYPE_INITIAL_QUALIFYING_SELECTED, ilLOSettings\TYPE_QUALIFYING_ALL, ilLOSettings\TYPE_QUALIFYING_SELECTED, ilLOSettings\TYPE_TEST_INITIAL, ilLOSettings\TYPE_TEST_QUALIFIED, and ilLOSettings\update().

Referenced by saveSettings().

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

Field Documentation

◆ $content_style_domain

ObjectFacade ilLOEditorGUI::$content_style_domain
private

Definition at line 53 of file class.ilLOEditorGUI.php.

◆ $ctrl

ilCtrlInterface ilLOEditorGUI::$ctrl
private

Definition at line 48 of file class.ilLOEditorGUI.php.

◆ $db

ilDBInterface ilLOEditorGUI::$db
protected

Definition at line 57 of file class.ilLOEditorGUI.php.

◆ $http

GlobalHttpState ilLOEditorGUI::$http
protected

Definition at line 54 of file class.ilLOEditorGUI.php.

◆ $lng

ilLanguage ilLOEditorGUI::$lng
private

Definition at line 47 of file class.ilLOEditorGUI.php.

◆ $logger

ilLogger ilLOEditorGUI::$logger
private

Definition at line 42 of file class.ilLOEditorGUI.php.

◆ $main_tpl

ilGlobalTemplateInterface ilLOEditorGUI::$main_tpl
protected

Definition at line 50 of file class.ilLOEditorGUI.php.

◆ $parent_gui

ilObjCourseGUI ilLOEditorGUI::$parent_gui
private

Definition at line 45 of file class.ilLOEditorGUI.php.

Referenced by __construct(), and getParentGUI().

◆ $parent_obj

ilObject ilLOEditorGUI::$parent_obj
private

Definition at line 44 of file class.ilLOEditorGUI.php.

Referenced by getParentObject().

◆ $refinery

Factory ilLOEditorGUI::$refinery
protected

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

◆ $settings

ilLOSettings ilLOEditorGUI::$settings
private

◆ $tabs

ilTabsGUI ilLOEditorGUI::$tabs
private

Definition at line 49 of file class.ilLOEditorGUI.php.

◆ $test_type

int ilLOEditorGUI::$test_type = self::TEST_TYPE_UNDEFINED
private

Definition at line 59 of file class.ilLOEditorGUI.php.

Referenced by getTestType().

◆ $toolbar

ilToolbarGUI ilLOEditorGUI::$toolbar
protected

Definition at line 51 of file class.ilLOEditorGUI.php.

◆ $tpl

ilGlobalTemplateInterface ilLOEditorGUI::$tpl
private

Definition at line 52 of file class.ilLOEditorGUI.php.

◆ $ui_services

ilUIServices ilLOEditorGUI::$ui_services
protected

Definition at line 56 of file class.ilLOEditorGUI.php.

◆ TEST_ASSIGN

const int ilLOEditorGUI::TEST_ASSIGN = 2

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

◆ TEST_NEW

const int ilLOEditorGUI::TEST_NEW = 1

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

◆ TEST_TYPE_IT

const int ilLOEditorGUI::TEST_TYPE_IT = 1

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

Referenced by testOverview(), and testsOverview().

◆ TEST_TYPE_QT

const int ilLOEditorGUI::TEST_TYPE_QT = 2

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

◆ TEST_TYPE_UNDEFINED

const int ilLOEditorGUI::TEST_TYPE_UNDEFINED = 0

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


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