ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilCourseObjectivesGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=0);
20
23use ILIAS\UI\Renderer as UIRenderer;
26
32{
33 public const MODE_UNDEFINED = 0;
34 public const MODE_CREATE = 1;
35 public const MODE_UPDATE = 2;
36
37 protected const STEP_SETTINGS = 1;
38 protected const STEP_MATERIAL_ASSIGNMENT = 2;
39 protected const STEP_INITIAL_TEST_ASSIGNMENT = 3;
40 protected const STEP_INITIAL_TEST_LIMIT = 4;
41 protected const STEP_FINAL_TEST_ASSIGNMENT = 5;
42 protected const STEP_FINAL_TEST_LIMIT = 6;
43
45 protected ?ilCourseObjective $objective = null;
50 protected int $course_id;
52 protected int $test_type = 0;
53 protected ?ilPropertyFormGUI $form = null;
54
56 protected ilDBInterface $db;
59 protected ilLanguage $lng;
61 protected ilTree $tree;
62 protected ilTabsGUI $tabs;
66 protected ilHelpGUI $help;
68 protected Workflow $workflow;
69 protected UIRenderer $renderer;
71 protected Factory $refinery;
72
73 public function __construct(int $a_course_id)
74 {
75 global $DIC;
76 $this->ctrl = $DIC->ctrl();
77 $this->db = $DIC->database();
78 $this->ctrl->saveParameter($this, array("ref_id"));
79
80 $this->logger = $DIC->logger()->crs();
81 $this->ilErr = $DIC['ilErr'];
82 $this->lng = $DIC->language();
83 $this->lng->loadLanguageModule('crs');
84 $this->tpl = $DIC->ui()->mainTemplate();
85 $this->tree = $DIC->repositoryTree();
86 $this->tabs = $DIC->tabs();
87 $this->access = $DIC->access();
88 $this->rbacsystem = $DIC->rbac()->system();
89 $this->toolbar = $DIC->toolbar();
90 $this->help = $DIC->help();
91 $this->objectDataCache = $DIC['ilObjDataCache'];
92 $this->workflow = $DIC->ui()->factory()->listing()->workflow();
93 $this->renderer = $DIC->ui()->renderer();
94 $this->http = $DIC->http();
95 $this->refinery = $DIC->refinery();
96
97 $this->course_id = $a_course_id;
98 $this->__initCourseObject();
99 $this->settings = ilLOSettings::getInstanceByObjId($this->course_obj->getId());
100 }
101
102 public function executeCommand(): void
103 {
104 $this->tabs->setTabActive('crs_objectives');
105
106 $cmd = $this->ctrl->getCmd();
107
108 if (!$cmd = $this->ctrl->getCmd()) {
109 $cmd = "list";
110 }
111
112 $this->$cmd();
113 }
114
115 protected function initObjectiveIdFromQuery(): int
116 {
117 if ($this->http->wrapper()->query()->has('objective_id')) {
118 return $this->http->wrapper()->query()->retrieve(
119 'objective_id',
120 $this->refinery->kindlyTo()->int()
121 );
122 }
123 return 0;
124 }
125
126 protected function initObjectiveIdsFromPost(): array
127 {
128 if ($this->http->wrapper()->post()->has('objective')) {
129 return $this->http->wrapper()->post()->retrieve(
130 'objective',
131 $this->refinery->kindlyTo()->listOf(
132 $this->refinery->kindlyTo()->int()
133 )
134 );
135 }
136 return [];
137 }
138
139 protected function initTestTypeFromQuery(): int
140 {
141 if ($this->http->wrapper()->query()->has('tt')) {
142 return $this->http->wrapper()->query()->retrieve(
143 'tt',
144 $this->refinery->kindlyTo()->int()
145 );
146 }
147 return 0;
148 }
149
150 public function getSettings(): ilLOSettings
151 {
152 return $this->settings;
153 }
154
155 protected function listObjectives(): void
156 {
157 ilSession::set('objective_mode', self::MODE_UNDEFINED);
158 if (!$this->access->checkAccess("write", '', $this->course_obj->getRefId())) {
159 $this->ilErr->raiseError($this->lng->txt("msg_no_perm_write"), $this->ilErr->MESSAGE);
160 }
161 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.crs_objectives.html', 'components/ILIAS/Course');
162 $this->toolbar->addButton(
163 $this->lng->txt('crs_add_objective'),
164 $this->ctrl->getLinkTarget($this, "'create")
165 );
166
167 $table = new ilCourseObjectivesTableGUI($this, $this->course_obj);
168 $table->setTitle($this->lng->txt('crs_objectives'), '', $this->lng->txt('crs_objectives'));
169 $table->parse(ilCourseObjective::_getObjectiveIds($this->course_obj->getId(), false));
170
171 $this->tpl->setVariable('OBJECTIVES_TABLE', $table->getHTML());
172 }
173
174 protected function questionOverview(): void
175 {
176 $this->tabs->setSubTabActive('crs_objective_overview_question_assignment');
177
178 if (!$this->access->checkAccess('write', '', $this->course_obj->getRefId())) {
179 $this->ilErr->raiseError($this->lng->txt('permission_denied'), $this->ilErr->WARNING);
180 }
181
182 $table = new ilCourseObjectiveQuestionsTableGUI($this, $this->course_obj);
183 $table->setTitle(
184 $this->lng->txt('crs_objectives_edit_question_assignments'),
185 '',
186 $this->lng->txt('crs_objectives')
187 );
188 $table->parse(ilCourseObjective::_getObjectiveIds($this->course_obj->getId(), false));
189 $this->tpl->setContent($table->getHTML());
190 }
191
192 protected function saveQuestionOverview(): void
193 {
194 if (!$this->access->checkAccess('write', '', $this->course_obj->getRefId())) {
195 $this->ilErr->raiseError($this->lng->txt('permission_denied'), $this->ilErr->WARNING);
196 }
197
198 $post_self_limit = [];
199 if ($this->http->wrapper()->post()->has('self')) {
200 $post_self_limit = $this->http->wrapper()->post()->retrieve(
201 'self',
202 $this->refinery->kindlyTo()->dictOf(
203 $this->refinery->kindlyTo()->float()
204 )
205 );
206 }
207 $post_final_limit = [];
208 if ($this->http->wrapper()->post()->has('final')) {
209 $post_final_limit = $this->http->wrapper()->post()->retrieve(
210 'final',
211 $this->refinery->kindlyTo()->dictOf(
212 $this->refinery->kindlyTo()->float()
213 )
214 );
215 }
216
217 foreach ($post_self_limit as $objective_id => $limit) {
218 $qst = new ilCourseObjectiveQuestion($objective_id);
219 $max_points = $qst->getSelfAssessmentPoints();
220
221 if ($limit < 0 || $limit > $max_points) {
222 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('crs_objective_limit_err'));
223 $this->questionOverview();
224 return;
225 }
226 }
227 foreach ($post_final_limit as $objective_id => $limit) {
228 $qst = new ilCourseObjectiveQuestion($objective_id);
229 $max_points = $qst->getFinalTestPoints();
230
231 if ($limit < 0 || $limit > $max_points) {
232 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('crs_objective_limit_err'));
233 $this->questionOverview();
234 return;
235 }
236 }
237
238 foreach ($post_self_limit as $objective_id => $limit) {
240 $objective_id,
242 $limit
243 );
244 }
245
246 foreach ($post_final_limit as $objective_id => $limit) {
248 $objective_id,
250 $limit
251 );
252 }
253
254 $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'));
255 $this->questionOverview();
256 }
257
258 protected function __initCourseObject(): void
259 {
261 if (!$this->course_obj = ilObjectFactory::getInstanceByRefId($this->course_id, false)) {
262 $this->logger->logStack(ilLogLevel::ERROR);
263 throw new RuntimeException('Course objectives GUI initialized without valid course instance');
264 }
265 }
266
267 public function __initObjectivesObject(int $a_id = 0): ilCourseObjective
268 {
269 return $this->objectives_obj = new ilCourseObjective($this->course_obj, $a_id);
270 }
271
272 public function __initLMObject($a_objective_id = 0): ilCourseObjectiveMaterials
273 {
274 return $this->objectives_lm_obj = new ilCourseObjectiveMaterials($a_objective_id);
275 }
276
277 public function __initQuestionObject($a_objective_id = 0): ilCourseObjectiveQuestion
278 {
279 $this->objectives_qst_obj = new ilCourseObjectiveQuestion($a_objective_id);
281 }
282
283 // end-patch lok
284
285 public function setSubTabs(string $a_active = ""): void
286 {
287 if ($a_active != "") {
288 $this->help->setScreenIdComponent("crs");
289 $this->help->setScreenId("crs_objective");
290 $this->help->setSubScreenId($a_active);
291 }
292 }
293
294 public function create(?ilPropertyFormGUI $form = null): void
295 {
296 $this->setSubTabs("create_obj");
297 ilSession::set('objective_mode', self::MODE_CREATE);
298
299 $this->ctrl->saveParameter($this, 'objective_id');
300
301 if (!$this->objective instanceof ilCourseObjective) {
302 $this->objective = new ilCourseObjective($this->course_obj, $this->initObjectiveIdFromQuery());
303 }
305 $this->initWizard(self::STEP_SETTINGS);
306 if (!$form instanceof ilPropertyFormGUI) {
307 $form = $this->initFormTitle('create');
308 }
309 $this->tpl->setContent($form->getHTML());
310 }
311
312 protected function edit(?ilPropertyFormGUI $form = null): void
313 {
314 ilSession::set('objective_mode', self::MODE_UPDATE);
315 $this->setSubTabs("edit_obj");
316 $this->ctrl->setParameter($this, 'objective_id', $this->initObjectiveIdFromQuery());
317
318 if (!$this->initObjectiveIdFromQuery()) {
319 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('crs_no_objective_selected'), true);
320 $this->ctrl->redirect($this, 'listObjectives');
321 }
322 if (!$this->objective instanceof ilCourseObjective) {
323 $this->objective = new ilCourseObjective($this->course_obj, $this->initObjectiveIdFromQuery());
324 }
325
327 $this->initWizard(self::STEP_SETTINGS);
328 if (!$form instanceof ilPropertyFormGUI) {
329 $form = $this->initFormTitle('create');
330 }
331 $this->tpl->setContent($form->getHTML());
332 }
333
334 protected function save(): void
335 {
336 if (!$this->access->checkAccess('write', '', $this->course_obj->getRefId())) {
337 $this->ilErr->raiseError($this->lng->txt('permission_denied'), $this->ilErr->WARNING);
338 }
339
340 $this->ctrl->saveParameter($this, 'objective_id');
341 $this->objective = new ilCourseObjective($this->course_obj, $this->initObjectiveIdFromQuery());
342 $form = $this->initFormTitle('create');
343 if ($form->checkInput()) {
344 $this->objective->setTitle($form->getInput('title'));
345 $this->objective->setDescription($form->getInput('description'));
346 $this->objective->setPasses(0);
347
348 if (!$this->initObjectiveIdFromQuery()) {
349 $objective_id = $this->objective->add();
350 $this->tpl->setOnScreenMessage('success', $this->lng->txt('crs_added_objective'), true);
351 } else {
352 $this->objective->update();
353 $this->tpl->setOnScreenMessage('success', $this->lng->txt('crs_objective_modified'), true);
354 $objective_id = $this->initObjectiveIdFromQuery();
355 }
356 } elseif ($this->initObjectiveIdFromQuery()) {
357 $form->setValuesByPost();
358 $this->edit($form);
359 return;
360 } else {
362 $this->create($form);
363 return;
364 }
365 if (ilSession::get('objective_mode') != self::MODE_CREATE) {
366 $this->ctrl->returnToParent($this);
367 }
368 $this->ctrl->setParameter($this, 'objective_id', $objective_id);
369 $this->ctrl->redirect($this, 'materialAssignment');
370 }
371
372 protected function materialAssignment(): void
373 {
374 if (!$this->access->checkAccess('write', '', $this->course_obj->getRefId())) {
375 $this->ilErr->raiseError($this->lng->txt('permission_denied'), $this->ilErr->WARNING);
376 }
377 if (!$this->initObjectiveIdFromQuery()) {
378 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('crs_no_objective_selected'), true);
379 $this->ctrl->redirect($this, 'listObjectives');
380 }
381
382 $this->setSubTabs("materials");
383 $this->ctrl->saveParameter($this, 'objective_id');
384 $this->objective = new ilCourseObjective($this->course_obj, $this->initObjectiveIdFromQuery());
385
387 $this,
388 $this->course_obj,
390 );
391 $table->setTitle(
392 $this->lng->txt('crs_objective_wiz_materials'),
393 '',
394 $this->lng->txt('crs_objectives')
395 );
396 $table->parse(ilCourseObjectiveMaterials::_getAssignableMaterials($this->course_obj->getRefId()));
398 $this->initWizard(self::STEP_MATERIAL_ASSIGNMENT);
399 $this->tpl->setContent($table->getHTML());
400 }
401
405 private function getIntArrayFromPost(string $key): array
406 {
407 if ($this->http->wrapper()->post()->has($key)) {
408 return $this->http->wrapper()->post()->retrieve(
409 $key,
410 $this->refinery->kindlyTo()->listOf(
411 $this->refinery->kindlyTo()->int()
412 )
413 );
414 }
415 return [];
416 }
417
421 private function getStringArrayFromPost(string $key): array
422 {
423 if ($this->http->wrapper()->post()->has($key)) {
424 return $this->http->wrapper()->post()->retrieve(
425 $key,
426 $this->refinery->kindlyTo()->listOf(
427 $this->refinery->kindlyTo()->string()
428 )
429 );
430 }
431 return [];
432 }
433
434 protected function updateMaterialAssignment(): void
435 {
436 if (!$this->access->checkAccess('write', '', $this->course_obj->getRefId())) {
437 $this->ilErr->raiseError($this->lng->txt('permission_denied'), $this->ilErr->WARNING);
438 }
439 if (!$this->initObjectiveIdFromQuery()) {
440 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('crs_no_objective_selected'), true);
441 $this->ctrl->redirect($this, 'listObjectives');
442 }
443
445
446 $visibleMaterials = $this->getIntArrayFromPost('visible_materials');
447 $visibleChapters = $this->getStringArrayFromPost('visible_chapters');
448 $materials = $this->getIntArrayFromPost('materials');
449 $chapters = $this->getStringArrayFromPost('chapters');
450
451 foreach ($visibleMaterials as $node_id) {
452 $obj_id = $this->objectDataCache->lookupObjId((int) $node_id);
453 if (!in_array($node_id, $materials)) {
454 $this->objectives_lm_obj->deleteMaterial($node_id, $obj_id);
455 continue;
456 }
457 if ($this->objectives_lm_obj->isMaterialAssigned($node_id, $obj_id)) {
458 continue;
459 }
460 $this->objectives_lm_obj->setLMRefId($node_id);
461 $this->objectives_lm_obj->setLMObjId($obj_id);
462 $this->objectives_lm_obj->setType($this->objectDataCache->lookupType($obj_id));
463 $this->objectives_lm_obj->add();
464 }
465
466 foreach ($visibleChapters as $chapter) {
467 list($ref_id, $chapter_id) = explode('_', $chapter);
468 if (!in_array($chapter, $chapters)) {
469 $this->objectives_lm_obj->deleteMaterial($ref_id, $chapter_id);
470 continue;
471 }
472 if ($this->objectives_lm_obj->isMaterialAssigned($ref_id, $chapter_id)) {
473 continue;
474 }
475 $this->objectives_lm_obj->setLMRefId($ref_id);
476 $this->objectives_lm_obj->setLMObjId($chapter_id);
477 $this->objectives_lm_obj->setType(ilLMObject::_lookupType($chapter_id));
478 $this->objectives_lm_obj->add();
479 }
480
481 $this->tpl->setOnScreenMessage('success', $this->lng->txt('crs_objectives_assigned_lm'));
482 if (ilSession::get('objective_mode') != self::MODE_CREATE) {
483 $this->tpl->setOnScreenMessage('success', $this->lng->txt('crs_objectives_assigned_lm'), true);
484 $this->ctrl->returnToParent($this);
485 }
486 if (
487 $this->getSettings()->worksWithInitialTest() &&
488 !$this->getSettings()->hasSeparateInitialTests()
489 ) {
491 } elseif (!$this->getSettings()->hasSeparateQualifiedTests()) {
492 $this->finalTestAssignment();
493 } else {
494 $this->ctrl->redirectByClass(ilLOEditorGUI::class);
495 }
496 }
497
498 protected function selfAssessmentAssignment(): void
499 {
500 if (!$this->access->checkAccess('write', '', $this->course_obj->getRefId())) {
501 $this->ilErr->raiseError($this->lng->txt('permission_denied'), $this->ilErr->WARNING);
502 }
503 if (!$this->initObjectiveIdFromQuery()) {
504 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('crs_no_objective_selected'), true);
505 $this->ctrl->redirect($this, 'listObjectives');
506 }
507
508 $this->setSubTabs("self_ass_assign");
509
510 $this->ctrl->saveParameter($this, 'objective_id');
511
512 $this->objective = new ilCourseObjective($this->course_obj, $this->initObjectiveIdFromQuery());
513
514 // begin-patch lok
515 $this->ctrl->setParameter($this, 'tt', ilLOSettings::TYPE_TEST_INITIAL);
516 $this->test_type = ilLOSettings::TYPE_TEST_INITIAL;
519 return;
520 }
521 // end-patch lok
523 $this,
524 $this->course_obj,
527 );
528 $table->setTitle(
529 $this->lng->txt('crs_objective_wiz_self'),
530 '',
531 $this->lng->txt('crs_objective')
532 );
533 $table->parse(ilCourseObjectiveQuestion::_getAssignableTests($this->course_obj->getRefId()));
534
536 $this->initWizard(self::STEP_INITIAL_TEST_ASSIGNMENT);
537 $this->tpl->setContent($table->getHTML());
538 }
539
540 protected function updateSelfAssessmentAssignment(): void
541 {
542 $checked_questions = [];
543 if ($this->http->wrapper()->post()->has('questions')) {
544 $checked_questions = $this->http->wrapper()->post()->retrieve(
545 'questions',
546 $this->refinery->kindlyTo()->dictOf(
547 $this->refinery->kindlyTo()->string()
548 )
549 );
550 }
551
552 if (!$this->access->checkAccess('write', '', $this->course_obj->getRefId())) {
553 $this->ilErr->raiseError($this->lng->txt('permission_denied'), $this->ilErr->WARNING);
554 }
555 if (!$this->initObjectiveIdFromQuery()) {
556 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('crs_no_objective_selected'), true);
557 $this->ctrl->redirect($this, 'listObjectives');
558 }
560
561 // Delete unchecked
562 foreach ($this->objectives_qst_obj->getSelfAssessmentQuestions() as $question) {
563 $id = $question['ref_id'] . '_' . $question['question_id'];
564 if (!in_array($id, $checked_questions)) {
565 $this->objectives_qst_obj->delete($question['qst_ass_id']);
566 }
567 }
568 // Add checked
569 foreach ($checked_questions as $question_id) {
570 list($test_ref_id, $qst_id) = explode('_', $question_id);
571 $test_obj_id = $this->objectDataCache->lookupObjId((int) $test_ref_id);
572
573 if ($this->objectives_qst_obj->isSelfAssessmentQuestion($qst_id)) {
574 continue;
575 }
576 $this->objectives_qst_obj->setTestStatus(ilCourseObjectiveQuestion::TYPE_SELF_ASSESSMENT);
577 $this->objectives_qst_obj->setTestRefId($test_ref_id);
578 $this->objectives_qst_obj->setTestObjId($test_obj_id);
579 $this->objectives_qst_obj->setQuestionId($qst_id);
580 $this->objectives_qst_obj->add();
581 }
582
583 // TODO: not nice
584 $this->questions = new ilCourseObjectiveQuestion($this->initObjectiveIdFromQuery());
585
586 if ($checked_questions) {
587 $this->tpl->setOnScreenMessage('success', $this->lng->txt('crs_objectives_assigned_lm'));
588 $this->selfAssessmentLimits();
589 } else {
590 switch (ilSession::get('objective_mode')) {
592 $this->finalTestAssignment();
593 return;
594
597 $this->tpl->setOnScreenMessage('success', $this->lng->txt('crs_objectives_assigned_lm'));
598 }
599 }
600 }
601
602 protected function selfAssessmentLimits(): void
603 {
604 if (!$this->access->checkAccess('write', '', $this->course_obj->getRefId())) {
605 $this->ilErr->raiseError($this->lng->txt('permission_denied'), $this->ilErr->WARNING);
606 }
607 if (!$this->initObjectiveIdFromQuery()) {
608 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('crs_no_objective_selected'), true);
609 $this->ctrl->redirect($this, 'listObjectives');
610 }
611
612 $this->setSubTabs("self_ass_limits");
613
614 $this->ctrl->saveParameter($this, 'objective_id');
615 $this->objective = new ilCourseObjective($this->course_obj, $this->initObjectiveIdFromQuery());
616
618 $this->initWizard(self::STEP_INITIAL_TEST_LIMIT);
619
620 $this->initFormLimits('selfAssessment');
621 $this->tpl->setContent($this->form->getHTML());
622 }
623
624 protected function updateSelfAssessmentLimits(): void
625 {
626 if (!$this->access->checkAccess('write', '', $this->course_obj->getRefId())) {
627 $this->ilErr->raiseError($this->lng->txt('permission_denied'), $this->ilErr->WARNING);
628 }
629 if (!$this->initObjectiveIdFromQuery()) {
630 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('crs_no_objective_selected'), true);
631 $this->ctrl->redirect($this, 'listObjectives');
632 }
633 $objective_id = $this->initObjectiveIdFromQuery();
634 $this->__initQuestionObject($objective_id);
635
636 $limit = $this->http->wrapper()->post()->retrieve(
637 'limit',
638 $this->refinery->byTrying([
639 $this->refinery->kindlyTo()->int(),
640 $this->refinery->always(0)
641 ])
642 );
643 if ($limit < 1 || $limit > 100) {
644 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('crs_objective_err_limit'));
645 $this->selfAssessmentLimits();
646 return;
647 }
648
649 foreach ($this->objectives_qst_obj->getSelfAssessmentTests() as $test) {
650 $this->objectives_qst_obj->setTestStatus(ilCourseObjectiveQuestion::TYPE_SELF_ASSESSMENT);
651 $this->objectives_qst_obj->setTestSuggestedLimit($limit);
652 $this->objectives_qst_obj->updateTest($test['test_objective_id']);
654 }
655
656 $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
657 if (!$this->settings->hasSeparateQualifiedTests()) {
658 $this->finalTestAssignment();
659 return;
660 }
661 $this->ctrl->returnToParent($this);
662 }
663
664 protected function finalTestAssignment(): void
665 {
666 if (!$this->access->checkAccess('write', '', $this->course_obj->getRefId())) {
667 $this->ilErr->raiseError($this->lng->txt('permission_denied'), $this->ilErr->WARNING);
668 }
669 if (!$this->initObjectiveIdFromQuery()) {
670 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('crs_no_objective_selected'), true);
671 $this->ctrl->redirect($this, 'listObjectives');
672 }
673
674 $this->setSubTabs("final_test_assign");
675
676 $this->ctrl->saveParameter($this, 'objective_id');
677 $this->objective = new ilCourseObjective($this->course_obj, $this->initObjectiveIdFromQuery());
678
679 // begin-patch lok
680 $this->ctrl->setParameter($this, 'tt', ilLOSettings::TYPE_TEST_QUALIFIED);
681 $this->test_type = ilLOSettings::TYPE_TEST_QUALIFIED;
684 return;
685 }
686 // end-patch lok
687
689 $this,
690 $this->course_obj,
693 );
694
695 $table->setTitle(
696 $this->lng->txt('crs_objective_wiz_final'),
697 '',
698 $this->lng->txt('crs_objective')
699 );
700 $table->parse(ilCourseObjectiveQuestion::_getAssignableTests($this->course_obj->getRefId()));
702 $this->initWizard(self::STEP_FINAL_TEST_ASSIGNMENT);
703 $this->tpl->setContent($table->getHTML());
704 }
705
706 protected function isRandomTestType(int $a_tst_type = 0): bool
707 {
708 if ($a_tst_type === 0) {
709 $a_tst_type = $this->test_type;
710 }
711
712 $tst_ref_id = $this->getSettings()->getTestByType($a_tst_type);
713 if ($tst_ref_id === 0) {
714 return false;
715 }
717 }
718
719 protected function showRandomTestAssignment(?ilPropertyFormGUI $form = null): void
720 {
721 $this->ctrl->saveParameter($this, 'objective_id');
722 $this->objective = new ilCourseObjective($this->course_obj, $this->initObjectiveIdFromQuery());
723 if ($this->test_type === ilLOSettings::TYPE_TEST_UNDEFINED) {
724 $this->test_type = $this->initTestTypeFromQuery();
725 }
726 $this->ctrl->setParameter($this, 'tt', $this->test_type);
727 $this->setSubTabs("rand_test_assign");
728
729 if (!$form instanceof ilPropertyFormGUI) {
730 $form = $this->initFormRandom();
731 }
732
734 if ($this->test_type === ilLOSettings::TYPE_TEST_INITIAL) {
735 $this->initWizard(self::STEP_INITIAL_TEST_ASSIGNMENT);
736 } else {
737 $this->initWizard(self::STEP_FINAL_TEST_ASSIGNMENT);
738 }
739
740 $this->tpl->setContent($form->getHTML());
741 }
742
743 protected function initFormRandom(): ilPropertyFormGUI
744 {
745 $form = new ilPropertyFormGUI();
746 $form->setFormAction($this->ctrl->getFormAction($this));
747
748 if ($this->test_type == ilLOSettings::TYPE_TEST_INITIAL) {
749 $form->setTitle($this->lng->txt('crs_loc_form_random_limits_it'));
750 } else {
751 $form->setTitle($this->lng->txt('crs_loc_form_random_limits_qt'));
752 }
753
754 $form->addCommandButton('saveRandom', $this->lng->txt('save'));
755
756 $options = new ilRadioGroupInputGUI($this->lng->txt('crs_loc_rand_assign_qpl'), 'type');
757 $options->setValue('1');
758 $options->setRequired(true);
759
760 $ass_qpl = new ilRadioOption($this->lng->txt('crs_loc_rand_assign_qpl'), '1');
761 $options->addOption($ass_qpl);
762
763 $qpl = new ilSelectInputGUI($this->lng->txt('crs_loc_rand_qpl'), 'qpl');
764 $qpl->setRequired(true);
765 $qpl->setMulti(true, false);
766 $qpl->setOptions($this->getRandomTestQplOptions());
767
769 $this->course_obj->getId(),
770 $this->initObjectiveIdFromQuery(),
771 ilObject::_lookupObjId($this->getSettings()->getTestByType($this->test_type)),
772 $this->test_type
773 );
774
775 $qpl->setValue((string) ($sequences[0] ?? ''));
776 $qpl->setMultiValues($sequences);
777 $ass_qpl->addSubItem($qpl);
778
779 // points
780 $per = new ilNumberInputGUI($this->lng->txt('crs_loc_perc'), 'per');
781 $per->setValue(
783 $this->course_obj->getId(),
784 $this->initObjectiveIdFromQuery(),
785 $this->test_type
786 )
787 );
788 $per->setSize(3);
789 $per->setMinValue(1);
790 $per->setMaxValue(100);
791 $per->setRequired(true);
792 $ass_qpl->addSubItem($per);
793 $form->addItem($options);
794 return $form;
795 }
796
797 protected function getRandomTestQplOptions(): array
798 {
799 $tst = null;
800 $tst_ref_id = $this->getSettings()->getTestByType($this->test_type);
801 if ($tst_ref_id) {
802 $tst = ilObjectFactory::getInstanceByRefId($tst_ref_id, false);
803 }
804 if (!$tst instanceof ilObjTest) {
805 return array();
806 }
808 $this->db,
809 $tst,
811 $this->db,
812 $tst
813 )
814 );
815
816 $list->loadDefinitions();
817 $translator = new ilTestQuestionFilterLabelTranslator($this->db, $this->lng);
818 $translator->loadLabels($list);
819
820 $options[0] = $this->lng->txt('select_one');
821 foreach ($list as $definition) {
823 $title = $definition->getPoolTitle();
824 // fau: taxFilter/typeFilter - get title for extended filter conditions
825 $filterTitle = array();
826 $filterTitle[] = $translator->getTaxonomyFilterLabel($definition->getMappedTaxonomyFilter());
827 $filterTitle[] = $translator->getTypeFilterLabel($definition->getTypeFilter());
828 if (!empty($filterTitle)) {
829 $title .= ' -> ' . implode(' / ', $filterTitle);
830 }
831 $options[$definition->getId()] = $title;
832 }
833 return $options;
834 }
835
836 protected function saveRandom(): void
837 {
838 $this->ctrl->saveParameter($this, 'objective_id');
839 $this->ctrl->setParameter($this, 'tt', $this->initTestTypeFromQuery());
840 $this->objective = new ilCourseObjective($this->course_obj, $this->initObjectiveIdFromQuery());
841 $this->test_type = $this->initTestTypeFromQuery();
842
843 $form = $this->initFormRandom();
844 if ($form->checkInput()) {
846 $this->course_obj->getId(),
847 $this->initObjectiveIdFromQuery(),
848 $this->test_type
849 );
850
851 $qst = $this->__initQuestionObject($this->initObjectiveIdFromQuery());
852 $qst->deleteByTestType(
853 ($this->test_type == ilLOSettings::TYPE_TEST_INITIAL) ?
856 );
857 $ref_id = $this->getSettings()->getTestByType($this->test_type);
858 foreach (array_unique((array) $form->getInput('qpl')) as $qpl_id) {
860 $this->course_obj->getId(),
861 $this->initObjectiveIdFromQuery(),
862 $this->test_type,
863 $qpl_id
864 );
865 $rnd->setLimit($form->getInput('per'));
866 $rnd->setTestId(ilObject::_lookupObjId($ref_id));
867 $rnd->create();
868 }
869 } else {
871 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('err_check_input'));
872 $this->showRandomTestAssignment($form);
873 return;
874 }
875
876 $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
877 if (
878 $this->test_type == ilLOSettings::TYPE_TEST_QUALIFIED ||
879 $this->getSettings()->hasSeparateQualifiedTests()
880 ) {
881 $this->ctrl->returnToParent($this);
882 } else {
883 $this->ctrl->redirect($this, 'finalTestAssignment');
884 }
885 }
886
887 protected function updateFinalTestAssignment(): void
888 {
889 $checked_questions = [];
890 if ($this->http->wrapper()->post()->has('questions')) {
891 $checked_questions = $this->http->wrapper()->post()->retrieve(
892 'questions',
893 $this->refinery->kindlyTo()->dictOf(
894 $this->refinery->kindlyTo()->string()
895 )
896 );
897 }
898
899 if (!$this->access->checkAccess('write', '', $this->course_obj->getRefId())) {
900 $this->ilErr->raiseError($this->lng->txt('permission_denied'), $this->ilErr->WARNING);
901 }
902 if (!$this->initObjectiveIdFromQuery()) {
903 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('crs_no_objective_selected'), true);
904 $this->ctrl->redirect($this, 'listObjectives');
905 }
906
908
909 // Delete unchecked
910 foreach ($this->objectives_qst_obj->getFinalTestQuestions() as $question) {
911 $id = $question['ref_id'] . '_' . $question['question_id'];
912 if (!in_array($id, $checked_questions)) {
913 $this->objectives_qst_obj->delete($question['qst_ass_id']);
914 }
915 }
916 // Add checked
917 foreach ($checked_questions as $question_id) {
918 list($test_ref_id, $qst_id) = explode('_', $question_id);
919 $test_obj_id = $this->objectDataCache->lookupObjId((int) $test_ref_id);
920
921 if ($this->objectives_qst_obj->isFinalTestQuestion($qst_id)) {
922 continue;
923 }
924
925 $this->objectives_qst_obj->setTestStatus(ilCourseObjectiveQuestion::TYPE_FINAL_TEST);
926 $this->objectives_qst_obj->setTestRefId($test_ref_id);
927 $this->objectives_qst_obj->setTestObjId($test_obj_id);
928 $this->objectives_qst_obj->setQuestionId($qst_id);
929 $this->objectives_qst_obj->add();
930 }
931
932 // TODO: not nice
933 $this->questions = new ilCourseObjectiveQuestion($this->initObjectiveIdFromQuery());
934 $this->tpl->setOnScreenMessage('success', $this->lng->txt('crs_objectives_assigned_lm'));
935
936 if ($checked_questions) {
937 $this->finalTestLimits();
938 return;
939 }
940 $this->finalTestAssignment();
941 }
942
946 protected function finalTestLimits(): void
947 {
948 if (!$this->access->checkAccess('write', '', $this->course_obj->getRefId())) {
949 $this->ilErr->raiseError($this->lng->txt('permission_denied'), $this->ilErr->WARNING);
950 }
951 if (!$this->initObjectiveIdFromQuery()) {
952 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('crs_no_objective_selected'), true);
953 $this->ctrl->returnToParent($this);
954 }
955
956 $this->setSubTabs("final_test_limits");
957
958 $this->ctrl->saveParameter($this, 'objective_id');
959 $this->objective = new ilCourseObjective($this->course_obj, $this->initObjectiveIdFromQuery());
960
962 $this->initWizard(self::STEP_FINAL_TEST_LIMIT);
963
964 $this->initFormLimits('final');
965 $this->tpl->setContent($this->form->getHTML());
966 }
967
968 protected function updateFinalTestLimits(): void
969 {
970 if (!$this->access->checkAccess('write', '', $this->course_obj->getRefId())) {
971 $this->ilErr->raiseError($this->lng->txt('permission_denied'), $this->ilErr->WARNING);
972 }
973 if (!$this->initObjectiveIdFromQuery()) {
974 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('crs_no_objective_selected'), true);
975 $this->ctrl->redirect($this, 'listObjectives');
976 }
977 $objective_id = $this->initObjectiveIdFromQuery();
978 $this->__initQuestionObject($objective_id);
979
980 $limit = 0;
981 if ($this->http->wrapper()->post()->has('limit')) {
982 $limit = $this->http->wrapper()->post()->retrieve(
983 'limit',
984 $this->refinery->kindlyTo()->int()
985 );
986 }
987
988 if ($limit < 1 || $limit > 100) {
989 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('crs_objective_err_limit'));
990 $this->finalTestLimits();
991 return;
992 }
993
994 foreach ($this->objectives_qst_obj->getFinalTests() as $test) {
995 $this->objectives_qst_obj->setTestStatus(ilCourseObjectiveQuestion::TYPE_FINAL_TEST);
996 $this->objectives_qst_obj->setTestSuggestedLimit($limit);
997 $this->objectives_qst_obj->updateTest($test['test_objective_id']);
999 }
1000
1001 if (ilSession::get('objective_mode') != self::MODE_CREATE) {
1002 $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
1003 } else {
1004 $this->tpl->setOnScreenMessage('success', $this->lng->txt('crs_added_objective'), true);
1005 }
1006 $this->ctrl->returnToParent($this);
1007 }
1008
1009 protected function initFormLimits(string $a_mode): ilPropertyFormGUI
1010 {
1011 if (!is_object($this->form)) {
1012 $this->form = new ilPropertyFormGUI();
1013 }
1014 $this->form->setFormAction($this->ctrl->getFormAction($this));
1015 $this->form->setTableWidth('100%');
1016 //$this->form->setTitleIcon(ilUtil::getImagePath('standard/icon_lobj.svg'),$this->lng->txt('crs_objective'));
1017
1018 $tests = [];
1019 $max_points = 0;
1020 switch ($a_mode) {
1021 case 'selfAssessment':
1022 $this->form->setTitle($this->lng->txt('crs_objective_wiz_self_limit'));
1023 $this->form->addCommandButton('updateSelfAssessmentLimits', $this->lng->txt('crs_wiz_next'));
1024
1025 $tests = $this->objectives_qst_obj->getSelfAssessmentTests();
1026 $max_points = $this->objectives_qst_obj->getSelfAssessmentPoints();
1027
1028 break;
1029
1030 case 'final':
1031 $this->form->setTitle($this->lng->txt('crs_objective_wiz_final_limit'));
1032 $this->form->addCommandButton('updateFinalTestLimits', $this->lng->txt('crs_wiz_next'));
1033
1034 $tests = $this->objectives_qst_obj->getFinalTests();
1035 $max_points = $this->objectives_qst_obj->getFinalTestPoints();
1036
1037 break;
1038 }
1039
1040 $over = new ilCustomInputGUI($this->lng->txt('crs_objective_qst_summary'), '');
1041
1042 $tpl = new ilTemplate('tpl.crs_objective_qst_summary.html', true, true, 'components/ILIAS/Course');
1043
1044 $limit = 0;
1045
1046 foreach ($tests as $test) {
1047 $GLOBALS['DIC']['ilLog']->write(__METHOD__ . ': ' . print_r($test, true));
1048
1049 $limit = $test['limit'];
1050
1051 foreach ($this->objectives_qst_obj->getQuestionsOfTest($test['obj_id']) as $question) {
1052 $tpl->setCurrentBlock('qst');
1053 $tpl->setVariable('QST_TITLE', $question['title']);
1054 if (strlen($question['description'])) {
1055 $tpl->setVariable('QST_DESCRIPTION', $question['description']);
1056 }
1057 $tpl->setVariable('QST_POINTS', $question['points'] . ' ' .
1058 $this->lng->txt('crs_objective_points'));
1059 $tpl->parseCurrentBlock();
1060 }
1061 $tpl->setCurrentBlock('tst');
1062 $tpl->setVariable('TST_TITLE', ilObject::_lookupTitle($test['obj_id']));
1063 if ($desc = ilObject::_lookupDescription($test['obj_id'])) {
1064 $tpl->setVariable('TST_DESC', $desc);
1065 }
1066 $tpl->setVariable('TST_TYPE_IMG', ilObject::_getIcon($test['obj_id'], 'tiny', 'tst'));
1067 $tpl->setVariable('TST_ALT_IMG', $this->lng->txt('obj_tst'));
1068 $tpl->parseCurrentBlock();
1069 }
1070
1071 $tpl->setVariable('TXT_ALL_POINTS', $this->lng->txt('crs_objective_all_points'));
1072 $tpl->setVariable('TXT_POINTS', $this->lng->txt('crs_objective_points'));
1073 $tpl->setVariable('POINTS', $max_points);
1074
1075 $over->setHtml($tpl->get());
1076 $this->form->addItem($over);
1077
1078 // points
1079 $req = new ilNumberInputGUI($this->lng->txt('crs_loc_perc'), 'limit');
1080 $req->setValue($limit);
1081 $req->setSize(3);
1082 $req->setMinValue(1);
1083 $req->setMaxValue(100);
1084 $req->setRequired(true);
1085 switch ($a_mode) {
1086 case 'selfAssessment':
1087 $req->setInfo($this->lng->txt('crs_obj_initial_req_info'));
1088 break;
1089
1090 case 'final':
1091 $req->setInfo($this->lng->txt('crs_obj_final_req_info'));
1092 break;
1093 }
1094 $this->form->addItem($req);
1095 return $this->form;
1096 }
1097
1098 protected function initFormTitle(string $a_mode): ilPropertyFormGUI
1099 {
1100 $this->form = new ilPropertyFormGUI();
1101 $this->form->setFormAction($this->ctrl->getFormAction($this));
1102 //$this->form->setTitleIcon(ilUtil::getImagePath('standard/icon_lobj.svg'),$this->lng->txt('crs_objective'));
1103
1104 switch ($a_mode) {
1105 case 'create':
1106 $this->form->setTitle($this->lng->txt('crs_objective_wiz_title'));
1107 $this->form->addCommandButton('save', $this->lng->txt('crs_wiz_next'));
1108 // begin-patch lok
1109 #$this->form->addCommandButton('listObjectives',$this->lng->txt('cancel'));
1110 // end-patch lok
1111 break;
1112
1113 case 'update':
1114 break;
1115 }
1116
1117 $title = new ilTextInputGUI($this->lng->txt('title'), 'title');
1118 $title->setValue($this->objective->getTitle());
1119 $title->setRequired(true);
1120 $title->setSize(40);
1121 $title->setMaxLength(70);
1122 $this->form->addItem($title);
1123
1124 $desc = new ilTextAreaInputGUI($this->lng->txt('description'), 'description');
1125 $desc->setValue($this->objective->getDescription());
1126 $desc->setCols(40);
1127 $desc->setRows(5);
1128 $this->form->addItem($desc);
1129 return $this->form;
1130 }
1131
1132 protected function initWizard(int $active_step): void
1133 {
1134 $steps = [];
1135 $step_positions = [];
1136
1137 // 1 Settings
1138 $title = $this->lng->txt('crs_objective_wiz_title');
1139 $link = $this->ctrl->getLinkTarget($this, 'edit');
1140
1141 $steps[] = $this->workflow->step($title, "", $link);
1142 $step_positions[self::STEP_SETTINGS] = count($steps) - 1;
1143
1144 // 2 Material
1145 $title = $this->lng->txt('crs_objective_wiz_materials');
1146 $link = $this->ctrl->getLinkTarget($this, 'materialAssignment');
1147 $steps[] = $this->workflow->step($title, "", $link);
1148 $step_positions[self::STEP_MATERIAL_ASSIGNMENT] = count($steps) - 1;
1149
1150 if ($this->getSettings()->worksWithInitialTest() && !$this->getSettings()->hasSeparateInitialTests()) {
1151 // 3 initial
1152 $title = $this->lng->txt('crs_objective_wiz_self');
1153 $link = $this->getSettings()->worksWithInitialTest()
1154 ? $this->ctrl->getLinkTarget($this, 'selfAssessmentAssignment')
1155 : null;
1156
1157 $steps[] = $this->workflow->step($title, "", $link)
1158 ->withAvailability($link == null ? Step::NOT_AVAILABLE : Step::AVAILABLE);
1159 $step_positions[self::STEP_INITIAL_TEST_ASSIGNMENT] = count($steps) - 1;
1160
1162 // 4 initial limit
1163 $title = $this->lng->txt('crs_objective_wiz_self_limit');
1164 $link = count($this->objectives_qst_obj->getSelfAssessmentQuestions())
1165 && $this->getSettings()->worksWithInitialTest()
1166 ? $this->ctrl->getLinkTarget($this, 'selfAssessmentLimits')
1167 : null;
1168 $steps[] = $this->workflow->step($title, "", $link)
1169 ->withAvailability($link == null ? Step::NOT_AVAILABLE : Step::AVAILABLE);
1170 $step_positions[self::STEP_INITIAL_TEST_LIMIT] = count($steps) - 1;
1171 }
1172 }
1173
1174 if (!$this->getSettings()->hasSeparateQualifiedTests()) {
1175 // 5 final
1176 $title = $this->lng->txt('crs_objective_wiz_final');
1177 $link = $this->ctrl->getLinkTarget($this, 'finalTestAssignment');
1178 $steps[] = $this->workflow->step($title, "", $link);
1179 $step_positions[self::STEP_FINAL_TEST_ASSIGNMENT] = count($steps) - 1;
1180
1182 // 6 final limit
1183 $title = $this->lng->txt('crs_objective_wiz_final_limit');
1184 $link = count($this->objectives_qst_obj->getFinalTestQuestions())
1185 ? $this->ctrl->getLinkTarget($this, 'finalTestLimits')
1186 : null;
1187 $steps[] = $this->workflow->step($title, "", $link)
1188 ->withAvailability($link == null ? Step::NOT_AVAILABLE : Step::AVAILABLE);
1189 $step_positions[self::STEP_FINAL_TEST_LIMIT] = count($steps) - 1;
1190 }
1191 }
1192
1193 $list = $this->workflow->linear(
1194 $this->lng->txt('crs_checklist_objective'),
1195 $steps
1196 );
1197 if (!empty($step_positions[$active_step])) {
1198 $list = $list->withActive($step_positions[$active_step]);
1199 }
1200 $this->tpl->setRightContent($this->renderer->render($list));
1201 }
1202}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
renderer()
Builds data types.
Definition: Factory.php:36
TableGUI for material assignments of course objectives.
class ilCourseObjectiveMaterials
static _getAssignableMaterials(int $a_container_id)
Get an array of course material ids that can be assigned to learning objectives No tst,...
TableGUI for question assignments of course objectives.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getAssignableTests(int $a_container_ref_id)
static _updateTestLimits(int $a_objective_id, int $a_status, int $a_limit)
class ilcourseobjective
static _getObjectiveIds(int $course_id, bool $a_activated_only=false)
class ilobjcourseobjectivesgui
create(?ilPropertyFormGUI $form=null)
edit(?ilPropertyFormGUI $form=null)
ilCourseObjectiveMaterials $objectives_lm_obj
ilCourseObjectiveQuestion $objectives_qst_obj
showRandomTestAssignment(?ilPropertyFormGUI $form=null)
ilCourseObjectiveQuestion $questions
ilGlobalTemplateInterface $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a custom property in a property form.
Error Handling & global info handling.
setFormAction(string $a_formaction)
Help GUI class.
static _lookupType(int $a_obj_id, int $a_lm_id=0)
static lookupLimit(int $a_container_id, int $a_objective_id, int $a_test_type)
static deleteForObjectiveAndTestType(int $a_course_id, int $a_objective_id, int $a_tst_type)
static lookupSequencesByType(int $a_container_id, int $a_objective_id, int $a_test_id, int $a_test_type)
Settings for LO courses.
static getInstanceByObjId(int $a_obj_id)
static updateResultLimit(int $a_objective_id, int $a_test_type, int $a_limit)
language handling
Component logger with individual log levels by component id.
This class represents a number property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupRandomTest(int $obj_id)
class ilObjectDataCache
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
static _lookupDescription(int $obj_id)
This class represents a property form user interface.
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
This class represents a property in a property form.
This class represents an option in a radio group.
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
This class represents a selection list property in a property form.
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
Interface GlobalHttpState.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
This is the interface for a workflow factory.
Definition: Factory.php:29
This describes a Workflow Step.
Definition: Step.php:30
An entity that renders components to a string output.
Definition: Renderer.php:31
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface ilDBInterface.
$ref_id
Definition: ltiauth.php:66
static http()
Fetches the global http state from ILIAS.
form( $class_path, string $cmd, string $submit_caption="")
catch(\Exception $e) $req
Definition: xapiproxy.php:91
global $DIC
Definition: shib_login.php:26
$GLOBALS["DIC"]
Definition: wac.php:54