MDL-49330 webservices: Fix get_course_notes api

This commit is contained in:
Ankit Agarwal 2015-04-02 11:34:11 +05:30 committed by Eloy Lafuente (stronk7)
parent f79747171d
commit 7ceee32454
3 changed files with 3 additions and 5 deletions

View File

@ -336,6 +336,7 @@ $functions = array(
'core_notes_get_course_notes' => array(
'classname' => 'core_notes_external',
'methodname' => 'get_course_notes',
'classpath' => 'notes/externallib.php',
'description' => 'Returns all notes in specified course (or site) for the specified user.',
'type' => 'read',
'capabilities' => 'moodle/notes:view',

View File

@ -25,6 +25,7 @@
*/
require_once("$CFG->libdir/externallib.php");
require_once($CFG->dirroot . "/notes/lib.php");
/**
* Notes external functions
@ -73,7 +74,6 @@ class core_notes_external extends external_api {
*/
public static function create_notes($notes = array()) {
global $CFG, $DB;
require_once($CFG->dirroot . "/notes/lib.php");
$params = self::validate_parameters(self::create_notes_parameters(), array('notes' => $notes));
@ -224,7 +224,6 @@ class core_notes_external extends external_api {
*/
public static function delete_notes($notes = array()) {
global $CFG;
require_once($CFG->dirroot . "/notes/lib.php");
$params = self::validate_parameters(self::delete_notes_parameters(), array('notes' => $notes));
@ -293,7 +292,6 @@ class core_notes_external extends external_api {
*/
public static function get_notes($notes) {
global $CFG;
require_once($CFG->dirroot . "/notes/lib.php");
$params = self::validate_parameters(self::get_notes_parameters(), array('notes' => $notes));
// Check if note system is enabled.
@ -393,7 +391,6 @@ class core_notes_external extends external_api {
*/
public static function update_notes($notes = array()) {
global $CFG, $DB;
require_once($CFG->dirroot . "/notes/lib.php");
$params = self::validate_parameters(self::update_notes_parameters(), array('notes' => $notes));

View File

@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2015040100.00; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2015040100.02; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.