From cd04c76f0f7948bd262c290f3bbe1a22a2c7722f Mon Sep 17 00:00:00 2001 From: David Siegfried <david.siegfried@uni-vechta.de> Date: Mon, 4 Nov 2024 12:28:30 +0000 Subject: [PATCH] prevent warnings in course-wizard, fixes #4805 Closes #4805 Merge request studip/studip!3596 --- lib/classes/coursewizardsteps/BasicDataWizardStep.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/classes/coursewizardsteps/BasicDataWizardStep.php b/lib/classes/coursewizardsteps/BasicDataWizardStep.php index 022f9338488..49446114ac0 100644 --- a/lib/classes/coursewizardsteps/BasicDataWizardStep.php +++ b/lib/classes/coursewizardsteps/BasicDataWizardStep.php @@ -73,7 +73,11 @@ class BasicDataWizardStep implements CourseWizardStep $tpl->set_attribute('admission_turnout_mandatory_types', $admission_turnout_mandatory_types); // Select a default type if none is given. if (empty($values['coursetype'])) { - if ($GLOBALS['user']->cfg->MY_COURSES_TYPE_FILTER && Request::isXhr()) { + if ( + $GLOBALS['user']->cfg->MY_COURSES_TYPE_FILTER + && $GLOBALS['user']->cfg->MY_COURSES_TYPE_FILTER !== 'all' + && Request::isXhr() + ) { $values['coursetype'] = $GLOBALS['user']->cfg->MY_COURSES_TYPE_FILTER; } else { $values['coursetype'] = 1; -- GitLab