mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
MDL-16675 change callers to require_js to take advantage of the fact that callers no longer have to add $CFG->wwwroot themselves.
This commit is contained in:
parent
e874af28ce
commit
ac324e05ea
@ -39,7 +39,7 @@ if (empty($cleanedroleids)) {
|
||||
|
||||
// Include the required JavaScript.
|
||||
require_js(array('yui_yahoo','yui_event'));
|
||||
require_js($CFG->wwwroot . '/admin/report/capability/script.js');
|
||||
require_js('admin/report/capability/script.js');
|
||||
|
||||
// Log.
|
||||
add_to_log(SITEID, "admin", "report capability", "report/capability/index.php?capability=$capability", $capability);
|
||||
|
@ -134,7 +134,7 @@ class block_admin_tree extends block_base {
|
||||
|
||||
if ($this->tempcontent !== '') {
|
||||
require_js(array('yui_yahoo','yui_event'));
|
||||
require_js($CFG->wwwroot . '/blocks/admin_tree/admintree.js');
|
||||
require_js('blocks/admin_tree/admintree.js');
|
||||
$this->content = new object();
|
||||
$this->content->text = '<div class="admintree">' . $this->tempcontent . "</div>\n";
|
||||
$this->content->text .= print_js_call('admin_tree.init',
|
||||
|
@ -1197,7 +1197,7 @@ function calendar_session_vars($course=null) {
|
||||
}
|
||||
|
||||
function calendar_overlib_html() {
|
||||
require_js(CALENDAR_URL . 'overlib.cfg.php');
|
||||
require_js('calendar/overlib.cfg.php');
|
||||
return '<div id="overDiv" style="position: absolute; visibility: hidden; z-index:1000;"></div>';
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@
|
||||
require_js(array('yui_yahoo','yui_event','yui_connection','yui_dom'));
|
||||
// Need to do this after the header because it requires the YUI stuff
|
||||
// to be loaded already
|
||||
require_js($CFG->wwwroot . '/course/completion.js');
|
||||
require_js('course/completion.js');
|
||||
print_js_config(array(
|
||||
'completion_strsaved' => get_string('saved','completion'),
|
||||
'completion_strtitley' => get_string('completion-title-manual-y','completion'),
|
||||
@ -248,7 +248,7 @@
|
||||
// At the bottom because we want to process sections and activities
|
||||
// after the relevant html has been generated. We're forced to do this
|
||||
// because of the way in which lib/ajax/ajaxcourse.js is written.
|
||||
require_js($CFG->wwwroot . '/lib/ajax/ajaxcourse.js');
|
||||
require_js('lib/ajax/ajaxcourse.js');
|
||||
|
||||
$COURSE->javascriptportal->print_javascript($course->id);
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ if (!empty($studentsperpage)) {
|
||||
print_paging_bar($numusers, $report->page, $studentsperpage, $report->pbarurl);
|
||||
}
|
||||
|
||||
require_js('functions.js');
|
||||
require_js('grade/report/grader/functions.js');
|
||||
|
||||
$reporthtml = '<div id="grader_report_message"></div>' . "\n";
|
||||
$reporthtml .= '<table id="user-grades" class="gradestable flexible boxaligncenter generaltable">';
|
||||
|
@ -12,11 +12,8 @@ require_once('../config.php');
|
||||
require_once('lib.php');
|
||||
require_once($CFG->libdir.'/json/JSON.php');
|
||||
|
||||
require_js('yui_yahoo');
|
||||
require_js('yui_dom');
|
||||
require_js('yui_utilities');
|
||||
require_js('yui_connection');
|
||||
require_js($CFG->wwwroot.'/group/clientlib.js');
|
||||
require_js(array('yui_yahoo', 'yui_dom', 'yui_utilities', 'yui_connection'));
|
||||
require_js('group/clientlib.js');
|
||||
|
||||
$courseid = required_param('id', PARAM_INT);
|
||||
$groupid = optional_param('group', false, PARAM_INT);
|
||||
|
@ -1963,7 +1963,7 @@ function get_html_head_contributions($questionlist, &$questions, &$states) {
|
||||
|
||||
// The question engine's own JavaScript.
|
||||
require_js(array('yui_yahoo','yui_event', 'yui_connection'));
|
||||
require_js($CFG->wwwroot . '/question/qengine.js');
|
||||
require_js('question/qengine.js');
|
||||
|
||||
// An inline script to record various lang strings, etc. that qengine.js needs.
|
||||
$contributions = array(question_init_qenginejs_script());
|
||||
|
@ -81,7 +81,7 @@
|
||||
|
||||
// Print the page header
|
||||
require_js(array('yui_yahoo','yui_event'));
|
||||
require_js($CFG->wwwroot . '/mod/quiz/quiz.js');
|
||||
require_js('mod/quiz/quiz.js');
|
||||
$title = get_string('attempt', 'quiz', $attemptobj->get_attempt_number());
|
||||
$headtags = $attemptobj->get_html_head_contributions($page);
|
||||
if ($accessmanager->securewindow_required($attemptobj->is_preview_user())) {
|
||||
|
@ -70,7 +70,7 @@
|
||||
}
|
||||
|
||||
/// Print the page header
|
||||
require_js($CFG->wwwroot . '/mod/quiz/quiz.js');
|
||||
require_js('mod/quiz/quiz.js');
|
||||
$headtags = $attemptobj->get_html_head_contributions($page);
|
||||
if ($accessmanager->securewindow_required($attemptobj->is_preview_user())) {
|
||||
$accessmanager->setup_secure_page($course->shortname.': '.format_string($quiz->name), $headtags);
|
||||
|
@ -44,7 +44,7 @@ $attemptobj->load_questions();
|
||||
$attemptobj->load_question_states();
|
||||
|
||||
/// Print the page header
|
||||
require_js($CFG->wwwroot . '/mod/quiz/quiz.js');
|
||||
require_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 . ': ' .
|
||||
|
@ -70,8 +70,7 @@
|
||||
if ($accessmanager->securewindow_required($canpreview)) {
|
||||
$bodytags = 'onload="popupchecker(\'' . get_string('popupblockerwarning', 'quiz') . '\');"';
|
||||
}
|
||||
require_js('yui_yahoo');
|
||||
require_js('yui_event');
|
||||
require_js(array('yui_yahoo', 'yui_event'));
|
||||
$PAGE->print_header($course->shortname.': %fullname%','',$bodytags);
|
||||
|
||||
/// Print any blocks on the left of the page.
|
||||
|
@ -2,10 +2,7 @@
|
||||
|
||||
require_once(dirname(dirname(dirname(dirname(__FILE__)))) . '/config.php');
|
||||
require_once($CFG->libdir . '/portfoliolib.php');
|
||||
require_js(array(
|
||||
'yui_yahoo',
|
||||
'yui_dom',
|
||||
));
|
||||
require_js(array('yui_yahoo', 'yui_dom'));
|
||||
$id = required_param('id', PARAM_INT);
|
||||
|
||||
$exporter = portfolio_exporter::rewaken_object($id);
|
||||
|
@ -291,7 +291,7 @@ EOT;
|
||||
//]]>
|
||||
</script>';
|
||||
|
||||
require_js($CFG->wwwroot . '/blocks/tags/coursetags.js');
|
||||
require_js('blocks/tags/coursetags.js');
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user