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

Moodle 4.3: question/qengine.js is deprecated #106

Closed
jorgenfinsveen opened this issue Jun 6, 2023 · 2 comments · Fixed by #115
Closed

Moodle 4.3: question/qengine.js is deprecated #106

jorgenfinsveen opened this issue Jun 6, 2023 · 2 comments · Fixed by #115
Assignees

Comments

@jorgenfinsveen
Copy link

Moodle version: 4.3dev (Build: 20230602)
JazzQuiz version: 1.2.0 (Build: 2023033100)


Discovered when creating a new JazzQuiz session. Receives the following error message:

The question/qengine.js has been deprecated. Please use core_question/question_engine

  - line 449 of /lib/outputrequirementslib.php: call to debugging()
  - line 376 of /mod/jazzquiz/classes/output/renderer.php: call to page_requirements_manager->js()
  - line 165 of /mod/jazzquiz/classes/output/renderer.php: call to mod_jazzquiz\output\renderer->require_quiz()
  - line 69 of /mod/jazzquiz/view.php: call to mod_jazzquiz\output\renderer->render_quiz()
  - line 195 of /mod/jazzquiz/view.php: call to mod_jazzquiz\jazzquiz_view_start_quiz()
  - line 201 of /mod/jazzquiz/view.php: call to mod_jazzquiz\jazzquiz_view()
@jorgenfinsveen
Copy link
Author

Does not affect Moodle 4.1. The qengine.js file says that it has been deprecated since 4.0. Should not be that difficult to resolve, but the replacement file core_question/question_engine does not seem to exist in the moodle directory. This was checked for moodle 4.1 and 4.3.

@jorgenfinsveen jorgenfinsveen self-assigned this Jul 28, 2023
@jorgenfinsveen jorgenfinsveen linked a pull request Jul 28, 2023 that will close this issue
@jorgenfinsveen
Copy link
Author

Resolved this by making the jazzquiz renderer check the current Moodle version and use the new question engine if the Moodle version is newer than 401 and the old one otherwise. This way, the jazzquiz plugin works fine with both Moodle 401 and 403. This was confirmed by tests on both these versions.

hgeorgsch added a commit that referenced this issue Aug 7, 2023
resolved deprecation issue
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.

1 participant