Posts made by Howard Miller

Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Answering my own question (as ever)...
 
Firstly, these are tests of web services (which turns out to be relevant). 

So, I think it's something to do with this - https://tracker.moodle.org/browse/MDL-77989
But, a much clearer explanation was actually to be found in a bug report for a plugin - https://github.com/microsoft/o365-moodle/issues/2398

The solution is update the web service to look like the current docs - https://moodledev.io/docs/4.4/apis/subsystems/external/writing-a-service

Don't use a require_once for externallib. Instead, use 'use' statements.

As usual, simple once you know but intensely frustrating when you don't. I now have about 50 web service classes to update.... sad
Average of ratings: Useful (2)
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Not really - you can make a course hidden to students but it'll still be accessible to teachers.

It's probably possible to do something with Course Categories and permission overrides in the categories but I tend not to encourage that sort of thing smile
Average of ratings: Useful (1)
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I'm guilty of starting a new thread for something that turned out to be related, https://moodle.org/mod/forum/discuss.php?d=458289

I'm not sure if it's the best way or even only way, but explicitly providing 'use' statements for needed classes seems to solve the problem.

Even less sure, but 'require_once' in tests may be a bit risky. Again, try some other way.