mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-49330 webservices: Fix get_course_notes api
This commit is contained in:
parent
f79747171d
commit
7ceee32454
@ -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',
|
||||
|
@ -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));
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user