protected function LearningPathAchievementController::getTimeSpentByStep in Opigno Learning path 3.x
Time spent if module is attempted.
3 calls to LearningPathAchievementController::getTimeSpentByStep()
- LearningPathAchievementController::build_course_steps in src/
Controller/ LearningPathAchievementController.php - Returns course steps renderable array.
- LearningPathAchievementController::trainingStepCourseBuild in src/
Controller/ LearningPathAchievementController.php - If step is course prepares a render array of content.
- LearningPathAchievementController::trainingStepModuleBuild in src/
Controller/ LearningPathAchievementController.php - If step is module prepares a render array of content.
File
- src/
Controller/ LearningPathAchievementController.php, line 1329
Class
- LearningPathAchievementController
- Class LearningPathAchievementController.
Namespace
Drupal\opigno_learning_path\ControllerCode
protected function getTimeSpentByStep($step) {
return isset($step['attempted']) && $step['time spent'] > 0 ? $step['time spent'] : FALSE;
}