edx-platform icon indicating copy to clipboard operation
edx-platform copied to clipboard

fix: "Course Number Display String" option doesn't influence certificate

Open DmytroAlipov opened this issue 10 months ago • 1 comments

Description

In Advanced Settings, it is possible to redefine the name for the Course Organization as well as for the Course Number. However, a bug was discovered in replacing this name on the certificate: c_1

For Course Number Display String everything works correctly: c_2

But the name of the organization is always taken from the Organizations model. In this case, the definition from Advanced Settings is ignored: c_4

For other pages, the override works correctly for both settings: c_3png

I slightly changed the logic for prioritizing the selection of the organization name for the certificate. Now everything is replaced correctly: c_5

DmytroAlipov avatar Apr 03 '24 13:04 DmytroAlipov

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

openedx-webhooks avatar Apr 03 '24 13:04 openedx-webhooks

Hi @DmytroAlipov,

I was just taking a look at these changes this morning and it's a good catch. Are there any tests that can be added or updated?

justinhynes avatar Apr 22 '24 13:04 justinhynes

Hi @justinhynes The testing situation here is difficult since the _update_organization_context function is difficult to test. This needs to be tested in the render_html_view context. There are no testing examples for this at the moment. I'm unlikely to be able to test it correctly. Can someone on your side help with this?

DmytroAlipov avatar Apr 22 '24 18:04 DmytroAlipov

OK! Thanks for the heads up. I'm not very familiar (personally) with the test suites around this functionality, I'll try take a look this morning. Worst case, we toss a story in our backlog to take a deeper look at improving test coverage in the future.

justinhynes avatar Apr 23 '24 12:04 justinhynes

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

openedx-webhooks avatar Apr 23 '24 13:04 openedx-webhooks

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

edx-pipeline-bot avatar Apr 23 '24 14:04 edx-pipeline-bot

2U Release Notice: This PR has been deployed to the edX production environment.

edx-pipeline-bot avatar Apr 23 '24 15:04 edx-pipeline-bot

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

edx-pipeline-bot avatar Apr 23 '24 15:04 edx-pipeline-bot