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

feat: solve bug gradebook #388

Closed
wants to merge 1 commit into from

Conversation

Yagnesh1998
Copy link

@Yagnesh1998 Yagnesh1998 commented Mar 25, 2024

as per 384 number bug

Untitled.design.mp4

LMS Logs

> tutor_nightly_dev-lms-1  |     return self.get_db_prep_value(value, connection=connection, prepared=False)
> tutor_nightly_dev-lms-1  |   File "/openedx/venv/lib/python3.8/site-packages/django/db/models/fields/__init__.py", line 947, in get_db_prep_value
> tutor_nightly_dev-lms-1  |     value = self.get_prep_value(value)
> tutor_nightly_dev-lms-1  |   File "/openedx/venv/lib/python3.8/site-packages/django/db/models/fields/__init__.py", line 1959, in get_prep_value
> tutor_nightly_dev-lms-1  |     raise e.__class__(
> tutor_nightly_dev-lms-1  | ValueError: Field 'earned_graded_override' expected a number but got ''.

Solution

The || [] in the line const gradeOverrides = selectors.grades.useGradeData().gradeOverrideHistoryResults || []; provides a fallback. If gradeOverrideHistoryResults is falsy (like undefined, null, or 0), it defaults to an empty array []. This ensures gradeOverrides always has an array value, preventing potential errors.

@Yagnesh1998 Yagnesh1998 requested a review from a team as a code owner March 25, 2024 19:54
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Mar 25, 2024
@openedx-webhooks
Copy link

Thanks for the pull request, @Yagnesh1998! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@mphilbrick211 mphilbrick211 removed the request for review from a team March 26, 2024 18:17
@mphilbrick211 mphilbrick211 added the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Mar 26, 2024
Copy link

codecov bot commented Mar 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.98%. Comparing base (d683e87) to head (e759ff1).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #388   +/-   ##
=======================================
  Coverage   94.98%   94.98%           
=======================================
  Files         139      139           
  Lines        1355     1355           
  Branches      264      265    +1     
=======================================
  Hits         1287     1287           
  Misses         60       60           
  Partials        8        8           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mphilbrick211 mphilbrick211 removed the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Mar 28, 2024
@farhaanbukhsh
Copy link
Member

farhaanbukhsh commented Mar 30, 2024

@mphilbrick211 @arbrandes I can help with reviewing this PR :)

Hey @Yagnesh1998 a similar PR is already in progress #387

@mphilbrick211
Copy link

@mphilbrick211 @arbrandes I can help with reviewing this PR :)

Hey @Yagnesh1998 a similar PR is already in progress #387

@Yagnesh1998 @farhaanbukhsh - can this be closed?

@Yagnesh1998
Copy link
Author

@mphilbrick211 Yes! Both the PRs are same, there is no point in opening both the PRs, so you can definitely close it.

@Yagnesh1998 Yagnesh1998 closed this May 2, 2024
@openedx-webhooks
Copy link

@Yagnesh1998 Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants