Skip to content

Conversation

cmltaWt0
Copy link
Contributor

@cmltaWt0 cmltaWt0 commented Sep 7, 2025

Description

"No answer specified" confirmation window is displayed all the time after the second save for dropdown.

234

Steps to Reproduce:

  1. Add new Unit
  2. Add new component Problem
  3. Choose Dropdown
  4. Fill in at least question and answers (for the correct answer, enter the number)
  5. Click Save
  6. Click on Edit for problem again
  7. Click Save

It's a re-creation of #1278

"No answer specified" confirmation window is displayed all the
time after second save for dropdown.
@cmltaWt0 cmltaWt0 self-assigned this Sep 7, 2025
@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Sep 7, 2025
@openedx-webhooks
Copy link

Thanks for the pull request, @cmltaWt0!

This repository is currently maintained by @bradenmacdonald.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.


Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

Copy link

codecov bot commented Sep 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.64%. Comparing base (67fab05) to head (ddbc13b).

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #2429    +/-   ##
========================================
  Coverage   94.64%   94.64%            
========================================
  Files        1187     1187            
  Lines       26196    26196            
  Branches     5675     5833   +158     
========================================
  Hits        24792    24792            
+ Misses       1341     1333     -8     
- Partials       63       71     +8     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mphilbrick211 mphilbrick211 moved this from Needs Triage to Ready for Review in Contributions Sep 10, 2025
const title = simpleTextAreaProblems.includes(problemType) ? answer.title : answerTitles[answer.id];
if (title?.length > 0) {
const title = simpleTextAreaProblems.includes(problemType) ? answer.title.toString() : answerTitles[answer.id];
if (title.length > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we certain that title is always going to be defined? There's no type information here so I don't really know, but it seems safer to leave it as title?.length just in case.

if (answer.correct) {
const title = simpleTextAreaProblems.includes(problemType) ? answer.title : answerTitles[answer.id];
if (title?.length > 0) {
const title = simpleTextAreaProblems.includes(problemType) ? answer.title.toString() : answerTitles[answer.id];
Copy link
Contributor

Choose a reason for hiding this comment

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

This fixes the problem, but it seems like the real problem is that answer.title is a number in the first place. Shouldn't we try to prevent title from being set to a non-string value in the first place, rather than fixing it here?

I think the root problem might be on this line where the XML parser sometimes returns a number for the #text value. Could we coerce it to a string there instead?

@mphilbrick211 mphilbrick211 moved this from Ready for Review to In Eng Review in Contributions Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U
Projects
Status: In Eng Review
Development

Successfully merging this pull request may close these issues.

3 participants