Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class 'core_external\external_api' not found #524

Closed
andreasilvestriunitn opened this issue Oct 17, 2023 · 4 comments · Fixed by #534
Closed

Class 'core_external\external_api' not found #524

andreasilvestriunitn opened this issue Oct 17, 2023 · 4 comments · Fixed by #534

Comments

@andreasilvestriunitn
Copy link

After updating questionnaire with last version (branch MOODLE_401_STABLE) on Moodle 4.1 brings up an error in the API Documentation page: "Class 'core_external\external_api' not found".
Removing changes committed on file externallib.php as per #502 the error disappear: remove "core_external" from rows 21 to 25.

@ptramonti
Copy link

As indicated here, you should extend the external_api class instead of \core_external\external_api.
Thanks

@aspark21
Copy link

@opitz please review

@ldgtd
Copy link

ldgtd commented Nov 23, 2023

Hello,

We got the same issue on Moodle 4.1.6 w/ the branch MOODLE_401_STABLE. Any update on this ? Thank you

jwalits added a commit to catalyst/moodle-mod_questionnaire that referenced this issue Nov 28, 2023
E
[PoetOS#524] fix issues with externallib.php file
jwalits added a commit to catalyst/moodle-mod_questionnaire that referenced this issue Nov 28, 2023
@jwalits
Copy link
Contributor

jwalits commented Nov 28, 2023

Along with the error on the API documentation page, we are also seeing error in the PHP unit tests

1) core\externallib_test::test_all_external_info with data set "mod_questionnaire_submit_questionnaire_response" (stdClass Object (...))
Error: Class 'core_external\external_api' not found

/var/www/site/mod/questionnaire/externallib.php:48
/var/www/site/lib/externallib.php:91
/var/www/site/lib/tests/externallib_test.php:442
/var/www/site/lib/phpunit/classes/advanced_testcase.php:80
phpvfscomposer:///var/www/site/vendor/phpunit/phpunit/phpunit:97

The above commit fixes this up.

x-iy added a commit to catalyst/moodle-mod_questionnaire that referenced this issue Nov 30, 2023
[PoetOS#524] fix issues with externallib.php file
lucaboesch pushed a commit to lucaboesch/moodle-mod_questionnaire that referenced this issue Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants