Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.
   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   * Feedback external functions and service definitions.
  19   *
  20   * @package    mod_feedback
  21   * @category   external
  22   * @copyright  2017 Juan Leyva <juan@moodle.com>
  23   * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  24   * @since      Moodle 3.3
  25   */
  26  
  27  defined('MOODLE_INTERNAL') || die;
  28  
  29  $functions = array(
  30  
  31      'mod_feedback_get_feedbacks_by_courses' => array(
  32          'classname'     => 'mod_feedback_external',
  33          'methodname'    => 'get_feedbacks_by_courses',
  34          'description'   => 'Returns a list of feedbacks in a provided list of courses, if no list is provided all feedbacks that
  35                              the user can view will be returned.',
  36          'type'          => 'read',
  37          'capabilities'  => 'mod/feedback:view',
  38          'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
  39      ),
  40      'mod_feedback_get_feedback_access_information' => array(
  41          'classname'     => 'mod_feedback_external',
  42          'methodname'    => 'get_feedback_access_information',
  43          'description'   => 'Return access information for a given feedback.',
  44          'type'          => 'read',
  45          'capabilities'  => 'mod/feedback:view',
  46          'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
  47      ),
  48      'mod_feedback_view_feedback' => array(
  49          'classname'     => 'mod_feedback_external',
  50          'methodname'    => 'view_feedback',
  51          'description'   => 'Trigger the course module viewed event and update the module completion status.',
  52          'type'          => 'write',
  53          'capabilities'  => 'mod/feedback:view',
  54          'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
  55      ),
  56      'mod_feedback_get_current_completed_tmp' => array(
  57          'classname'     => 'mod_feedback_external',
  58          'methodname'    => 'get_current_completed_tmp',
  59          'description'   => 'Returns the temporary completion record for the current user.',
  60          'type'          => 'read',
  61          'capabilities'  => 'mod/feedback:view',
  62          'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
  63      ),
  64      'mod_feedback_get_items' => array(
  65          'classname'     => 'mod_feedback_external',
  66          'methodname'    => 'get_items',
  67          'description'   => 'Returns the items (questions) in the given feedback.',
  68          'type'          => 'read',
  69          'capabilities'  => 'mod/feedback:view',
  70          'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
  71      ),
  72      'mod_feedback_launch_feedback' => array(
  73          'classname'     => 'mod_feedback_external',
  74          'methodname'    => 'launch_feedback',
  75          'description'   => 'Starts or continues a feedback submission.',
  76          'type'          => 'write',
  77          'capabilities'  => 'mod/feedback:complete',
  78          'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
  79      ),
  80      'mod_feedback_get_page_items' => array(
  81          'classname'     => 'mod_feedback_external',
  82          'methodname'    => 'get_page_items',
  83          'description'   => 'Get a single feedback page items.',
  84          'type'          => 'read',
  85          'capabilities'  => 'mod/feedback:complete',
  86          'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
  87      ),
  88      'mod_feedback_process_page' => array(
  89          'classname'     => 'mod_feedback_external',
  90          'methodname'    => 'process_page',
  91          'description'   => 'Process a jump between pages.',
  92          'type'          => 'write',
  93          'capabilities'  => 'mod/feedback:complete',
  94          'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
  95      ),
  96      'mod_feedback_get_analysis' => array(
  97          'classname'     => 'mod_feedback_external',
  98          'methodname'    => 'get_analysis',
  99          'description'   => 'Retrieves the feedback analysis.',
 100          'type'          => 'read',
 101          'capabilities'  => 'mod/feedback:viewanalysepage',
 102          'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
 103      ),
 104      'mod_feedback_get_unfinished_responses' => array(
 105          'classname'     => 'mod_feedback_external',
 106          'methodname'    => 'get_unfinished_responses',
 107          'description'   => 'Retrieves responses from the current unfinished attempt.',
 108          'type'          => 'read',
 109          'capabilities'  => 'mod/feedback:view',
 110          'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
 111      ),
 112      'mod_feedback_get_finished_responses' => array(
 113          'classname'     => 'mod_feedback_external',
 114          'methodname'    => 'get_finished_responses',
 115          'description'   => 'Retrieves responses from the last finished attempt.',
 116          'type'          => 'read',
 117          'capabilities'  => 'mod/feedback:view',
 118          'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
 119      ),
 120      'mod_feedback_get_non_respondents' => array(
 121          'classname'     => 'mod_feedback_external',
 122          'methodname'    => 'get_non_respondents',
 123          'description'   => 'Retrieves a list of students who didn\'t submit the feedback.',
 124          'type'          => 'read',
 125          'capabilities'  => 'mod/feedback:viewreports',
 126          'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
 127      ),
 128      'mod_feedback_get_responses_analysis' => array(
 129          'classname'     => 'mod_feedback_external',
 130          'methodname'    => 'get_responses_analysis',
 131          'description'   => 'Return the feedback user responses analysis.',
 132          'type'          => 'read',
 133          'capabilities'  => 'mod/feedback:viewreports',
 134          'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
 135      ),
 136      'mod_feedback_get_last_completed' => array(
 137          'classname'     => 'mod_feedback_external',
 138          'methodname'    => 'get_last_completed',
 139          'description'   => 'Retrieves the last completion record for the current user.',
 140          'type'          => 'read',
 141          'capabilities'  => 'mod/feedback:view',
 142          'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
 143      ),
 144  );