You are here

function opigno_learning_path_get_course_step in Opigno Learning path 8

Same name and namespace in other branches
  1. 3.x opigno_learning_path.module \opigno_learning_path_get_course_step()

Builds up a training course step.

Parameters

int $group_id: Training group ID.

int $uid: User ID.

\Drupal\group\Entity\GroupInterface $course: Group entity of the course.

Return value

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

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

3 calls to opigno_learning_path_get_course_step()
opigno_learning_path_get_all_steps in ./opigno_learning_path.module
Builds up a full list of all the steps in a group for a user.
opigno_learning_path_get_steps in ./opigno_learning_path.module
Builds up a list of steps in a group for a user.
opigno_learning_path_get_steps_current_attempt in ./opigno_learning_path.module
Builds a list of group steps for a user current attempt.

File

./opigno_learning_path.module, line 2605
Contains opigno_learning_path.module.

Code

function opigno_learning_path_get_course_step($group_id, $uid, GroupInterface $course, $latest_cert_date = NULL) {
  $opigno_lps = Drupal::service('opigno_lps');
  return $opigno_lps
    ->getCourseStep($group_id, $uid, $course, $latest_cert_date);
}