Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 37 additions & 37 deletions lbplanner/db/services.php

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions lbplanner/services/config/get_version.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
use core_external\{external_api, external_function_parameters, external_single_structure, external_value};

/**
* Get version service.
* Returns the version of the plugin.
*
* @package local_lbplanner
* @subpackage services_config
* @copyright 2024 necodeIT
* @copyright 2025 necodeIT
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/ CC-BY-NC-SA 4.0 International or later
*/
class config_get_version extends external_api {
Expand All @@ -38,7 +38,7 @@ public static function get_version_parameters(): external_function_parameters {
}

/**
* Returns the version.
* Returns the version of the plugin.
*
* @return array containing the version
*/
Expand Down
4 changes: 2 additions & 2 deletions lbplanner/services/courses/get_all_courses.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
use local_lbplanner\model\user;

/**
* Get ALL courses. Slotmaster only.
* Returns ALL courses.
*
* @package local_lbplanner
* @subpackage services_courses
Expand All @@ -40,7 +40,7 @@ public static function get_all_courses_parameters(): external_function_parameter
}

/**
* Get ALL courses.
* Returns ALL courses.
*/
public static function get_all_courses(): array {
global $USER;
Expand Down
4 changes: 2 additions & 2 deletions lbplanner/services/courses/get_my_courses.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use local_lbplanner\model\course;

/**
* Get all the courses of the current year.
* Returns courses visible to this user.
*
* @package local_lbplanner
* @subpackage services_courses
Expand All @@ -38,7 +38,7 @@ public static function get_my_courses_parameters(): external_function_parameters
}

/**
* Get all the courses of the current year.
* Returns courses visible to this user.
*/
public static function get_my_courses(): array {
$courses = course_helper::get_eduplanner_courses(true);
Expand Down
12 changes: 6 additions & 6 deletions lbplanner/services/courses/update_course.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
use moodle_exception;

/**
* Update the data for a course.
* Update the user-specific data for a course.
*
* @package local_lbplanner
* @subpackage services_courses
* @copyright 2024 necodeIT
* @copyright 2025 necodeIT
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/ CC-BY-NC-SA 4.0 International or later
*/
class courses_update_course extends external_api {
Expand All @@ -48,15 +48,15 @@ public static function update_course_parameters(): external_function_parameters
}

/**
* Update the User-data for a course.
* Update the user-specific data for a course.
* @param int $courseid The id of the course
* @param string $color The color of the course
* @param string $shortname The shortname of the course
* @param int $enabled Whether the course is enabled or not (0 or 1)
* @param bool $enabled Whether the course is enabled or not
* @return void
* @throws moodle_exception
*/
public static function update_course(int $courseid, string $color, string $shortname, int $enabled): void {
public static function update_course(int $courseid, string $color, string $shortname, bool $enabled): void {
global $DB, $USER;

self::validate_parameters(
Expand All @@ -82,7 +82,7 @@ public static function update_course(int $courseid, string $color, string $short
$course->set_shortname($shortname);
}
if ($enabled !== null) {
$course->set_enabled((bool) $enabled);
$course->set_enabled($enabled);
}

$DB->update_record(course_helper::EDUPLANNER_COURSE_TABLE, $course->prepare_for_db());
Expand Down
2 changes: 1 addition & 1 deletion lbplanner/services/kanban/get_board.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static function get_board_parameters(): external_function_parameters {
}

/**
* Gets all the entries on this user's board.
* Returns all entries in the kanban board for the current user.
*/
public static function get_board(): array {
global $USER;
Expand Down
6 changes: 3 additions & 3 deletions lbplanner/services/modules/get_all_course_modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
use local_lbplanner\model\module;

/**
* Get all the modules of the given course.
* Returns all modules belonging to a course.
*
* @package local_lbplanner
* @subpackage services_modules
* @copyright 2024 necodeIT
* @copyright 2025 necodeIT
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/ CC-BY-NC-SA 4.0 International or later
*/
class modules_get_all_course_modules extends external_api {
Expand All @@ -48,7 +48,7 @@ public static function get_all_course_modules_parameters(): external_function_pa
}

/**
* Returns all the modules inside a course.
* Returns all modules belonging to a course.
*
* @param int $courseid The ID of the course
* @param bool $ekenabled whether or not to include ek modules
Expand Down
4 changes: 2 additions & 2 deletions lbplanner/services/modules/get_all_modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
use local_lbplanner\model\module;

/**
* Get all the modules of the current year.
* Returns all the modules for a user.
*
* @package local_lbplanner
* @subpackage services_modules
* @copyright 2024 necodeIT
* @copyright 2025 necodeIT
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/ CC-BY-NC-SA 4.0 International or later
*/
class modules_get_all_modules extends external_api {
Expand Down
4 changes: 2 additions & 2 deletions lbplanner/services/modules/get_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
use local_lbplanner\model\module;

/**
* Get the data for a module.
* Returns the data for a module.
*
* @package local_lbplanner
* @subpackage services_modules
* @copyright 2024 necodeIT
* @copyright 2025 necodeIT
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/ CC-BY-NC-SA 4.0 International or later
*/
class modules_get_module extends external_api {
Expand Down
6 changes: 3 additions & 3 deletions lbplanner/services/notifications/get_all_notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
use local_lbplanner\helpers\notifications_helper;

/**
* Get all the notifications of the user.
* Returns all notifications for this user.
*
* @package local_lbplanner
* @subpackage services_notifications
* @copyright 2024 necodeIT
* @copyright 2025 necodeIT
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/ CC-BY-NC-SA 4.0 International or later
*/
class notifications_get_all_notifications extends external_api {
Expand All @@ -37,7 +37,7 @@ public static function get_all_notifications_parameters(): external_function_par
}

/**
* Returns all the notifications of the user
* Returns all notifications for this user.
*
* @return array
*/
Expand Down
2 changes: 1 addition & 1 deletion lbplanner/services/notifications/update_notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @package local_lbplanner
* @subpackage services_notifications
* @copyright 2024 necodeIT
* @copyright 2025 necodeIT
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/ CC-BY-NC-SA 4.0 International or later
*/
class notifications_update_notification extends external_api {
Expand Down
6 changes: 3 additions & 3 deletions lbplanner/services/plan/accept_invite.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
use local_lbplanner\helpers\invite_helper;

/**
* Accept an invite to the plan.
* Accept an invite.
*
* @package local_lbplanner
* @subpackage services_plan
* @copyright 2024 necodeIT
* @copyright 2025 necodeIT
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/ CC-BY-NC-SA 4.0 International or later
*/
class plan_accept_invite extends external_api {
Expand All @@ -42,7 +42,7 @@ public static function accept_invite_parameters(): external_function_parameters
}

/**
* Accepts an invite
* Accept an invite.
*
* @param int $inviteid the ID of the invite to be accepted
* @return void
Expand Down
6 changes: 3 additions & 3 deletions lbplanner/services/plan/clear_plan.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
use local_lbplanner\helpers\plan_helper;

/**
* Clear the plan for the given user.
* Clears your current plan.
*
* @package local_lbplanner
* @subpackage services_plan
* @copyright 2024 necodeIT
* @copyright 2025 necodeIT
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/ CC-BY-NC-SA 4.0 International or later
*/
class plan_clear_plan extends external_api {
Expand All @@ -37,7 +37,7 @@ public static function clear_plan_parameters(): external_function_parameters {
}

/**
* Clear the plan.
* Clears your current plan.
*
* @return void
* @throws Exception when access denied
Expand Down
4 changes: 2 additions & 2 deletions lbplanner/services/plan/decline_invite.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
use local_lbplanner\enums\{NOTIF_TRIGGER, PLAN_INVITE_STATE};

/**
* Decline an invite from the plan.
* Decline an invite.
*
* @package local_lbplanner
* @subpackage services_plan
* @copyright 2024 necodeIT
* @copyright 2025 necodeIT
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/ CC-BY-NC-SA 4.0 International or later
*/
class plan_decline_invite extends external_api {
Expand Down
6 changes: 3 additions & 3 deletions lbplanner/services/plan/delete_deadline.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
use local_lbplanner\helpers\plan_helper;

/**
* Delete a deadline from your plan
* Deletes a deadline from your plan.
*
* @package local_lbplanner
* @subpackage services_plan
* @copyright 2024 necodeIT
* @copyright 2025 necodeIT
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/ CC-BY-NC-SA 4.0 International or later
*/
class plan_delete_deadline extends external_api {
Expand All @@ -45,7 +45,7 @@ public static function delete_deadline_parameters(): external_function_parameter
}

/**
* Delete a deadline.
* Deletes a deadline from your plan.
*
* @param int $moduleid ID of the Module
* @return void
Expand Down
6 changes: 3 additions & 3 deletions lbplanner/services/plan/get_invites.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
use local_lbplanner\helpers\plan_helper;

/**
* Get all the invites of the current user.
* Returns all invites for this user.
*
* @package local_lbplanner
* @subpackage services_plan
* @copyright 2024 necodeIT
* @copyright 2025 necodeIT
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/ CC-BY-NC-SA 4.0 International or later
*/
class plan_get_invites extends external_api {
Expand All @@ -38,7 +38,7 @@ public static function get_invites_parameters(): external_function_parameters {
}

/**
* Returns all invites of the current user.
* Returns all invites for this user.
*
* @return array
*/
Expand Down
4 changes: 2 additions & 2 deletions lbplanner/services/plan/get_plan.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
use local_lbplanner\helpers\plan_helper;

/**
* Get the plan of the given user.
* Returns the plan of the current user.
*
* @package local_lbplanner
* @subpackage services_plan
* @copyright 2024 necodeIT
* @copyright 2025 necodeIT
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/ CC-BY-NC-SA 4.0 International or later
*/
class plan_get_plan extends \core_external\external_api {
Expand Down
2 changes: 1 addition & 1 deletion lbplanner/services/plan/invite_user.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*
* @package local_lbplanner
* @subpackage services_plan
* @copyright 2024 necodeIT
* @copyright 2025 necodeIT
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/ CC-BY-NC-SA 4.0 International or later
*/
class plan_invite_user extends external_api {
Expand Down
10 changes: 5 additions & 5 deletions lbplanner/services/plan/leave_plan.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@
use local_lbplanner\enums\{NOTIF_TRIGGER, PLAN_ACCESS_TYPE, PLAN_INVITE_STATE};

/**
* Leave your plan
*
* if no other user exists in the plan, the user can't leave
* Leave current plan.
* If no other user exists in the plan, the user can't leave.
*
* @package local_lbplanner
* @subpackage services_plan
* @copyright 2024 necodeIT
* @copyright 2025 necodeIT
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/ CC-BY-NC-SA 4.0 International or later
*/
class plan_leave_plan extends external_api {
Expand All @@ -41,7 +40,8 @@ public static function leave_plan_parameters(): external_function_parameters {
}

/**
* Leave your plan
* Leave current plan.
* If no other user exists in the plan, the user can't leave.
*
* @return void
* @throws \moodle_exception when user is only member left in plan
Expand Down
2 changes: 1 addition & 1 deletion lbplanner/services/plan/remove_user.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*
* @package local_lbplanner
* @subpackage services_plan
* @copyright 2024 necodeIT
* @copyright 2025 necodeIT
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/ CC-BY-NC-SA 4.0 International or later
*/
class plan_remove_user extends external_api {
Expand Down
2 changes: 1 addition & 1 deletion lbplanner/services/plan/set_deadline.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*
* @package local_lbplanner
* @subpackage services_plan
* @copyright 2024 necodeIT
* @copyright 2025 necodeIT
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/ CC-BY-NC-SA 4.0 International or later
*/
class plan_set_deadline extends external_api {
Expand Down
2 changes: 1 addition & 1 deletion lbplanner/services/plan/update_access.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @package local_lbplanner
* @subpackage services_plan
* @copyright 2024 necodeIT
* @copyright 2025 necodeIT
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/ CC-BY-NC-SA 4.0 International or later
*/
class plan_update_access extends external_api {
Expand Down
2 changes: 1 addition & 1 deletion lbplanner/services/plan/update_plan.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*
* @package local_lbplanner
* @subpackage services_plan
* @copyright 2024 necodeIT
* @copyright 2025 necodeIT
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/ CC-BY-NC-SA 4.0 International or later
*/
class plan_update_plan extends external_api {
Expand Down
2 changes: 1 addition & 1 deletion lbplanner/services/slots/add_slot_filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @package local_lbplanner
* @subpackage services_slots
* @copyright 2024 necodeIT
* @copyright 2025 necodeIT
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/ CC-BY-NC-SA 4.0 International or later
*/
class slots_add_slot_filter extends external_api {
Expand Down
Loading
Loading