Skip to content

Commit

Permalink
SCORM MDL-21333 remove link to allow manual opening of window as JS c…
Browse files Browse the repository at this point in the history
…ommunication can fail and no grades are reported from the object. Remove old strings no longer required. merged from HEAD
  • Loading branch information
danmarsden committed Jul 22, 2010
1 parent f467b17 commit 039d392
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
3 changes: 1 addition & 2 deletions lang/en_utf8/scorm.php
Expand Up @@ -114,8 +114,7 @@
$string['passed'] = 'Passed';
$string['php5'] = 'PHP 5 (DOMXML native library)';
$string['popup'] = 'New window';
$string['popupblocked'] = 'If a new window does not appear, $a';
$string['popupblockedlinkname'] = 'click here to launch the activity';
$string['popupblockmessage'] = 'If a pop-up window doesn\'t appear, please enable pop-ups in your browser.';
$string['popupmenu'] = 'In a drop down menu';
$string['popupopen'] = 'Open package in a new window';
$string['position_error'] = 'The $a->tag tag can\'t be child of $a->parent tag';
Expand Down
12 changes: 0 additions & 12 deletions mod/scorm/loadSCO.php
Expand Up @@ -177,18 +177,6 @@ function doredirect() {
}
}, 1000);
}
removelink();
}
function removelink() {
try {
if (window.opener.document.getElementById('altpopuplink')) {
window.opener.document.getElementById('altpopuplink').style.display='none';
} else {
window.opener.document.all['altpopuplink'].style.display='none';
}
} catch(error) {
// nothing to be done
}
}
//]]>
</script>
Expand Down
3 changes: 1 addition & 2 deletions mod/scorm/player.php
Expand Up @@ -325,8 +325,7 @@ function openpopup(url,name,options,width,height) {
</noscript>
<?php
//Added incase javascript popups are blocked
$link = '<a href="'.$CFG->wwwroot.'/mod/scorm/loadSCO.php?id='.$cm->id.$scoidstr.$modestr.'" target="_blank">'.get_string('popupblockedlinkname','scorm').'</a>';
print_simple_box(get_string('popupblocked','scorm',$link),'center','','',5,'generalbox','altpopuplink');
print_simple_box(get_string('popupblockmessage','scorm'),'center','','',5,'generalbox','altpopuplink');
$linkcourse = '<a href="'.$CFG->wwwroot.'/course/view.php?id='.$scorm->course.'">' . get_string('finishscormlinkname','scorm') . '</a>';
print_simple_box(get_string('finishscorm','scorm',$linkcourse),'center','','',5,'generalbox','altfinishlink');
}
Expand Down

0 comments on commit 039d392

Please sign in to comment.