mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 09:56:38 +02:00
Added sco frame size
Completed compliance for scorm 1.2
This commit is contained in:
parent
b3df3a0d71
commit
5f18d4e79a
10 changed files with 175 additions and 82 deletions
|
@ -76,6 +76,7 @@
|
|||
}
|
||||
|
||||
$strexpand = get_string('expcoll','scorm');
|
||||
$strpopup = get_string('popup','scorm');
|
||||
|
||||
//
|
||||
// Print the page header
|
||||
|
@ -87,46 +88,8 @@
|
|||
"$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,$bodyscripts);
|
||||
?>
|
||||
<style type="text/css">
|
||||
.scormlist {
|
||||
list-style-type:none;
|
||||
text-indent:-4ex;
|
||||
}
|
||||
|
||||
.fullscreen {
|
||||
width: 100%;
|
||||
vertical-align: top;
|
||||
}
|
||||
</style>
|
||||
<script language="Javascript">
|
||||
<!--
|
||||
function playSCO(scoid) {
|
||||
if (scoid == 0) {
|
||||
document.location = 'view.php?id=<?php echo $cm->id ?>';
|
||||
} else {
|
||||
document.navform.scoid.value=scoid;
|
||||
document.navform.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function expandCollide(which,list) {
|
||||
var nn=document.ids?true:false
|
||||
var w3c=document.getElementById?true:false
|
||||
var beg=nn?"document.ids.":w3c?"document.getElementById(":"document.all.";
|
||||
var mid=w3c?").style":".style";
|
||||
|
||||
if (eval(beg+list+mid+".display") != "none") {
|
||||
which.src = "pix/plus.gif";
|
||||
eval(beg+list+mid+".display='none';");
|
||||
} else {
|
||||
which.src = "pix/minus.gif";
|
||||
eval(beg+list+mid+".display='block';");
|
||||
}
|
||||
}
|
||||
-->
|
||||
</script>
|
||||
|
||||
<table class="fullscreen" height="90%">
|
||||
|
||||
<table width="100%">
|
||||
<tr><td valign="top">
|
||||
<p><?php echo format_text($scorm->summary) ?></p>
|
||||
<p><?php echo $mode == 'browse' ? get_string('browsemode','scorm') : ' '; ?></p>
|
||||
|
@ -134,12 +97,13 @@
|
|||
<tr>
|
||||
<th>
|
||||
<div style='float: left;'><?php print_string('coursestruct','scorm') ?></div>
|
||||
<div style='float:right;'>
|
||||
<a href='#' onClick='expandCollide(imgmain,0);'><img id='imgmain' src="pix/minus.gif" alt="<?php echo $strexpand ?>" title="<?php echo $strexpand ?>"/></a>
|
||||
</div>
|
||||
<!--<div style='float:right;'>
|
||||
<a href='#' onClick='popup(main,popupimg);'><img id='popupimg' src="pix/popup.gif" alt="<?php echo $strpopup ?>" title="<?php echo $strpopup ?>"/></a>
|
||||
</div> -->
|
||||
</th>
|
||||
</tr>
|
||||
<tr><td>
|
||||
<!-- <tr><td width="<?php echo $CFG->scorm_structurewidth ?>%"> -->
|
||||
<tr><td width="<?php echo $CFG->scorm_structurewidth ?>%">
|
||||
<?php
|
||||
$sco = scorm_display_structure($scorm,'scormlist',$currentorg,$scoid,$mode,true);
|
||||
if ($mode == 'normal') {
|
||||
|
@ -161,17 +125,64 @@
|
|||
<input name="scoid" type="hidden" />
|
||||
<input name="currentorg" type="hidden" value="<?php echo $currentorg ?>" />
|
||||
<input name="mode" type="hidden" value="<?php echo $mode ?>" />
|
||||
<input name="prev" type="<?php if ($sco->prev == 0) { echo 'hidden'; } else { echo 'button'; } ?>" value="<?php print_string('prev','scorm') ?>" onClick="playSCO(<?php echo $sco->prev ?>);" />
|
||||
<input name="next" type="<?php if ($sco->next == 0) { echo 'hidden'; } else { echo 'button'; } ?>" value="<?php print_string('next','scorm') ?>" onClick="playSCO(<?php echo $sco->next ?>);" /><br />
|
||||
<input name="prev" type="<?php if (($sco->prev == 0) || ($sco->showprev == 1)) { echo 'hidden'; } else { echo 'button'; } ?>" value="<?php print_string('prev','scorm') ?>" onClick="prevSCO();" />
|
||||
<input name="next" type="<?php if (($sco->next == 0) || ($sco->shownext == 1)) { echo 'hidden'; } else { echo 'button'; } ?>" value="<?php print_string('next','scorm') ?>" onClick="nextSCO();" /><br />
|
||||
<input name="exit" type="button" value="<?php print_string('exit','scorm') ?>" onClick="playSCO(0)" />
|
||||
</form>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="fullscreen" height="90%">
|
||||
<iframe name="main" class="fullscreen" height="<?php echo $CFG->scorm_frameheight ?>" src="loadSCO.php?id=<?php echo $cm->id.$scoidstring.$modestring ?>"></iframe>
|
||||
<td valign="top" width="<?php print $scorm->width ?>">
|
||||
<iframe name="main" width="100%" height="<?php echo $scorm->height ?>" src="loadSCO.php?id=<?php echo $cm->id.$scoidstring.$modestring ?>"></iframe>
|
||||
</td></tr>
|
||||
</table>
|
||||
<style type="text/css">
|
||||
.scormlist {
|
||||
list-style-type:none;
|
||||
text-indent:-4ex;
|
||||
}
|
||||
</style>
|
||||
<script language="Javascript">
|
||||
<!--
|
||||
function playSCO(scoid) {
|
||||
if (scoid == 0) {
|
||||
document.location = 'view.php?id=<?php echo $cm->id ?>';
|
||||
} else {
|
||||
document.navform.scoid.value=scoid;
|
||||
document.navform.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function popup(win,image) {
|
||||
win = window.open("loadSCO.php?id=<?php echo $cm->id.$scoidstring.$modestring ?>","","width=<?php echo $scorm->width ?>,height=<?php echo $scorm->height ?>,scrollbars=1");
|
||||
image.src = "pix/popdown.gif";
|
||||
return win;
|
||||
}
|
||||
|
||||
function prevSCO() {
|
||||
playSCO(<?php echo $sco->prev ?>);
|
||||
}
|
||||
|
||||
function nextSCO() {
|
||||
playSCO(<?php echo $sco->next ?>);
|
||||
}
|
||||
|
||||
function expandCollide(which,list) {
|
||||
var nn=document.ids?true:false
|
||||
var w3c=document.getElementById?true:false
|
||||
var beg=nn?"document.ids.":w3c?"document.getElementById(":"document.all.";
|
||||
var mid=w3c?").style":".style";
|
||||
|
||||
if (eval(beg+list+mid+".display") != "none") {
|
||||
which.src = "pix/plus.gif";
|
||||
eval(beg+list+mid+".display='none';");
|
||||
} else {
|
||||
which.src = "pix/minus.gif";
|
||||
eval(beg+list+mid+".display='block';");
|
||||
}
|
||||
}
|
||||
-->
|
||||
</script>
|
||||
<script language="JavaScript" type="text/javascript" src="request.js"></script>
|
||||
<script language="JavaScript" type="text/javascript" src="api.php?id=<?php echo $cm->id.$scoidstring.$modestring ?>"></script>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue