jleyva / moodle-block_configurablereports

This block is a Moodle custom reports builder. You can create custom reports without SQL knowledge. It's a tool suitable for admins or teachers.
http://moodle.org/plugins/view.php?plugin=block_configurable_reports
67 stars 159 forks source link

External function parameters: invalid OPTIONAL value specified #194

Open christina-roperto opened 2 years ago

christina-roperto commented 2 years ago

Plugin failed unit tests:

There was 1 error:

1) core_externallib_testcase::test_all_external_info with data set "block_configurable_reports_get_report_data" (stdClass Object (...)) Unexpected debugging() call detected. Debugging: External function parameters: invalid OPTIONAL value specified.

/var/www/site/lib/phpunit/classes/advanced_testcase.php:88

To re-run: vendor/bin/phpunit "core_externallib_testcase" lib/tests/externallib_test.php

noisyjerm commented 1 year ago

This error may prevent an admin being able to configure a webservice /admin/webservice/service_functions.php

As per pull request 195, Replace VALUE_OPTIONAL with VALUE_DEFAULT on line 59 in /classes/external.php 'courseid' => new external_value(PARAM_INT, 'The course id', VALUE_DEFAULT)

See:https://moodledev.io/docs/apis/subsystems/external/writing-a-service#required-optional-or-default-value