Skip to content

Commit d8b75c5

Browse files
committed
0030807: Sitzungen ohne Titel im Slate (bspw. "Zuletzt besucht") nicht aufrufbar
1 parent e5ca380 commit d8b75c5

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

Modules/Session/classes/class.ilObjSessionGUI.php

+15-16
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,6 @@ public function executeCommand()
168168
$form = $this->initCreateForm("sess");
169169
} else {
170170
$form = $this->initForm("edit");
171-
if ($form === true) {
172-
$form = $this->form;
173-
}
174171
}
175172
$ilCtrl->forwardCommand($form);
176173
break;
@@ -770,8 +767,7 @@ protected function initCreateForm($a_new_type)
770767
if (!is_object($this->object)) {
771768
$this->object = new ilObjSession();
772769
}
773-
$this->initForm('create');
774-
return $this->form;
770+
return $this->initForm('create');
775771
}
776772

777773
/**
@@ -806,10 +802,13 @@ public function saveObject($a_redirect_on_success = true)
806802

807803
$this->ctrl->saveParameter($this, "new_type");
808804

809-
$this->initForm('create');
805+
$form = $this->initForm('create');
810806
$ilErr->setMessage('');
811-
if (!$this->form->checkInput()) {
807+
if (!$form->checkInput()) {
808+
$form->setValuesByPost();
812809
$ilErr->setMessage($this->lng->txt('err_check_input'));
810+
$this->createObject($form);
811+
return false;
813812
}
814813

815814
if (
@@ -1057,10 +1056,13 @@ public function updateObject()
10571056

10581057
$old_autofill = $this->object->hasWaitingListAutoFill();
10591058

1060-
$this->initForm('edit');
1059+
$form = $this->initForm('edit');
10611060
$ilErr->setMessage('');
10621061
if (!$this->form->checkInput()) {
10631062
$ilErr->setMessage($this->lng->txt('err_check_input'));
1063+
$form->setValuesByPost();
1064+
$this->editObject();
1065+
return false;
10641066
}
10651067

10661068
if (
@@ -1580,7 +1582,7 @@ protected function initForm($a_mode)
15801582
$ilUser = $DIC['ilUser'];
15811583

15821584
if (is_object($this->form)) {
1583-
return true;
1585+
return $this->form;
15841586
}
15851587

15861588
$this->lng->loadLanguageModule('dateplaner');
@@ -1640,6 +1642,7 @@ protected function initForm($a_mode)
16401642

16411643
// title
16421644
$title = new ilTextInputGUI($this->lng->txt('event_title'), 'title');
1645+
$title->setRequired(true);
16431646
$title->setValue($this->object->getTitle());
16441647
$title->setSize(50);
16451648
$title->setMaxLength(70);
@@ -1786,22 +1789,18 @@ protected function initForm($a_mode)
17861789
switch ($a_mode) {
17871790
case 'create':
17881791
$this->form->setTitle($this->lng->txt('event_table_create'));
1789-
17901792
$this->form->addCommandButton('save', $this->lng->txt('event_btn_add'));
17911793
$this->form->addCommandButton('saveAndAssignMaterials', $this->lng->txt('event_btn_add_edit'));
17921794
$this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
1793-
1794-
return true;
1795+
return $this->form;
17951796

17961797
case 'edit':
17971798
$this->form->setTitle($this->lng->txt('event_table_update'));
1798-
17991799
$this->form->addCommandButton('update', $this->lng->txt('save'));
18001800
$this->form->addCommandButton('cancelEdit', $this->lng->txt('cancel'));
1801-
1802-
return true;
1801+
return $this->form;
18031802
}
1804-
return true;
1803+
return $this->form;
18051804
}
18061805

18071806
/**

0 commit comments

Comments
 (0)