Skip to content

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

Merged
justinhynes merged 1 commit into
openedx:masterfrom
DmytroAlipov:fix-course-org-display-string
Apr 23, 2024
Merged

fix: "Course Number Display String" option doesn't influence certificate#34465
justinhynes merged 1 commit into
openedx:masterfrom
DmytroAlipov:fix-course-org-display-string

Conversation

@DmytroAlipov

Copy link
Copy Markdown
Contributor

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
DmytroAlipov requested a review from a team as a code owner April 3, 2024 13:36
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Apr 3, 2024
@openedx-webhooks

Copy link
Copy Markdown

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.

@DmytroAlipov DmytroAlipov added the bug Report of or fix for something that isn't working as intended label Apr 3, 2024
@mphilbrick211 mphilbrick211 added the waiting for eng review PR is ready for review. Review and merge it, or suggest changes. label Apr 3, 2024
@DmytroAlipov
DmytroAlipov force-pushed the fix-course-org-display-string branch from 8391c43 to 7f81d41 Compare April 5, 2024 18:18
"Course organization display string" option in Advanced settings
doesn't influence certificate
@DmytroAlipov
DmytroAlipov force-pushed the fix-course-org-display-string branch from 7f81d41 to 806d735 Compare April 5, 2024 18:33
@justinhynes

Copy link
Copy Markdown
Contributor

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?

@DmytroAlipov

Copy link
Copy Markdown
Contributor Author

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?

@justinhynes

justinhynes commented Apr 23, 2024

Copy link
Copy Markdown
Contributor

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 justinhynes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great catch and thanks for the fix!

As you had warned, I didn't find an easy place to slot in some new tests, so I did a bit of manual testing just to ensure I understood the problem and change.

Long story short, this looks good :) 👍

@justinhynes
justinhynes merged commit 9738f61 into openedx:master Apr 23, 2024
@openedx-webhooks

Copy link
Copy Markdown

@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.

@DmytroAlipov
DmytroAlipov deleted the fix-course-org-display-string branch April 23, 2024 13:29
@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

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

@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

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

@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Report of or fix for something that isn't working as intended open-source-contribution PR author is not from Axim or 2U waiting for eng review PR is ready for review. Review and merge it, or suggest changes.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants