moodle_local_treestudyplan/db/services.php

595 lines
35 KiB
PHP
Raw Permalink Normal View History

<?php
2023-08-24 23:02:41 +02:00
// This file is part of the Studyplan plugin for Moodle
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <https://www.gnu.org/licenses/>.
/**
2023-08-27 15:12:54 +02:00
* Webservice function register
2023-08-24 23:02:41 +02:00
* @package local_treestudyplan
* @copyright 2023 P.M. Kuipers
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
2023-08-25 13:04:19 +02:00
defined('MOODLE_INTERNAL') || die();
$services = [
"Competency listing" => [
'functions' => [
'local_treestudyplan_get_studyplan_map',
'local_treestudyplan_get_studyline_map',
'local_treestudyplan_add_studyplan',
'local_treestudyplan_add_studyline',
'local_treestudyplan_edit_studyplan',
'local_treestudyplan_edit_studyline',
'local_treestudyplan_delete_studyplan',
'local_treestudyplan_delete_studyline',
'local_treestudyplan_reorder_studylines',
'local_treestudyplan_get_studyitem',
'local_treestudyplan_add_studyitem',
'local_treestudyplan_edit_studyitem',
'local_treestudyplan_reorder_studyitems',
'local_treestudyplan_delete_studyitem',
'local_treestudyplan_connect_studyitems',
'local_treestudyplan_disconnect_studyitems',
'local_treestudyplan_get_user_studyplan_map',
'local_treestudyplan_map_courses',
'local_treestudyplan_export_studyplan',
'local_treestudyplan_import_studyplan',
],
'requiredcapability' => 'local/treestudyplan:configure',
2023-08-25 10:41:56 +02:00
'shortname' => 'local_treestudyplan_cohorts',
'restrictedusers' => 0,
'enabled' => 0,
'ajax' => true,
],
];
$functions = [
/***************************
2023-08-24 23:02:41 +02:00
* Studyplan functions
***************************/
2023-08-25 12:16:51 +02:00
'local_treestudyplan_list_studyplans' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'list_studyplans', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'List available studyplans',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan, local/treestudyplan:viewuserreports',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_get_studyplan_map' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'get_studyplan_map', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Retrieve studyplan map',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan, local/treestudyplan:viewuserreports',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_get_studyline_map' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'get_studyline_map', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Retrieve studyline map',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_add_studyplan' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'add_studyplan', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Add studyplan',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
2023-08-24 23:02:41 +02:00
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
2023-08-24 23:02:41 +02:00
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_add_studyline' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'add_studyline', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Add studyline',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_edit_studyplan' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'edit_studyplan', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Edit studyplan',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_edit_studyline' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'edit_studyline', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Edit studyline',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_delete_studyplan' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'delete_studyplan', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Delete studyplan',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_delete_studyline' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'delete_studyline', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Delete studyline',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_reorder_studylines' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'reorder_studylines', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Reorder studylines',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_get_studyitem' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'get_studyitem', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Retrieve study item',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
2023-08-24 23:02:41 +02:00
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
2023-08-24 23:02:41 +02:00
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_add_studyitem' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'add_studyitem', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Add study item',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
2023-08-24 23:02:41 +02:00
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
2023-08-24 23:02:41 +02:00
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_edit_studyitem' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'edit_studyitem', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Edit study item',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
2023-08-24 23:02:41 +02:00
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
2023-08-24 23:02:41 +02:00
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_reorder_studyitems' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'reorder_studyitems', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Reorder study items',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
2023-08-24 23:02:41 +02:00
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
2023-08-24 23:02:41 +02:00
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_delete_studyitem' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'delete_studyitem', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Delete study item',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_connect_studyitems' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'connect_studyitems', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Connect study items',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_disconnect_studyitems' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'disconnect_studyitems', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Disconnect study items',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
/***************************
2023-08-24 23:02:41 +02:00
* Badge functions
***************************/
2023-08-25 12:16:51 +02:00
'local_treestudyplan_list_badges' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'list_badges', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'List availabel site badges',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
/***************************
2023-08-24 23:02:41 +02:00
* Association functions
***************************/
2023-08-25 12:16:51 +02:00
'local_treestudyplan_list_cohort' => [ // Web service function name.
'classname' => '\local_treestudyplan\associationservice', // Class containing the external function.
'methodname' => 'list_cohort', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'List available cohorts',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_find_user' => [ // Web service function name.
'classname' => '\local_treestudyplan\associationservice', // Class containing the external function.
'methodname' => 'find_user', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Find user',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_connect_cohort' => [ // Web service function name.
'classname' => '\local_treestudyplan\associationservice', // Class containing the external function.
'methodname' => 'connect_cohort', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Connect cohort to studyplan',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_disconnect_cohort' => [ // Web service function name.
'classname' => '\local_treestudyplan\associationservice', // Class containing the external function.
'methodname' => 'disconnect_cohort', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Disconnect cohort from study plan',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
],
2023-08-24 23:02:41 +02:00
2023-08-25 12:16:51 +02:00
'local_treestudyplan_connect_user' => [ // Web service function name.
'classname' => '\local_treestudyplan\associationservice', // Class containing the external function.
'methodname' => 'connect_user', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Connect user to study plan',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_disconnect_user' => [ // Web service function name.
'classname' => '\local_treestudyplan\associationservice', // Class containing the external function.
'methodname' => 'disconnect_user', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Disconnect user from studyplan',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_associated_users' => [ // Web service function name.
'classname' => '\local_treestudyplan\associationservice', // Class containing the external function.
'methodname' => 'associated_users', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'List users associated with a studyplan',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_associated_cohorts' => [ // Web service function name.
'classname' => '\local_treestudyplan\associationservice', // Class containing the external function.
'methodname' => 'associated_cohorts', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'List cohorts associated with a studyplan',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_list_user_studyplans' => [ // Web service function name.
'classname' => '\local_treestudyplan\studentstudyplanservice', // Class containing the external function.
'methodname' => 'list_user_studyplans', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'List user studyplans',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:viewuserreports',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_get_user_studyplans' => [ // Web service function name.
'classname' => '\local_treestudyplan\studentstudyplanservice', // Class containing the external function.
'methodname' => 'get_user_studyplans', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Retrieve user studyplan',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:viewuserreports',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_get_user_studyplan' => [ // Web service function name.
'classname' => '\local_treestudyplan\studentstudyplanservice', // Class containing the external function.
'methodname' => 'get_user_studyplan', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Retrieve user studyplan',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:viewuserreports',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_get_invited_studyplan' => [ // Web service function name.
'classname' => '\local_treestudyplan\studentstudyplanservice', // Class containing the external function.
'methodname' => 'get_invited_studyplan', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Retrieve user studyplan based on invite',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => '',
'loginrequired' => false,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_list_own_studyplans' => [ // Web service function name.
'classname' => '\local_treestudyplan\studentstudyplanservice', // Class containing the external function.
'methodname' => 'list_own_studyplans', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'List own studyplans',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
2023-08-24 23:02:41 +02:00
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => '',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_get_own_studyplan' => [ // Web service function name.
'classname' => '\local_treestudyplan\studentstudyplanservice', // Class containing the external function.
'methodname' => 'get_own_studyplan', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Retrieve own studyplan',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
2023-08-24 23:02:41 +02:00
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => '',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_map_categories' => [ // Web service function name.
'classname' => '\local_treestudyplan\courseservice', // Class containing the external function.
'methodname' => 'map_categories', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'List available root categories',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_get_category' => [ // Web service function name.
'classname' => '\local_treestudyplan\courseservice', // Class containing the external function.
'methodname' => 'get_category', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Get details for specified category',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_include_grade' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'include_grade', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Include gradable in result',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan, local/treestudyplan:selectowngradables',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_all_associated' => [ // Web service function name.
'classname' => '\local_treestudyplan\associationservice', // Class containing the external function.
'methodname' => 'all_associated', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'List associated users',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:viewuserreports',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_list_aggregators' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'list_aggregators', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'List available aggregators',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_disable_autoenddate' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'disable_autoenddate', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Disable automatic end dates on courses in the study plan',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:forcescales',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_force_studyplan_scale' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'force_studyplan_scale', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Change all associated gradables to the chosen scale if possible',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:forcescales',
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_list_scales' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'list_scales', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'List system scales',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:forcescales',
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_duplicate_plan' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'duplicate_plan', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Copy studyplan',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_export_plan' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'export_plan', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Export study plan',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_export_studylines' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'export_studylines', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Export study plan',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_import_plan' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'import_plan', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Import study plan',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_import_studylines' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'import_studylines', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Import study plan',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-09-03 15:21:30 +02:00
'local_treestudyplan_get_period' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'get_period', // External function name.
'description' => 'Get period name and timing',
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
'capabilities' => 'local/treestudyplan:viewstudyplan',
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_edit_period' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'edit_period', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Edit period name and timing',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_submit_cm_editform' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'submit_cm_editform', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Submit course module edit form',
2023-08-25 12:16:51 +02:00
'type' => 'write', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_get_teaching_studyplans' => [ // Web service function name.
'classname' => '\local_treestudyplan\studentstudyplanservice', // Class containing the external function.
'methodname' => 'get_teaching_studyplans', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Get the studyplans I currently teach in',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:viewuserreports',
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_list_accessible_categories' => [ // Web service function name.
'classname' => '\local_treestudyplan\courseservice', // Class containing the external function.
'methodname' => 'list_accessible_categories', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Get categories accessible to the current user',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
'ajax' => true,
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_list_used_categories' => [ // Web service function name.
'classname' => '\local_treestudyplan\courseservice', // Class containing the external function.
'methodname' => 'list_used_categories', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Get categories hosting a studyplan',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'ajax' => true,
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_scan_badge_progress' => [ // Web service function name.
'classname' => '\local_treestudyplan\courseservice', // Class containing the external function.
'methodname' => 'scan_badge_progress', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Scan progress of students in attaining badge',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:viewuserreports',
'ajax' => true,
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_scan_completion_progress' => [ // Web service function name.
'classname' => '\local_treestudyplan\courseservice', // Class containing the external function.
'methodname' => 'scan_completion_progress', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Scan progress of students in attaining completions',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:viewuserreports',
'ajax' => true,
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_scan_grade_progress' => [ // Web service function name.
'classname' => '\local_treestudyplan\courseservice', // Class containing the external function.
'methodname' => 'scan_grade_progress', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Scan progress of students in attaining grades',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:viewuserreports',
'ajax' => true,
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_cascade_cohortsync' => [ // Web service function name.
'classname' => '\local_treestudyplan\associationservice', // Class containing the external function.
'methodname' => 'cascade_cohortsync', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Sync cohortsync to studyplan association',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
2023-08-24 23:02:41 +02:00
'ajax' => true,
'loginrequired' => true,
],
2023-08-25 12:16:51 +02:00
'local_treestudyplan_course_period_timing' => [ // Web service function name.
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'course_period_timing', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Chenge course start and end times to match period',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'ajax' => true,
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
2023-08-25 13:04:19 +02:00
'local_treestudyplan_set_studyitem_span' => [ // Web service function name.
2023-08-25 12:16:51 +02:00
'classname' => '\local_treestudyplan\studyplanservice', // Class containing the external function.
'methodname' => 'set_studyitem_span', // External function name.
2023-08-25 11:52:05 +02:00
'description' => 'Change the span of a course item',
2023-08-25 12:16:51 +02:00
'type' => 'read', // Database rights of the web service function (read, write).
2023-08-25 11:52:05 +02:00
'capabilities' => 'local/treestudyplan:editstudyplan',
'ajax' => true,
'loginrequired' => true,
2023-08-24 23:02:41 +02:00
],
];