-
Notifications
You must be signed in to change notification settings - Fork 8
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
Make contrib/groups/* safer and more well-documented #34
Comments
sshine
changed the title
Make contrib/groups/* more safer and more well-documented
Make contrib/groups/* safer and more well-documented
Sep 20, 2017
sshine
added a commit
that referenced
this issue
Sep 20, 2017
sshine
added a commit
that referenced
this issue
Sep 29, 2017
- Turn this into a library (`if __name__ == "__main__"`). - Script still assumes that groups were not created on Canvas. If they were from a previous run, comment out the call to create_groups_on_canvas(). I don't think it actually creates those groups a second time, but running takes a bit longer since it makes an API call for each group it creates. Trying to create groups that already exist and are partly or wholly filled is a bug, though. - Throw with an informative message when multiple directories match a KU ID. Reasons could be: 'subs/' given when 'subs/N/' expected. - Throw with an informative message when two group members both upload files. This could be handled more gracefully by creating a group directory and symlink both submissions into it, rather than symlink the group directory directly to one of the submissions. - Filter empty submission directories based on their content (.staffeli.yml, group.txt) rather than their file count. This fixes a bug where the 'silent' partner uploads a group.txt for good measure and this script thinks there are two submitters.
See comments for previous commit. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The documentation for contrib/groups/create-groups.py isn't accurate wrt. number of arguments.
check-groups.py should assert that the group.txts it finds are actually plaintext files and not RTF documents or pictures of kittens.
create-groups.py fails when two individuals both upload a group.txt that put them in the same group:
Either the documentation should be clear about what to when check-groups.py fails in various ways, or the script should handle the situation gracefully, e.g. by detecting that groups (abc123 def456) and (def456 abc123) are the same and only create one group for them.
It would be neat if the script had a "dry run" parameter that doesn't create groups but fetches the ones that are created and performs the filesystem operations with them. Currently this isn't possible because
canvas.create_group()
(used here) both creates a group on Canvas and returns the group's properties. If there were acanvas.get_groups()
, that'd be neat.The text was updated successfully, but these errors were encountered: