mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
MDL-49330 webservices: Fix get_course_notes api
This commit is contained in:
parent
f79747171d
commit
7ceee32454
3 changed files with 3 additions and 5 deletions
|
@ -336,6 +336,7 @@ $functions = array(
|
||||||
'core_notes_get_course_notes' => array(
|
'core_notes_get_course_notes' => array(
|
||||||
'classname' => 'core_notes_external',
|
'classname' => 'core_notes_external',
|
||||||
'methodname' => 'get_course_notes',
|
'methodname' => 'get_course_notes',
|
||||||
|
'classpath' => 'notes/externallib.php',
|
||||||
'description' => 'Returns all notes in specified course (or site) for the specified user.',
|
'description' => 'Returns all notes in specified course (or site) for the specified user.',
|
||||||
'type' => 'read',
|
'type' => 'read',
|
||||||
'capabilities' => 'moodle/notes:view',
|
'capabilities' => 'moodle/notes:view',
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once("$CFG->libdir/externallib.php");
|
require_once("$CFG->libdir/externallib.php");
|
||||||
|
require_once($CFG->dirroot . "/notes/lib.php");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notes external functions
|
* Notes external functions
|
||||||
|
@ -73,7 +74,6 @@ class core_notes_external extends external_api {
|
||||||
*/
|
*/
|
||||||
public static function create_notes($notes = array()) {
|
public static function create_notes($notes = array()) {
|
||||||
global $CFG, $DB;
|
global $CFG, $DB;
|
||||||
require_once($CFG->dirroot . "/notes/lib.php");
|
|
||||||
|
|
||||||
$params = self::validate_parameters(self::create_notes_parameters(), array('notes' => $notes));
|
$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()) {
|
public static function delete_notes($notes = array()) {
|
||||||
global $CFG;
|
global $CFG;
|
||||||
require_once($CFG->dirroot . "/notes/lib.php");
|
|
||||||
|
|
||||||
$params = self::validate_parameters(self::delete_notes_parameters(), array('notes' => $notes));
|
$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) {
|
public static function get_notes($notes) {
|
||||||
global $CFG;
|
global $CFG;
|
||||||
require_once($CFG->dirroot . "/notes/lib.php");
|
|
||||||
|
|
||||||
$params = self::validate_parameters(self::get_notes_parameters(), array('notes' => $notes));
|
$params = self::validate_parameters(self::get_notes_parameters(), array('notes' => $notes));
|
||||||
// Check if note system is enabled.
|
// Check if note system is enabled.
|
||||||
|
@ -393,7 +391,6 @@ class core_notes_external extends external_api {
|
||||||
*/
|
*/
|
||||||
public static function update_notes($notes = array()) {
|
public static function update_notes($notes = array()) {
|
||||||
global $CFG, $DB;
|
global $CFG, $DB;
|
||||||
require_once($CFG->dirroot . "/notes/lib.php");
|
|
||||||
|
|
||||||
$params = self::validate_parameters(self::update_notes_parameters(), array('notes' => $notes));
|
$params = self::validate_parameters(self::update_notes_parameters(), array('notes' => $notes));
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
defined('MOODLE_INTERNAL') || die();
|
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.
|
// RR = release increments - 00 in DEV branches.
|
||||||
// .XX = incremental changes.
|
// .XX = incremental changes.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue