ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
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
 
ilAccess $access
 

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 62 of file class.ilLOEditorGUI.php.

63 {
64 global $DIC;
65
66 $this->main_tpl = $DIC->ui()->mainTemplate();
67 $this->parent_obj = $parent_gui->getObject();
68 $this->parent_gui = $parent_gui;
70
71 $cs = $DIC->contentStyle();
72 $this->content_style_domain = $cs->domain()->styleForRefId($this->parent_obj->getRefId());
73
74 $this->lng = $DIC->language();
75 $this->ctrl = $DIC->ctrl();
76 $this->tpl = $DIC->ui()->mainTemplate();
77 $this->tabs = $DIC->tabs();
78 $this->toolbar = $DIC->toolbar();
79 $this->logger = $DIC->logger()->crs();
80 $this->http = $DIC->http();
81 $this->refinery = $DIC->refinery();
82 $this->ui_services = $DIC->ui();
83 $this->db = $DIC->database();
84 $this->access = $DIC->access();
85 }
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\access(), 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 977 of file class.ilLOEditorGUI.php.

977 : void
978 {
979 $enabled = $this->initObjectiveIdsFromPost();
981 foreach ($objectives as $objective_id) {
982 $objective = new ilCourseObjective($this->getParentObject(), $objective_id);
983 if (in_array($objective_id, $enabled)) {
984 $objective->setActive(true);
985 $objective->update();
986 }
987 }
989 $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
990 $this->ctrl->redirect($this, 'listObjectives');
991 }
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 944 of file class.ilLOEditorGUI.php.

944 : void
945 {
946 $this->tabs->activateSubTab('objectives');
947
948 $confirm = new ilConfirmationGUI();
949 $confirm->setFormAction($this->ctrl->getFormAction($this));
950 $confirm->setHeaderText($this->lng->txt('crs_delete_objectve_sure'));
951 $confirm->setConfirm($this->lng->txt('delete'), 'deleteObjectives');
952 $confirm->setCancel($this->lng->txt('cancel'), 'listObjectives');
953
954 $objective_ids = [];
955 if ($this->http->wrapper()->post()->has('objective')) {
956 $objective_ids = $this->http->wrapper()->post()->retrieve(
957 'objective',
958 $this->refinery->kindlyTo()->dictOf(
959 $this->refinery->kindlyTo()->int()
960 )
961 );
962 }
963 foreach ($objective_ids as $objective_id) {
964 $obj = new ilCourseObjective($this->getParentObject(), $objective_id);
965 $name = $obj->getTitle();
966
967 $confirm->addItem(
968 'objective_ids[]',
969 (string) $objective_id,
970 $name
971 );
972 }
973 $this->tpl->setContent($confirm->getHTML());
975 }
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 993 of file class.ilLOEditorGUI.php.

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

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 270 of file class.ilLOEditorGUI.php.

270 : void
271 {
272 $assignments = ilLOTestAssignments::getInstance($this->getParentObject()->getId());
273 foreach ($assignments->getAssignmentsByType($a_type) as $assignment) {
274 $assignment->delete();
275 }
276 }
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 1009 of file class.ilLOEditorGUI.php.

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

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 87 of file class.ilLOEditorGUI.php.

87 : void
88 {
89 $next_class = $this->ctrl->getNextClass($this);
90 $cmd = $this->ctrl->getCmd();
91
92 if (!$this->access->checkAccess('write', '', $this->getParentObject()->getRefId())) {
93 throw new \ilPermissionException($this->lng->txt("permission_denied"));
94 }
95
96 $this->setTabs();
97 switch ($next_class) {
98 case 'ilcourseobjectivesgui':
99
100 $this->ctrl->setReturn($this, 'returnFromObjectives');
101 $this->tabs->clearTargets();
102 $this->tabs->setBackTarget(
103 $this->lng->txt('back'),
104 $this->ctrl->getLinkTarget($this, 'listObjectives')
105 );
106
107 $reg_gui = new ilCourseObjectivesGUI($this->getParentObject()->getRefId());
108 $this->ctrl->forwardCommand($reg_gui);
109 break;
110
111 case 'ilcontainerstartobjectsgui':
112
113 $stgui = new ilContainerStartObjectsGUI($this->getParentObject());
114 $ret = $this->ctrl->forwardCommand($stgui);
115
116 $this->tabs->activateSubTab('start');
117 $this->tabs->removeSubTab('manage');
118 break;
119
120 case 'ilconditionhandlergui':
121
122 $this->ctrl->saveParameterByClass('ilconditionhandlergui', 'objective_id');
123
124 $this->tabs->clearTargets();
125 $this->tabs->setBackTarget(
126 $this->lng->txt('back'),
127 $this->ctrl->getLinkTarget($this, 'listObjectives')
128 );
129
130 $cond = new ilConditionHandlerGUI();
131 $cond->setBackButtons(array());
132 $cond->setAutomaticValidation(false);
133 $cond->setTargetType("lobj");
134 $cond->setTargetRefId($this->getParentObject()->getRefId());
135 $cond->setTargetId($this->initObjectiveIdFromQuery());
136
137 // objective
138 $obj = new ilCourseObjective($this->getParentObject(), $this->initObjectiveIdFromQuery());
139 $cond->setTargetTitle($obj->getTitle());
140 $this->ctrl->forwardCommand($cond);
141 break;
142
143 case 'illopagegui':
144 $this->ctrl->saveParameterByClass('illopagegui', 'objective_id');
145
146 $this->tabs->clearTargets();
147 $this->tabs->setBackTarget(
148 $this->lng->txt('back'),
149 $this->ctrl->getLinkTarget($this, 'listObjectives')
150 );
151
152 $objtv_id = $this->initObjectiveIdFromQuery();
153
154 if (!ilLOPage::_exists('lobj', $objtv_id)) {
155 // doesn't exist -> create new one
156 $new_page_object = new ilLOPage();
157 $new_page_object->setParentId($objtv_id);
158 $new_page_object->setId($objtv_id);
159 $new_page_object->createFromXML();
160 unset($new_page_object);
161 }
162
163 $this->ctrl->setReturn($this, 'listObjectives');
164 $pgui = new ilLOPageGUI($objtv_id);
165 $pgui->setPresentationTitle(ilCourseObjective::lookupObjectiveTitle($objtv_id));
166
167 $pgui->setStyleId($this->content_style_domain->getEffectiveStyleId());
168
169 // #14895
170 $this->tpl->setCurrentBlock("ContentStyle");
171 $this->tpl->setVariable(
172 "LOCATION_CONTENT_STYLESHEET",
173 ilObjStyleSheet::getContentStylePath($this->content_style_domain->getEffectiveStyleId())
174 );
175 $this->tpl->parseCurrentBlock();
176
177 $ret = $this->ctrl->forwardCommand($pgui);
178 if ($ret) {
179 $this->tpl->setContent($ret);
180 }
181 break;
182
183 default:
184 if (!$cmd) {
185 // get first unaccomplished step
186 $cmd = ilLOEditorStatus::getInstance($this->getParentObject())->getFirstFailedStep();
187 }
188 $this->$cmd();
189
190 break;
191 }
192 }
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\access(), 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 240 of file class.ilLOEditorGUI.php.

241 {
242 return $this->parent_gui;
243 }
Class ilObjCourseGUI.

References $parent_gui.

◆ getParentObject()

◆ getSettings()

ilLOEditorGUI::getSettings ( )

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

246 {
247 return $this->settings;
248 }
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 255 of file class.ilLOEditorGUI.php.

255 : int
256 {
257 return $this->test_type;
258 }

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 194 of file class.ilLOEditorGUI.php.

194 : int
195 {
196 if ($this->http->wrapper()->query()->has('objective_id')) {
197 return $this->http->wrapper()->query()->retrieve(
198 'objective_id',
199 $this->refinery->kindlyTo()->int()
200 );
201 }
202 return 0;
203 }

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 205 of file class.ilLOEditorGUI.php.

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

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 379 of file class.ilLOEditorGUI.php.

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

892 {
893 $form = new ilPropertyFormGUI();
894 $form->setTitle($this->lng->txt('crs_loc_form_create_objectives'));
895 $form->setFormAction($this->ctrl->getFormAction($this));
896
897 $txt = new ilTextWizardInputGUI($this->lng->txt('crs_objectives'), 'objectives');
898 $txt->setValues(array(0 => ''));
899 $txt->setRequired(true);
900 $form->addItem($txt);
901
902 $form->addCommandButton('saveObjectiveCreation', $this->lng->txt('save'));
903 return $form;
904 }
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 218 of file class.ilLOEditorGUI.php.

218 : int
219 {
220 if ($this->http->wrapper()->query()->has('tt')) {
221 return $this->http->wrapper()->query()->retrieve(
222 'tt',
223 $this->refinery->kindlyTo()->int()
224 );
225 }
226 return 0;
227 }

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 853 of file class.ilLOEditorGUI.php.

853 : void
854 {
856 $this->tabs->activateSubTab('objectives');
857
859 $this->getParentObject()->getId(),
860 false
861 );
862
863 if ($objectives === []) {
864 $this->showObjectiveCreation();
865 return;
866 }
867
868 $this->toolbar->addButton(
869 $this->lng->txt('crs_add_objective'),
870 $this->ctrl->getLinkTargetByClass('ilcourseobjectivesgui', "create")
871 );
872
873 $table = new ilCourseObjectivesTableGUI($this, $this->getParentObject());
874 $table->setTitle($this->lng->txt('crs_objectives'), '', $this->lng->txt('crs_objectives'));
875 $table->parse($objectives);
876 $this->tpl->setContent($table->getHTML());
877
879 }
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 494 of file class.ilLOEditorGUI.php.

494 : void
495 {
496 $this->tabs->activateSubTab('materials');
497
498 $this->parent_gui->renderAddNewItem('obgr');
499
500 $this->tpl->setOnScreenMessage(
501 'info',
502 $this->lng->txt('crs_objective_status_materials_info')
503 );
504
506 }

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 229 of file class.ilLOEditorGUI.php.

229 : void
230 {
232 $this->listObjectives();
233 }

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

+ Here is the call graph for this function:

◆ saveMultiTestAssignment()

ilLOEditorGUI::saveMultiTestAssignment ( )
protected

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

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

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

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 310 of file class.ilLOEditorGUI.php.

310 : void
311 {
312 $form = $this->initSettingsForm();
313 if ($form->checkInput()) {
315 $settings->setInitialTestType((int) $form->getInput('ittype'));
316 switch ($settings->getInitialTestType()) {
318 $settings->setInitialTestAsStart((bool) $form->getInput('start_ip'));
319 break;
320
323 break;
324
326 $settings->setInitialTestAsStart((bool) $form->getInput('start_iq'));
327 break;
328
331 break;
332
335 break;
336 }
337
338 $settings->setQualifyingTestType((int) $form->getInput('qttype'));
339 switch ($settings->getQualifyingTestType()) {
341 $settings->setQualifyingTestAsStart((bool) $form->getInput('start_q'));
342 break;
343
346 break;
347 }
348
349 $settings->resetResults((bool) $form->getInput('reset'));
350 $settings->setPassedObjectiveMode((int) $form->getInput('passed_mode'));
351
352 if (
355 ) {
357 $this->main_tpl->setOnScreenMessage('info', $this->lng->txt('crs_loc_settings_err_qstart'), true);
358 }
359
360 $settings->update();
361 $this->updateStartObjects();
363
365
366 $this->main_tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
367 $this->ctrl->redirect($this, 'settings');
368 }
369
370 // Error
371 $this->main_tpl->setOnScreenMessage('failure', $this->lng->txt('err_check_input'));
372 $form->setValuesByPost();
373 $this->settings($form);
374 }
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 926 of file class.ilLOEditorGUI.php.

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

References 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 791 of file class.ilLOEditorGUI.php.

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

1037 : void
1038 {
1039 // objective settings
1040 $this->tabs->addSubTab(
1041 'settings',
1042 $this->lng->txt('settings'),
1043 $this->ctrl->getLinkTarget($this, 'settings')
1044 );
1045 // learning objectives
1046 $this->tabs->addSubTab(
1047 'objectives',
1048 $this->lng->txt('crs_loc_tab_objectives'),
1049 $this->ctrl->getLinkTarget($this, 'listObjectives')
1050 );
1051 // materials
1052 // tests
1055 if (
1058 ) {
1059 $this->ctrl->setParameter($this, 'tt', ilLOSettings::TYPE_TEST_INITIAL);
1060 $this->tabs->addSubTab(
1061 'itest',
1062 $this->lng->txt('crs_loc_tab_itest'),
1063 $this->ctrl->getLinkTarget($this, 'testOverview')
1064 );
1065 } else {
1066 $this->ctrl->setParameter($this, 'tt', ilLOSettings::TYPE_TEST_INITIAL);
1067 $this->tabs->addSubTab(
1068 'itests',
1069 $this->lng->txt('crs_loc_tab_itests'),
1070 $this->ctrl->getLinkTarget($this, 'testsOverview')
1071 );
1072 }
1073 }
1074
1076 $this->ctrl->setParameter($this, 'tt', ilLOSettings::TYPE_TEST_QUALIFIED);
1077 $this->tabs->addSubTab(
1078 'qtest',
1079 $this->lng->txt('crs_loc_tab_qtest'),
1080 $this->ctrl->getLinkTarget($this, 'testOverview')
1081 );
1082 } else {
1083 $this->ctrl->setParameter($this, 'tt', ilLOSettings::TYPE_TEST_QUALIFIED);
1084 $this->tabs->addSubTab(
1085 'qtests',
1086 $this->lng->txt('crs_loc_tab_qtests'),
1087 $this->ctrl->getLinkTarget($this, 'testsOverview')
1088 );
1089 }
1090
1092 $this->tabs->addSubTab(
1093 'start',
1094 $this->lng->txt('crs_loc_tab_start'),
1095 $this->ctrl->getLinkTargetByClass('ilcontainerstartobjectsgui', '')
1096 );
1097 }
1098
1099 // Member view
1100 #ilMemberViewGUI::showMemberViewSwitch($this->getParentObject()->getRefId());
1101 }
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 250 of file class.ilLOEditorGUI.php.

250 : void
251 {
252 $this->test_type = $a_type;
253 }

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 260 of file class.ilLOEditorGUI.php.

260 : void
261 {
262 if (!$form instanceof ilPropertyFormGUI) {
263 $form = $this->initSettingsForm();
264 }
265 $this->tabs->activateSubTab('settings');
266 $this->tpl->setContent($form->getHTML());
268 }

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 881 of file class.ilLOEditorGUI.php.

881 : void
882 {
883 $this->tabs->activateSubTab('objectives');
884 if (!$form instanceof ilPropertyFormGUI) {
885 $form = $this->initSimpleObjectiveForm();
886 }
887 $this->tpl->setContent($form->getHTML());
889 }

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 1029 of file class.ilLOEditorGUI.php.

1029 : void
1030 {
1031 $status = new ilLOEditorStatus($this->getParentObject());
1032 $status->setSection($a_section);
1033 $status->setCmdClass($this);
1034 $this->tpl->setRightContent($status->getHTML());
1035 }
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 656 of file class.ilLOEditorGUI.php.

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

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 584 of file class.ilLOEditorGUI.php.

584 : void
585 {
587 $this->setTestType($this->initTestTypeFromQuery());
588 }
589 $this->ctrl->setParameter($this, 'tt', $this->getTestType());
590
592 switch ($this->getTestType()) {
594 $this->tabs->activateSubTab('itest');
595 break;
596
598 $this->tabs->activateSubTab('qtest');
599 break;
600 }
601
602 // Check if test is assigned
603 if (!$settings->getTestByType($this->getTestType())) {
604 $this->testSettings();
605 return;
606 }
607
608 try {
609 $data_retrieval = new ilLOTestAssignmentTableDataRetrieval(
610 $this->lng,
611 $this->db,
612 $this->ui_services,
613 $this->ctrl,
615 );
616 $data_retrieval->parseSingleAssignment(
617 ilLOSettings::getInstanceByObjId($this->getParentObject()->getId())->getTestByType($this->getTestType())
618 );
619 $table = new ilLOTestAssignmentTableGUI(
621 $this->getTestType(),
622 $this->getParentObject()->getId(),
623 $this->lng,
624 $this->ui_services,
625 $this->http,
626 $data_retrieval,
627 $this->refinery,
628 $this->ctrl,
629 $this->getParentObject()
630 );
631 $table->handleCommands();
632 $this->tpl->setContent($table->getHTML());
633 $this->showStatus(
637 );
639 $this->logger->debug(': Show new assignment screen because of : ' . $ex->getMessage());
640 $this->testSettings();
641 }
642 }
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 644 of file class.ilLOEditorGUI.php.

644 : void
645 {
647 $this->testOverview();
648 }
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 650 of file class.ilLOEditorGUI.php.

650 : void
651 {
653 $this->testOverview();
654 }

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 685 of file class.ilLOEditorGUI.php.

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

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 508 of file class.ilLOEditorGUI.php.

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

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 569 of file class.ilLOEditorGUI.php.

569 : void
570 {
572 $this->testsOverview();
573 }

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

+ Here is the call graph for this function:

◆ testsOverviewQualified()

ilLOEditorGUI::testsOverviewQualified ( )
protected

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

575 : void
576 {
578 $this->testsOverview();
579 }

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 779 of file class.ilLOEditorGUI.php.

779 : void
780 {
781 foreach (ilCourseObjective::_getObjectiveIds($this->getParentObject()->getId()) as $objective_id) {
782 $materials = new ilCourseObjectiveMaterials($objective_id);
783 foreach ($materials->getMaterials() as $material) {
784 if ($material['ref_id'] == $test->getRefId()) {
785 $materials->delete($material['lm_ass_id']);
786 }
787 }
788 }
789 }
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 711 of file class.ilLOEditorGUI.php.

711 : void
712 {
713 $start = new ilContainerStartObjects(0, $this->getParentObject()->getId());
714 $this->getSettings()->updateStartObjects($start);
715 }
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 278 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

◆ $access

ilAccess ilLOEditorGUI::$access
protected

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

◆ $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 60 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: