moodle/admin/tool/lp/db/services.php
2016-04-18 10:59:01 +08:00

912 lines
37 KiB
PHP

<?php
// This file is part of Moodle - http://moodle.org/
//
// 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 <http://www.gnu.org/licenses/>.
/**
* Learning plan webservice functions.
*
*
* @package tool_lp
* @copyright 2015 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$functions = array(
// Learning plan related functions.
'tool_lp_create_competency_framework' => array(
'classname' => 'tool_lp\external',
'methodname' => 'create_competency_framework',
'classpath' => '',
'description' => 'Creates new competency frameworks.',
'type' => 'write',
'capabilities' => 'moodle/competency:competencymanage',
'ajax' => true,
),
'tool_lp_read_competency_framework' => array(
'classname' => 'tool_lp\external',
'methodname' => 'read_competency_framework',
'classpath' => '',
'description' => 'Load a summary of a competency framework.',
'type' => 'read',
'capabilities' => 'moodle/competency:competencyview',
'ajax' => true,
),
'tool_lp_duplicate_competency_framework' => array(
'classname' => 'tool_lp\external',
'methodname' => 'duplicate_competency_framework',
'classpath' => '',
'description' => 'Duplicate a competency framework.',
'type' => 'write',
'capabilities' => 'moodle/competency:competencymanage',
'ajax' => true,
),
'tool_lp_delete_competency_framework' => array(
'classname' => 'tool_lp\external',
'methodname' => 'delete_competency_framework',
'classpath' => '',
'description' => 'Delete a competency framework.',
'type' => 'write',
'capabilities' => 'moodle/competency:competencymanage',
'ajax' => true,
),
'tool_lp_update_competency_framework' => array(
'classname' => 'tool_lp\external',
'methodname' => 'update_competency_framework',
'classpath' => '',
'description' => 'Update a competency framework.',
'type' => 'write',
'capabilities' => 'moodle/competency:competencymanage',
'ajax' => true,
),
'tool_lp_list_competency_frameworks' => array(
'classname' => 'tool_lp\external',
'methodname' => 'list_competency_frameworks',
'classpath' => '',
'description' => 'Load a list of a competency frameworks.',
'type' => 'read',
'capabilities' => 'moodle/competency:competencyview',
'ajax' => true,
),
'tool_lp_count_competency_frameworks' => array(
'classname' => 'tool_lp\external',
'methodname' => 'count_competency_frameworks',
'classpath' => '',
'description' => 'Count a list of a competency frameworks.',
'type' => 'read',
'capabilities' => 'moodle/competency:competencyview',
'ajax' => true,
),
'tool_lp_competency_framework_viewed' => array(
'classname' => 'tool_lp\external',
'methodname' => 'competency_framework_viewed',
'classpath' => '',
'description' => 'Log event competency framework viewed',
'type' => 'read',
'capabilities' => 'moodle/competency:competencyview',
'ajax' => true,
),
'tool_lp_data_for_competency_frameworks_manage_page' => array(
'classname' => 'tool_lp\external',
'methodname' => 'data_for_competency_frameworks_manage_page',
'classpath' => '',
'description' => 'Load the data for the competency frameworks manage page template',
'type' => 'read',
'capabilities' => 'moodle/competency:competencyview',
'ajax' => true,
),
'tool_lp_create_competency' => array(
'classname' => 'tool_lp\external',
'methodname' => 'create_competency',
'classpath' => '',
'description' => 'Creates new competencies.',
'type' => 'write',
'capabilities' => 'moodle/competency:competencymanage',
'ajax' => true,
),
'tool_lp_read_competency' => array(
'classname' => 'tool_lp\external',
'methodname' => 'read_competency',
'classpath' => '',
'description' => 'Load a summary of a competency.',
'type' => 'read',
'capabilities' => 'moodle/competency:competencyview',
'ajax' => true,
),
'tool_lp_competency_viewed' => array(
'classname' => 'tool_lp\external',
'methodname' => 'competency_viewed',
'classpath' => '',
'description' => 'Log event competency viewed',
'type' => 'read',
'capabilities' => 'moodle/competency:competencyview',
'ajax' => true,
),
'tool_lp_delete_competency' => array(
'classname' => 'tool_lp\external',
'methodname' => 'delete_competency',
'classpath' => '',
'description' => 'Delete a competency.',
'type' => 'write',
'capabilities' => 'moodle/competency:competencymanage',
'ajax' => true,
),
'tool_lp_update_competency' => array(
'classname' => 'tool_lp\external',
'methodname' => 'update_competency',
'classpath' => '',
'description' => 'Update a competency.',
'type' => 'write',
'capabilities' => 'moodle/competency:competencymanage',
'ajax' => true,
),
'tool_lp_data_for_competency_summary' => array(
'classname' => 'tool_lp\external',
'methodname' => 'data_for_competency_summary',
'classpath' => '',
'description' => 'Load competency data for summary template.',
'type' => 'read',
'capabilities' => 'moodle/competency:competencyview',
'ajax' => true,
),
'tool_lp_list_competencies' => array(
'classname' => 'tool_lp\external',
'methodname' => 'list_competencies',
'classpath' => '',
'description' => 'Load a list of a competencies.',
'type' => 'read',
'capabilities' => 'moodle/competency:competencyview',
'ajax' => true,
),
'tool_lp_list_competencies_in_template' => array(
'classname' => 'tool_lp\external',
'methodname' => 'list_competencies_in_template',
'classpath' => '',
'description' => 'Load a list of a competencies for a given template.',
'type' => 'read',
'capabilities' => 'moodle/competency:competencyview',
'ajax' => true,
),
'tool_lp_count_competencies' => array(
'classname' => 'tool_lp\external',
'methodname' => 'count_competencies',
'classpath' => '',
'description' => 'Count a list of a competencies.',
'type' => 'read',
'capabilities' => 'moodle/competency:competencyview',
'ajax' => true,
),
'tool_lp_count_competencies_in_template' => array(
'classname' => 'tool_lp\external',
'methodname' => 'count_competencies_in_template',
'classpath' => '',
'description' => 'Count a list of a competencies for a given template.',
'type' => 'read',
'capabilities' => 'moodle/competency:competencyview',
'ajax' => true,
),
'tool_lp_search_competencies' => array(
'classname' => 'tool_lp\external',
'methodname' => 'search_competencies',
'classpath' => '',
'description' => 'Search a list of a competencies.',
'type' => 'read',
'capabilities' => 'moodle/competency:competencyview',
'ajax' => true,
),
'tool_lp_data_for_competencies_manage_page' => array(
'classname' => 'tool_lp\external',
'methodname' => 'data_for_competencies_manage_page',
'classpath' => '',
'description' => 'Load the data for the competencies manage page template',
'type' => 'read',
'capabilities' => 'moodle/competency:competencyview',
'ajax' => true,
),
'tool_lp_set_parent_competency' => array(
'classname' => 'tool_lp\external',
'methodname' => 'set_parent_competency',
'classpath' => '',
'description' => 'Set a new parent for a competency.',
'type' => 'write',
'capabilities' => 'moodle/competency:competencymanage',
'ajax' => true,
),
'tool_lp_move_up_competency' => array(
'classname' => 'tool_lp\external',
'methodname' => 'move_up_competency',
'classpath' => '',
'description' => 'Re-order a competency.',
'type' => 'write',
'capabilities' => 'moodle/competency:competencymanage',
'ajax' => true,
),
'tool_lp_move_down_competency' => array(
'classname' => 'tool_lp\external',
'methodname' => 'move_down_competency',
'classpath' => '',
'description' => 'Re-order a competency.',
'type' => 'write',
'capabilities' => 'moodle/competency:competencymanage',
'ajax' => true,
),
'tool_lp_list_course_competencies' => array(
'classname' => 'tool_lp\external',
'methodname' => 'list_course_competencies',
'classpath' => '',
'description' => 'List the competencies in a course',
'type' => 'read',
'capabilities' => 'moodle/competency:coursecompetencyview',
'ajax' => true,
),
'tool_lp_list_courses_using_competency' => array(
'classname' => 'tool_lp\external',
'methodname' => 'list_courses_using_competency',
'classpath' => '',
'description' => 'List the courses using a competency',
'type' => 'read',
'capabilities' => 'moodle/competency:coursecompetencyview',
'ajax' => true,
),
'tool_lp_count_competencies_in_course' => array(
'classname' => 'tool_lp\external',
'methodname' => 'count_competencies_in_course',
'classpath' => '',
'description' => 'List the competencies in a course',
'type' => 'read',
'capabilities' => 'moodle/competency:coursecompetencyview',
'ajax' => true,
),
'tool_lp_count_courses_using_competency' => array(
'classname' => 'tool_lp\external',
'methodname' => 'count_courses_using_competency',
'classpath' => '',
'description' => 'List the courses using a competency',
'type' => 'read',
'capabilities' => 'moodle/competency:coursecompetencyview',
'ajax' => true,
),
'tool_lp_add_competency_to_course' => array(
'classname' => 'tool_lp\external',
'methodname' => 'add_competency_to_course',
'classpath' => '',
'description' => 'Add the competency to a course',
'type' => 'write',
'capabilities' => 'moodle/competency:coursecompetencymanage',
'ajax' => true,
),
'tool_lp_add_competency_to_template' => array(
'classname' => 'tool_lp\external',
'methodname' => 'add_competency_to_template',
'classpath' => '',
'description' => 'Add the competency to a template',
'type' => 'write',
'capabilities' => 'moodle/competency:templatemanage',
'ajax' => true,
),
'tool_lp_remove_competency_from_course' => array(
'classname' => 'tool_lp\external',
'methodname' => 'remove_competency_from_course',
'classpath' => '',
'description' => 'Remove a competency from a course',
'type' => 'write',
'capabilities' => 'moodle/competency:coursecompetencymanage',
'ajax' => true,
),
'tool_lp_set_course_competency_ruleoutcome' => array(
'classname' => 'tool_lp\external',
'methodname' => 'set_course_competency_ruleoutcome',
'classpath' => '',
'description' => 'Modify the ruleoutcome value for course competency',
'type' => 'write',
'capabilities' => 'moodle/competency:coursecompetencymanage',
'ajax' => true,
),
'tool_lp_remove_competency_from_template' => array(
'classname' => 'tool_lp\external',
'methodname' => 'remove_competency_from_template',
'classpath' => '',
'description' => 'Remove a competency from a template',
'type' => 'write',
'capabilities' => 'moodle/competency:templatemanage',
'ajax' => true,
),
'tool_lp_data_for_course_competencies_page' => array(
'classname' => 'tool_lp\external',
'methodname' => 'data_for_course_competencies_page',
'classpath' => '',
'description' => 'Load the data for the course competencies page template.',
'type' => 'read',
'capabilities' => 'moodle/competency:coursecompetencyview',
'ajax' => true,
),
'tool_lp_data_for_template_competencies_page' => array(
'classname' => 'tool_lp\external',
'methodname' => 'data_for_template_competencies_page',
'classpath' => '',
'description' => 'Load the data for the template competencies page template.',
'type' => 'read',
'capabilities' => 'moodle/competency:templateview',
'ajax' => true,
),
'tool_lp_reorder_course_competency' => array(
'classname' => 'tool_lp\external',
'methodname' => 'reorder_course_competency',
'classpath' => '',
'description' => 'Move a course competency to a new relative sort order.',
'type' => 'write',
'capabilities' => 'moodle/competency:coursecompetencymanage',
'ajax' => true,
),
'tool_lp_reorder_template_competency' => array(
'classname' => 'tool_lp\external',
'methodname' => 'reorder_template_competency',
'classpath' => '',
'description' => 'Move a template competency to a new relative sort order.',
'type' => 'write',
'capabilities' => 'moodle/competency:templatemanage',
'ajax' => true,
),
'tool_lp_create_template' => array(
'classname' => 'tool_lp\external',
'methodname' => 'create_template',
'classpath' => '',
'description' => 'Creates new learning plan templates.',
'type' => 'write',
'capabilities' => 'moodle/competency:templatemanage',
'ajax' => true,
),
'tool_lp_duplicate_template' => array(
'classname' => 'tool_lp\external',
'methodname' => 'duplicate_template',
'classpath' => '',
'description' => 'Duplicate learning plan template.',
'type' => 'write',
'capabilities' => 'moodle/competency:templatemanage',
'ajax' => true,
),
'tool_lp_read_template' => array(
'classname' => 'tool_lp\external',
'methodname' => 'read_template',
'classpath' => '',
'description' => 'Load a summary of a learning plan template.',
'type' => 'read',
'capabilities' => 'moodle/competency:templateview',
'ajax' => true,
),
'tool_lp_delete_template' => array(
'classname' => 'tool_lp\external',
'methodname' => 'delete_template',
'classpath' => '',
'description' => 'Delete a learning plan template.',
'type' => 'write',
'capabilities' => 'moodle/competency:templatemanage',
'ajax' => true,
),
'tool_lp_update_template' => array(
'classname' => 'tool_lp\external',
'methodname' => 'update_template',
'classpath' => '',
'description' => 'Update a learning plan template.',
'type' => 'write',
'capabilities' => 'moodle/competency:templatemanage',
'ajax' => true,
),
'tool_lp_list_templates' => array(
'classname' => 'tool_lp\external',
'methodname' => 'list_templates',
'classpath' => '',
'description' => 'Load a list of a learning plan templates.',
'type' => 'read',
'capabilities' => 'moodle/competency:templateview',
'ajax' => true,
),
'tool_lp_list_templates_using_competency' => array(
'classname' => 'tool_lp\external',
'methodname' => 'list_templates_using_competency',
'classpath' => '',
'description' => 'Load a list of a learning plan templates for a given competency.',
'type' => 'read',
'capabilities' => 'moodle/competency:templateview',
'ajax' => true,
),
'tool_lp_count_templates' => array(
'classname' => 'tool_lp\external',
'methodname' => 'count_templates',
'classpath' => '',
'description' => 'Count a list of a learning plan templates.',
'type' => 'read',
'capabilities' => 'moodle/competency:templateview',
'ajax' => true,
),
'tool_lp_count_templates_using_competency' => array(
'classname' => 'tool_lp\external',
'methodname' => 'count_templates_using_competency',
'classpath' => '',
'description' => 'Count a list of a learning plan templates for a given competency.',
'type' => 'read',
'capabilities' => 'moodle/competency:templateview',
'ajax' => true,
),
'tool_lp_data_for_templates_manage_page' => array(
'classname' => 'tool_lp\external',
'methodname' => 'data_for_templates_manage_page',
'classpath' => '',
'description' => 'Load the data for the learning plan templates manage page template',
'type' => 'read',
'capabilities' => 'moodle/competency:templateview',
'ajax' => true,
),
'tool_lp_create_plan' => array(
'classname' => 'tool_lp\external',
'methodname' => 'create_plan',
'classpath' => '',
'description' => 'Creates a learning plan.',
'type' => 'write',
'capabilities' => 'moodle/competency:planmanage',
'ajax' => true,
),
'tool_lp_update_plan' => array(
'classname' => 'tool_lp\external',
'methodname' => 'update_plan',
'classpath' => '',
'description' => 'Updates a learning plan.',
'type' => 'write',
'capabilities' => 'moodle/competency:planmanage',
'ajax' => true,
),
'tool_lp_complete_plan' => array(
'classname' => 'tool_lp\external',
'methodname' => 'complete_plan',
'classpath' => '',
'description' => 'Complete learning plan.',
'type' => 'write',
'capabilities' => 'moodle/competency:planmanage',
'ajax' => true,
),
'tool_lp_reopen_plan' => array(
'classname' => 'tool_lp\external',
'methodname' => 'reopen_plan',
'classpath' => '',
'description' => 'Reopen learning plan.',
'type' => 'write',
'capabilities' => 'moodle/competency:planmanage',
'ajax' => true,
),
'tool_lp_read_plan' => array(
'classname' => 'tool_lp\external',
'methodname' => 'read_plan',
'classpath' => '',
'description' => 'Load a learning plan.',
'type' => 'read',
'capabilities' => 'moodle/competency:planviewown',
'ajax' => true,
),
'tool_lp_delete_plan' => array(
'classname' => 'tool_lp\external',
'methodname' => 'delete_plan',
'classpath' => '',
'description' => 'Delete a learning plan.',
'type' => 'write',
'capabilities' => 'moodle/competency:planmanage',
'ajax' => true,
),
'tool_lp_list_user_plans' => array(
'classname' => 'tool_lp\external',
'methodname' => 'list_user_plans',
'classpath' => '',
'description' => 'List a user\'s learning plans.',
'type' => 'read',
'capabilities' => 'moodle/competency:planviewown',
'ajax' => true,
),
'tool_lp_data_for_plans_page' => array(
'classname' => 'tool_lp\external',
'methodname' => 'data_for_plans_page',
'classpath' => '',
'description' => 'Load the data for the plans page template',
'type' => 'read',
'capabilities' => 'moodle/competency:planviewown',
'ajax' => true,
),
'tool_lp_data_for_plan_page' => array(
'classname' => 'tool_lp\external',
'methodname' => 'data_for_plan_page',
'classpath' => '',
'description' => 'Load the data for the plan page template.',
'type' => 'read',
'capabilities' => 'moodle/competency:planview',
'ajax' => true,
),
'tool_lp_list_plan_competencies' => array(
'classname' => 'tool_lp\external',
'methodname' => 'list_plan_competencies',
'classpath' => '',
'description' => 'List the competencies in a plan',
'type' => 'read',
'capabilities' => 'moodle/competency:planviewown',
'ajax' => true,
),
'tool_lp_add_competency_to_plan' => array(
'classname' => 'tool_lp\external',
'methodname' => 'add_competency_to_plan',
'classpath' => '',
'description' => 'Add the competency to a learning plan',
'type' => 'write',
'capabilities' => 'moodle/competency:planmanage',
'ajax' => true,
),
'tool_lp_remove_competency_from_plan' => array(
'classname' => 'tool_lp\external',
'methodname' => 'remove_competency_from_plan',
'classpath' => '',
'description' => 'Remove the competency from a learning plan',
'type' => 'write',
'capabilities' => 'moodle/competency:planmanage',
'ajax' => true,
),
'tool_lp_reorder_plan_competency' => array(
'classname' => 'tool_lp\external',
'methodname' => 'reorder_plan_competency',
'classpath' => '',
'description' => 'Move a plan competency to a new relative sort order.',
'type' => 'write',
'capabilities' => 'moodle/competency:planmanage',
'ajax' => true,
),
'tool_lp_plan_request_review' => array(
'classname' => 'tool_lp\external',
'methodname' => 'plan_request_review',
'classpath' => '',
'description' => 'Request for a plan to be reviewed.',
'type' => 'write',
'capabilities' => 'moodle/competency:planmanagedraft',
'ajax' => true,
),
'tool_lp_plan_start_review' => array(
'classname' => 'tool_lp\external',
'methodname' => 'plan_start_review',
'classpath' => '',
'description' => 'Start the review of a plan.',
'type' => 'write',
'capabilities' => 'moodle/competency:planmanage',
'ajax' => true,
),
'tool_lp_plan_stop_review' => array(
'classname' => 'tool_lp\external',
'methodname' => 'plan_stop_review',
'classpath' => '',
'description' => 'Stop the review of a plan.',
'type' => 'write',
'capabilities' => 'moodle/competency:planmanage',
'ajax' => true,
),
'tool_lp_plan_cancel_review_request' => array(
'classname' => 'tool_lp\external',
'methodname' => 'plan_cancel_review_request',
'classpath' => '',
'description' => 'Cancel the review of a plan.',
'type' => 'write',
'capabilities' => 'moodle/competency:planmanagedraft',
'ajax' => true,
),
'tool_lp_approve_plan' => array(
'classname' => 'tool_lp\external',
'methodname' => 'approve_plan',
'classpath' => '',
'description' => 'Approve a plan.',
'type' => 'write',
'capabilities' => 'moodle/competency:planmanage',
'ajax' => true,
),
'tool_lp_unapprove_plan' => array(
'classname' => 'tool_lp\external',
'methodname' => 'unapprove_plan',
'classpath' => '',
'description' => 'Unapprove a plan.',
'type' => 'write',
'capabilities' => 'moodle/competency:planmanage',
'ajax' => true,
),
'tool_lp_template_has_related_data' => array(
'classname' => 'tool_lp\external',
'methodname' => 'template_has_related_data',
'classpath' => '',
'description' => 'Check if a template has related data',
'type' => 'read',
'capabilities' => 'moodle/competency:templateview',
'ajax' => true,
),
'tool_lp_get_scale_values' => array(
'classname' => 'tool_lp\external',
'methodname' => 'get_scale_values',
'classpath' => '',
'description' => 'Fetch the values for a specific scale',
'type' => 'read',
'capabilities' => 'moodle/competency:competencymanage',
'ajax' => true,
),
'tool_lp_add_related_competency' => array(
'classname' => 'tool_lp\external',
'methodname' => 'add_related_competency',
'classpath' => '',
'description' => 'Adds a related competency',
'type' => 'write',
'capabilities' => 'moodle/competency:competencymanage',
'ajax' => true,
),
'tool_lp_remove_related_competency' => array(
'classname' => 'tool_lp\external',
'methodname' => 'remove_related_competency',
'classpath' => '',
'description' => 'Remove a related competency',
'type' => 'write',
'capabilities' => 'moodle/competency:competencymanage',
'ajax' => true,
),
'tool_lp_data_for_related_competencies_section' => array(
'classname' => 'tool_lp\external',
'methodname' => 'data_for_related_competencies_section',
'classpath' => '',
'description' => 'Load the data for the related competencies template.',
'type' => 'read',
'capabilities' => 'moodle/competency:competencyview',
'ajax' => true,
),
'tool_lp_search_users' => array(
'classname' => 'tool_lp\external',
'methodname' => 'search_users',
'classpath' => '',
'description' => 'Search for users.',
'type' => 'read',
'capabilities' => '',
'ajax' => true,
),
'tool_lp_search_cohorts' => array(
'classname' => 'tool_lp\external',
'methodname' => 'search_cohorts',
'classpath' => '',
'description' => 'Search for cohorts.',
'type' => 'read',
'capabilities' => 'moodle/cohort:view',
'ajax' => true,
),
// User evidence.
'tool_lp_read_user_evidence' => array(
'classname' => 'tool_lp\external',
'methodname' => 'read_user_evidence',
'classpath' => '',
'description' => 'Read an evidence of prior learning.',
'type' => 'read',
'capabilities' => 'moodle/competency:userevidenceview',
'ajax' => true,
),
'tool_lp_delete_user_evidence' => array(
'classname' => 'tool_lp\external',
'methodname' => 'delete_user_evidence',
'classpath' => '',
'description' => 'Delete an evidence of prior learning.',
'type' => 'write',
'capabilities' => 'moodle/competency:userevidencemanageown',
'ajax' => true,
),
'tool_lp_data_for_user_evidence_list_page' => array(
'classname' => 'tool_lp\external',
'methodname' => 'data_for_user_evidence_list_page',
'classpath' => '',
'description' => 'Load the data for the user evidence list page template',
'type' => 'read',
'capabilities' => 'moodle/competency:userevidenceview',
'ajax' => true,
),
'tool_lp_data_for_user_evidence_page' => array(
'classname' => 'tool_lp\external',
'methodname' => 'data_for_user_evidence_page',
'classpath' => '',
'description' => 'Load the data for the user evidence page template',
'type' => 'read',
'capabilities' => 'moodle/competency:userevidenceview',
'ajax' => true,
),
'tool_lp_create_user_evidence_competency' => array(
'classname' => 'tool_lp\external',
'methodname' => 'create_user_evidence_competency',
'classpath' => '',
'description' => 'Create an evidence of prior learning relationship with a competency.',
'type' => 'read',
'capabilities' => 'moodle/competency:userevidencemanageown, moodle/competency:competencyview',
'ajax' => true,
),
'tool_lp_delete_user_evidence_competency' => array(
'classname' => 'tool_lp\external',
'methodname' => 'delete_user_evidence_competency',
'classpath' => '',
'description' => 'Delete an evidence of prior learning relationship with a competency.',
'type' => 'write',
'capabilities' => 'moodle/competency:userevidencemanageown',
'ajax' => true,
),
// User competency.
'tool_lp_user_competency_cancel_review_request' => array(
'classname' => 'tool_lp\external',
'methodname' => 'user_competency_cancel_review_request',
'classpath' => '',
'description' => 'Cancel a review request.',
'type' => 'write',
'capabilities' => 'moodle/competency:userevidencemanageown',
'ajax' => true,
),
'tool_lp_user_competency_request_review' => array(
'classname' => 'tool_lp\external',
'methodname' => 'user_competency_request_review',
'classpath' => '',
'description' => 'Request a review.',
'type' => 'write',
'capabilities' => 'moodle/competency:userevidencemanageown',
'ajax' => true,
),
'tool_lp_user_competency_start_review' => array(
'classname' => 'tool_lp\external',
'methodname' => 'user_competency_start_review',
'classpath' => '',
'description' => 'Start a review.',
'type' => 'write',
'capabilities' => 'moodle/competency:competencygrade',
'ajax' => true,
),
'tool_lp_user_competency_stop_review' => array(
'classname' => 'tool_lp\external',
'methodname' => 'user_competency_stop_review',
'classpath' => '',
'description' => 'Stop a review.',
'type' => 'write',
'capabilities' => 'moodle/competency:competencygrade',
'ajax' => true,
),
'tool_lp_data_for_user_competency_summary' => array(
'classname' => 'tool_lp\external',
'methodname' => 'data_for_user_competency_summary',
'classpath' => '',
'description' => 'Load a summary of a user competency.',
'type' => 'read',
'capabilities' => 'moodle/competency:planview',
'ajax' => true,
),
'tool_lp_user_competency_viewed' => array(
'classname' => 'tool_lp\external',
'methodname' => 'user_competency_viewed',
'classpath' => '',
'description' => 'Log the user competency viewed event.',
'type' => 'read',
'capabilities' => 'moodle/competency:usercompetencyview',
'ajax' => true,
),
'tool_lp_user_competency_viewed_in_plan' => array(
'classname' => 'tool_lp\external',
'methodname' => 'user_competency_viewed_in_plan',
'classpath' => '',
'description' => 'Log the user competency viewed in plan event.',
'type' => 'read',
'capabilities' => 'moodle/competency:usercompetencyview',
'ajax' => true,
),
'tool_lp_user_competency_viewed_in_course' => array(
'classname' => 'tool_lp\external',
'methodname' => 'user_competency_viewed_in_course',
'classpath' => '',
'description' => 'Log the user competency viewed in course event',
'type' => 'read',
'capabilities' => 'moodle/competency:usercompetencyview',
'ajax' => true,
),
'tool_lp_user_competency_plan_viewed' => array(
'classname' => 'tool_lp\external',
'methodname' => 'user_competency_plan_viewed',
'classpath' => '',
'description' => 'Log the user competency plan viewed event.',
'type' => 'read',
'capabilities' => 'moodle/competency:usercompetencyview',
'ajax' => true,
),
'tool_lp_grade_competency' => array(
'classname' => 'tool_lp\external',
'methodname' => 'grade_competency',
'classpath' => '',
'description' => 'Grade a competency.',
'type' => 'write',
'capabilities' => 'moodle/competency:competencygrade',
'ajax' => true,
),
'tool_lp_grade_competency_in_plan' => array(
'classname' => 'tool_lp\external',
'methodname' => 'grade_competency_in_plan',
'classpath' => '',
'description' => 'Grade a competency from the user plan page.',
'type' => 'write',
'capabilities' => 'moodle/competency:competencygrade',
'ajax' => true,
),
'tool_lp_data_for_user_competency_summary_in_plan' => array(
'classname' => 'tool_lp\external',
'methodname' => 'data_for_user_competency_summary_in_plan',
'classpath' => '',
'description' => 'Load a summary of a user competency.',
'type' => 'read',
'capabilities' => 'moodle/competency:planview',
'ajax' => true,
),
'tool_lp_grade_competency_in_course' => array(
'classname' => 'tool_lp\external',
'methodname' => 'grade_competency_in_course',
'classpath' => '',
'description' => 'Grade a competency from the course page.',
'type' => 'write',
'capabilities' => 'moodle/competency:competencygrade',
'ajax' => true,
),
'tool_lp_data_for_user_competency_summary_in_course' => array(
'classname' => 'tool_lp\external',
'methodname' => 'data_for_user_competency_summary_in_course',
'classpath' => '',
'description' => 'Load a summary of a user competency.',
'type' => 'read',
'capabilities' => 'moodle/competency:coursecompetencyview',
'ajax' => true,
),
'tool_lp_unlink_plan_from_template' => array(
'classname' => 'tool_lp\external',
'methodname' => 'unlink_plan_from_template',
'classpath' => '',
'description' => 'Unlink a plan form it template.',
'type' => 'write',
'capabilities' => 'moodle/competency:planmanage',
'ajax' => true,
),
'tool_lp_view_template' => array(
'classname' => 'tool_lp\external',
'methodname' => 'template_viewed',
'classpath' => '',
'description' => 'Log event template viewed',
'type' => 'read',
'capabilities' => 'moodle/competency:templateview',
'ajax' => true,
),
'tool_lp_request_review_of_user_evidence_linked_competencies' => array(
'classname' => 'tool_lp\external',
'methodname' => 'request_review_of_user_evidence_linked_competencies',
'classpath' => '',
'description' => 'Send user evidence competencies in review',
'type' => 'write',
'capabilities' => 'moodle/competency:userevidencemanageown',
'ajax' => true,
),
'tool_lp_update_course_competency_settings' => array(
'classname' => 'tool_lp\external',
'methodname' => 'update_course_competency_settings',
'classpath' => '',
'description' => 'Update the course competency settings',
'type' => 'write',
'capabilities' => 'moodle/competency:coursecompetencyconfigure',
'ajax' => true,
),
);