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

Scale rubric criterion levels on max_mark update #7311

Conversation

pranavrao145
Copy link
Contributor

Proposed Changes

Fixes #7296 by changing the order in which changes are processed when max_mark is updated on a rubric criterion.

Type of Change

(Write an X or a brief description next to the type or types that best describe your changes.)

Type Applies?
🚨 Breaking change (fix or feature that would cause existing functionality to change)
New feature (non-breaking change that adds functionality)
🐛 Bug fix (non-breaking change that fixes an issue) X
🎨 User interface change (change to user interface; provide screenshots)
♻️ Refactoring (internal change to codebase, without changing functionality)
🚦 Test update (change that only adds or modifies tests)
📦 Dependency update (change that updates a dependency)
🔧 Internal (change that only affects developers or continuous integration)

Checklist

(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the [ ] into a [x] in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)

Before opening your pull request:

  • I have performed a self-review of my changes.
    • Check that all changed files included in this pull request are intentional changes.
    • Check that all changes are relevant to the purpose of this pull request, as described above.
  • I have added tests for my changes, if applicable.
    • This is required for all bug fixes and new features.

After opening your pull request:

  • I have updated the project Changelog (this is required for all changes).
  • I have verified that the pre-commit.ci checks have passed.
  • I have verified that the CI tests have passed.
  • I have reviewed the test coverage changes reported by Coveralls.
  • I have requested a review from a project maintainer.

@pranavrao145 pranavrao145 force-pushed the fix/rubric-criterion-denominator branch from ad5c103 to 83c2862 Compare November 28, 2024 23:54
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 12076714915

Details

  • 18 of 18 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.006%) to 91.754%

Totals Coverage Status
Change from base Build 12074989300: 0.006%
Covered Lines: 41128
Relevant Lines: 44150

💛 - Coveralls

Copy link
Collaborator

@david-yz-liu david-yz-liu left a comment

Choose a reason for hiding this comment

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

@pranavrao145 thanks for doing this. I realized now why the code was written the way it was originally, as we didn't want to accidentally override the instructor's inputs on the form (for example, if the instructor changes the criterion max mark and the level weights at the same time).

This is a bit more work, but can you please modify the back-end algorithm so that

  1. for each existing level, if the levels_attributes has a mark that is different from the current level mark, use the new levels_attributes mark directly (no scaling); but if the levels_attributes mark is the same as the current level mark, scale that.
  2. for each new level, use the instructor-provided mark in levels_attributes (no scaling)

I think the easiest way to do this is to keep the original order of criterion/level updating, but prior to the level updating mutate the levels_attributes hash to compute the new level marks according to my above description.

@pranavrao145 pranavrao145 marked this pull request as draft December 1, 2024 00:55
@pranavrao145 pranavrao145 force-pushed the fix/rubric-criterion-denominator branch from 83c2862 to 5bd8e93 Compare December 3, 2024 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rubic criterion isn't populated correctly with a denominator > 4
3 participants