Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed lesson status skin support

  • Loading branch information...
commit 3a19de6dd2cc99a0a2b6b91804c84d8c42765818 1 parent 8eae75e
bobopinna authored
View
13 mod/scorm/lib.php
@@ -215,7 +215,7 @@ function scorm_user_complete($course, $user, $mod, $scorm) {
global $CFG;
$liststyle = 'structlist';
- $scormpixdir = $CFG->wwwroot.'/mod/scorm/pix/';
+ $scormpixdir = $CFG->modpixpath."/scorm/pix/";
$now = time();
$firstmodify = $now;
$lastmodify = 0;
@@ -1069,6 +1069,7 @@ function scorm_count_launchable($scormid,$organization) {
function scorm_display_structure($scorm,$liststyle,$currentorg='',$scoid='',$mode='normal',$play=false) {
global $USER, $CFG;
+ $scormpixdir = $CFG->modpixpath."/scorm/pix/";
$strexpand = get_string('expcoll','scorm');
echo "<ul id='0' class='$liststyle'>";
@@ -1115,9 +1116,9 @@ function scorm_display_structure($scorm,$liststyle,$currentorg='',$scoid='',$mod
$nextsco = next($scoes);
if (($nextsco !== false) && ($sco->parent != $nextsco->parent) && (($level==0) || (($level>0) && ($nextsco->parent == $sco->identifier)))) {
$sublist++;
- echo '<a href="#" onClick="expandCollide(img'.$sublist.','.$sublist.');"><img id="img'.$sublist.'" src="'.$CFG->wwwroot.'/mod/scorm/pix/minus.gif" alt="'.$strexpand.'" title="'.$strexpand.'"/></a>';
+ echo '<a href="#" onClick="expandCollide(img'.$sublist.','.$sublist.');"><img id="img'.$sublist.'" src="'.$scormpixdir.'minus.gif" alt="'.$strexpand.'" title="'.$strexpand.'"/></a>';
} else {
- echo '<img src="'.$CFG->wwwroot.'/mod/scorm/pix/spacer.gif" />';
+ echo '<img src="'.$scormpixdir.'spacer.gif" />';
}
if (empty($sco->title)) {
$sco->title = $sco->identifier;
@@ -1134,7 +1135,7 @@ function scorm_display_structure($scorm,$liststyle,$currentorg='',$scoid='',$mod
$usertrack->status = 'notattempted';
}
$strstatus = get_string($usertrack->status,'scorm');
- echo "<img src='".$CFG->wwwroot."/mod/scorm/pix/".$usertrack->status.".gif' alt='$strstatus' title='$strstatus' />";
+ echo "<img src='".$scormpixdir.$usertrack->status.".gif' alt='$strstatus' title='$strstatus' />";
if (($usertrack->status == 'notattempted') || ($usertrack->status == 'incomplete') || ($usertrack->status == 'browsed')) {
$incomplete = true;
if ($play && empty($scoid)) {
@@ -1149,10 +1150,10 @@ function scorm_display_structure($scorm,$liststyle,$currentorg='',$scoid='',$mod
$scoid = $sco->id;
}
if ($sco->scormtype == 'sco') {
- echo '<img src="'.$CFG->wwwroot.'/mod/scorm/pix/notattempted.gif" alt="'.get_string('notattempted','scorm').'" title="'.get_string('notattempted','scorm').'" />';
+ echo '<img src="'.$scormpixdir.'notattempted.gif" alt="'.get_string('notattempted','scorm').'" title="'.get_string('notattempted','scorm').'" />';
$incomplete = true;
} else {
- echo '<img src="'.$CFG->wwwroot.'/mod/scorm/pix/asset.gif" alt="'.get_string('asset','scorm').'" title="'.get_string('asset','scorm').'" />';
+ echo '<img src="'.$scormpixdir.'asset.gif" alt="'.get_string('asset','scorm').'" title="'.get_string('asset','scorm').'" />';
}
}
if ($sco->id == $scoid) {
View
11 mod/scorm/playscorm.php
@@ -95,9 +95,6 @@
<tr>
<th>
<div class="structurehead"><?php print_string('coursestruct','scorm') ?></div>
- <!--<div class="popupbutton">
- <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 class="top">
@@ -118,6 +115,8 @@
$SESSION->scorm_status = 'Not Initialized';
$SESSION->scorm_mode = $mode;
+ $scormpixdir = $CFG->modpixpath."/scorm/pix/";
+
?>
<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>
@@ -151,7 +150,7 @@ function playSCO(scoid) {
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";
+ image.src = "<?php echo $scormpixdir ?>popdown.gif";
return win;
}
@@ -170,10 +169,10 @@ function expandCollide(which,list) {
var mid=w3c?").style":".style";
if (eval(beg+list+mid+".display") != "none") {
- which.src = "pix/plus.gif";
+ which.src = "<?php echo $scormpixdir ?>plus.gif";
eval(beg+list+mid+".display='none';");
} else {
- which.src = "pix/minus.gif";
+ which.src = "<?php echo $scormpixdir ?>minus.gif";
eval(beg+list+mid+".display='block';");
}
}
View
7 mod/scorm/report.php
@@ -68,6 +68,9 @@
}
print_heading(format_string($scorm->name));
}
+
+ $scormpixdir = $CFG->modpixpath."/scorm/pix/";
+
if (!empty($id)) {
if ($scoes = get_records_select("scorm_scoes","scorm='$scorm->id' ORDER BY id")) {
if ($scousers=get_records_select("scorm_scoes_track", "scormid='$scorm->id' GROUP BY userid,scormid", "", "userid,scormid")) {
@@ -112,7 +115,7 @@
$trackdata->total_time = '';
}
$strstatus = get_string($trackdata->status,'scorm');
- $row[] = $anchorstart.'<img src="pix/'.$trackdata->status.'.gif" alt="'.$strstatus.'" title="'.
+ $row[] = $anchorstart.'<img src="'.$scormpixdir.$trackdata->status.'.gif" alt="'.$strstatus.'" title="'.
$strstatus.'">&nbsp;'.$trackdata->total_time.$scoreview.$anchorend;
}
}
@@ -146,7 +149,7 @@
$trackdata->total_time = '';
}
$strstatus = get_string($trackdata->status,'scorm');
- echo '<img src="pix/'.$trackdata->status.'.gif" alt="'.$strstatus.'" title="'.
+ echo '<img src="'.$scormpixdir.$trackdata->status.'.gif" alt="'.$strstatus.'" title="'.
$strstatus.'">&nbsp;'.$trackdata->total_time.'<br />'.$scoreview.'<br />';
echo '</div>'."\n";
foreach($trackdata as $element => $value) {
View
6 mod/scorm/view.php
@@ -131,6 +131,8 @@
echo '<input type="hidden" name="mode" value="review" />'."\n";
}
}
+
+ $scormpixdir = $CFG->modpixpath."/scorm/pix/";
?>
<br />
<input type="hidden" name="scoid" />
@@ -152,10 +154,10 @@ function expandCollide(which,list) {
var mid=w3c?").style":".style";
if (eval(beg+list+mid+".display") != "none") {
- which.src = "pix/plus.gif";
+ which.src = "<?php echo $scormpixdir ?>plus.gif";
eval(beg+list+mid+".display='none';");
} else {
- which.src = "pix/minus.gif";
+ which.src = "<?php echo $scormpixdir ?>minus.gif";
eval(beg+list+mid+".display='block';");
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.