Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

group collisions #3

Closed
phette23 opened this issue Jan 26, 2024 · 1 comment
Closed

group collisions #3

phette23 opened this issue Jan 26, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@phette23
Copy link
Member

phette23 commented Jan 26, 2024

When another course's groups are on a folder, it creates a name collision the second time we attempt to create the group. Example:

  • Course B Creator has Viewer access to Course A
  • When we run course_folder(Course A) we create the group "Course B Creator (internal)"
  • Later, when we run course_folder(Course B) we fail when trying to create the same group

Panopto's SOAP API has no GetFolderByName method. So when we hit a collision, we can't get the ID of the group to add it to the appropriate role on the course folder currently being processed.

We could keep a { "Group Name": "Group ID" } hash of all groups we've created thus far in the script and consult that when there are collisions. Running at the term level with a semester string --filter this might work because the only groups being created are those for some course folder underneath the term.

There are probably too many user groups to download all their data using another method. I think there is a method to get the groups a user is in...maybe we could use that method with one of the group's members to try to find the pre-existing group when a collision happens?

@phette23 phette23 added the bug Something isn't working label Jan 26, 2024
@phette23 phette23 self-assigned this Jan 26, 2024
@phette23
Copy link
Member Author

Another approach would be to append a short hash of the original group name and the folder name to the end of the internal group name so we would have unique names per course folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant