Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 42a2c7f16e198529ab2c807a5182bca1c5d6f7c4 1 parent 2575332
@scriby scriby authored
View
11 mod/lti/lib.php
@@ -48,8 +48,6 @@
defined('MOODLE_INTERNAL') || die;
-require_once($CFG->dirroot.'/mod/lti/locallib.php');
-
/**
* List of features supported in URL module
* @param string $feature FEATURE_xx constant for requested feature
@@ -80,7 +78,8 @@ function lti_supports($feature) {
* @return int The id of the newly inserted basiclti record
**/
function lti_add_instance($lti, $mform) {
- global $DB;
+ global $DB, $CFG;
+ require_once($CFG->dirroot.'/mod/lti/locallib.php');
$lti->timecreated = time();
$lti->timemodified = $lti->timecreated;
@@ -112,7 +111,8 @@ function lti_add_instance($lti, $mform) {
* @return boolean Success/Fail
**/
function lti_update_instance($lti, $mform) {
- global $DB;
+ global $DB, $CFG;
+ require_once($CFG->dirroot.'/mod/lti/locallib.php');
$lti->timemodified = time();
$lti->id = $lti->instance;
@@ -171,7 +171,8 @@ function lti_delete_instance($id) {
* @return cached_cm_info info
*/
function lti_get_coursemodule_info($coursemodule) {
- global $DB;
+ global $DB, $CFG;
+ require_once($CFG->dirroot.'/mod/lti/locallib.php');
if (!$lti = $DB->get_record('lti', array('id' => $coursemodule->instance),
'icon, secureicon')) {
View
1  mod/lti/request_tool.php
@@ -25,6 +25,7 @@
require_once('../../config.php');
require_once($CFG->dirroot.'/mod/lti/lib.php');
+require_once($CFG->dirroot.'/mod/lti/locallib.php');
$instanceid = required_param('instanceid', PARAM_INT);
View
1  mod/lti/return.php
@@ -25,6 +25,7 @@
require_once('../../config.php');
require_once($CFG->dirroot.'/mod/lti/lib.php');
+require_once($CFG->dirroot.'/mod/lti/locallib.php');
$courseid = required_param('course', PARAM_INT);
$instanceid = required_param('instanceid', PARAM_INT);
Please sign in to comment.
Something went wrong with that request. Please try again.