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); $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: $scorm->name"); if (!$cm->visible and !isteacher($course->id)) { print_header($pagetitle, "$course->fullname", "$navigation $scorm->name", "", "", true, update_module_button($cm->id, $course->id, $strscorm), navmenu($course, $cm)); notice(get_string("activityiscurrentlyhidden")); } if ($frameset == "top") { add_to_log($course->id, "scorm", "view", "playscorm.php?id=$cm->id", "$scorm->id"); // // Print the page header // print_header($pagetitle, "$course->fullname", "$navigation framename}\" href=\"view.php?id=$cm->id\" title=\"$scorm->summary\">$scorm->name", "", "", true, update_module_button($cm->id, $course->id, $strscorm), navmenu($course, $cm, '_top')); echo "\n
".text_to_html($scorm->summary, true, false)."
\n"; if ($scoes = get_records_select("scorm_scoes","scorm='$scorm->id' order by id ASC")){ $level=0; $parents[$level]="/"; foreach ($scoes as $sco) { if ($parents[$level]!=$sco->parent) { if ($level>0 && $parents[$level-1]==$sco->parent) { $level--; } else { $level++; $parents[$level]=$sco->parent; } } $indenting = ""; for ($i=0;$i<$level;$i++) { $indenting .= "-"; } $options[$sco->id] = $indenting."> ".$sco->title; } } echo "\n \n"; echo " \n"; if ($_GET["mode"] == "browse") echo "\n"; echo "\n
id\" target=\"_top\">  \n"; choose_from_menu($options, "courseStructure", "", "", "document.navform.scoid.value=document.navform.courseStructure.options[document.navform.courseStructure.selectedIndex].value;document.navform.submit();"); echo "  
".get_string("browsemode","scorm")."
\n"; echo "\n\n"; } else { // // Frameset // if ($_POST["scoid"]) $scoid = "&scoid=".$_POST["scoid"]; echo "\n"; echo "$course->shortname: $scorm->name\n"; echo "\n"; echo "\n"; echo " id&mode=".$_POST["mode"]."&frameset=top\">\n"; echo " \n"; echo "\n"; echo "\n"; } ?>