aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/coursewizardsteps/BasicDataWizardStep.php
diff options
context:
space:
mode:
authorPhilipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de>2024-09-24 10:53:31 +0200
committerPhilipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de>2024-09-24 10:53:31 +0200
commit4459dd7917f4d1c34f40bb68f0e991e9c3d53e4c (patch)
tree5c07151ae61276d334e88f6309c30d439a85c12e /lib/classes/coursewizardsteps/BasicDataWizardStep.php
parentda0022e5c1abbf9825ae76debaabdff7e8623bb4 (diff)
parent97a188592c679890a25c37ab78463add76a52ff7 (diff)
Merge branch 'main' into issue-3911issue-3911
Diffstat (limited to 'lib/classes/coursewizardsteps/BasicDataWizardStep.php')
-rw-r--r--lib/classes/coursewizardsteps/BasicDataWizardStep.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/classes/coursewizardsteps/BasicDataWizardStep.php b/lib/classes/coursewizardsteps/BasicDataWizardStep.php
index 4f424e8..d47c4f3 100644
--- a/lib/classes/coursewizardsteps/BasicDataWizardStep.php
+++ b/lib/classes/coursewizardsteps/BasicDataWizardStep.php
@@ -28,7 +28,7 @@ class BasicDataWizardStep implements CourseWizardStep
public function getStepTemplate($values, $stepnumber, $temp_id)
{
// Load template from step template directory.
- $factory = new Flexi_TemplateFactory($GLOBALS['STUDIP_BASE_PATH'] . '/app/views/course/wizard/steps');
+ $factory = new Flexi\Factory($GLOBALS['STUDIP_BASE_PATH'] . '/app/views/course/wizard/steps');
if (!empty($values[__CLASS__]['studygroup'])) {
$tpl = $factory->open('basicdata/index_studygroup');
$values[__CLASS__]['lecturers'][$GLOBALS['user']->id] = 1;
@@ -356,9 +356,9 @@ class BasicDataWizardStep implements CourseWizardStep
htmlReady(get_title_for_status('dozent', 1, $values['coursetype']))
);
}
- if (!$values['lecturers'][$GLOBALS['user']->id] && !$GLOBALS['perm']->have_perm('admin')) {
+ if (empty($values['lecturers'][$GLOBALS['user']->id]) && !$GLOBALS['perm']->have_perm('admin')) {
if (Config::get()->DEPUTIES_ENABLE) {
- if (!$values['deputies'][$GLOBALS['user']->id]) {
+ if (empty($values['deputies'][$GLOBALS['user']->id])) {
$errors[] = sprintf(
_('Sie selbst müssen entweder als %s oder als Vertretung eingetragen sein.'),
htmlReady(get_title_for_status('dozent', 1, $values['coursetype']))
@@ -620,7 +620,10 @@ class BasicDataWizardStep implements CourseWizardStep
}
}
-
+ } else {
+ foreach ($indices as $index) {
+ $values[$index] = $values[$index] ?? '';
+ }
}
return $values;