Skip to content

Commit

Permalink
Fix codecheck/moodlechecker errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mouneyrac committed May 17, 2012
1 parent d7238d0 commit d6ebe01
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
16 changes: 14 additions & 2 deletions admin/webservice/testclient_forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,10 @@ public function get_params() {

/**
* Form class for create_categories() web service function test.
*
* @package core_webservice
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright 2012 Fabio Souto
*/
class core_course_create_categories_form extends moodleform {
/**
Expand Down Expand Up @@ -800,9 +804,13 @@ public function get_params() {
return $params;
}
}

/**
* Form class for delete_categories() web service function test.
*
* @package core_webservice
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright 2012 Fabio Souto
*/
class core_course_delete_categories_form extends moodleform {
/**
Expand Down Expand Up @@ -878,9 +886,13 @@ public function get_params() {
return $params;
}
}

/**
* Form class for create_categories() web service function test.
*
* @package core_webservice
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright 2012 Fabio Souto
*/
class core_course_update_categories_form extends moodleform {
/**
Expand Down
4 changes: 2 additions & 2 deletions course/externallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,6 @@ public static function create_courses($courses) {
require_once($CFG->dirroot . "/course/lib.php");
require_once($CFG->libdir . '/completionlib.php');


$params = self::validate_parameters(self::create_courses_parameters(),
array('courses' => $courses));

Expand Down Expand Up @@ -1038,7 +1037,8 @@ public static function delete_courses($courseids) {

// Check if the current user has enought permissions.
if (!can_delete_course($courseid)) {
throw new moodle_exception('cannotdeletecategorycourse', 'error', '', format_string($course->fullname)." (id: $courseid)");
throw new moodle_exception('cannotdeletecategorycourse', 'error',
'', format_string($course->fullname)." (id: $courseid)");
}

delete_course($course, false);
Expand Down
4 changes: 2 additions & 2 deletions lib/db/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@
'type' => 'write',
'capabilities'=> 'moodle:category/manage',
),

'moodle_course_get_courses' => array(
'classname' => 'core_course_external',
'methodname' => 'get_courses',
Expand Down Expand Up @@ -457,7 +457,7 @@
'type' => 'write',
'capabilities'=> 'moodle/category:manage',
),

'core_course_delete_categories' => array(
'classname' => 'core_course_external',
'methodname' => 'delete_categories',
Expand Down

0 comments on commit d6ebe01

Please sign in to comment.