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

Added a button to release/unrelease grades #2081

Merged
merged 24 commits into from
Feb 27, 2024
Merged

Conversation

dwang3851
Copy link
Contributor

@dwang3851 dwang3851 commented Feb 10, 2024

Description

  • Added a button to the view source page to release grades
  • Added an indicator next to the grades tabs to show if a problem's score is released or unreleased
  • If all of the scores for a submission are released, there is a unrelease grades button

Screenshots:
image
image

Motivation and Context

-Currently, scores can only be released all at once, or through the individual problems on a gradesheet

How Has This Been Tested?

  • I tested in my local environment (autolab manual installation) with a student, TA, and instructor account
  • Checked that none of the changes are observable from a student account
  • Ensured both TA and course instructors are able to use the release grades button

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have run rubocop and erblint for style check. If you haven't, run overcommit --install && overcommit --sign to use pre-commit hook for linting
  • My change requires a change to the documentation, which is located at Autolab Docs
  • I have updated the documentation accordingly, included in this PR

@dwang3851 dwang3851 self-assigned this Feb 10, 2024
Copy link
Contributor

coderabbitai bot commented Feb 10, 2024

Walkthrough

Walkthrough

The recent updates focus on enhancing the flexibility and intuitiveness of grade release mechanisms within a learning management system. Notably, the changes introduce the ability to release or unrelease individual student grades and refine the logic behind grade visibility and deadline adherence. This is achieved through modifications across controllers, models, views, and configurations, streamlining the process for instructors and TAs and addressing specific user needs for more granular control over score dissemination.

Changes

File Path Change Summary
app/controllers/submissions_controller.rb Added release_student_grade and unrelease_student_grade actions with updated before_action callbacks.
app/helpers/submission_helper.rb Added an empty line.
app/models/submission.rb Added problems_released? method; refactored grades_released?.
app/views/.../viewGradesheet.html.erb, app/views/submissions/view.html.erb, app/views/submissions/_grades.html.erb Updated to support conditional grade release display and logic.
app/assets/javascripts/annotations.js, app/views/submissions/view.js.erb Enhanced grade release button functionality and rendering.
app/views/assessments/_handin_form.html.erb Refactored late submission logic and form submission adjustments.
config/routes.rb Added routes for release_student_grade and unrelease_student_grade.
db/schema.rb Database schema adjustments including type changes and added limits.

Assessment against linked issues

Objective Addressed Explanation
Allow release of individual student scores (#2063)
Simplify the grade release process and address grading deadline confusion (#1717) The changes seem to support more granular control over grade releases, which could simplify the process, but it's unclear if the grading deadline confusion is directly addressed.

Related issues

  • Refine grading deadline  #1717: This issue discusses refining the grading deadline to make it less confusing and more intuitive. The changes in this PR, particularly those enhancing the control over grade release, could indirectly address concerns raised in this issue by providing more flexibility in how and when grades are released, potentially making the grading deadline less of a bottleneck.

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

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 <commit_id>.
    • Generate unit-tests for this file.
  • 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 from git 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.
  • 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 to get help, request features, and share feedback.

app/helpers/submission_helper.rb Outdated Show resolved Hide resolved
app/views/submissions/_release_grades.html.erb Outdated Show resolved Hide resolved
config/routes.rb Outdated Show resolved Hide resolved
app/controllers/submissions_controller.rb Outdated Show resolved Hide resolved
app/controllers/submissions_controller.rb Outdated Show resolved Hide resolved
@gitstream-cm gitstream-cm bot requested review from a team and jlge and removed request for a team February 10, 2024 19:32
@gitstream-cm gitstream-cm bot added small Pull request is small waiting-for-review labels Feb 10, 2024
@gitstream-cm gitstream-cm bot requested a review from a team February 10, 2024 19:33
Copy link
Contributor

@jlge jlge left a comment

Choose a reason for hiding this comment

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

Testing locally works, just some notes about naming and style. Overall a slay ✨

db/schema.rb Outdated Show resolved Hide resolved
app/views/submissions/_release_grades.html.erb Outdated Show resolved Hide resolved
app/controllers/submissions_controller.rb Outdated Show resolved Hide resolved
app/controllers/submissions_controller.rb Outdated Show resolved Hide resolved
app/controllers/submissions_controller.rb Outdated Show resolved Hide resolved
@gitstream-cm gitstream-cm bot requested a review from a team February 12, 2024 00:27
@dwang3851 dwang3851 requested a review from jlge February 13, 2024 20:56
Added new line
Copy link
Contributor

@jlge jlge left a comment

Choose a reason for hiding this comment

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

LGTM
image

refresh gitstream
@dwang3851 dwang3851 added this pull request to the merge queue Feb 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 19, 2024
@damianhxy damianhxy self-requested a review February 20, 2024 00:06
app/controllers/submissions_controller.rb Outdated Show resolved Hide resolved
app/controllers/submissions_controller.rb Outdated Show resolved Hide resolved
app/controllers/submissions_controller.rb Outdated Show resolved Hide resolved
app/views/submissions/_grades.html.erb Outdated Show resolved Hide resolved
config/routes.rb Outdated Show resolved Hide resolved
app/helpers/submission_helper.rb Outdated Show resolved Hide resolved
@damianhxy
Copy link
Member

LGTM, other than that the buttons do not update when annotations are created (e.g. a nil score is now non-nil and unreleased).

Copy link
Member

@damianhxy damianhxy left a comment

Choose a reason for hiding this comment

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

LGTM

@dwang3851 dwang3851 added this pull request to the merge queue Feb 27, 2024
Merged via the queue into master with commit 73a8473 Feb 27, 2024
5 checks passed
@dwang3851 dwang3851 deleted the releaseGrades-button branch February 27, 2024 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
small Pull request is small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow release of individual student scores
3 participants