Skip to content

multiple course group managers - #765

Merged
simonLeary42 merged 12 commits into
mainfrom
simonLeary42-patch-1
Aug 21, 2026
Merged

multiple course group managers#765
simonLeary42 merged 12 commits into
mainfrom
simonLeary42-patch-1

Conversation

@simonLeary42

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the unity-course worker script to support assigning multiple PI group managers when creating a new course user and its PI group.

Changes:

  • Accepts a comma-separated list of manager UIDs instead of a single UID.
  • Creates/validates multiple manager UnityUser objects and attempts to add each to the PI group as a manager.
Suppressed comments (1)

workers/unity-course.php:71

  • This block uses invalid PHP for (... in ...) syntax, and it also references $manager (undefined after switching to $managers) and $manager_uid (not defined in this loop) when setting mail / adding managers. Select a primary manager for the single-valued mail attribute and iterate managers with foreach ($managers as $manager_uid => $manager) when adding managers.
for ($managers as $manager) {
    $course_pi_group->newUserRequest($manager, false);
    $course_pi_group->approveUser($manager);
    $course_pi_group->addManagerUID($manager_uid);   
}

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread workers/unity-course.php Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread workers/unity-course.php
Comment thread workers/unity-course.php
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@simonLeary42
simonLeary42 marked this pull request as ready for review August 21, 2026 15:24
@simonLeary42
simonLeary42 merged commit 8350b3f into main Aug 21, 2026
4 checks passed
@simonLeary42
simonLeary42 deleted the simonLeary42-patch-1 branch August 21, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants