Index: player.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/scorm/player.php,v
retrieving revision 1.16.2.5
diff -c -r1.16.2.5 player.php
*** player.php	8 Jul 2007 00:15:39 -0000	1.16.2.5
--- player.php	16 Jul 2008 22:53:26 -0000
***************
*** 75,81 ****
                   '', '', true, update_module_button($cm->id, $course->id, $strscorm), '', false);
          notice(get_string("activityiscurrentlyhidden"));
      }
- 
      //
      // TOC processing
      //
--- 75,80 ----
***************
*** 136,148 ****
      print_header($pagetitle, "$course->fullname",
                   "$navigation <a target='{$CFG->framename}' href='view.php?id=$cm->id'>".format_string($scorm->name,true)."</a>",
                   '', '', true, update_module_button($cm->id, $course->id, $strscorm), '', false, $bodyscript);
!     if ($sco->scormtype == 'sco') {
  ?>
      <script language="JavaScript" type="text/javascript" src="request.js"></script>
      <script language="JavaScript" type="text/javascript" src="api.php?id=<?php echo $cm->id.$scoidstr.$modestr.$attemptstr ?>"></script>
  <?php
!     }
!     if (($sco->previd != 0) && ($sco->previous == 0)) {
          $scostr = '&scoid='.$sco->previd;
          echo '    <script language="javascript">var prev="'.$CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modepop.$scostr."\";</script>\n";
      } else {
--- 135,155 ----
      print_header($pagetitle, "$course->fullname",
                   "$navigation <a target='{$CFG->framename}' href='view.php?id=$cm->id'>".format_string($scorm->name,true)."</a>",
                   '', '', true, update_module_button($cm->id, $course->id, $strscorm), '', false, $bodyscript);
!     // if ($sco->scormtype == 'sco') {
  ?>
      <script language="JavaScript" type="text/javascript" src="request.js"></script>
      <script language="JavaScript" type="text/javascript" src="api.php?id=<?php echo $cm->id.$scoidstr.$modestr.$attemptstr ?>"></script>
+     <script type="text/javascript" src="<?=$CFG->wwwroot?>/mod/scorm/rd.js"></script>
+        <script type="text/javascript">
+      <!--    
+          window.onresize = function() {
+              scorm_resize();
+          };
+      -->  
+      </script>
  <?php
!     // }
!     if (($sco->previd != 0) && ((!isset($sco->previous)) || ($sco->previous == 0))) {
          $scostr = '&scoid='.$sco->previd;
          echo '    <script language="javascript">var prev="'.$CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modepop.$scostr."\";</script>\n";
      } else {
***************
*** 159,183 ****
  <?php  
      if ($scorm->hidetoc == 0) {
  ?>
!         <div id="tocbox" class="generalbox">
!             <div id="tochead" class="header"><?php print_string('contents','scorm') ?></div>
!             <div id="toctree">
              <?php echo $result->toc; ?>
!             </div>
!         </div>
  <?php
          $class = ' class="toc"';
      } else {
          $class = ' class="no-toc"';
      }
  ?>
!         <div id="scormbox"<?php echo $class ?>>
  <?php
      // This very big test check if is necessary the "scormtop" div
      if (
             ($mode != 'normal') ||  // We are not in normal mode so review or browse text will displayed
             (
                 ($scorm->hidenav == 0) &&  // Teacher want to display navigation links
                 (
                     (
                         ($sco->previd != 0) &&  // This is not the first learning object of the package
--- 166,254 ----
  <?php  
      if ($scorm->hidetoc == 0) {
  ?>
! 
!         <div id="tocbox">
! 
! <?php
! 
!         if ($scorm->hidenav ==0){
! 
! ?>
! 
!             <!-- Bottons nav at left-->
! 
!             <div id="tochead">
! 
!                 <form name="tochead" method="post" action="player.php?id=<?php echo $cm->id ?>" target="_top">
! 
! <?php
! 
!             $orgstr = '&amp;currentorg='.$currentorg;
! 
!             if (($scorm->hidenav == 0) && ($sco->previd != 0) && ($sco->previous == 0)) {
! 
!                 // Print the prev LO button
! 
!                 $scostr = '&amp;scoid='.$sco->previd;
! 
!                 $url = $CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modestr.$scostr;
! 
! ?>
! 
!                     <input name="prev" type="button" value="<?php print_string('prev','scorm') ?>" onClick="document.location.href=' <?php echo $url; ?> '"/>
! 
! <?php
! 
!             }
! 
!             
! 
!             if (($scorm->hidenav == 0) && ($sco->nextid != 0) && ($sco->next == 0)) {
! 
!                 // Print the next LO button
! 
!                 $scostr = '&amp;scoid='.$sco->nextid;
! 
!                 $url = $CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modestr.$scostr;
! 
! ?>
! 
!                     <input name="next" type="button" value="<?php print_string('next','scorm') ?>" onClick="document.location.href=' <?php echo $url; ?> '"/>
! 
! <?php
! 
!             }
! 
! ?>
! 
!                 </form>
! 
!             </div> <!-- tochead -->
! 
! <?php
! 
!         }
! ?>
!             <div id="toctree" class="generalbox">
              <?php echo $result->toc; ?>
!             </div> <!-- toctree -->
! 
!         </div> <!--  tocbox -->
!             
  <?php
          $class = ' class="toc"';
      } else {
          $class = ' class="no-toc"';
      }
  ?>
!         <div id="scormbox"<?php echo $class; if(($scorm->hidetoc == 2) || ($scorm->hidetoc == 1)){echo 'style="width:100%"';}?>>
  <?php
      // This very big test check if is necessary the "scormtop" div
      if (
             ($mode != 'normal') ||  // We are not in normal mode so review or browse text will displayed
             (
                 ($scorm->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
***************
*** 200,206 ****
                  <div id="scormnav" class="right">
          <?php
              $orgstr = '&amp;currentorg='.$currentorg;
!             if (($scorm->hidenav == 0) && ($sco->previd != 0) && ($sco->previous == 0)) {
                  /// Print the prev LO link
                  $scostr = '&amp;scoid='.$sco->previd;
                  $url = $CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modestr.$scostr;
--- 271,277 ----
                  <div id="scormnav" class="right">
          <?php
              $orgstr = '&amp;currentorg='.$currentorg;
!             if (($scorm->hidenav == 0) && ($sco->previd != 0) && ((!isset($sco->previous)) || ($sco->previous == 0))) {
                  /// Print the prev LO link
                  $scostr = '&amp;scoid='.$sco->previd;
                  $url = $CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modestr.$scostr;
***************
*** 209,215 ****
              if ($scorm->hidetoc == 2) {
                  echo $result->tocmenu;
              }
!             if (($scorm->hidenav == 0) && ($sco->nextid != 0) && ($sco->next == 0)) {
                  /// Print the next LO link
                  $scostr = '&amp;scoid='.$sco->nextid;
                  $url = $CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modestr.$scostr;
--- 280,286 ----
              if ($scorm->hidetoc == 2) {
                  echo $result->tocmenu;
              }
!             if (($scorm->hidenav == 0) && ($sco->nextid != 0) && ((!isset($sco->next)) || ($sco->next == 0))) {
                  /// Print the next LO link
                  $scostr = '&amp;scoid='.$sco->nextid;
                  $url = $CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modestr.$scostr;
***************
*** 221,227 ****
  <?php
          } 
  ?>
!             </div>
  <?php
      } // The end of the very big test
  ?>
--- 292,298 ----
  <?php
          } 
  ?>
!             </div> <!-- Scormtop -->
  <?php
      } // The end of the very big test
  ?>
***************
*** 235,251 ****
  <?php
      if ($result->prerequisites) {
          if ($scorm->popup == 0) {
! ?>
!                 <iframe id="main"
!                         class="scoframe"
!                         width="<?php echo $scorm->width<=100 ? $scorm->width.'%' : $scorm->width ?>" 
!                         height="<?php echo $scorm->height<=100 ? $scorm->height.'%' : $scorm->height ?>" 
!                         src="loadSCO.php?id=<?php echo $cm->id.$scoidstr.$modestr ?>">
!                 </iframe>
! <?php
          } else {
  ?>
                      <script language="javascript">
                          function openpopup(url,name,options,width,height) {
                              fullurl = "<?php echo $CFG->wwwroot.'/mod/scorm/' ?>" + url;
                              windowobj = window.open(fullurl,name,options);
--- 306,321 ----
  <?php
      if ($result->prerequisites) {
          if ($scorm->popup == 0) {
!             echo "                <script type=\"text/javascript\">scorm_resize();</script>\n";
! 
!             $fullurl="loadSCO.php?id=".$cm->id.$scoidstr.$modestr;
! 
!             echo "                <iframe id=\"scoframe1\" class=\"scoframe\" name=\"scoframe1\" src=\"{$fullurl}\"></iframe>\n";   
          } else {
  ?>
                      <script language="javascript">
+                     //<![CDATA[
+                     scorm_resize();
                          function openpopup(url,name,options,width,height) {
                              fullurl = "<?php echo $CFG->wwwroot.'/mod/scorm/' ?>" + url;
                              windowobj = window.open(fullurl,name,options);
***************
*** 267,280 ****
                          url = "loadSCO.php?id=<?php echo $cm->id.$scoidpop ?>";
                          width = <?php p($scorm->width) ?>;
                          height = <?php p($scorm->height) ?>;
!                         var main = openpopup(url, "scormpopup", "<?php p($scorm->options) ?>", width, height);
                      </script>
                      <noscript>
!                     <iframe id="main"
!                             class="scoframe"
!                             width="<?php echo $scorm->width<=100 ? $scorm->width.'%' : $scorm->width ?>" 
!                             height="<?php echo $scorm->height<=100 ? $scorm->height.'%' : $scorm->height ?>" 
!                             src="loadSCO.php?id=<?php echo $cm->id.$scoidstr.$modestr ?>">
                      </iframe>
                      </noscript>
  <?php            
--- 337,347 ----
                          url = "loadSCO.php?id=<?php echo $cm->id.$scoidpop ?>";
                          width = <?php p($scorm->width) ?>;
                          height = <?php p($scorm->height) ?>;
!                         var main = openpopup(url, "<?php p($scorm->name) ?>", "<?php p($scorm->options) ?>", width, height);
!                     //]]>
                      </script>
                      <noscript>
!                     <iframe id="main" class="scoframe" src="loadSCO.php?id=<?php echo $cm->id.$scoidstr.$modestr ?>">
                      </iframe>
                      </noscript>
  <?php            
Index: styles.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/scorm/styles.php,v
retrieving revision 1.11
diff -c -r1.11 styles.php
*** styles.php	20 Sep 2006 19:46:53 -0000	1.11
--- styles.php	16 Jul 2008 22:53:26 -0000
***************
*** 3,8 ****
--- 3,10 ----
    white-space: nowrap;
    font-size: small;
  }
+ 
+ 
  .orgtitle {
    font-weight: bold;
    font-size: small;
***************
*** 20,83 ****
    text-align: right;
  }
  .mod-scorm .scoframe {
  
  }
  
  #mod-scorm-player #scormpage {
    position: relative;
    width: 100%;
  }
! #mod-scorm-player #tocbox {
!   position: absolute;
!   left: 0px;
!   top: 0px;
!   width: 19%;
! }
  #mod-scorm-player #tochead {
    text-align: center;
!   font-weight: bold;
! }
! #mod-scorm-player #scormbox {
!   position: absolute;
!   right: 0px;
!   top: 0px;
  }
  #mod-scorm-player .toc {
    width: 80%; 
    margin-left: 20%; 
  }
  #mod-scorm-player .no-toc {
    width: 100%;
  }
  #mod-scorm-player #scormobject {
!  /* border: 1px solid black; */
  }
  #mod-scorm-player #scormtop {
    position: relative;
    width: 100%;
    height: 30px;
  }
  #mod-scorm-player #scormbrowse {
    position: absolute;
    left: 5px;
    top: 0px;
  }
  #mod-scorm-player #scormnav {
    position: absolute;
    right: 5px;
    top: 0px;
  }
! #mod-scorm-player .structurelist {
    list-style-type: none;
!   text-indent:-4ex;
!   font-size: small;
  }
  
! #mod-scorm-view .structurehead {
!   font-weight: bold;
    text-align: center;
  }
  #mod-scorm-view .structurelist  {
    list-style-type: none;
    white-space: nowrap;
  }
--- 22,204 ----
    text-align: right;
  }
  .mod-scorm .scoframe {
+    position: relative;
+    width: 100%;
+    height: 100%;
  
  }
  
+ 
  #mod-scorm-player #scormpage {
    position: relative;
    width: 100%;
  }
! 
  #mod-scorm-player #tochead {
+   position: relative;
    text-align: center;
!   top: 3px;
!   height: 30px;  
  }
+ 
+ 
  #mod-scorm-player .toc {
    width: 80%; 
    margin-left: 20%; 
  }
+ 
  #mod-scorm-player .no-toc {
    width: 100%;
  }
+ 
  #mod-scorm-player #scormobject {
!   height: 400px; 
  }
+ 
  #mod-scorm-player #scormtop {
    position: relative;
    width: 100%;
    height: 30px;
  }
+ 
  #mod-scorm-player #scormbrowse {
    position: absolute;
    left: 5px;
    top: 0px;
  }
+ 
  #mod-scorm-player #scormnav {
    position: absolute;
    right: 5px;
    top: 0px;
+   text-align: center;
+   top: 3px;
+   width: 100%;
  }
! 
! 
! #mod-scorm-view .structurehead {
!   text-align: center;
! }
! 
! #mod-scorm-view .structurelist  {
    list-style-type: none;
!   white-space: nowrap;
  }
  
! 
! #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;
+ 
  }
+ 
