From 9438ede68a32db157ad3f05e27429b6a3b4b71e1 Mon Sep 17 00:00:00 2001 From: dongsheng Date: Fri, 18 Apr 2008 04:29:03 +0000 Subject: [PATCH] MDL-9378, new visualization for scorm, see tracker, head only --- mod/scorm/player.php | 149 +++++++++++++++++++------ mod/scorm/rd.js | 77 +++++++++++++ mod/scorm/styles.php | 258 +++++++++++++++++++++++++++++++++++++++---- 3 files changed, 426 insertions(+), 58 deletions(-) create mode 100644 mod/scorm/rd.js diff --git a/mod/scorm/player.php b/mod/scorm/player.php index 7ac0f3f372..41566c118d 100755 --- a/mod/scorm/player.php +++ b/mod/scorm/player.php @@ -4,7 +4,6 @@ require_once('../../config.php'); require_once('locallib.php'); - // // Checkin' script parameters // @@ -59,7 +58,6 @@ } $pagetitle = strip_tags("$course->shortname: ".format_string($scorm->name)); - if (!$cm->visible and !has_capability('moodle/course:viewhiddenactivities', get_context_instance(CONTEXT_COURSE,$course->id))) { $navlinks[] = array('name' => format_string($scorm->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance'); $navigation = build_navigation($navlinks); @@ -68,7 +66,6 @@ '', '', true, update_module_button($cm->id, $course->id, $strscorm), '', false); notice(get_string("activityiscurrentlyhidden")); } - // // TOC processing // @@ -138,6 +135,14 @@ ?> + + previd != 0) && ((!isset($sco->previous)) || ($sco->previous == 0))) { @@ -157,25 +162,88 @@ hidetoc == 0) { ?> -
-
-
+ +
+ +hidenav ==0){ + +?> + + + +
+ +
+ +hidenav == 0) && ($sco->previd != 0) && ($sco->previous == 0)) { + + // Print the prev LO button + + $scostr = '&scoid='.$sco->previd; + + $url = $CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modestr.$scostr; + +?> + + + +hidenav == 0) && ($sco->nextid != 0) && ($sco->next == 0)) { + + // Print the next LO button + + $scostr = '&scoid='.$sco->nextid; + + $url = $CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modestr.$scostr; + +?> + + + + + +
+ +
+ + +
toc; ?> -
-
+
+ +
-
> +
hidetoc == 2) || ($scorm->hidetoc == 1)){echo 'style="width:100%"';}?>> hidenav == 0) && // Teacher want to display navigation links + ($scorm->hidetoc != 0) && // The buttons has not been displayed ( ( ($sco->previd != 0) && // This is not the first learning object of the package @@ -193,25 +261,43 @@ '.get_string('browsemode','scorm')."
\n" : ''; ?> '.get_string('reviewmode','scorm')."
\n" : ''; ?> hidenav == 0) || ($scorm->hidetoc == 2)) { + if (($scorm->hidenav == 0) || ($scorm->hidetoc == 2) || ($scorm->hidetoc == 1)) { ?>
hidenav == 0) && ($sco->previd != 0) && ((!isset($sco->previous)) || ($sco->previous == 0))) { - /// Print the prev LO link + if (($scorm->hidenav == 0) && ($sco->previd != 0) && ($sco->previous == 0) && (($scorm->hidetoc == 2) || ($scorm->hidetoc == 1)) ) { + + // Print the prev LO button $scostr = '&scoid='.$sco->previd; $url = $CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modestr.$scostr; - echo '< '.get_string('prev','scorm').''; +?> + +
+ + + +
+ +hidetoc == 2) { echo $result->tocmenu; } - if (($scorm->hidenav == 0) && ($sco->nextid != 0) && ((!isset($sco->next)) || ($sco->next == 0))) { - /// Print the next LO link + if (($scorm->hidenav == 0) && ($sco->nextid != 0) && ($sco->next == 0) && (($scorm->hidetoc == 2) || ($scorm->hidetoc == 1))) { + + // Print the next LO button $scostr = '&scoid='.$sco->nextid; $url = $CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modestr.$scostr; - echo '  '.get_string('next','scorm').' >'; +?> + +
+ + + +
+ + @@ -219,7 +305,7 @@ -
+ @@ -233,18 +319,16 @@ prerequisites) { if ($scorm->popup == 0) { -?> - -scorm_resize();\n"; + + $fullurl="loadSCO.php?id=".$cm->id.$scoidstr.$modestr; + + echo " \n"; } else { ?> customcorners)) { print_container_end(); } ?> -
 
- + + + + diff --git a/mod/scorm/rd.js b/mod/scorm/rd.js new file mode 100644 index 0000000000..f54dc52665 --- /dev/null +++ b/mod/scorm/rd.js @@ -0,0 +1,77 @@ + diff --git a/mod/scorm/styles.php b/mod/scorm/styles.php index 5dbc1582d0..d637b3bcb3 100644 --- a/mod/scorm/styles.php +++ b/mod/scorm/styles.php @@ -1,82 +1,292 @@ .structlist { + list-style-type: none; + white-space: nowrap; + font-size: small; + } + .orgtitle { + font-weight: bold; + font-size: small; + } + .mod-scorm .top { + vertical-align: top; + } + .mod-scorm .left { + text-align: left; + } + .mod-scorm .center { + text-align: center; + } + .mod-scorm .right { + text-align: right; + } + .mod-scorm .scoframe { + position: relative; + + width: 100%; + + height: 100%; + + + } + + #mod-scorm-player #scormpage { + + position: relative; + width: 100%; + + + + } -#mod-scorm-player #tocbox { - float: left; - width: 17%; - left: 0px; - top: 0px; -} + #mod-scorm-player #tochead { + + position: relative; + text-align: center; - font-weight: bold; -} -#mod-scorm-player #scormbox { - right: 0px; + + top: 3px; + + height: 30px; + + + } + #mod-scorm-player .toc { - float: right; + width: 80%; - right: 0px; - top: 0px; + + margin-left: 20%; + + + + } + #mod-scorm-player .no-toc { + width: 100%; + + + } + #mod-scorm-player #scormobject { - /* border: 1px solid black; */ + + height: 400px; + + + + } + #mod-scorm-player #scormtop { + + position: relative; + width: 100%; - height: auto; + + height: 30px; + + + } -#mod-scorm-player #scormmode { - float: left; - width: 50%; + +#mod-scorm-player #scormbrowse { + + position: absolute; + left: 5px; + top: 0px; + + + + } + #mod-scorm-player #scormnav { - float: right; + + position: absolute; + right: 5px; + top: 0px; + + text-align: center; + + top: 3px; + + width: 100%; + + + + } -#mod-scorm-player .structurelist { + + + +#mod-scorm-view .structurehead { + + text-align: center; + + + +} + + + +#mod-scorm-view .structurelist { + list-style-type: none; - text-indent:-4ex; - font-size: small; + + white-space: nowrap; + + + } -#mod-scorm-view .structurehead { - font-weight: bold; + + +#mod-scorm-player #scormbox { + + width: 74%; + + position: absolute; + + right: 0px; + + top: 0px; + + + +} + + + +#mod-scorm-player #tocbox { + + position: relative; + + left: 0px; + + width: 24%; + + font-size: 0.8em; + + + +} + + + +#mod-scorm-player #tochead { + + position: relative; + text-align: center; + + top: 3px; + + height: 30px; + + + +} + + + +#toctree { + + position:relative; + + width:100%; + + overflow-x: auto; + + overflow-y: auto; + + + +} + +.structurelist { + + list-style-type: none; + } + +#mod-scorm-player .structurelist { + + position: relative; + + list-style-type: none; + + width: 96%; + + margin-left:0; + + padding-left: 0; + + margin-right:0; + + padding-right: 0; + + padding-top: 0; + + padding-bottom: 0; + + margin-top:0; + + margin-bottom:0; + + + + +} + + + +#mod-scorm-player .structurelist ul{ + + padding-left: 0.5em; + + margin-left: 0.5em; + +} + #mod-scorm-view .structurelist { + list-style-type: none; + white-space: nowrap; + } + -- 2.39.5