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

fix: add empty rubric validation #2173

Merged
merged 4 commits into from
Feb 9, 2024

Conversation

dyudyunov
Copy link
Contributor

TL;DR - Add a validation to forbid saving ORA response with an empty prompt to avoid errors.

image

This PR reopens #2092

Developer Checklist

Testing Instructions

  1. Open unit for the course
  2. Choose Open Response block - any type except "Peer assessment only" and "Self-assessment to peer assessment"
  3. Click on Edit, on the Prompt tab click on Remove, save changes

Reviewer Checklist

Collectively, these should be completed by reviewers of this PR:

  • I've done a visual code review
  • I've tested the new functionality

FYI: @openedx/content-aurora

@dyudyunov dyudyunov requested a review from a team as a code owner February 8, 2024 13:41
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Feb 8, 2024
@openedx-webhooks
Copy link

Thanks for the pull request, @dyudyunov! 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.

@dyudyunov
Copy link
Contributor Author

Hi @pomegranited

I created a new branch based on the master and applied Taras' fixes.
Here are some notes about translations (unresolved in the old PR).

I have the gettext version

gettext --version
gettext (GNU gettext-runtime) 0.21.1
Copyright (C) 1995-2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Ulrich Drepper.

I use the make check_translations_up_to_date command as described in this guide

Copy link

codecov bot commented Feb 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f86007d) 94.94% compared to head (2f80b93) 94.95%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2173   +/-   ##
=======================================
  Coverage   94.94%   94.95%           
=======================================
  Files         191      191           
  Lines       20666    20675    +9     
  Branches     1878     1879    +1     
=======================================
+ Hits        19622    19631    +9     
  Misses        780      780           
  Partials      264      264           
Flag Coverage Δ
unittests 94.95% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@dyudyunov dyudyunov force-pushed the add-rubric-validation branch from 528380b to 2f80b93 Compare February 8, 2024 13:47
@dyudyunov dyudyunov mentioned this pull request Feb 8, 2024
5 tasks
Copy link
Contributor

@pomegranited pomegranited left a comment

Choose a reason for hiding this comment

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

Thank you for resubmitting this change @dyudyunov ! It works great.

I'll merge this now in case you need to submit version bump PRs to edx-platform before they cut quince.2 tonight.

Here are some notes about translations (unresolved in the old PR).

Your translation changes on this PR look fine -- you've resolved the linebreaks that were in the previous diff, that's all I needed.

  • I tested this on my devstack:
    • Added a new ORA2 component to my test course
    • Removed all "prompts" from the component and tried to Save:
      Got the new error as expected: "You must provide at least one prompt."
    • Added a new prompt, and Saved without error.
  • I read through the code
  • I checked for accessibility issues by using my keyboard only during testing
  • Includes documentation N/A
  • User-facing strings are extracted for translation

@pomegranited pomegranited merged commit a255a08 into openedx:master Feb 9, 2024
9 checks passed
@openedx-webhooks
Copy link

@dyudyunov 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@dyudyunov
Copy link
Contributor Author

@pomegranited

Your translation changes on this PR look fine -- you've resolved the linebreaks that were in the previous diff, that's all I needed.

I think the difference is that Taras ran those commands from the host machine (I was able to reproduce something very similar this way) instead of running them in the LMS container with ORA installed from the local dir.
Maybe the guide should be updated with a more detailed how-to for translations, e.g. adding a link to the local development guide seems helpful.

@dyudyunov dyudyunov deleted the add-rubric-validation branch February 9, 2024 07:55
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.

3 participants