Skip to content
Snippets Groups Projects
Commit cd04c76f authored by David Siegfried's avatar David Siegfried Committed by Jan-Hendrik Willms
Browse files

prevent warnings in course-wizard, fixes #4805

Closes #4805

Merge request studip/studip!3596
parent c7c10f40
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment