function opigno_scorm_ui_player_start_sco in Opigno 7
Determine the start SCO for the SCORM package.
@todo Get last viewed SCO.
Parameters
array $flat_tree:
Return value
object
1 call to opigno_scorm_ui_player_start_sco()
- opigno_scorm_ui_render_player in modules/
scorm/ ui/ opigno_scorm_ui.module - Render a SCORM player for the given SCORM object.
File
- modules/
scorm/ ui/ includes/ opigno_scorm_ui.player.inc, line 80 - Player logic.
Code
function opigno_scorm_ui_player_start_sco($flat_tree) {
foreach ($flat_tree as $sco) {
if (!empty($sco->launch)) {
return $sco;
}
}
// Failsafe. Just get the first element.
return array_shift($flat_tree);
}