course)) { error("Course is misconfigured"); } if (! $scorm = get_record("scorm", "id", $cm->instance)) { error("Course module is incorrect"); } } else if (!empty($a)) { if (! $scorm = get_record("scorm", "id", $a)) { error("Course module is incorrect"); } if (! $course = get_record("course", "id", $scorm->course)) { error("Course is misconfigured"); } if (! $cm = get_coursemodule_from_instance("scorm", $scorm->id, $course->id)) { error("Course Module ID was incorrect"); } } else { error('A required parameter is missing'); } require_login($course->id, false, $cm); $strscorms = get_string('modulenameplural', 'scorm'); $strscorm = get_string('modulename', 'scorm'); $strpopup = get_string('popup','scorm'); if ($course->category != 0) { $navigation = "framename}\" href=\"../../course/view.php?id=$course->id\">$course->shortname ->"; if ($scorms = get_all_instances_in_course('scorm', $course)) { // The module SCORM activity with the least id is the course $firstscorm = current($scorms); if (!(($course->format == 'scorm') && ($firstscorm->id == $scorm->id))) { $navigation .= "framename}\" href=\"index.php?id=$course->id\">$strscorms ->"; } } } else { $navigation = "framename}\" href=\"index.php?id=$course->id\">$strscorms ->"; } $pagetitle = strip_tags("$course->shortname: ".format_string($scorm->name)); if (!$cm->visible and !isteacher($course->id)) { print_header($pagetitle, "$course->fullname", "$navigation ".format_string($scorm->name,true)."", '', '', true, update_module_button($cm->id, $course->id, $strscorm), '', false); notice(get_string("activityiscurrentlyhidden")); } // // TOC processing // $attempt = scorm_get_last_attempt($scorm->id, $USER->id); if (($newattempt=='on') && (($attempt < $scorm->maxattempt) || ($scorm->maxattempt == 0))) { $attempt++; } $attemptstr = '&attempt=' . $attempt; $result = scorm_get_toc($USER,$scorm,'structurelist',$currentorg,$scoid,$mode,$attempt,true); $sco = $result->sco; if (($mode == 'browse') && ($scorm->hidebrowse == 1)) { $mode = 'normal'; } if ($mode != 'browse') { if ($trackdata = scorm_get_tracks($sco->id,$USER->id,$attempt)) { if (($trackdata->status == 'completed') || ($trackdata->status == 'passed') || ($trackdata->status == 'failed')) { $mode = 'review'; } else { $mode = 'normal'; } } } add_to_log($course->id, 'scorm', 'view', "player.php?id=$cm->id&scoid=$sco->id", "$scorm->id"); $scoidstr = '&scoid='.$sco->id; $scoidpop = '&scoid='.$sco->id; $modestr = '&mode='.$mode; if ($mode == 'browse') { $modepop = '&mode='.$mode; } else { $modepop = ''; } $orgstr = '¤torg='.$currentorg; $SESSION->scorm_scoid = $sco->id; $SESSION->scorm_status = 'Not Initialized'; $SESSION->scorm_mode = $mode; $SESSION->attempt = $attempt; // // Print the page header // $bodyscript = ''; if ($scorm->popup == 1) { $bodyscript = 'onunload="main.close();"'; } $exitlink = '('.get_string('exit','scorm').') '; print_header($pagetitle, "$course->fullname", "$navigation ".format_string($scorm->name,true)."", '', '', true, $exitlink.update_module_button($cm->id, $course->id, $strscorm), '', false, $bodyscript); if ($sco->scormtype == 'sco') { ?> previd != 0) && ($sco->previous == 0)) { $scostr = '&scoid='.$sco->previd; echo ' \n"; } else { echo ' \n"; } if (($sco->nextid != 0) && ($sco->next == 0)) { $scostr = '&scoid='.$sco->nextid; echo ' \n"; } else { echo ' \n"; } ?>
hidetoc == 0) { ?>
toc; ?>
> hidenav == 0) && // Teacher want to display navigation links ( ( ($sco->previd != 0) && // This is not the first learning object of the package ($sco->previous == 0) // Moodle must manage the previous link ) || ( ($sco->nextid != 0) && // This is not the last learning object of the package ($sco->next == 0) // Moodle must manage the next link ) ) ) || ($scorm->hidetoc == 2) // Teacher want to display toc in a small popup menu ) { ?>
'.get_string('browsemode','scorm')."
\n" : ''; ?> '.get_string('reviewmode','scorm')."
\n" : ''; ?> hidenav == 0) || ($scorm->hidetoc == 2)) { ?>
hidenav == 0) && ($sco->previd != 0) && ($sco->previous == 0)) { /// Print the prev LO link $scostr = '&scoid='.$sco->previd; $url = $CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modestr.$scostr; echo '< '.get_string('prev','scorm').''; } if ($scorm->hidetoc == 2) { echo $result->tocmenu; } if (($scorm->hidenav == 0) && ($sco->nextid != 0) && ($sco->next == 0)) { /// Print the next LO link $scostr = '&scoid='.$sco->nextid; $url = $CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modestr.$scostr; echo '  '.get_string('next','scorm').' >'; } ?>
prerequisites) { if ($scorm->popup == 0) { if (strpos('MSIE',$_SERVER['HTTP_USER_AGENT']) === false) { /// Internet Explorer does not has full support to objects ?>