Problem/Motivation
As a user, after completing a course/learning path and being redirected to that course's homepage, I would like a CTA to be presented that allows me to immediately download my certificate.
Proposed resolution
Update LearningPathController::progress to include a conditional view certificate button underneath continue training that prompts user to download certificate PDF.
No update to dependencies needed since already relies on opigno_certificate.
Remaining tasks
Update LearningPathController::progress
User interface changes
Pending completion of a learning path, a 'View Certificate' button will be provided underneath 'Continue Training'.
API changes
N/A
Data model changes
N/A
Release notes snippet
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3154553-4.patch | 4.87 KB | butlerbryanc |
| #2 | Screen Shot 2020-06-24 at 12.22.05 PM.png | 12.9 KB | butlerbryanc |
Issue fork opigno_learning_path-3154553
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
butlerbryanc commentedh2. Updates
* Patch attached.
* Styled similar to continue button.
* Replaced background image with Achievements icon from Platon theme.
* On hover, text reads Download Certificate.
Image of expected results with Platon Theme

Comment #3
kkohlbrenner commentedHi @butlerbryanc
In the attached patch, I see
However, I can't find this route in opigno_learning_path.routing.yml. Is this route defined in another opigno routing file?
Regarding this change:
It appears that $is_passed is set to a boolean value.
The function docblock, defined in opigno_learning_path.module, states:
Rather than checking,
I think it would be more straight forward if we used,
does that make sense?
Additionally, it appears that this feature doesn't include functionality for an administrator to toggle, is that right?
Comment #4
butlerbryanc commentedh2. Updates
* change conditional to just check boolean var $is_passed.
h2. Notes
* @kkohlbrenner there aren't administrative features for configuring these buttons.
* The path you pointed out is from a module that is already a dependency.
Comment #5
butlerbryanc commentedComment #7
jasonawantI've unassigned this issue.
This patch does not currently apply to 8.x-1.12 version.
I think this patch altered the LearningPathController::progress() method. However, this was removed in this commit > https://git.drupalcode.org/project/opigno_learning_path/-/commit/acf5a3e...
Is there an alternative to LearningPathController::progress()
Comment #8
axelmHi,
We are working on a complete redesign of UI with Opigno 3.0 (Drupal 9), in order to integrate a lot of feedbacks from users and improve UX.
Among these feedbacks we considered this one, and we will add several additional CTA allowing to get more direct access to certificates, without visiting achievements page.
This will be introduced at the latest at the beginning of September, so coming soon.
Comment #9
jasonawantThanks for the info.
Regarding my question,
Could you point me to a replacement? Is there something that can be used to report a student's progress on the course detail page?