Skip to content

Commit

Permalink
Merge branch 'MDL-71169-master-execute' of git://github.com/mudrd8mz/…
Browse files Browse the repository at this point in the history
…moodle
  • Loading branch information
andrewnicols committed Apr 14, 2021
2 parents 7d3012f + 22ecf2f commit c10791c
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 36 deletions.
2 changes: 0 additions & 2 deletions grade/grading/form/guide/db/services.php
Expand Up @@ -27,15 +27,13 @@
$functions = [
'gradingform_guide_grader_gradingpanel_fetch' => [
'classname' => 'gradingform_guide\\grades\\grader\\gradingpanel\\external\\fetch',
'methodname' => 'execute',
'description' => 'Fetch the data required to display the grader grading panel, ' .
'creating the grade item if required',
'type' => 'write',
'ajax' => true,
],
'gradingform_guide_grader_gradingpanel_store' => [
'classname' => 'gradingform_guide\\grades\\grader\\gradingpanel\\external\\store',
'methodname' => 'execute',
'description' => 'Store the grading data for a user from the grader grading panel.',
'type' => 'write',
'ajax' => true,
Expand Down
2 changes: 0 additions & 2 deletions grade/grading/form/rubric/db/services.php
Expand Up @@ -27,15 +27,13 @@
$functions = [
'gradingform_rubric_grader_gradingpanel_fetch' => [
'classname' => 'gradingform_rubric\\grades\\grader\\gradingpanel\\external\\fetch',
'methodname' => 'execute',
'description' => 'Fetch the data required to display the grader grading panel, ' .
'creating the grade item if required',
'type' => 'write',
'ajax' => true,
],
'gradingform_rubric_grader_gradingpanel_store' => [
'classname' => 'gradingform_rubric\\grades\\grader\\gradingpanel\\external\\store',
'methodname' => 'execute',
'description' => 'Store the grading data for a user from the grader grading panel.',
'type' => 'write',
'ajax' => true,
Expand Down
18 changes: 0 additions & 18 deletions lib/db/services.php
Expand Up @@ -289,7 +289,6 @@
],
'core_calendar_get_calendar_export_token' => [
'classname' => 'core_calendar\external\export\token',
'methodname' => 'execute',
'description' => 'Return the auth token required for exporting a calendar.',
'type' => 'read',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
Expand Down Expand Up @@ -817,14 +816,12 @@
),
'core_files_delete_draft_files' => array(
'classname' => 'core_files\external\delete\draft',
'methodname' => 'execute',
'description' => 'Delete the indicated files (or directories) from a user draft file area.',
'type' => 'write',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
),
'core_files_get_unused_draft_itemid' => array(
'classname' => 'core_files\external\get\unused_draft',
'methodname' => 'execute',
'description' => 'Generate a new draft itemid for the current user.',
'type' => 'write',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
Expand All @@ -840,7 +837,6 @@
),
'core_form_dynamic_form' => array(
'classname' => 'core_form\external\dynamic_form',
'methodname' => 'execute',
'description' => 'Process submission of a dynamic (modal) form',
'type' => 'write',
'ajax' => true,
Expand Down Expand Up @@ -908,7 +904,6 @@
),
'core_grades_grader_gradingpanel_point_fetch' => [
'classname' => 'core_grades\\grades\\grader\\gradingpanel\\point\\external\\fetch',
'methodname' => 'execute',
'description' => 'Fetch the data required to display the grader grading panel for simple grading, ' .
'creating the grade item if required',
'type' => 'write',
Expand All @@ -917,15 +912,13 @@
],
'core_grades_grader_gradingpanel_point_store' => [
'classname' => 'core_grades\\grades\\grader\\gradingpanel\\point\\external\\store',
'methodname' => 'execute',
'description' => 'Store the data required to display the grader grading panel for simple grading',
'type' => 'write',
'ajax' => true,
'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
],
'core_grades_grader_gradingpanel_scale_fetch' => [
'classname' => 'core_grades\\grades\\grader\\gradingpanel\\scale\\external\\fetch',
'methodname' => 'execute',
'description' => 'Fetch the data required to display the grader grading panel for scale-based grading, ' .
'creating the grade item if required',
'type' => 'write',
Expand All @@ -934,7 +927,6 @@
],
'core_grades_grader_gradingpanel_scale_store' => [
'classname' => 'core_grades\\grades\\grader\\gradingpanel\\scale\\external\\store',
'methodname' => 'execute',
'description' => 'Store the data required to display the grader grading panel for scale-based grading',
'type' => 'write',
'ajax' => true,
Expand Down Expand Up @@ -1558,7 +1550,6 @@
),
'core_output_load_fontawesome_icon_system_map' => array(
'classname' => 'core\external\output\icon_system\load_fontawesome_map',
'methodname' => 'execute',
'description' => 'Load the mapping of moodle pix names to fontawesome icon names',
'type' => 'read',
'loginrequired' => false,
Expand Down Expand Up @@ -1749,7 +1740,6 @@
),
'core_user_search_identity' => array(
'classname' => '\core_user\external\search_identity',
'methodname' => 'execute',
'description' => 'Return list of users identities matching the given criteria in their name or other identity fields.',
'type' => 'read',
'capabilities' => 'moodle/user:viewalldetails',
Expand Down Expand Up @@ -2635,7 +2625,6 @@

'core_block_fetch_addable_blocks' => array(
'classname' => 'core_block\external\fetch_addable_blocks',
'methodname' => 'execute',
'description' => 'Returns all addable blocks in a given page.',
'type' => 'read',
'capabilities' => 'moodle/site:manageblocks',
Expand Down Expand Up @@ -2711,15 +2700,13 @@
],
'core_table_get_dynamic_table_content' => [
'classname' => 'core_table\external\dynamic\get',
'methodname' => 'execute',
'description' => 'Get the dynamic table content raw html',
'type' => 'read',
'ajax' => true,
'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
],
'core_xapi_statement_post' => [
'classname' => 'core_xapi\external\post_statement',
'methodname' => 'execute',
'classpath' => '',
'description' => 'Post an xAPI statement.',
'type' => 'write',
Expand All @@ -2729,7 +2716,6 @@
],
'core_contentbank_delete_content' => [
'classname' => 'core_contentbank\external\delete_content',
'methodname' => 'execute',
'classpath' => '',
'description' => 'Delete a content from the content bank.',
'type' => 'write',
Expand All @@ -2738,7 +2724,6 @@
],
'core_contentbank_rename_content' => [
'classname' => 'core_contentbank\external\rename_content',
'methodname' => 'execute',
'classpath' => '',
'description' => 'Rename a content in the content bank.',
'type' => 'write',
Expand All @@ -2747,7 +2732,6 @@
],
'core_contentbank_set_content_visibility' => [
'classname' => 'core_contentbank\external\set_content_visibility',
'methodname' => 'execute',
'classpath' => '',
'description' => 'Set the visibility of a content in the content bank.',
'type' => 'write',
Expand All @@ -2756,7 +2740,6 @@
],
'core_create_userfeedback_action_record' => [
'classname' => 'core\external\record_userfeedback_action',
'methodname' => 'execute',
'classpath' => '',
'description' => 'Record the action that the user takes in the user feedback notification for future use.',
'type' => 'write',
Expand All @@ -2765,7 +2748,6 @@
],
'core_payment_get_available_gateways' => [
'classname' => 'core_payment\external\get_available_gateways',
'methodname' => 'execute',
'description' => 'Get the list of payment gateways that support the given component/area',
'type' => 'read',
'ajax' => true,
Expand Down
2 changes: 2 additions & 0 deletions lib/upgrade.txt
Expand Up @@ -118,6 +118,8 @@ information provided here is intended especially for developers.
* The behat transformation 'string time to timestamp' no longer supports datetime format. If provided, the format must
be strftime compatible. Example:
- I should see "##tomorrow noon##%A, %d %B %Y, %I:%M %p##"
* External functions implementation classes should use 'execute' as the method name, in which case the
'methodname' property should not be specified in db/services.php file.

=== 3.10 ===
* PHPUnit has been upgraded to 8.5. That comes with a few changes:
Expand Down
3 changes: 2 additions & 1 deletion lib/upgradelib.php
Expand Up @@ -1217,6 +1217,7 @@ function external_update_descriptions($component) {
$function = $functions[$dbfunction->name];
unset($functions[$dbfunction->name]);
$function['classpath'] = empty($function['classpath']) ? null : $function['classpath'];
$function['methodname'] = $function['methodname'] ?? 'execute';

$update = false;
if ($dbfunction->classname != $function['classname']) {
Expand Down Expand Up @@ -1266,7 +1267,7 @@ function external_update_descriptions($component) {
$dbfunction = new stdClass();
$dbfunction->name = $fname;
$dbfunction->classname = $function['classname'];
$dbfunction->methodname = $function['methodname'];
$dbfunction->methodname = $function['methodname'] ?? 'execute';
$dbfunction->classpath = empty($function['classpath']) ? null : $function['classpath'];
$dbfunction->component = $component;
$dbfunction->capabilities = array_key_exists('capabilities', $function)?$function['capabilities']:'';
Expand Down
1 change: 0 additions & 1 deletion media/player/videojs/db/services.php
Expand Up @@ -27,7 +27,6 @@
$functions = [
'media_videojs_get_language' => [
'classname' => 'media_videojs\external\get_language',
'methodname' => 'execute',
'classpath' => '',
'description' => 'get language.',
'type' => 'read',
Expand Down
3 changes: 0 additions & 3 deletions mod/glossary/db/services.php
Expand Up @@ -164,7 +164,6 @@

'mod_glossary_delete_entry' => [
'classname' => 'mod_glossary\external\delete_entry',
'methodname' => 'execute',
'classpath' => '',
'description' => 'Delete the given entry from the glossary.',
'type' => 'write',
Expand All @@ -173,7 +172,6 @@

'mod_glossary_update_entry' => [
'classname' => 'mod_glossary\external\update_entry',
'methodname' => 'execute',
'classpath' => '',
'description' => 'Updates the given glossary entry.',
'type' => 'write',
Expand All @@ -182,7 +180,6 @@

'mod_glossary_prepare_entry_for_edition' => [
'classname' => 'mod_glossary\external\prepare_entry',
'methodname' => 'execute',
'classpath' => '',
'description' => 'Prepares the given entry for edition returning draft item areas and file areas information.',
'type' => 'read',
Expand Down
7 changes: 0 additions & 7 deletions mod/h5pactivity/db/services.php
Expand Up @@ -28,7 +28,6 @@
$functions = [
'mod_h5pactivity_get_h5pactivity_access_information' => [
'classname' => 'mod_h5pactivity\external\get_h5pactivity_access_information',
'methodname' => 'execute',
'classpath' => '',
'description' => 'Return access information for a given h5p activity.',
'type' => 'read',
Expand All @@ -37,7 +36,6 @@
],
'mod_h5pactivity_view_h5pactivity' => [
'classname' => 'mod_h5pactivity\external\view_h5pactivity',
'methodname' => 'execute',
'classpath' => '',
'description' => 'Trigger the course module viewed event and update the module completion status.',
'type' => 'write',
Expand All @@ -46,7 +44,6 @@
],
'mod_h5pactivity_get_attempts' => [
'classname' => 'mod_h5pactivity\external\get_attempts',
'methodname' => 'execute',
'classpath' => '',
'description' => 'Return the information needed to list a user attempts.',
'type' => 'read',
Expand All @@ -55,7 +52,6 @@
],
'mod_h5pactivity_get_results' => [
'classname' => 'mod_h5pactivity\external\get_results',
'methodname' => 'execute',
'classpath' => '',
'description' => 'Return the information needed to list a user attempt results.',
'type' => 'read',
Expand All @@ -64,7 +60,6 @@
],
'mod_h5pactivity_get_h5pactivities_by_courses' => [
'classname' => 'mod_h5pactivity\external\get_h5pactivities_by_courses',
'methodname' => 'execute',
'classpath' => '',
'description' => 'Returns a list of h5p activities in a list of
provided courses, if no list is provided all h5p activities
Expand All @@ -75,15 +70,13 @@
],
'mod_h5pactivity_log_report_viewed' => [
'classname' => 'mod_h5pactivity\external\log_report_viewed',
'methodname' => 'execute',
'classpath' => '',
'description' => 'Log that the h5pactivity was viewed.',
'type' => 'write',
'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
],
'mod_h5pactivity_get_user_attempts' => [
'classname' => 'mod_h5pactivity\external\get_user_attempts',
'methodname' => 'execute',
'classpath' => '',
'description' => 'Return the information needed to list all enrolled user attempts.',
'type' => 'read',
Expand Down
2 changes: 0 additions & 2 deletions payment/gateway/paypal/db/services.php
Expand Up @@ -27,15 +27,13 @@
$functions = [
'paygw_paypal_get_config_for_js' => [
'classname' => 'paygw_paypal\external\get_config_for_js',
'methodname' => 'execute',
'classpath' => '',
'description' => 'Returns the configuration settings to be used in js',
'type' => 'read',
'ajax' => true,
],
'paygw_paypal_create_transaction_complete' => [
'classname' => 'paygw_paypal\external\transaction_complete',
'methodname' => 'execute',
'classpath' => '',
'description' => 'Takes care of what needs to be done when a PayPal transaction comes back as complete.',
'type' => 'write',
Expand Down

0 comments on commit c10791c

Please sign in to comment.