- Issue created by @jsbalsera
- Status changed to Needs review
over 1 year ago 10:37am 24 May 2023 - 🇺🇸United States pixiekat
You also need this one for line 613 getApprovedModuleByStep()
When there's a course without a module and the user goes to See progress it results in a 500 error:
DivisionByZeroError: Division by zero in Drupal\opigno_learning_path\Controller\LearningPathAchievementController->getStatusPercentCourseByStep() (line 669 of modules/contrib/opigno_learning_path/src/Controller/LearningPathAchievementController.php).
Create a course without adding any module, then click on the See Progress button. Example url: `group/1/training-statistic`
Check that there are steps
$passed_percent = $course_steps['total'] ? round(($course_steps['passed'] / $course_steps['total']) * 100) : 0;
None
None
None
None
Needs review
3.0
Code
You also need this one for line 613 getApprovedModuleByStep()