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

Add version check for mod_quiz namespace #794

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

jack-tii
Copy link
Contributor

In Moodle 4.2 the PHP class quiz_attempt was moved out of the global namespace and into mod_quiz

Currently our plugin works for newer Moodle versions (4.2+) but we need to support Moodle 4.1. Therefore we need to add a check for the current Moodle version, and use the namespace version on Moodle 4.2+.

Copy link

snyk-io bot commented Jan 27, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

code/snyk check is complete. No issues have been found. (View Details)

@jack-tii
Copy link
Contributor Author

This should fix #789

Copy link

@rrusso rrusso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please review this, it's bad copy pasta and you're missing the mod/quiz/locallib include above the 1st call to the class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants