You are here

function opigno_learning_path_get_module_step in Opigno Learning path 3.x

Same name and namespace in other branches
  1. 8 opigno_learning_path.module \opigno_learning_path_get_module_step()

Builds up a training module step.

Parameters

int $group_id: Training group ID.

int $uid: User ID.

\Drupal\opigno_module\Entity\OpignoModule $module: Opigno Module entity.

int $latest_cert_date: Latest certification date.

Return value

array Data array about step in a group for a user.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

9 calls to opigno_learning_path_get_module_step()
LearningPathAchievementController::build_module_panel in src/Controller/LearningPathAchievementController.php
Returns module panel renderable array.
LearningPathAchievementController::module_approved_activities in src/Controller/LearningPathAchievementController.php
Returns module approved activities.
LearningPathAchievementTrait::getActivities in src/Traits/LearningPathAchievementTrait.php
Gets the activities list by the group and module.
OpignoLinkConditionTest::finishCurrentModuleAttempt in tests/src/Functional/OpignoLinkConditionTest.php
Force finish module current attempt.
OpignoModuleScoreTest::createAndFinishAttempt in tests/src/Functional/OpignoModuleScoreTest.php
Creates and finishes attempt.

... See full list

File

./opigno_learning_path.module, line 2492
Contains opigno_learning_path.module.

Code

function opigno_learning_path_get_module_step($group_id, $uid, OpignoModule $module, $latest_cert_date = NULL) {
  $opigno_lps = Drupal::service('opigno_lps');
  return $opigno_lps
    ->getModuleStep($group_id, $uid, $module, $latest_cert_date);
}