MDL-60364 Web service: E_ERROR in course_check_updates web service
authorNeill Magill <neill.magill@nottingham.ac.uk>
Fri, 6 Oct 2017 09:36:06 +0000 (10:36 +0100)
committerNeill Magill <neill.magill@nottingham.ac.uk>
Fri, 6 Oct 2017 12:43:09 +0000 (13:43 +0100)
The error stated that course_check_updates() is undefined, this function
is in the course lib.php file.

course/externallib.php

index 3919365..73e4b80 100644 (file)
@@ -3135,6 +3135,7 @@ class core_course_external extends external_api {
      */
     public static function check_updates($courseid, $tocheck, $filter = array()) {
         global $CFG, $DB;
+        require_once($CFG->dirroot . "/course/lib.php");
 
         $params = self::validate_parameters(
             self::check_updates_parameters(),