Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 401 and 402]

   1  <?php
   2  // This file is part of Moodle - http://moodle.org/
   3  //
   4  // Moodle is free software: you can redistribute it and/or modify
   5  // it under the terms of the GNU General Public License as published by
   6  // the Free Software Foundation, either version 3 of the License, or
   7  // (at your option) any later version.
   8  //
   9  // Moodle is distributed in the hope that it will be useful,
  10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12  // GNU General Public License for more details.
  13  //
  14  // You should have received a copy of the GNU General Public License
  15  // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
  16  
  17  
  18  /**
  19   * Learning plan webservice functions.
  20   *
  21   *
  22   * @package    tool_lp
  23   * @copyright  2015 Damyon Wiese
  24   * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  25   */
  26  
  27  defined('MOODLE_INTERNAL') || die();
  28  
  29  $functions = array(
  30  
  31      // Learning plan related functions.
  32      'tool_lp_data_for_competency_frameworks_manage_page' => array(
  33          'classname'    => 'tool_lp\external',
  34          'methodname'   => 'data_for_competency_frameworks_manage_page',
  35          'classpath'    => '',
  36          'description'  => 'Load the data for the competency frameworks manage page template',
  37          'type'         => 'read',
  38          'capabilities' => 'moodle/competency:competencyview',
  39          'ajax'         => true,
  40      ),
  41      'tool_lp_data_for_competency_summary' => array(
  42          'classname'    => 'tool_lp\external',
  43          'methodname'   => 'data_for_competency_summary',
  44          'classpath'    => '',
  45          'description'  => 'Load competency data for summary template.',
  46          'type'         => 'read',
  47          'capabilities' => 'moodle/competency:competencyview',
  48          'ajax'         => true,
  49      ),
  50      'tool_lp_data_for_competencies_manage_page' => array(
  51          'classname'    => 'tool_lp\external',
  52          'methodname'   => 'data_for_competencies_manage_page',
  53          'classpath'    => '',
  54          'description'  => 'Load the data for the competencies manage page template',
  55          'type'         => 'read',
  56          'capabilities' => 'moodle/competency:competencyview',
  57          'ajax'         => true,
  58      ),
  59      'tool_lp_list_courses_using_competency' => array(
  60          'classname'    => 'tool_lp\external',
  61          'methodname'   => 'list_courses_using_competency',
  62          'classpath'    => '',
  63          'description'  => 'List the courses using a competency',
  64          'type'         => 'read',
  65          'capabilities' => 'moodle/competency:coursecompetencyview',
  66          'ajax'         => true,
  67      ),
  68      'tool_lp_data_for_course_competencies_page' => array(
  69          'classname'    => 'tool_lp\external',
  70          'methodname'   => 'data_for_course_competencies_page',
  71          'classpath'    => '',
  72          'description'  => 'Load the data for the course competencies page template.',
  73          'type'         => 'read',
  74          'capabilities' => 'moodle/competency:coursecompetencyview',
  75          'ajax'         => true,
  76          'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
  77      ),
  78      'tool_lp_data_for_template_competencies_page' => array(
  79          'classname'    => 'tool_lp\external',
  80          'methodname'   => 'data_for_template_competencies_page',
  81          'classpath'    => '',
  82          'description'  => 'Load the data for the template competencies page template.',
  83          'type'         => 'read',
  84          'capabilities' => 'moodle/competency:templateview',
  85          'ajax'         => true,
  86      ),
  87      'tool_lp_data_for_templates_manage_page' => array(
  88          'classname'    => 'tool_lp\external',
  89          'methodname'   => 'data_for_templates_manage_page',
  90          'classpath'    => '',
  91          'description'  => 'Load the data for the learning plan templates manage page template',
  92          'type'         => 'read',
  93          'capabilities' => 'moodle/competency:templateview',
  94          'ajax'         => true,
  95      ),
  96      'tool_lp_data_for_plans_page' => array(
  97          'classname'    => 'tool_lp\external',
  98          'methodname'   => 'data_for_plans_page',
  99          'classpath'    => '',
 100          'description'  => 'Load the data for the plans page template',
 101          'type'         => 'read',
 102          'capabilities' => 'moodle/competency:planviewown',
 103          'ajax'         => true,
 104          'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
 105      ),
 106      'tool_lp_data_for_plan_page' => array(
 107          'classname'    => 'tool_lp\external',
 108          'methodname'   => 'data_for_plan_page',
 109          'classpath'    => '',
 110          'description'  => 'Load the data for the plan page template.',
 111          'type'         => 'read',
 112          'capabilities' => 'moodle/competency:planview',
 113          'ajax'         => true,
 114          'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
 115      ),
 116      'tool_lp_data_for_related_competencies_section' => array(
 117          'classname'    => 'tool_lp\external',
 118          'methodname'   => 'data_for_related_competencies_section',
 119          'classpath'    => '',
 120          'description'  => 'Load the data for the related competencies template.',
 121          'type'         => 'read',
 122          'capabilities' => 'moodle/competency:competencyview',
 123          'ajax'         => true,
 124      ),
 125      'tool_lp_search_users' => array(
 126          'classname'    => 'tool_lp\external',
 127          'methodname'   => 'search_users',
 128          'classpath'    => '',
 129          'description'  => 'Search for users.',
 130          'type'         => 'read',
 131          'capabilities' => '',
 132          'ajax'         => true,
 133      ),
 134      // This function was originally in this plugin but has been moved to core.
 135      'tool_lp_search_cohorts' => array(
 136          'classname'    => 'core_cohort_external',
 137          'methodname'   => 'search_cohorts',
 138          'classpath'    => 'cohort/externallib.php',
 139          'description'  => 'Search for cohorts. This method is deprecated, please call \'core_cohort_search_cohorts\' instead',
 140          'type'         => 'read',
 141          'capabilities' => 'moodle/cohort:view',
 142      ),
 143  
 144      // User evidence.
 145      'tool_lp_data_for_user_evidence_list_page' => array(
 146          'classname'    => 'tool_lp\external',
 147          'methodname'   => 'data_for_user_evidence_list_page',
 148          'classpath'    => '',
 149          'description'  => 'Load the data for the user evidence list page template',
 150          'type'         => 'read',
 151          'capabilities' => 'moodle/competency:userevidenceview',
 152          'ajax'         => true,
 153          'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
 154      ),
 155      'tool_lp_data_for_user_evidence_page' => array(
 156          'classname'    => 'tool_lp\external',
 157          'methodname'   => 'data_for_user_evidence_page',
 158          'classpath'    => '',
 159          'description'  => 'Load the data for the user evidence page template',
 160          'type'         => 'read',
 161          'capabilities' => 'moodle/competency:userevidenceview',
 162          'ajax'         => true,
 163          'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
 164      ),
 165  
 166      // User competency.
 167      'tool_lp_data_for_user_competency_summary' => array(
 168          'classname'    => 'tool_lp\external',
 169          'methodname'   => 'data_for_user_competency_summary',
 170          'classpath'    => '',
 171          'description'  => 'Load a summary of a user competency.',
 172          'type'         => 'read',
 173          'capabilities' => 'moodle/competency:planview',
 174          'ajax'         => true,
 175          'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
 176      ),
 177      'tool_lp_data_for_user_competency_summary_in_plan' => array(
 178          'classname'    => 'tool_lp\external',
 179          'methodname'   => 'data_for_user_competency_summary_in_plan',
 180          'classpath'    => '',
 181          'description'  => 'Load a summary of a user competency.',
 182          'type'         => 'read',
 183          'capabilities' => 'moodle/competency:planview',
 184          'ajax'         => true,
 185          'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
 186      ),
 187      'tool_lp_data_for_user_competency_summary_in_course' => array(
 188          'classname'    => 'tool_lp\external',
 189          'methodname'   => 'data_for_user_competency_summary_in_course',
 190          'classpath'    => '',
 191          'description'  => 'Load a summary of a user competency.',
 192          'type'         => 'read',
 193          'capabilities' => 'moodle/competency:coursecompetencyview',
 194          'ajax'         => true,
 195          'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
 196      ),
 197  );
 198