- Support
- Forums
- SimpleQuiz
- Extension Forums
- SimpleQuiz Forum
- Warnings on completed exam with error reporting set high
Warnings on completed exam with error reporting set high
- John Bongiovanni
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 25
- Thank you received: 0
2 years 5 months ago #1
by John Bongiovanni
This message has an attachment image.
Warnings on completed exam with error reporting set high was created by John Bongiovanni
Hi Christopher,
Everything is working fine, but I am seeing some warnings on my test site, which has error reporting set to high. Just passing it on.
John
Everything is working fine, but I am seeing some warnings on my test site, which has error reporting set to high. Just passing it on.
John
This message has an attachment image.
Please log in or register to see it.
Please Log in or Create an account to join the conversation.
- Christopher Mavros
- Offline
- Administrator
2 years 5 months ago #2
by Christopher Mavros
Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!
Replied by Christopher Mavros on topic Warnings on completed exam with error reporting set high
Hello John and thank you for posting.
Please make sure that your plugin function declaration is:(note the ampersands)
These arguments must be passed by reference, which means that you should give the function access to the original variable in order to be able to make changes in it, rather than just passing its value, which means you can't affect the original variable of the quiz.
In older PHP versions, this was required in both sides of the function (both in the declaration and the function call) but now it's only required in the function declaration.
Thanks again.
Please make sure that your plugin function declaration is:
onQuizCompleted(&$quiz, &$user_id, &$quiz_type, &$score)
These arguments must be passed by reference, which means that you should give the function access to the original variable in order to be able to make changes in it, rather than just passing its value, which means you can't affect the original variable of the quiz.
In older PHP versions, this was required in both sides of the function (both in the declaration and the function call) but now it's only required in the function declaration.
Thanks again.
Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!
Please Log in or Create an account to join the conversation.
Moderators: Christopher Mavros
- Home
- Support
- Forums
- SimpleQuiz
- Extension Forums
- SimpleQuiz Forum
- Warnings on completed exam with error reporting set high