moodle / devdocs

Source of the Moodle Developer Resources and Documentation
https://moodledev.io/
Other
40 stars 291 forks source link

Updated view-php.tsx #1066

Closed hamidayubdev closed 3 months ago

hamidayubdev commented 3 months ago

get_course_and_cm_from_cmid can run into exception if cmid doesn't exist, thus added try catch block in view-php.tsx.

netlify[bot] commented 3 months ago

Deploy Preview for moodledevdocs failed.

Built without sensitive environment variables

Name Link
Latest commit f3f381fb614e42147e346e4cb40faf0b7136c32a
Latest deploy log https://app.netlify.com/sites/moodledevdocs/deploys/667fa34b49cc010008283eea
andrewnicols commented 3 months ago

This isn't somethign that we typically do. That's not to say that people can't but it's not something done in most situatinons. Additionally the print_error() method is deprecated and shouldn't be used any more.