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
TBH... I've just gone with Petr's solution. I up the debugging level at the start of each WS's execute() call. Not pretty but does the job. I (obviously?) indirect through a function so I can turn it off in one place - I have 55 web services and counting.

I did think about writing a new exception but I'm very lazy Mamatheka
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

We've written a rather complex grading tool which is entirely domain specific taking in all the weird and arcane rules that our institution has developed. The UI is entirely in Vue.js and the backend entirely Moodle web services.

With the best will in the world, it occasionally blows up. I've written a "thing" that produces a nicely formatted "it's broken - send a screen grab of this to IT" screen when a web service returns an exception. However, as we don't have developer level debugging on the production site I don't get the trace in the error string. This would be VERY useful. But I absolutely do not want that for all the day to day Moodle stuff.

Thus (good version)...

Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Just to recap. They enter the full URL of the course (e.g. https://my.moodle.site/course/view.php?id=99) and with no warnings they get bounced to the *home* page?

That's not what I would expect. A permission issue would simply give an error - so I think something else is going on. I would start by turning Debugging up full in case some messages appear. I would also check the PHP and web server logs to see if there are any clues.
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I read this (and didn't understand a lot of it) - https://moodledev.io/docs/5.0/apis/subsystems/routing

If you look at the example, some of that stuff is quite distinctive (e.g. the use). I grepped on some of the strings. There's mountains of hits in various places under lib/. However, the only other place in 4.5 is user/preferences and then courses/ appears in 5.0. I couldn't spot anywhere else. As I say, this is mostly guesswork.