diff --git a/admin/report/capability/index.php b/admin/report/capability/index.php index 20ca20d1650..d15924e93a3 100644 --- a/admin/report/capability/index.php +++ b/admin/report/capability/index.php @@ -39,7 +39,7 @@ if (empty($cleanedroleids)) { // Include the required JavaScript. $PAGE->requires->yui2_lib('event'); -$PAGE->requires->js('admin/report/capability/script.js'); +$PAGE->requires->js('/admin/report/capability/script.js'); $PAGE->requires->js_function_call('capability_report.cap_filter_init', array(get_string('search'))); // Log. diff --git a/admin/report/spamcleaner/index.php b/admin/report/spamcleaner/index.php index 88278c21d0c..1f83b18fec1 100755 --- a/admin/report/spamcleaner/index.php +++ b/admin/report/spamcleaner/index.php @@ -285,7 +285,7 @@ function print_user_entry($user, $keywords, $count) { function print_spamcleaner_javascript() { global $PAGE; - $PAGE->requires->js('admin/report/spamcleaner/spamcleaner.js'); + $PAGE->requires->js('/admin/report/spamcleaner/spamcleaner.js'); $strings = Array('spaminvalidresult','spamdeleteallconfirm','spamcannotdelete','spamdeleteconfirm'); $PAGE->requires->strings_for_js($strings, 'report_spamcleaner'); $PAGE->requires->data_for_js('spamcleaner', Array('me'=>me())); diff --git a/admin/roles/assign.php b/admin/roles/assign.php index 2c3a96db641..9d096cea991 100755 --- a/admin/roles/assign.php +++ b/admin/roles/assign.php @@ -257,7 +257,7 @@ /// Print the header and tabs $PAGE->requires->yui2_lib('dom-event'); - $PAGE->requires->js($CFG->admin . '/roles/roles.js'); + $PAGE->requires->js('/admin/roles/roles.js'); if ($context->contextlevel == CONTEXT_USER) { $user = $DB->get_record('user', array('id'=>$userid)); $fullname = fullname($user, has_capability('moodle/site:viewfullnames', $context)); diff --git a/admin/roles/lib.php b/admin/roles/lib.php index 33447441f38..d185c1c84b1 100644 --- a/admin/roles/lib.php +++ b/admin/roles/lib.php @@ -123,7 +123,7 @@ abstract class capability_table_base { if (count($this->capabilities) > capability_table_base::NUM_CAPS_FOR_SEARCH) { global $CFG, $PAGE; $PAGE->requires->yui2_lib('dom-event'); - $PAGE->requires->js($CFG->admin . '/roles/roles.js'); + $PAGE->requires->js('/admin/roles/roles.js'); $PAGE->requires->js_function_call('cap_table_filter.init', array($this->id, get_string('filter'), get_string('clear'))); } diff --git a/admin/webservice/service_users.php b/admin/webservice/service_users.php index f6c754dc6cf..195c78c0035 100644 --- a/admin/webservice/service_users.php +++ b/admin/webservice/service_users.php @@ -30,7 +30,7 @@ require_once($CFG->dirroot.'/admin/webservice/lib.php'); $id = required_param('id', PARAM_INT); $PAGE->set_url('/admin/webservice/service_users.php', array('id'=>$id)); -$PAGE->requires->js($CFG->admin.'/webservice/script.js'); +$PAGE->requires->js('/admin/webservice/script.js'); admin_externalpage_setup('externalserviceusers'); admin_externalpage_print_header(); diff --git a/admin/xmldb/index.php b/admin/xmldb/index.php index b2d64806fd3..d455d674f0d 100644 --- a/admin/xmldb/index.php +++ b/admin/xmldb/index.php @@ -85,13 +85,13 @@ $script = $CFG->admin . '/xmldb/actions/' . $action . '/' . $action . '.js'; $file = $CFG->dirroot . '/' . $script; if (file_exists($file) && is_readable($file)) { - $PAGE->requires->js($script); + $PAGE->requires->js('/'.$script); } else if ($postaction) { /// Try to load the postaction javascript if exists $script = $CFG->admin . '/xmldb/actions/' . $postaction . '/' . $postaction . '.js'; $file = $CFG->dirroot . '/' . $script; if (file_exists($file) && is_readable($file)) { - $PAGE->requires->js($script); + $PAGE->requires->js('/'.$script); } } } diff --git a/blocks/admin_tree/block_admin_tree.php b/blocks/admin_tree/block_admin_tree.php index 5351f210b49..8da9137df91 100644 --- a/blocks/admin_tree/block_admin_tree.php +++ b/blocks/admin_tree/block_admin_tree.php @@ -138,7 +138,7 @@ class block_admin_tree extends block_base { if ($this->tempcontent !== '') { $this->page->requires->yui2_lib('event'); - $this->page->requires->js('blocks/admin_tree/admintree.js'); + $this->page->requires->js('/blocks/admin_tree/admintree.js'); $this->page->requires->js_function_call('admin_tree.init', array($this->divcounter - 1, $this->expandnodes, $OUTPUT->pix_url('i/open'), $OUTPUT->pix_url('i/closed'), diff --git a/blocks/calendar_month/block_calendar_month.php b/blocks/calendar_month/block_calendar_month.php index 01f8fed8f52..3297ac0f248 100644 --- a/blocks/calendar_month/block_calendar_month.php +++ b/blocks/calendar_month/block_calendar_month.php @@ -60,7 +60,7 @@ class block_calendar_month extends block_base { // Be VERY careful with the format for default courses arguments! // Correct formatting is [courseid] => 1 to be concise with moodlelib.php functions. calendar_set_filters($courses, $group, $user, $filtercourse, $groupeventsfrom, false); - $this->page->requires->js('calendar/calendar.js'); + $this->page->requires->js('/calendar/calendar.js'); if ($courseshown == SITEID) { // For the front page $this->content->text .= calendar_top_controls('frontpage', array('id' => $courseshown, 'm' => $cal_m, 'y' => $cal_y)); diff --git a/blocks/global_navigation_tree/block_global_navigation_tree.php b/blocks/global_navigation_tree/block_global_navigation_tree.php index 9a7ff86f9aa..4ac631e7bbc 100644 --- a/blocks/global_navigation_tree/block_global_navigation_tree.php +++ b/blocks/global_navigation_tree/block_global_navigation_tree.php @@ -81,7 +81,7 @@ class block_global_navigation_tree extends block_tree { function get_required_javascript() { $this->_initialise_dock(); - $this->page->requires->js('blocks/global_navigation_tree/navigation.js'); + $this->page->requires->js('/blocks/global_navigation_tree/navigation.js'); user_preference_allow_ajax_update('docked_block_instance_'.$this->instance->id, PARAM_INT); } @@ -96,7 +96,7 @@ class block_global_navigation_tree extends block_tree { } $this->page->requires->yui2_lib('dom'); // JS for navigation moved to the standard theme, the code will probably have to depend on the actual page structure - // $this->page->requires->js('lib/javascript-navigation.js'); + // $this->page->requires->js('/lib/javascript-navigation.js'); // Navcount is used to allow us to have multiple trees although I dont' know why // you would want to trees the same diff --git a/blocks/settings_navigation_tree/block_settings_navigation_tree.php b/blocks/settings_navigation_tree/block_settings_navigation_tree.php index ef51316a30d..ec741e59f54 100644 --- a/blocks/settings_navigation_tree/block_settings_navigation_tree.php +++ b/blocks/settings_navigation_tree/block_settings_navigation_tree.php @@ -79,7 +79,7 @@ class block_settings_navigation_tree extends block_tree { function get_required_javascript() { $this->_initialise_dock(); - $this->page->requires->js('blocks/global_navigation_tree/navigation.js'); + $this->page->requires->js('/blocks/global_navigation_tree/navigation.js'); $args = array($this->instance->id, array('instance'=>$this->instance->id, 'candock'=>$this->instance_can_be_docked())); $this->page->requires->js_function_call('blocks.navigation.setup_new_tree', $args)->on_dom_ready(); user_preference_allow_ajax_update('docked_block_instance_'.$this->instance->id, PARAM_INT); @@ -96,7 +96,7 @@ class block_settings_navigation_tree extends block_tree { } $this->page->requires->yui2_lib('dom'); // JS for navigation moved to the standard theme, the code will probably have to depend on the actual page structure - // $this->page->requires->js('lib/javascript-navigation.js'); + // $this->page->requires->js('/lib/javascript-navigation.js'); block_settings_navigation_tree::$navcount++; // Check if this block has been docked diff --git a/calendar/event.php b/calendar/event.php index 4e777e44a55..a7ea27ede79 100644 --- a/calendar/event.php +++ b/calendar/event.php @@ -201,7 +201,7 @@ if ($data) { } $PAGE->requires->yui2_lib('animation'); -$PAGE->requires->js('calendar/calendar.js'); +$PAGE->requires->js('/calendar/calendar.js'); $PAGE->navbar->add($strcalendar, $link); $PAGE->navbar->add($title); diff --git a/calendar/view.php b/calendar/view.php index f14f8972354..13542ba5f4a 100644 --- a/calendar/view.php +++ b/calendar/view.php @@ -155,7 +155,7 @@ $PAGE->set_heading($strcalendar); $PAGE->set_button($prefsbutton); $PAGE->requires->yui2_lib('animation'); -$PAGE->requires->js('calendar/calendar.js'); +$PAGE->requires->js('/calendar/calendar.js'); echo $OUTPUT->header(); diff --git a/comment/index.php b/comment/index.php index a9d9ec05641..673c806415c 100644 --- a/comment/index.php +++ b/comment/index.php @@ -34,7 +34,7 @@ $PAGE->requires->yui2_lib('event'); $PAGE->requires->yui2_lib('animation'); $PAGE->requires->yui2_lib('json'); $PAGE->requires->yui2_lib('connection'); -$PAGE->requires->js('comment/admin.js'); +$PAGE->requires->js('/comment/admin.js'); $action = optional_param('action', '', PARAM_ALPHA); $commentid = optional_param('commentid', 0, PARAM_INT); diff --git a/course/report/participation/index.php b/course/report/participation/index.php index ff965521d3d..31b42b1fd02 100644 --- a/course/report/participation/index.php +++ b/course/report/participation/index.php @@ -242,7 +242,7 @@ echo '

'.get_string('counteditems', '', $a).'

'."\n"; - echo $PAGE->requires->js('course/report/participation/participation.js')->asap(); + echo $PAGE->requires->js('/course/report/participation/participation.js')->asap(); echo '
'."\n"; echo '
'."\n"; diff --git a/course/report/progress/index.php b/course/report/progress/index.php index 906c8c18f2e..b45fb3a01d5 100644 --- a/course/report/progress/index.php +++ b/course/report/progress/index.php @@ -105,7 +105,7 @@ if($csv) { if($svgcleverness) { $PAGE->requires->yui2_lib('event'); - $PAGE->requires->js('course/report/progress/textrotate.js'); + $PAGE->requires->js('/course/report/progress/textrotate.js'); } // Handle groups (if enabled) diff --git a/course/view.php b/course/view.php index c9be1ea5e91..8d1d206c73b 100644 --- a/course/view.php +++ b/course/view.php @@ -161,8 +161,8 @@ $PAGE->requires->yui2_lib('dragdrop'); $PAGE->requires->yui2_lib('connection'); $PAGE->requires->yui2_lib('selector'); - $PAGE->requires->js('lib/ajax/block_classes.js'); - $PAGE->requires->js('lib/ajax/section_classes.js'); + $PAGE->requires->js('/lib/ajax/block_classes.js'); + $PAGE->requires->js('/lib/ajax/section_classes.js'); // Okay, global variable alert. VERY UGLY. We need to create // this object here before the _print_block() @@ -179,7 +179,7 @@ $completion = new completion_info($course); if ($completion->is_enabled() && ajaxenabled()) { $PAGE->requires->yui2_lib('connection'); - $PAGE->requires->js('course/completion.js')->in_head(); + $PAGE->requires->js('/course/completion.js')->in_head(); $PAGE->requires->js_function_call('completion_init')->on_dom_ready(); $PAGE->requires->data_for_js('completion_strsaved', get_string('saved', 'completion')); $PAGE->requires->data_for_js('completion_strtitley', get_string('completion-title-manual-y', 'completion')); diff --git a/enrol/authorize/locallib.php b/enrol/authorize/locallib.php index 6ecbdeb9373..91005c65178 100644 --- a/enrol/authorize/locallib.php +++ b/enrol/authorize/locallib.php @@ -70,7 +70,7 @@ function authorize_print_orders($courseid, $userid) { if ($canmanagepayments) { $popupmenu .= '
'; $checkbox = html_select_option::make_checkbox(1, $userid == $USER->id, get_string('mypaymentsonly', 'enrol_authorize')); - $PAGE->requires->js('enrol/authorize/authorize.js'); + $PAGE->requires->js('/enrol/authorize/authorize.js'); $checkbox->add_action('click', 'authorize_jump_to_mypayments', array('userid' => $USER->id, 'status' => $status)); $popupmenu .= $OUTPUT->checkbox($checkbox, 'showonlymy'); } diff --git a/filter/mediaplugin/filter.php b/filter/mediaplugin/filter.php index 40be83ae146..ade18ad60e8 100644 --- a/filter/mediaplugin/filter.php +++ b/filter/mediaplugin/filter.php @@ -117,7 +117,7 @@ class mediaplugin_filter extends moodle_text_filter { } if (!$this->eolas_fix_applied) { - $PAGE->requires->js('filter/mediaplugin/eolas_fix.js'); + $PAGE->requires->js('/filter/mediaplugin/eolas_fix.js'); $this->eolas_fix_applied = true; } @@ -148,7 +148,7 @@ function mediaplugin_filter_mp3_callback($link) { $args['flashvars'] = $c; $args['quality'] = 'high'; - $jsoutput = $PAGE->requires->js('lib/ufo.js')->asap(); + $jsoutput = $PAGE->requires->js('/lib/ufo.js')->asap(); $jsoutput .= $PAGE->requires->data_for_js('FO', $args)->asap(); $jsoutput .= $PAGE->requires->js_function_call('create_UFO_object', Array($id))->asap(); @@ -175,7 +175,7 @@ function mediaplugin_filter_swf_callback($link) { $args['build'] = 40; $args['allowscriptaccess'] = 'never'; $args['quality'] = 'high'; - $jsoutput = $PAGE->requires->js('lib/ufo.js')->asap(); + $jsoutput = $PAGE->requires->js('/lib/ufo.js')->asap(); $jsoutput .= $PAGE->requires->data_for_js('FO', $args)->asap(); $jsoutput .= $PAGE->requires->js_function_call('create_UFO_object', Array($id))->asap(); @@ -204,7 +204,7 @@ function mediaplugin_filter_flv_callback($link) { $args['allowscriptaccess'] = 'never'; $args['quality'] = 'high'; $args['allowfullscreen'] = 'true'; - $jsoutput = $PAGE->requires->js('lib/ufo.js')->asap(); + $jsoutput = $PAGE->requires->js('/lib/ufo.js')->asap(); $jsoutput .= $PAGE->requires->data_for_js('FO', $args)->asap(); $jsoutput .= $PAGE->requires->js_function_call('create_UFO_object', Array($id))->asap(); diff --git a/grade/edit/tree/index.php b/grade/edit/tree/index.php index 93f35852607..3a211d33749 100644 --- a/grade/edit/tree/index.php +++ b/grade/edit/tree/index.php @@ -35,7 +35,7 @@ $PAGE->requires->yui2_lib('dragdrop'); $PAGE->requires->yui2_lib('element'); $PAGE->requires->yui2_lib('container'); $PAGE->requires->yui2_lib('animation'); -$PAGE->requires->js('grade/edit/tree/functions.js'); +$PAGE->requires->js('/grade/edit/tree/functions.js'); $courseid = required_param('id', PARAM_INT); $action = optional_param('action', 0, PARAM_ALPHA); diff --git a/grade/report/grader/index.php b/grade/report/grader/index.php index 087be338cf8..0a6ec5e95d1 100644 --- a/grade/report/grader/index.php +++ b/grade/report/grader/index.php @@ -116,10 +116,10 @@ $PAGE->requires->yui2_lib('connection'); $PAGE->requires->yui2_lib('dragdrop'); $PAGE->requires->yui2_lib('element'); $PAGE->requires->yui2_lib('container'); -$PAGE->requires->js('grade/report/grader/functions.js'); -$PAGE->requires->js('grade/report/grader/grader.js'); -$PAGE->requires->js('lib/overlib/overlib.js')->in_head(); -$PAGE->requires->js('lib/overlib/overlib_cssstyle.js')->in_head(); +$PAGE->requires->js('/grade/report/grader/functions.js'); +$PAGE->requires->js('/grade/report/grader/grader.js'); +$PAGE->requires->js('/lib/overlib/overlib.js')->in_head(); +$PAGE->requires->js('/lib/overlib/overlib_cssstyle.js')->in_head(); if ($report->get_pref('enableajax')) { $report = new grade_report_grader_ajax($courseid, $gpr, $context, $page, $sortitemid); diff --git a/group/index.php b/group/index.php index 8aa6474b156..4532589cb06 100644 --- a/group/index.php +++ b/group/index.php @@ -14,7 +14,7 @@ require_once('lib.php'); ini_set('include_path', $CFG->libdir.'/pear'.PATH_SEPARATOR.ini_get('include_path')); $PAGE->requires->yui2_lib('connection'); -$PAGE->requires->js('group/clientlib.js'); +$PAGE->requires->js('/group/clientlib.js'); $courseid = required_param('id', PARAM_INT); $groupid = optional_param('group', false, PARAM_INT); diff --git a/group/members.php b/group/members.php index a9254a55913..941e5eda8a4 100644 --- a/group/members.php +++ b/group/members.php @@ -77,7 +77,7 @@ $strusergroupmembership = get_string('usergroupmembership', 'group'); $groupname = format_string($group->name); -$PAGE->requires->js('group/clientlib.js'); +$PAGE->requires->js('/group/clientlib.js'); $PAGE->navbar->add($strparticipants, new moodle_url('/user/index.php', array('id'=>$courseid))); $PAGE->navbar->add($strgroups, new moodle_url('/group/index.php', array('id'=>$courseid))); $PAGE->navbar->add($stradduserstogroup); diff --git a/group/overview.php b/group/overview.php index 5543da6392d..0b140f3d2f6 100644 --- a/group/overview.php +++ b/group/overview.php @@ -115,8 +115,8 @@ if ($rs = $DB->get_recordset_sql($sql, $params)) { $rs->close(); } -$PAGE->requires->js('lib/overlib/overlib.js')->in_head(); -$PAGE->requires->js('lib/overlib/overlib_cssstyle.js')->in_head(); +$PAGE->requires->js('/lib/overlib/overlib.js')->in_head(); +$PAGE->requires->js('/lib/overlib/overlib_cssstyle.js')->in_head(); $PAGE->navbar->add($strparticipants, new moodle_url('/user/index.php', array('id'=>$courseid))); $PAGE->navbar->add($strgroups); diff --git a/lib/ajax/ajaxlib.php b/lib/ajax/ajaxlib.php index f1455fd71b1..29819ea787a 100644 --- a/lib/ajax/ajaxlib.php +++ b/lib/ajax/ajaxlib.php @@ -33,9 +33,9 @@ * * Typical useage would be *
- *     $PAGE->requires->css('mod/mymod/userstyles.php?id='.$id); // not overriddable via themes!
- *     $PAGE->requires->js('mod/mymod/script.js');
- *     $PAGE->requires->js('mod/mymod/small_but_urgent.js')->in_head();
+ *     $PAGE->requires->css('/mod/mymod/userstyles.php?id='.$id); // not overriddable via themes!
+ *     $PAGE->requires->js('/mod/mymod/script.js');
+ *     $PAGE->requires->js('/mod/mymod/small_but_urgent.js')->in_head();
  *     $PAGE->requires->js_function_call('init_mymod', array($data))->on_dom_ready();
  * 
* @@ -881,7 +881,7 @@ abstract class linked_requirement extends requirement_base { * * The methods {@link asap()}, {@link in_head()} and {@link at_top_of_body()} * are indented to be used as a fluid API, so you can say things like - * $PAGE->requires->js('mod/mymod/script.js')->in_head(); + * $PAGE->requires->js('/mod/mymod/script.js')->in_head(); * * However, by default JavaScript files are included at the end of the HTML. * This is recommended practice because it means that the web browser will only diff --git a/lib/commentlib.php b/lib/commentlib.php index 9429dcdc789..3295b75c781 100644 --- a/lib/commentlib.php +++ b/lib/commentlib.php @@ -184,7 +184,7 @@ EOD; $PAGE->requires->yui2_lib('animation'); $PAGE->requires->yui2_lib('json'); $PAGE->requires->yui2_lib('connection'); - $PAGE->requires->js('comment/comment.js')->in_head(); + $PAGE->requires->js('/comment/comment.js')->in_head(); $PAGE->requires->string_for_js('addcomment', 'moodle'); $PAGE->requires->string_for_js('deletecomment', 'moodle'); $PAGE->requires->string_for_js('comments', 'moodle'); diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index a17e9e940a4..c79cde3b389 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -1698,7 +1698,7 @@ function require_js($lib) { if (strpos($lib, 'yui_') === 0) { $PAGE->requires->yui2_lib(substr($lib, 4)); } else if (preg_match('/^https?:/', $lib)) { - echo $PAGE->requires->js(str_replace($CFG->wwwroot, '', $lib))->asap(); + echo $PAGE->requires->js(str_replace($CFG->wwwroot, '/', $lib))->asap(); } else { echo $PAGE->requires->js($lib)->asap(); } diff --git a/lib/form/editor.php b/lib/form/editor.php index 22c93a62d5e..da4166a1d8e 100644 --- a/lib/form/editor.php +++ b/lib/form/editor.php @@ -19,7 +19,7 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element { function MoodleQuickForm_editor($elementName=null, $elementLabel=null, $attributes=null, $options=null) { global $CFG, $PAGE; - $PAGE->requires->js('lib/form/filepicker.js'); + $PAGE->requires->js('/lib/form/filepicker.js'); $options = (array)$options; foreach ($options as $name=>$value) { diff --git a/lib/form/filemanager.php b/lib/form/filemanager.php index 92735d0b0dc..1d882c02880 100644 --- a/lib/form/filemanager.php +++ b/lib/form/filemanager.php @@ -46,8 +46,8 @@ class MoodleQuickForm_filemanager extends HTML_QuickForm_element { $this->_options['maxbytes'] = get_max_upload_file_size($CFG->maxbytes, $options['maxbytes']); } parent::HTML_QuickForm_element($elementName, $elementLabel, $attributes); - $PAGE->requires->js('repository/filepicker.js'); - $PAGE->requires->js('lib/form/filemanager.js'); + $PAGE->requires->js('/repository/filepicker.js'); + $PAGE->requires->js('/lib/form/filemanager.js'); } function setName($name) { diff --git a/lib/form/filepicker.php b/lib/form/filepicker.php index 2bb18b80732..cf00a144f4b 100644 --- a/lib/form/filepicker.php +++ b/lib/form/filepicker.php @@ -80,7 +80,7 @@ class MoodleQuickForm_filepicker extends HTML_QuickForm_input { } $client_id = uniqid(); - $PAGE->requires->js('lib/form/filepicker.js'); + $PAGE->requires->js('/lib/form/filepicker.js'); $args = new stdclass; // need these three to filter repositories list diff --git a/lib/form/passwordunmask.php b/lib/form/passwordunmask.php index 9c485b23c0e..37f5232e109 100644 --- a/lib/form/passwordunmask.php +++ b/lib/form/passwordunmask.php @@ -26,7 +26,7 @@ class MoodleQuickForm_passwordunmask extends MoodleQuickForm_password { $id = $this->getAttribute('id'); $unmask = get_string('unmaskpassword', 'form'); $unmaskjs = $PAGE->requires->data_for_js('punmask',Array('id'=>$id, 'unmaskstr'=>$unmask))->asap(); - $unmaskjs .= $PAGE->requires->js('lib/form/passwordunmask.js')->asap(); + $unmaskjs .= $PAGE->requires->js('/lib/form/passwordunmask.js')->asap(); return $this->_getTabs() . '_getAttrString($this->_attributes) . ' />
'.$unmaskjs; } } //end func toHtml diff --git a/lib/form/searchableselector.php b/lib/form/searchableselector.php index 0d2d6eeeabd..7ecf4b94b1e 100644 --- a/lib/form/searchableselector.php +++ b/lib/form/searchableselector.php @@ -55,7 +55,7 @@ class MoodleQuickForm_searchableselector extends MoodleQuickForm_select{ // Javascript for the search/selection fields global $PAGE; $PAGE->requires->yui2_lib('event'); - $PAGE->requires->js('lib/form/searchableselector.js'); + $PAGE->requires->js('/lib/form/searchableselector.js'); $PAGE->requires->js_function_call('selector.filter_init', array(get_string('search'),$this->getAttribute('id'))); $strHtml = ''; diff --git a/lib/form/url.php b/lib/form/url.php index 22fe5d7a926..ce0cbd7c111 100755 --- a/lib/form/url.php +++ b/lib/form/url.php @@ -60,7 +60,7 @@ class MoodleQuickForm_url extends HTML_QuickForm_text{ $repojs = repository_get_client($context, $client_id, '*', FILE_EXTERNAL); - $PAGE->requires->js('lib/form/url.js'); + $PAGE->requires->js('/lib/form/url.js'); $str .= $repojs; $str .= <<