autolab / Autolab

Course management service that enables auto-graded programming assignments.
http://www.autolabproject.com/
Apache License 2.0
757 stars 215 forks source link

Assessment groups improvements #2120

Closed damianhxy closed 6 months ago

damianhxy commented 6 months ago

Description

  1. Add missing breadcrumbs for groups (index, new, show)
  2. Replace links with path helpers where possible
  3. Remove deadcode re: @grouplessCUDs which is never shown on show or new pages
  4. For convenience, don't add instructor/CA to group when they create one (if self-assignment is disabled)
  5. Groups clear their members upon destruction
  6. Allow (only) instructors to boot students, i.e. even if they're already confirmed
  7. Disband groups if the only members left are those that require group confirmation
  8. UX improvements
    • Don't show "haven't confirmed group membership" message to instructors
    • Show names in addition to emails
    • Helper text to inform students when group is at max size or student assignment is not allowed
    • Flash when disbanding groups
    • Hide inapplicable UI elements (e.g. when student assignment is not allowed)
    • Improve explanation of behavior
  9. Allow students to leave group while waiting for group approval (this is the one that resolves #2115)
  10. Allow members to "add themselves" - essentially no effect for students, but useful for instructors who might want to add themselves to groups

Motivation and Context

Closes #2115

How Has This Been Tested?

Create assessment with group size 3 and student self-assignment enabled

Create assessment with group size 3 and student self-assignment disabled

In general, test that behavior makes sense.

Screenshots

Instructor (in group), student-assignment allowed / not allowed

Note: when student-assignment allowed, need to self-approve. If not allowed, automatically approved. Screenshot 2024-03-18 at 19 32 51

Instructor (not in group), student-assignment allowed / not allowed

Screenshot 2024-03-18 at 19 31 31

Confirmed student, student-assignment allowed

Screenshot 2024-03-18 at 19 29 26

Confirmed student, student-assignment not allowed

Screenshot 2024-03-18 at 19 29 33

Group-confirmed student, student-assignment allowed

Screenshot 2024-03-18 at 19 30 40

Group-confirmed student, student-assignment not allowed

Screenshot 2024-03-18 at 19 30 46

Member-confirmed student, student-assignment allowed

Screenshot 2024-03-18 at 19 31 08

Member-confirmed student, student-assignment not allowed

Screenshot 2024-03-18 at 19 31 15

Types of changes

Checklist:

coderabbitai[bot] commented 6 months ago
Walkthrough ## Walkthrough The recent updates to the group handling system introduce enhanced breadcrumb navigation, refined group management logic, and improved user feedback mechanisms. These changes streamline the process of creating, joining, and leaving groups, alongside better error handling and user guidance. Additionally, the system now supports scenarios such as group disbanding and membership status updates, ensuring a smoother experience for users managing group memberships. ## Changes | File(s) | Change Summary | |---------|----------------| | `app/controllers/groups_controller.rb`
`app/helpers/groups_helper.rb` | Enhanced breadcrumb handling, refactored redirection paths, and improved error messages for group management. | | `app/models/assessment_user_datum.rb`
`app/models/group.rb` | Added methods for group member management and checks for group emptiness. | | `app/views/groups/new.html.erb`
`app/views/groups/show.html.erb`
`app/views/groups/_new_form.html.erb`
`app/views/groups/index.html.erb` | Updated UI elements and conditional rendering logic for a better user experience in group creation and management. | | `app/assets/stylesheets/style.css.scss` | Simplified styling for checkboxes. | | `app/controllers/assessments_controller.rb` | Updated parameters handling for assessments. | | `app/views/assessments/_edit_penalties.html.erb`
`app/views/assessments/new.html.erb` | Adjusted UI elements in assessment views. | ## Assessment against linked issues | Objective | Addressed | Explanation | |-----------|-----------|-------------| | Unable to leave group while a request is pending (#2115) | ✅ | |

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

Tips ### Chat There are 3 ways to chat with CodeRabbit: - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `Generate unit-tests for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit tests for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai read src/utils.ts and generate unit tests.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - The JSON schema for the configuration file is available [here](https://coderabbit.ai/integrations/coderabbit-overrides.v2.json). - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json` ### CodeRabbit Discord Community Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.
damianhxy commented 6 months ago

Also self-assign groups is checked by default when creating a new assessment, only way to uncheck it is to do so in assessment settings. I think maybe it would be better to let instructors check/uncheck it before/while creating an assessment too?

Done: Screenshot 2024-03-28 at 03 21 28

I also took the liberty of fixing the breadcrumbs for the creation page Screenshot 2024-03-28 at 03 21 38