You are here

function opigno_scorm_add_cmi_data in Opigno SCORM 3.x

Same name and namespace in other branches
  1. 8 opigno_scorm.module \opigno_scorm_add_cmi_data()

Get the CMI data for the SCORM player.

Invokes the hook_opigno_scorm_ui_register_cmi_data() on all implementing modules to retrieve data to pass to the SCORM player.

Parameters

object $scorm: Scorm object.

array $scos: Scos array.

Return value

array Cmi data.

1 call to opigno_scorm_add_cmi_data()
OpignoScormPlayer::toRendarableArray in src/OpignoScormPlayer.php
Build rendarable array for scorm package output.

File

./opigno_scorm.module, line 66
Module functionality implementation.

Code

function opigno_scorm_add_cmi_data($scorm, array $scos, $scorm_version) {
  $data = \Drupal::moduleHandler()
    ->invokeAll('opigno_scorm_register_cmi_data', [
    $scorm,
    $scos,
    $scorm_version,
  ]);
  \Drupal::moduleHandler()
    ->alter('opigno_scorm_register_cmi_data', $data, $scorm, $scos);
  return $data;
}