Problem/Motivation

The button next to the learning path progress is always set to “Continue Training” regardless of the state the user is in for that training.
In our case this is a bit confusing for the end user.

Steps to reproduce

Set up a learning path and the button text next to the progress bar is always “Continue Training” even if the user have not started yet or if it is passed.

Proposed resolution

It would make more sense if the button text changed accordingly to the progress. So if the
- progress is 0%, the button say “Start”
- progress is more than 0% the button say “Continue”
- progress is 100% the button say “Passed”

Attached is a patch with an attempt to adjust this. I am very new to the Opigno ecosystem so if there is a better way or something I’v missed here please help out.

Remaining tasks

TBD

User interface changes

TBD

API changes

TBD

Data model changes

TBD

Comments

MickeA created an issue. See original summary.

miax’s picture

dajjen’s picture

StatusFileSize
new940 bytes

Reroll patch to latest 8.x-1.x branch as of today.
I also changed how to get current user cause code in Drupal should accept its dependencies via either constructor injection or setter method injection.

axelm’s picture

Hi
Thanks for the suggestion and the patch.
It will be applied in the next release

axelm’s picture

Status: Active » Patch (to be ported)
dajjen’s picture

StatusFileSize
new1019 bytes

Reroll patch.

axelm’s picture

Status: Patch (to be ported) » Fixed

Releases in Opigno 2.27

axelm’s picture

Status: Fixed » Closed (fixed)