diff --git a/lib/form/url.php b/lib/form/url.php index aa7100e35d1..1193086c332 100644 --- a/lib/form/url.php +++ b/lib/form/url.php @@ -79,7 +79,7 @@ class MoodleQuickForm_url extends HTML_QuickForm_text{ * @return string */ function toHtml(){ - global $CFG, $COURSE, $USER, $PAGE, $OUTPUT; + global $PAGE, $OUTPUT; $id = $this->_attributes['id']; $elname = $this->_attributes['name']; @@ -94,20 +94,9 @@ class MoodleQuickForm_url extends HTML_QuickForm_text{ if (empty($this->_options['usefilepicker'])) { return $str; } - $strsaved = get_string('filesaved', 'repository'); - $straddlink = get_string('choosealink', 'repository'); - if ($COURSE->id == SITEID) { - $context = context_system::instance(); - } else { - $context = context_course::instance($COURSE->id); - } + $client_id = uniqid(); - $str .= <<