Skip to content
Snippets Groups Projects
Commit 18a8055c authored by Moritz Strohm's avatar Moritz Strohm
Browse files

course/enrolment: allow participants to enter locked courses, fixes #4822

Closes #4822

Merge request studip/studip!3612
parent f79a0f63
No related branches found
No related tags found
No related merge requests found
......@@ -1597,6 +1597,17 @@ class Course extends SimpleORMap implements Range, PrivacyObject, StudipItem, Fe
);
}
//Check the course membership:
if ($GLOBALS['perm']->have_studip_perm('user', $this->id, $user_id)) {
return new \Studip\EnrolmentInformation(
_('Sie sind bereits in der Veranstaltung eingetragen.'),
\Studip\Information::INFO,
'already_member',
true
);
}
//Check the course set and if the user is on an admission list:
if ($course_set = $this->getCourseSet()) {
......@@ -1671,17 +1682,6 @@ class Course extends SimpleORMap implements Range, PrivacyObject, StudipItem, Fe
);
}
//Check the course membership:
if ($GLOBALS['perm']->have_studip_perm('user', $this->id, $user_id)) {
return new \Studip\EnrolmentInformation(
_('Sie sind bereits in der Veranstaltung eingetragen.'),
\Studip\Information::INFO,
'already_member',
true
);
}
//Check the admission status:
$admission_status = $user->admission_applications->findBy('seminar_id', $this->id)->val('status');
......
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