forked from lushonline/moodle2-skillsoft-activity
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpreloader.php
More file actions
39 lines (34 loc) · 1.33 KB
/
preloader.php
File metadata and controls
39 lines (34 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/*
* @package mod-skillsoft
* @author martinholden1972@googlemail.com
* @copyright 2009-2014 Martin Holden
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once('../../config.php');
require_once($CFG->dirroot.'/mod/skillsoft/locallib.php');
$id = required_param('id', PARAM_TEXT); // Course Module ID, or
$assetid = required_param('assetid', PARAM_TEXT); // SkillSoft AssetID
require_login($id, false);
$url = new moodle_url('/mod/skillsoft/getolsadata.php', array('id'=>$id,'assetid'=>$assetid));
$target = $url->out(false,array(),false);
$htmlbody = '<p>'.get_string('skillsoft_metadataloading', 'skillsoft').' ';
$htmlbody .= '<img src="'. $OUTPUT->pix_url('wait', 'skillsoft').'" class="icon" alt="'.get_string('skillsoft_waitingalt','skillsoft').'" /><br/>';
$htmlbody .= '</p>';
?>
<html>
<head>
<title><?php echo get_string('skillsoft_metadatatitle', 'skillsoft');?></title>
<script type="text/javascript">
//<![CDATA[
function doredirect() {
document.body.innerHTML = '<?php echo $htmlbody ?>';
document.location = '<?php echo $target ?>';
}
//]]>
</script>
</head>
<body onload="doredirect();">
<p><?php echo get_string('skillsoft_metadataloading', 'skillsoft');?></p>
</body>
</html>