Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 401 and 402] [Versions 401 and 403]

   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.',
 140          'type'         => 'read',
 141          'capabilities' => 'moodle/cohort:view',
 142          'ajax'         => true,
 143      ),
 144  
 145      // User evidence.
 146      'tool_lp_data_for_user_evidence_list_page' => array(
 147          'classname'    => 'tool_lp\external',
 148          'methodname'   => 'data_for_user_evidence_list_page',
 149          'classpath'    => '',
 150          'description'  => 'Load the data for the user evidence list page template',
 151          'type'         => 'read',
 152          'capabilities' => 'moodle/competency:userevidenceview',
 153          'ajax'         => true,
 154          'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
 155      ),
 156      'tool_lp_data_for_user_evidence_page' => array(
 157          'classname'    => 'tool_lp\external',
 158          'methodname'   => 'data_for_user_evidence_page',
 159          'classpath'    => '',
 160          'description'  => 'Load the data for the user evidence page template',
 161          'type'         => 'read',
 162          'capabilities' => 'moodle/competency:userevidenceview',
 163          'ajax'         => true,
 164          'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
 165      ),
 166  
 167      // User competency.
 168      'tool_lp_data_for_user_competency_summary' => array(
 169          'classname'    => 'tool_lp\external',
 170          'methodname'   => 'data_for_user_competency_summary',
 171          'classpath'    => '',
 172          'description'  => 'Load a summary of a user competency.',
 173          'type'         => 'read',
 174          'capabilities' => 'moodle/competency:planview',
 175          'ajax'         => true,
 176          'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
 177      ),
 178      'tool_lp_data_for_user_competency_summary_in_plan' => array(
 179          'classname'    => 'tool_lp\external',
 180          'methodname'   => 'data_for_user_competency_summary_in_plan',
 181          'classpath'    => '',
 182          'description'  => 'Load a summary of a user competency.',
 183          'type'         => 'read',
 184          'capabilities' => 'moodle/competency:planview',
 185          'ajax'         => true,
 186          'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
 187      ),
 188      'tool_lp_data_for_user_competency_summary_in_course' => array(
 189          'classname'    => 'tool_lp\external',
 190          'methodname'   => 'data_for_user_competency_summary_in_course',
 191          'classpath'    => '',
 192          'description'  => 'Load a summary of a user competency.',
 193          'type'         => 'read',
 194          'capabilities' => 'moodle/competency:coursecompetencyview',
 195          'ajax'         => true,
 196          'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
 197      ),
 198  );
 199