function opigno_scorm_scorm_cmi_get in Opigno SCORM 3.x
Same name and namespace in other branches
- 8 opigno_scorm.module \opigno_scorm_scorm_cmi_get()
Helper function to get SCORM CMI data while also providing a default value.
Parameters
int $uid: User ID.
int $scorm_id: Scorn ID.
string $cmi_key: Cmi key.
mixed $default_value: Default.
Return value
mixed|null Scorm cmi.
2 calls to opigno_scorm_scorm_cmi_get()
- OpignoScormPlayer::toRendarableArray in src/
OpignoScormPlayer.php - Build rendarable array for scorm package output.
- opigno_scorm_opigno_scorm_register_cmi_data in ./
opigno_scorm.module - Implements hook_opigno_scorm_register_cmi_data().
File
- ./
opigno_scorm.module, line 183 - Module functionality implementation.
Code
function opigno_scorm_scorm_cmi_get($uid, $scorm_id, $cmi_key, $default_value = NULL) {
$value = opigno_scorm_cmi_get($uid, $scorm_id, $cmi_key);
return isset($value) ? $value : $default_value;
}