Merge branch 'MDL-29619-master' of git://github.com/ankitagarwal/moodle

This commit is contained in:
Aparup Banerjee 2011-10-24 14:21:39 +08:00
commit 5117a3d789
2 changed files with 7 additions and 0 deletions

View File

@ -44,6 +44,7 @@ $string['displayselect_help'] = 'This setting, together with the URL file type a
$string['displayselectexplain'] = 'Choose display type, unfortunately not all types are suitable for all URLs.';
$string['externalurl'] = 'External URL';
$string['framesize'] = 'Frame height';
$string['invalidstoredurl'] = 'Invalid URL';
$string['chooseavariable'] = 'Choose a variable...';
$string['invalidurl'] = 'Entered URL is invalid';
$string['modulename'] = 'URL';

View File

@ -55,6 +55,12 @@ $completion->set_module_viewed($cm);
$PAGE->set_url('/mod/url/view.php', array('id' => $cm->id));
// Make sure URL is valid before generating output
$url->externalurl = clean_param($url->externalurl, PARAM_URL);
if (empty($url->externalurl)) {
print_error('invalidstoredurl', 'url');
}
if ($redirect) {
// coming from course page or url index page,
// the redirection is needed for completion tracking and logging