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); $context = get_context_instance(CONTEXT_COURSE, $course->id); if (isset($SESSION->scorm_scoid)) { unset($SESSION->scorm_scoid); } $strscorms = get_string("modulenameplural", "scorm"); $strscorm = get_string("modulename", "scorm"); if ($course->id != SITEID) { $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)); add_to_log($course->id, 'scorm', 'pre-view', 'view.php?id='.$cm->id, "$scorm->id"); if ((has_capability('mod/scorm:skipview', get_context_instance(CONTEXT_MODULE,$cm->id))) && scorm_simple_play($scorm,$USER)) { exit; } // // Print the page header // print_header($pagetitle, "$course->fullname", "$navigation framename}\" href=\"view.php?id=$cm->id\">".format_string($scorm->name,true)."", '', '', true, update_module_button($cm->id, $course->id, $strscorm), navmenu($course, $cm)); if (empty($cm->visible) and !has_capability('moodle/course:manageactivities', $context)) { notice(get_string("activityiscurrentlyhidden")); } if (has_capability('moodle/course:manageactivities', $context)) { $trackedusers = get_record('scorm_scoes_track', 'scormid', $scorm->id, '', '', '', '', 'count(distinct(userid)) as c'); if ($trackedusers->c > 0) { echo "
framename}\" href=\"report.php?id=$cm->id\"> ".get_string('viewallreports','scorm',$trackedusers->c).'
'; } else { echo ''; } } // Print the main part of the page print_heading(format_string($scorm->name)); print_simple_box(format_text($scorm->summary), 'center', '70%', '', 5, 'generalbox', 'intro'); scorm_view_display($USER, $scorm, 'view.php?id='.$cm->id, $cm); print_footer($course); ?>