Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-20534 lti: A8. Removing locallib.php require from lib.php

  • Loading branch information...
commit 42a2c7f16e198529ab2c807a5182bca1c5d6f7c4 1 parent 2575332
scriby authored November 11, 2011
11  mod/lti/lib.php
@@ -48,8 +48,6 @@
48 48
 
49 49
 defined('MOODLE_INTERNAL') || die;
50 50
 
51  
-require_once($CFG->dirroot.'/mod/lti/locallib.php');
52  
-
53 51
 /**
54 52
  * List of features supported in URL module
55 53
  * @param string $feature FEATURE_xx constant for requested feature
@@ -80,7 +78,8 @@ function lti_supports($feature) {
80 78
  * @return int The id of the newly inserted basiclti record
81 79
  **/
82 80
 function lti_add_instance($lti, $mform) {
83  
-    global $DB;
  81
+    global $DB, $CFG;
  82
+    require_once($CFG->dirroot.'/mod/lti/locallib.php');
84 83
 
85 84
     $lti->timecreated = time();
86 85
     $lti->timemodified = $lti->timecreated;
@@ -112,7 +111,8 @@ function lti_add_instance($lti, $mform) {
112 111
  * @return boolean Success/Fail
113 112
  **/
114 113
 function lti_update_instance($lti, $mform) {
115  
-    global $DB;
  114
+    global $DB, $CFG;
  115
+    require_once($CFG->dirroot.'/mod/lti/locallib.php');
116 116
 
117 117
     $lti->timemodified = time();
118 118
     $lti->id = $lti->instance;
@@ -171,7 +171,8 @@ function lti_delete_instance($id) {
171 171
  * @return cached_cm_info info
172 172
  */
173 173
 function lti_get_coursemodule_info($coursemodule) {
174  
-    global $DB;
  174
+    global $DB, $CFG;
  175
+    require_once($CFG->dirroot.'/mod/lti/locallib.php');
175 176
 
176 177
     if (!$lti = $DB->get_record('lti', array('id' => $coursemodule->instance),
177 178
             'icon, secureicon')) {
1  mod/lti/request_tool.php
@@ -25,6 +25,7 @@
25 25
 
26 26
 require_once('../../config.php');
27 27
 require_once($CFG->dirroot.'/mod/lti/lib.php');
  28
+require_once($CFG->dirroot.'/mod/lti/locallib.php');
28 29
 
29 30
 $instanceid = required_param('instanceid', PARAM_INT);
30 31
 
1  mod/lti/return.php
@@ -25,6 +25,7 @@
25 25
 
26 26
 require_once('../../config.php');
27 27
 require_once($CFG->dirroot.'/mod/lti/lib.php');
  28
+require_once($CFG->dirroot.'/mod/lti/locallib.php');
28 29
 
29 30
 $courseid = required_param('course', PARAM_INT);
30 31
 $instanceid = required_param('instanceid', PARAM_INT);

0 notes on commit 42a2c7f

Please sign in to comment.
Something went wrong with that request. Please try again.