Skip to content
Snippets Groups Projects
Commit d0ae2a4d authored by Elmar Ludwig's avatar Elmar Ludwig
Browse files

don't try to use "all" (default value of MY_INSTITUTES_DEFAULT) as an institute_id, fixes #4506

Closes #4506

Merge request studip/studip!3301
parent f2d520af
No related branches found
No related tags found
No related merge requests found
...@@ -129,7 +129,7 @@ class BasicDataWizardStep implements CourseWizardStep ...@@ -129,7 +129,7 @@ class BasicDataWizardStep implements CourseWizardStep
if (!empty($values['studygroup']) || count($institutes) > 0) { if (!empty($values['studygroup']) || count($institutes) > 0) {
$tpl->set_attribute('institutes', $institutes); $tpl->set_attribute('institutes', $institutes);
if (empty($values['institute'])) { if (empty($values['institute'])) {
if ($GLOBALS['user']->cfg->MY_INSTITUTES_DEFAULT && Request::isXhr()) { if ($GLOBALS['user']->cfg->MY_INSTITUTES_DEFAULT !== 'all' && Request::isXhr()) {
$values['institute'] = $GLOBALS['user']->cfg->MY_INSTITUTES_DEFAULT; $values['institute'] = $GLOBALS['user']->cfg->MY_INSTITUTES_DEFAULT;
} else { } else {
$values['institute'] = InstituteMember::getDefaultInstituteIdForUser($GLOBALS['user']->id); $values['institute'] = InstituteMember::getDefaultInstituteIdForUser($GLOBALS['user']->id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment