LpSteps::getCourseStep should include attempts allowed

Created on 12 May 2025, 25 days ago

Problem/Motivation

When manually scoring a module, a failure is exposed that doesn't allow the Learning Path to complete:

https://www.drupal.org/project/opigno_module/issues/3522075 πŸ› ModuleResultForm doesn't complete LP if passed Active

As part of that fix, a fix is required in LpSteps::getCourseStep which loads the number of attempts a step may be performed by the student. This allows downstream modules to check for mandatory steps with outstanding attempts so as to mark the LP status.

Steps to reproduce

Call LpSteps::getCourseStep(). The output should include the allowed attempts. If unlimited, it should be zero.

Proposed resolution

Add 'allowed attempts' to the array output.

Remaining tasks

Create patch.

User interface changes

None.

API changes

Steps recalled by this method now have the attempts allowed available to them.

Data model changes

None.

πŸ› Bug report
Status

Active

Version

3.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States socketwench

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024