course)) { error("Course is misconfigured"); } if (! $scorm = get_record("scorm", "id", $cm->instance)) { error("Course module is incorrect"); } } else { 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"); } } require_login($course->id, false, $cm); $strscorms = get_string("modulenameplural", "scorm"); $strscorm = get_string("modulename", "scorm"); if ($course->category) { $navigation = "framename}\" href=\"../../course/view.php?id=$course->id\">$course->shortname -> 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"); // // Print the page header // if (!$cm->visible and !isteacher($course->id)) { print_header($pagetitle, "$course->fullname", "$navigation ".format_string($scorm->name), "", "", true, update_module_button($cm->id, $course->id, $strscorm), navmenu($course, $cm)); notice(get_string("activityiscurrentlyhidden")); } else { 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 (isteacher($course->id)) { if ($sco_users = get_records_select("scorm_scoes_track", "scormid='$scorm->id' GROUP BY userid")) { echo "
framename}\" href=\"report.php?id=$cm->id\">".get_string("viewallreports","scorm",count($sco_users))."
"; } else { echo "
".get_string("noreports","scorm")."
"; } } // 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'); if (isguest()) { print_heading(get_string("guestsno", "scorm")); print_footer($course); exit; } echo "
"; $liststyle = "style=\"list-style-type:none;\""; print_simple_box_start("center"); echo "\n"; echo " \n"; $organization = $scorm->launch; if ($orgs = get_records_select_menu('scorm_scoes',"scorm='$scorm->id' AND organization='' AND launch=''",'id','id,title')) { if (count($orgs) > 1) { if (isset($_POST['organization'])) { $organization = $_POST['organization']; } echo "\n"; } } $orgidentifier = ''; if ($org = get_record('scorm_scoes','id',$organization)) { if (($org->organization == '') && ($org->launch == '')) { $orgidentifier = $org->identifier; } else { $orgidentifier = $org->organization; } } echo " \n"; echo "
".get_string("coursestruct","scorm")."
".get_string('organizations','scorm').": \n"; choose_from_menu($orgs, 'organization', "$organization", '','submit()'); echo "
\n"; $incomplete = scorm_display_structure($scorm,'scormlist',$orgidentifier); echo "
\n"; print_simple_box_end(); echo "
id\">\n"; echo "\n\n\n\n\n\n
"; print_string("mode","scorm"); echo ": \n"; if ($incomplete === true) { echo "\n"; } else { echo "\n"; } echo "
"; echo ' '; echo "\n
\n

"; ?>