Skip to content
Snippets Groups Projects
Commit 53f958cf authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms Committed by Jan-Hendrik Willms
Browse files

fixes #3238

Closes #3238

Merge request studip/studip!2197
parent fee8def6
No related branches found
No related tags found
No related merge requests found
...@@ -2150,10 +2150,9 @@ get_title_for_status('dozent', 1, $this->status))); ...@@ -2150,10 +2150,9 @@ get_title_for_status('dozent', 1, $this->status)));
*/ */
public function setMemberPriority($members): Seminar public function setMemberPriority($members): Seminar
{ {
$counter = 0;
CourseMember::findEachBySQL( CourseMember::findEachBySQL(
function (CourseMember $membership) use (&$counter) { function (CourseMember $membership) use (&$members) {
$membership->position = $counter++; $membership->position = array_search($membership->user_id, $members);
$membership->store(); $membership->store();
}, },
"Seminar_id = ? AND user_id IN (?)", "Seminar_id = ? AND user_id IN (?)",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment