Show a success button at the top of the Progress page - #2780
Conversation
|
@singingwolfboy Who would be a good person to review this? You? : ) While this is an optional feature, it might be worth checking if/how it would make sense from a product perspective - it's used by a client to get his students to his own website, where he generates the certificates. @FiloSottile This PR is getting a bit old, it might be useful to rebase to get a proper review. |
There was a problem hiding this comment.
It would be better to just put this text directly in the template, so that it can be internationalized effectively.
|
You might want to take a look at our public certificate generation code: maybe you can make this pull request work with it somehow? |
|
Rebased and addressed @singingwolfboy's remarks. See commit message 3eb139951af03f7547710503c6e8fd5b93520697 Doubt: should I urlencode the |
There was a problem hiding this comment.
I much prefer str.format() to the old-style % formatting. Can you switch it to the new version?
Show a button at the top of lms/templates/courseware/progress.html if the lowest nonzero grade cutoff has been reached. Introduce two settings: PROGRESS_SUCCESS_BUTTON_URL is the href of that button (the course id is appended); PROGRESS_SUCCESS_BUTTON_TEXT is the text, defaults to "Download your certificate"
The button text default is now in the template and i18n-able, a PROGRESS_SUCCESS_BUTTON_TEXT_OVERRIDE option is offered in settings. The button url now uses string formatting.
|
@singingwolfboy Implemented your comments, except for the one about the OVERRIDE option for the reason @antoviaque explained here https://github.com/edx/edx-platform/pull/2780#discussion_r11098095, and rebased. |
|
@singingwolfboy Sorry to ping you again, any new comments? |
|
Sorry for the delay. This seems fine to me: merging. |
Show a success button at the top of the Progress page
Add SHOW_PROGRESS_SUCCESS_BUTTON feature
This will show a button at the top of
lms/templates/courseware/progress.htmlif the lowest nonzero grade cutoff has been reached.Introduce two settings:
PROGRESS_SUCCESS_BUTTON_URLis the href of that button (the course id is appended)PROGRESS_SUCCESS_BUTTON_TEXTis the text, defaults to "Download your certificate"The change is pretty minimal. However, feedback on settings naming/placement and testing would be welcome.
This is a test task for recruiting purposes - @antoviaque