MDL-21240 shortened urls now start with / everywhere

This commit is contained in:
Petr Skoda
2010-01-18 20:57:32 +00:00
parent f2ab0d0694
commit 9dec75dbcc
87 changed files with 125 additions and 125 deletions
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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()));
+1 -1
View File
@@ -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));
+1 -1
View File
@@ -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')));
}
+1 -1
View File
@@ -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();
+2 -2
View File
@@ -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);
}
}
}
+1 -1
View File
@@ -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'),
@@ -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));
@@ -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
@@ -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
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -242,7 +242,7 @@
echo '<h2>'.get_string('counteditems', '', $a).'</h2>'."\n";
echo $PAGE->requires->js('course/report/participation/participation.js')->asap();
echo $PAGE->requires->js('/course/report/participation/participation.js')->asap();
echo '<form action="'.$CFG->wwwroot.'/user/action_redir.php" method="post" id="studentsform" onsubmit="return checksubmit(this);">'."\n";
echo '<div>'."\n";
+1 -1
View File
@@ -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)
+3 -3
View File
@@ -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 <blockname>_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'));
+1 -1
View File
@@ -70,7 +70,7 @@ function authorize_print_orders($courseid, $userid) {
if ($canmanagepayments) {
$popupmenu .= '<br />';
$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');
}
+4 -4
View File
@@ -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();
+1 -1
View File
@@ -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);
+4 -4
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -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);
+4 -4
View File
@@ -33,9 +33,9 @@
*
* Typical useage would be
* <pre>
* $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();
* </pre>
*
@@ -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
+1 -1
View File
@@ -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');
+1 -1
View File
@@ -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();
}
+1 -1
View File
@@ -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) {
+2 -2
View File
@@ -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) {
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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() . '<input' . $this->_getAttrString($this->_attributes) . ' /><div class="unmask" id="'.$id.'unmaskdiv"></div>'.$unmaskjs;
}
} //end func toHtml
+1 -1
View File
@@ -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 = '';
+1 -1
View File
@@ -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 .= <<<EOD
<button id="filepicker-btn-{$client_id}" style="display:none" onclick="return url_launch_filepicker('$id', '$client_id', 0)">$straddlink</button>
+4 -4
View File
@@ -310,7 +310,7 @@ class core_renderer extends renderer_base {
$output .= '<meta http-equiv="refresh" content="'.$this->page->periodicrefreshdelay.';url='.$this->page->url->out().'" />';
}
$this->page->requires->js('lib/javascript-static.js')->in_head(); // contains deprecated stuff too, do not add extre file for that for perf reasons!
$this->page->requires->js('/lib/javascript-static.js')->in_head(); // contains deprecated stuff too, do not add extre file for that for perf reasons!
$this->page->requires->js_function_call('setTimeout', array('fix_column_widths()', 20));
$focus = $this->page->focuscontrol;
@@ -346,8 +346,8 @@ class core_renderer extends renderer_base {
if (isloggedin() && !empty($CFG->excludeoldflashclients) && empty($SESSION->flashversion)) {
$this->page->requires->yui2_lib('event');
$this->page->requires->yui2_lib('connection');
$this->page->requires->js('lib/swfobject/swfobject.js')->in_head();
$this->page->requires->js('lib/flashdetect/flashdetect.js')->in_head();
$this->page->requires->js('/lib/swfobject/swfobject.js')->in_head();
$this->page->requires->js('/lib/flashdetect/flashdetect.js')->in_head();
$this->page->requires->js_function_call('setflashversiontosession', array($CFG->wwwroot, sesskey()));
}
@@ -2216,7 +2216,7 @@ class core_renderer extends renderer_base {
if ($table->rotateheaders && can_use_rotated_text()) {
$this->page->requires->yui2_lib('event');
$this->page->requires->js('course/report/progress/textrotate.js');
$this->page->requires->js('/course/report/progress/textrotate.js');
}
return $output;
+1 -1
View File
@@ -2128,7 +2128,7 @@ function get_html_head_contributions($questionlist, &$questions, &$states) {
// The question engine's own JavaScript.
$PAGE->requires->yui2_lib('connection');
$PAGE->requires->js('question/qengine.js');
$PAGE->requires->js('/question/qengine.js');
question_init_qengine_js();
// Anything that questions on this page need.
+4 -4
View File
@@ -168,8 +168,8 @@ function resourcelib_embed_mp3($fullurl, $title, $clicktoopen) {
OET;
$PAGE->requires->yui2_lib('dom');
$PAGE->requires->js('lib/ufo.js')->in_head();
$PAGE->requires->js('lib/resourcelib.js')->in_head();
$PAGE->requires->js('/lib/ufo.js')->in_head();
$PAGE->requires->js('/lib/resourcelib.js')->in_head();
$code .= $PAGE->requires->data_for_js('FO', $ufoargs)->asap();
$code .= $PAGE->requires->js_function_call('resourcelib_create_UFO_object', array($id))->asap();
return $code;
@@ -214,8 +214,8 @@ function resourcelib_embed_flashvideo($fullurl, $title, $clicktoopen) {
EOT;
$PAGE->requires->yui2_lib('dom');
$PAGE->requires->js('lib/ufo.js')->in_head();
$PAGE->requires->js('lib/resourcelib.js')->in_head();
$PAGE->requires->js('/lib/ufo.js')->in_head();
$PAGE->requires->js('/lib/resourcelib.js')->in_head();
$code .= $PAGE->requires->data_for_js('FO', $ufoargs)->asap();
$code .= $PAGE->requires->js_function_call('resourcelib_create_UFO_object', array($id))->asap();
return $code;
+1 -1
View File
@@ -1106,7 +1106,7 @@ function print_upgrade_part_end($plugin, $installation, $verbose) {
*/
function upgrade_get_javascript() {
global $PAGE;
$PAGE->requires->js('lib/javascript-static.js')->at_top_of_body();
$PAGE->requires->js('/lib/javascript-static.js')->at_top_of_body();
$PAGE->requires->js_function_call('repeatedly_scroll_to_end')->at_top_of_body();
$PAGE->requires->js_function_call('cancel_scroll_to_end')->after_delay(1);
}
+1 -1
View File
@@ -171,7 +171,7 @@ function message_print_contacts() {
$autorefresh = '<p align="center" class="note">'.get_string('pagerefreshes', 'message', $CFG->message_contacts_refresh).'</p>';
$autorefresh = addslashes_js($autorefresh); // js escaping
$PAGE->requires->js('message/message.js');
$PAGE->requires->js('/message/message.js');
$PAGE->requires->js_function_call('refresh_page', Array(60*1000, $PAGE->url->out()));
echo $OUTPUT->container_start('messagejsautorefresh note center');
+1 -1
View File
@@ -76,7 +76,7 @@ if ($messages ) {
}
}
$PAGE->requires->js('message/message.js')->in_head();
$PAGE->requires->js('/message/message.js')->in_head();
$PAGE->requires->js_function_call('refresh_parent_messages_frame');
$PAGE->requires->data_for_js('chatmessages', Array('msgcount'=>count($jsmessages), 'msg'=>$jsmessages))->in_head();
+1 -1
View File
@@ -39,7 +39,7 @@ if (has_capability('moodle/site:sendmessage', get_context_instance(CONTEXT_SYSTE
$PAGE->set_pagelayout('popup');
$PAGE->set_title('send');
$PAGE->requires->js('message/message.js');
$PAGE->requires->js('/message/message.js');
/// Script parameters
$userid = required_param('id', PARAM_INT);
+1 -1
View File
@@ -933,7 +933,7 @@ class assignment_base {
echo $extra_javascript;
echo $PAGE->requires->data_for_js('assignment', Array('nextid'=>$nextid, 'userid'=>$userid))->asap();
echo $PAGE->requires->js('mod/assignment/assignment.js')->asap();
echo $PAGE->requires->js('/mod/assignment/assignment.js')->asap();
echo '<table cellspacing="0" class="feedback '.$subtype.'" >';
+1 -1
View File
@@ -90,7 +90,7 @@ $PAGE->requires->string_for_js('modulename', 'chat');
$PAGE->requires->string_for_js('beep', 'chat');
$PAGE->requires->string_for_js('talk', 'chat');
$PAGE->requires->js('mod/chat/gui_ajax/script.js');
$PAGE->requires->js('/mod/chat/gui_ajax/script.js');
$PAGE->requires->yui2_lib('animation');
$PAGE->add_body_class('yui-skin-sam');
+1 -1
View File
@@ -32,7 +32,7 @@ $USER = $DB->get_record('user', array('id'=>$chatuser->userid));
//Setup course, lang and theme
$PAGE->set_course($course);
$PAGE->requires->js('mod/chat/gui_header_js/chat_gui_header.js')->in_head();
$PAGE->requires->js('/mod/chat/gui_header_js/chat_gui_header.js')->in_head();
$PAGE->set_pagelayout('embedded');
$PAGE->set_focuscontrol('input_chat_message');
$PAGE->set_cacheable(false);
+1 -1
View File
@@ -64,7 +64,7 @@ if (!empty($chat_message)) {
if ($chatuser->version == 'header_js') {
/// force msg referesh ASAP
echo $PAGE->requires->js('mod/chat/gui_header_js/chat_gui_header.js')->asap();
echo $PAGE->requires->js('/mod/chat/gui_header_js/chat_gui_header.js')->asap();
if ($CFG->chat_normal_updatemode != 'jsupdated') { // See bug MDL-6791
echo $PAGE->requires->js_function_call('insert_redirect')->asap();;
}
+1 -1
View File
@@ -69,7 +69,7 @@ foreach ($chatusers as $chatuser) {
$i++;
}
$PAGE->requires->data_for_js('uidles', $uidles)->in_head();
$PAGE->requires->js('mod/chat/gui_header_js/chat_gui_header.js')->in_head();
$PAGE->requires->js('/mod/chat/gui_header_js/chat_gui_header.js')->in_head();
$PAGE->requires->js_function_call('start')->on_dom_ready();
ob_start();
echo $OUTPUT->header();
+1 -1
View File
@@ -18,7 +18,7 @@ $USER = $DB->get_record('user', array('id'=>$chatuser->userid));
//Setup course, lang and theme
$PAGE->set_course($DB->get_record('course', array('id' => $chatuser->course)));
$PAGE->requires->js('mod/chat/gui_sockets/chat_gui_sockets.js')->in_head();
$PAGE->requires->js('/mod/chat/gui_sockets/chat_gui_sockets.js')->in_head();
$PAGE->requires->js_function_call('setfocus');
$PAGE->set_focuscontrol('chat_message');
$PAGE->set_cacheable(false);
+1 -1
View File
@@ -117,7 +117,7 @@ if ($data->csstemplate) {
$PAGE->requires->css('/mod/data/css.php?d='.$data->id);
}
if ($data->jstemplate) {
$PAGE->requires->js('mod/data/js.php?d='.$data->id)->in_head();
$PAGE->requires->js('/mod/data/js.php?d='.$data->id)->in_head();
}
+1 -1
View File
@@ -1426,7 +1426,7 @@ function data_print_preference_form($data, $perpage, $search, $sort='', $order='
else {
$checked = '';
}
$PAGE->requires->js('mod/data/data.js');
$PAGE->requires->js('/mod/data/data.js');
echo '&nbsp;<input type="hidden" name="advanced" value="0" />';
echo '&nbsp;<input type="hidden" name="filter" value="1" />';
echo '&nbsp;<input type="checkbox" id="advancedcheckbox" name="advanced" value="1" '.$checked.' onchange="showHideAdvSearch(this.checked);" /><label for="advancedcheckbox">'.get_string('advancedsearch', 'data').'</label>';
+1 -1
View File
@@ -89,7 +89,7 @@ $bodytag .= 'currTextarea = document.getElementById(\'tempform\').template;';
$bodytag .= '" ';
$PAGE->navbar->add(get_string($mode,'data'));
$PAGE->requires->js('mod/data/data.js');
$PAGE->requires->js('/mod/data/data.js');
$PAGE->set_title($data->name);
echo $OUTPUT->header();
echo $OUTPUT->heading(format_string($data->name));
+1 -1
View File
@@ -274,7 +274,7 @@
$PAGE->requires->css('/mod/data/css.php?d='.$data->id);
}
if ($data->jstemplate) {
$PAGE->requires->js('mod/data/js.php?d='.$data->id)->in_head();
$PAGE->requires->js('/mod/data/js.php?d='.$data->id)->in_head();
}
/// Print the page header
+1 -1
View File
@@ -144,7 +144,7 @@ if ($courseitemfilter > 0) {
echo '<input type="hidden" name="courseitemfilter" value="'.$courseitemfilter.'" />';
echo '<input type="hidden" name="courseitemfiltertyp" value="'.$courseitemfiltertyp.'" />';
echo '<input type="hidden" name="courseid" value="'.$courseid.'" />';
echo $PAGE->requires->js('mod/feedback/feedback.js')->asap();
echo $PAGE->requires->js('/mod/feedback/feedback.js')->asap();
$sql = 'select c.id, c.shortname from {course} c, '.
'{feedback_value} fv, {feedback_item} fi '.
'where c.id = fv.course_id and fv.item = fi.id '.
+1 -1
View File
@@ -227,7 +227,7 @@ echo '</form>';
// echo $OUTPUT->box_end();
if ($typ!='label') {
$PAGE->requires->js('mod/feedback/feedback.js');
$PAGE->requires->js('/mod/feedback/feedback.js');
$PAGE->requires->js_function_call('set_item_focus', Array('id_itemname'));
}
+1 -1
View File
@@ -85,7 +85,7 @@ echo $OUTPUT->heading(format_text($feedback->name));
echo $OUTPUT->continue_button(htmlspecialchars('show_entries.php?id='.$id.'&do_show=showentries'));
//print the list with anonymous completeds
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
$PAGE->requires->js('mod/feedback/feedback.js');
$PAGE->requires->js('/mod/feedback/feedback.js');
?>
<div class="mdl-align">
<form name="frm" action="<?php echo me();?>" method="post">
+1 -1
View File
@@ -48,7 +48,7 @@ add_to_log($course->id, 'folder', 'view', 'view.php?id='.$cm->id, $folder->id, $
$PAGE->set_url('/mod/folder/view.php', array('id' => $cm->id));
$PAGE->requires->yui2_lib('json');
$PAGE->requires->yui2_lib('treeview');
$PAGE->requires->js('mod/folder/functions.js');
$PAGE->requires->js('/mod/folder/functions.js');
$PAGE->set_title($course->shortname.': '.$folder->name);
$PAGE->set_heading($course->fullname);
+1 -1
View File
@@ -72,7 +72,7 @@
$PAGE->requires->yui2_lib('event');
$PAGE->requires->yui2_lib('connection');
$PAGE->requires->yui2_lib('json');
$PAGE->requires->js('mod/forum/rate_ajax.js');
$PAGE->requires->js('/mod/forum/rate_ajax.js');
// move this down fix for MDL-6926
require_once('lib.php');
+2 -2
View File
@@ -5012,7 +5012,7 @@ function forum_get_subscribe_link($forum, $context, $messages = array(), $cantac
$link = '';
if ($fakelink) {
$PAGE->requires->js('mod/forum/forum.js');
$PAGE->requires->js('/mod/forum/forum.js');
$PAGE->requires->js_function_call('forum_produce_subscribe_link', Array($forum->id, $backtoindexlink, $linktext, $linktitle));
$link = "<noscript>";
}
@@ -5067,7 +5067,7 @@ function forum_get_tracking_link($forum, $messages=array(), $fakelink=true) {
$link = '';
if ($fakelink) {
$PAGE->requires->js('mod/forum/forum.js');
$PAGE->requires->js('/mod/forum/forum.js');
$PAGE->requires->js_function_call('forum_produce_tracking_link', Array($forum->id, $linktext, $linktitle));
// use <noscript> to print button in case javascript is not enabled
$link .= '<noscript>';
+1 -1
View File
@@ -271,7 +271,7 @@ function forum_print_big_search_form($course) {
echo $OUTPUT->box_start('generalbox boxaligncenter');
echo $PAGE->requires->js('mod/forum/forum.js')->asap();
echo $PAGE->requires->js('/mod/forum/forum.js')->asap();
echo '<form id="searchform" action="search.php" method="get">';
echo '<table cellpadding="10" class="searchbox" id="form">';
+1 -1
View File
@@ -97,7 +97,7 @@
$PAGE->requires->yui2_lib('event');
$PAGE->requires->yui2_lib('connection');
$PAGE->requires->yui2_lib('json');
$PAGE->requires->js('mod/forum/rate_ajax.js');
$PAGE->requires->js('/mod/forum/rate_ajax.js');
$PAGE->set_title(format_string($forum->name));
$PAGE->set_heading(format_string($course->fullname));
+2 -2
View File
@@ -55,8 +55,8 @@
$strmodulename = get_string("modulename", "hotpot");
// print header
$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->set_title(format_string($course->shortname) . ": $hotpot->name");
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
+1 -1
View File
@@ -425,7 +425,7 @@
break;
default:
$iframe_id = 'hotpot_iframe';
$PAGE->requires->js('mod/hotpot/iframe.js');
$PAGE->requires->js('/mod/hotpot/iframe.js');
$PAGE->requires->js_function_call('set_iframe_height', array($iframe_id))->on_dom_ready();
echo $OUTPUT->header();
if (!empty($available_msg)) {
+1 -1
View File
@@ -54,7 +54,7 @@ $PAGE->requires->yui2_lib('button');
$PAGE->requires->yui2_lib('container');
$PAGE->requires->yui2_lib('dragdrop');
$PAGE->requires->yui2_lib('resize');
$PAGE->requires->js('mod/imscp/functions.js')->in_head();
$PAGE->requires->js('/mod/imscp/functions.js')->in_head();
$PAGE->requires->string_for_js('navigation', 'imscp');
$PAGE->requires->string_for_js('toc', 'imscp');
+1 -1
View File
@@ -1036,7 +1036,7 @@ function lesson_get_media_html($lesson, $context) {
// anything else - just try object tag enlarged as much as possible
$code = resourcelib_embed_general($url, $title, $clicktoopen, $mimetype);
$PAGE->requires->yui2_lib('dom');
$PAGE->requires->js('mod/url/functions.js');
$PAGE->requires->js('/mod/url/functions.js');
$PAGE->requires->js_function_call('imscp_setup_object')->on_dom_ready();
}
+1 -1
View File
@@ -487,7 +487,7 @@ function lesson_clock_block_contents($cmid, $lesson, $timer, $page) {
$clocksettings = array('starttime'=>$timer->starttime, 'servertime'=>time(),'testlength'=>($lesson->maxtime * 60));
$content .= $page->requires->data_for_js('clocksettings', $clocksettings)->now();
$content .= $page->requires->js('mod/lesson/timer.js')->now();
$content .= $page->requires->js('/mod/lesson/timer.js')->now();
$content .= $page->requires->js_function_call('show_clock')->now();
$bc = new block_contents();
+1 -1
View File
@@ -727,7 +727,7 @@ class securewindow_access_rule extends quiz_access_rule_base {
echo "window.open('$attempturl', '$window', '$this->windowoptions');", '" />';
/// JavaScript to reveal the button.
echo $PAGE->requires->js('mod/quiz/quiz.js')->asap();
echo $PAGE->requires->js('/mod/quiz/quiz.js')->asap();
echo $PAGE->requires->js_function_call('reveal_start_button')->asap();
/// A noscript tag to explains that this quiz only works with JavaScript enabled.
+2 -2
View File
@@ -85,8 +85,8 @@
$attemptobj->load_question_states($questionids);
/// Print the quiz page ////////////////////////////////////////////////////////
$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();
// Arrange for the navigation to be displayed.
$navbc = $attemptobj->get_navigation_panel('quiz_attempt_nav_panel', $page);
+1 -1
View File
@@ -724,7 +724,7 @@ class quiz_attempt extends quiz {
// as seen as possible, particularly if the page is loading slowly.
$PAGE->requires->yui2_lib('dom');
$PAGE->requires->yui2_lib('event');
$PAGE->requires->js('mod/quiz/quiz.js')->in_head();
$PAGE->requires->js('/mod/quiz/quiz.js')->in_head();
get_html_head_contributions($this->get_question_ids($page), $this->questions, $this->states);
}
+1 -1
View File
@@ -456,7 +456,7 @@ for ($pageiter = 1; $pageiter <= $numberoflisteners; $pageiter++) {
$quizeditconfig->dialoglisteners[] = 'addrandomdialoglaunch_' . $pageiter;
}
$PAGE->requires->data_for_js('quiz_edit_config', $quizeditconfig);
$PAGE->requires->js('mod/quiz/edit.js');
$PAGE->requires->js('/mod/quiz/edit.js');
// Print the tabs.
$currenttab = 'edit';
+1 -1
View File
@@ -112,7 +112,7 @@ class mod_quiz_mod_form extends moodleform_mod {
$pagegroup[] = &$mform->createElement('checkbox', 'repaginatenow', '', get_string('repaginatenow', 'quiz'), array('id' => 'id_repaginatenow'));
$mform->disabledIf('repaginatenow', 'shufflequestions', 'eq', 1);
$PAGE->requires->yui2_lib('event');
$PAGE->requires->js('mod/quiz/edit.js');
$PAGE->requires->js('/mod/quiz/edit.js');
}
$mform->addGroup($pagegroup, 'questionsperpagegrp', get_string('newpage', 'quiz'), null, false);
+2 -2
View File
@@ -56,8 +56,8 @@ class quiz_grading_report extends quiz_default_report {
$this->cm = $cm;
echo $PAGE->requires->js('lib/overlib/overlib.js')->asap();
echo $PAGE->requires->js('lib/overlib/overlib_cssstyle.js')->asap();
echo $PAGE->requires->js('/lib/overlib/overlib.js')->asap();
echo $PAGE->requires->js('/lib/overlib/overlib_cssstyle.js')->asap();
$this->print_header_and_tabs($cm, $course, $quiz, $reportmode="grading");
+2 -2
View File
@@ -85,8 +85,8 @@
$firstregion = reset($PAGE->blocks->get_regions());
$PAGE->blocks->add_pretend_block($navbc, $firstregion);
$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();
/// Print the page header
$headtags = $attemptobj->get_html_head_contributions($page);
+2 -2
View File
@@ -67,8 +67,8 @@
($stateid ? '&state=' . $stateid : ''),
$attemptobj->get_quizid(), $attemptobj->get_cmid());
$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();
/// Print the page header
$attemptobj->get_question_html_head_contributions($questionid);
+1 -1
View File
@@ -47,7 +47,7 @@ $attemptobj->load_questions();
$attemptobj->load_question_states();
/// Print the page header
$PAGE->requires->js('mod/quiz/quiz.js');
$PAGE->requires->js('/mod/quiz/quiz.js');
$title = get_string('summaryofattempt', 'quiz');
if ($accessmanager->securewindow_required($attemptobj->is_preview_user())) {
$accessmanager->setup_secure_page($attemptobj->get_course()->shortname . ': ' .
+1 -1
View File
@@ -105,7 +105,7 @@ function resource_display_embed($resource, $cm, $course, $file) {
// anything else - just try object tag enlarged as much as possible
$code = resourcelib_embed_general($fullurl, $title, $clicktoopen, $mimetype);
$PAGE->requires->yui2_lib('dom');
$PAGE->requires->js('mod/url/functions.js')->in_head();
$PAGE->requires->js('/mod/url/functions.js')->in_head();
$PAGE->requires->js_function_call('url_init_object');
}
+2 -2
View File
@@ -541,8 +541,8 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
$result->toc .= $PAGE->requires->data_for_js('scormdata', array(
'plusicon' => $OUTPUT->pix_url('pix/plus', 'scorm'),
'minusicon' => $OUTPUT->pix_url('pix/minus', 'scorm')))->asap();
$result->toc .= $PAGE->requires->js('lib/cookies.js')->asap();
$result->toc .= $PAGE->requires->js('mod/scorm/datamodels/scorm_datamodels.js')->asap();
$result->toc .= $PAGE->requires->js('/lib/cookies.js')->asap();
$result->toc .= $PAGE->requires->js('/mod/scorm/datamodels/scorm_datamodels.js')->asap();
}
$url = $CFG->wwwroot.'/mod/scorm/player.php?a='.$scorm->id.'&currentorg='.$currentorg.$modestr;
+2 -2
View File
@@ -320,8 +320,8 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
$PAGE->requires->data_for_js('scormdata', array(
'plusicon' => $OUTPUT->pix_url('pix/plus', 'scorm'),
'minusicon' => $OUTPUT->pix_url('pix/minus', 'scorm')));
$PAGE->requires->js('lib/cookies.js');
$PAGE->requires->js('mod/scorm/datamodels/scorm_datamodels.js');
$PAGE->requires->js('/lib/cookies.js');
$PAGE->requires->js('/mod/scorm/datamodels/scorm_datamodels.js');
}
$url = $CFG->wwwroot.'/mod/scorm/player.php?a='.$scorm->id.'&currentorg='.$currentorg.$modestr;
+2 -2
View File
@@ -211,8 +211,8 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
$PAGE->requires->data_for_js('scormdata', array(
'plusicon' => $OUTPUT->pix_url('pix/plus', 'scorm'),
'minusicon' => $OUTPUT->pix_url('pix/minus', 'scorm')));
$PAGE->requires->js('lib/cookies.js');
$PAGE->requires->js('mod/scorm/datamodels/scorm_datamodels.js');
$PAGE->requires->js('/lib/cookies.js');
$PAGE->requires->js('/mod/scorm/datamodels/scorm_datamodels.js');
}
$url = $CFG->wwwroot.'/mod/scorm/player.php?a='.$scorm->id.'&currentorg='.$currentorg.$modestr;
+1 -1
View File
@@ -81,7 +81,7 @@
print_error('cannotfindsco', 'scorm');
}
$scorm->version = strtolower(clean_param($scorm->version, PARAM_SAFEDIR)); // Just to be safe
$PAGE->requires->js('lib/cookies.js')->asap();
$PAGE->requires->js('/lib/cookies.js')->asap();
if (file_exists($CFG->dirroot.'/mod/scorm/datamodels/'.$scorm->version.'.js.php')) {
include_once($CFG->dirroot.'/mod/scorm/datamodels/'.$scorm->version.'.js.php');
} else {
+4 -4
View File
@@ -164,9 +164,9 @@
$PAGE->set_button($exitlink);
echo $PAGE->requires->data_for_js('scormplayerdata', Array('cwidth'=>$scorm->width,'cheight'=>$scorm->height))->in_head();
echo $PAGE->requires->js('mod/scorm/request.js')->in_head();
echo $PAGE->requires->js('mod/scorm/loaddatamodel.php?id='.$cm->id.$scoidstr.$modestr.$attemptstr)->in_head();
echo $PAGE->requires->js('mod/scorm/rd.js')->in_head();
echo $PAGE->requires->js('/mod/scorm/request.js')->in_head();
echo $PAGE->requires->js('/mod/scorm/loaddatamodel.php?id='.$cm->id.$scoidstr.$modestr.$attemptstr)->in_head();
echo $PAGE->requires->js('/mod/scorm/rd.js')->in_head();
echo $OUTPUT->header();
@@ -313,7 +313,7 @@
$name = 'scorm_'.$name;
echo $PAGE->requires->js_function_call('scorm_resize')->asap();
echo $PAGE->requires->js('mod/scorm/player.js')->asap();
echo $PAGE->requires->js('/mod/scorm/player.js')->asap();
echo $PAGE->requires->js_function_call('scorm_openpopup', Array("loadSCO.php?id=".$cm->id.$scoidpop, p($name), p($scorm->options), p($scorm->width), p($scorm->height)))->asap();
?>
<noscript>
+1 -1
View File
@@ -188,7 +188,7 @@
$checkarray['questions'][] = Array('question'=>$question, 'default'=>$default);
}
}
$PAGE->requires->js('mod/survey/survey.js');
$PAGE->requires->js('/mod/survey/survey.js');
$PAGE->requires->data_for_js('surveycheck', $checkarray);
$PAGE->requires->string_for_js('questionsnotanswered', 'survey');
$PAGE->requires->js_function_call('survey_attach_onsubmit');
+1 -1
View File
@@ -266,7 +266,7 @@ function url_display_embed($url, $cm, $course) {
// anything else - just try object tag enlarged as much as possible
$code = resourcelib_embed_general($fullurl, $title, $clicktoopen, $mimetype);
$PAGE->requires->yui2_lib('dom');
$PAGE->requires->js('mod/url/functions.js')->in_head();
$PAGE->requires->js('/mod/url/functions.js')->in_head();
$PAGE->requires->js_function_call('url_init_object');
}
+2 -2
View File
@@ -1111,7 +1111,7 @@ class question_bank_view {
return;
}
$PAGE->requires->js('question/qbank.js');
$PAGE->requires->js('/question/qbank.js');
// Category selection form
echo $OUTPUT->heading(get_string('questionbank', 'question'), 2);
@@ -1857,7 +1857,7 @@ function require_login_in_context($contextorid = null){
*/
function print_choose_qtype_to_add_form($hiddenparams) {
global $CFG, $QTYPES, $PAGE, $OUTPUT;
$PAGE->requires->js('question/qbank.js');
$PAGE->requires->js('/question/qbank.js');
echo '<div id="chooseqtypehead" class="hd">' . "\n";
echo $OUTPUT->heading(get_string('chooseqtypetoadd', 'question'), 3);
echo "</div>\n";
+2 -2
View File
@@ -307,8 +307,8 @@ class embedded_cloze_qtype extends default_questiontype {
// The regex will recognize text snippets of type {#X}
// where the X can be any text not containg } or white-space characters.
echo $PAGE->requires->js('lib/overlib/overlib.js')->asap();
echo $PAGE->requires->js('lib/overlib/overlib_cssstyle.js')->asap();
echo $PAGE->requires->js('/lib/overlib/overlib.js')->asap();
echo $PAGE->requires->js('/lib/overlib/overlib_cssstyle.js')->asap();
while (preg_match('~\{#([^[:space:]}]*)}~', $qtextremaining, $regs)) {
$qtextsplits = explode($regs[0], $qtextremaining, 2);
+2 -2
View File
@@ -866,10 +866,10 @@ class default_questiontype {
$plugindirrel = 'question/type/' . $this->name();
if (file_exists($plugindir . '/script.js')) {
$PAGE->requires->js($plugindirrel . '/script.js');
$PAGE->requires->js('/' . $plugindirrel . '/script.js');
}
if (file_exists($plugindir . '/script.php')) {
$PAGE->requires->js($plugindirrel . '/script.php');
$PAGE->requires->js('/' . $plugindirrel . '/script.php');
}
}
+2 -2
View File
@@ -243,7 +243,7 @@ function coursetag_print_cloud($tagcloud, $return=false, $max_size=180, $min_siz
function coursetag_get_jscript($coursetagdivs = '') {
global $CFG, $DB, $PAGE;
$PAGE->requires->js('tag/tag.js');
$PAGE->requires->js('/tag/tag.js');
$PAGE->requires->strings_for_js(array('jserror1', 'jserror2'), 'block_tags');
if ($coursetagdivs) {
@@ -256,7 +256,7 @@ function coursetag_get_jscript($coursetagdivs = '') {
}
}
$PAGE->requires->js('blocks/tags/coursetags.js');
$PAGE->requires->js('/blocks/tags/coursetags.js');
return '';
}
+1 -1
View File
@@ -137,7 +137,7 @@ if (!empty($errorstring)) {
$tagform->display();
if (ajaxenabled()) {
$PAGE->requires->js('tag/tag.js');
$PAGE->requires->js('/tag/tag.js');
$PAGE->requires->js_function_call('init_tag_autocomplete')->on_dom_ready();
}
echo $OUTPUT->footer();
+1 -1
View File
@@ -668,7 +668,7 @@
if ($bulkoperations) {
$PAGE->requires->js('user/user.js');
$PAGE->requires->js('/user/user.js');
echo '<form action="action_redir.php" method="post" id="participantsform" onsubmit="return checksubmit(this);">';
echo '<div>';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
+1 -1
View File
@@ -108,7 +108,7 @@ abstract class user_selector_base {
$PAGE->requires->yui2_lib('json');
$PAGE->requires->yui2_lib('connection');
$PAGE->requires->yui2_lib('datasource');
$PAGE->requires->js('user/selector/script.js');
$PAGE->requires->js('/user/selector/script.js');
}
/**
+1 -1
View File
@@ -14,7 +14,7 @@ $args['flashvars'] = 'amfurl='.$CFG->wwwroot.'/webservice/amf/server.php';
$args['setcontainercss'] = 'true';
$PAGE->requires->js('lib/ufo.js')->in_head();
$PAGE->requires->js('/lib/ufo.js')->in_head();
$PAGE->requires->data_for_js('FO', $args);
$PAGE->requires->js_function_call('create_UFO_object', Array('moodletestclient'));