Skip to content

Commit

Permalink
MDL-49330 webservices: Fix get_course_notes api
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitagarwal authored and stronk7 committed Apr 2, 2015
1 parent f797471 commit 7ceee32
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions lib/db/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@
'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',
Expand Down
5 changes: 1 addition & 4 deletions notes/externallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
*/

require_once("$CFG->libdir/externallib.php");
require_once($CFG->dirroot . "/notes/lib.php");

/**
* Notes external functions
Expand Down Expand Up @@ -73,7 +74,6 @@ public static function create_notes_parameters() {
*/
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));

Expand Down Expand Up @@ -224,7 +224,6 @@ public static function delete_notes_parameters() {
*/
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));

Expand Down Expand Up @@ -293,7 +292,6 @@ public static function get_notes_parameters() {
*/
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.
Expand Down Expand Up @@ -393,7 +391,6 @@ public static function update_notes_parameters() {
*/
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));

Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 7ceee32

Please sign in to comment.