mirror of
https://github.com/moodle/moodle.git
synced 2025-04-05 00:12:42 +02:00
MDL-71167 mod_scorm: use full url in redirect
This commit is contained in:
parent
4c26696e7e
commit
00579c7583
@ -280,7 +280,7 @@ class mod_scorm_mod_form extends moodleform_mod {
|
||||
}
|
||||
|
||||
public function data_preprocessing(&$defaultvalues) {
|
||||
global $COURSE;
|
||||
global $CFG, $COURSE;
|
||||
|
||||
if (isset($defaultvalues['popup']) && ($defaultvalues['popup'] == 1) && isset($defaultvalues['options'])) {
|
||||
if (!empty($defaultvalues['options'])) {
|
||||
@ -313,10 +313,10 @@ class mod_scorm_mod_form extends moodleform_mod {
|
||||
|
||||
if (($COURSE->format == 'singleactivity') && ((count($scorms) == 0) || ($defaultvalues['instance'] == $coursescorm->id))) {
|
||||
$defaultvalues['redirect'] = 'yes';
|
||||
$defaultvalues['redirecturl'] = '../course/view.php?id='.$defaultvalues['course'];
|
||||
$defaultvalues['redirecturl'] = $CFG->wwwroot.'/course/view.php?id='.$defaultvalues['course'];
|
||||
} else {
|
||||
$defaultvalues['redirect'] = 'no';
|
||||
$defaultvalues['redirecturl'] = '../mod/scorm/view.php?id='.$defaultvalues['coursemodule'];
|
||||
$defaultvalues['redirecturl'] = $CFG->wwwroot.'/mod/scorm/view.php?id='.$defaultvalues['coursemodule'];
|
||||
}
|
||||
if (isset($defaultvalues['version'])) {
|
||||
$defaultvalues['pkgtype'] = (substr($defaultvalues['version'], 0, 5) == 'SCORM') ? 'scorm' : 'aicc';
|
||||
|
Loading…
x
Reference in New Issue
Block a user