Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Run SQL after quiz ends
(1 viewing) (1) Guest
component
Go to bottomPage: 1
TOPIC: Run SQL after quiz ends
#4171
Run SQL after quiz ends 14 Years, 2 Months ago Karma: 0
I'm talking Quiz or Quiz Lite.

Is this possible? I'd like to run a quiz and then at the end, depending on the result, run some SQL.

For example, the person takes the quiz for the first time and scores 60% which is a fail and so nothing happens and they have to take the quiz again.

On their second attempt they score 90% which is a pass so I want to run a small snippet of SQL to update some custom fields in the db. Is there built in functionality for me to do this?

Thanks
The administrator has disabled public write access.
 
#4176
Re:Run SQL after quiz ends 14 Years, 2 Months ago Karma: 748
Hello,

'ARI Quiz' supports Joomla! events and provides ability to execute necessary PHP code at the end of a quiz.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#4178
Re:Run SQL after quiz ends 14 Years, 1 Month ago Karma: 0
Thanks - so I have the quiz component and installed the events plugin. How and where do I put the code? I searched the site and the help file but can't find any examples.
The administrator has disabled public write access.
 
#4179
Re:Run SQL after quiz ends 14 Years, 1 Month ago Karma: 748
Open the following file, please:

<joomla_dir>/plugins/system/ariquizevents.php

find the following code:

Code:


function onEndQuiz($params)
{
}



and place necessary PHP code in body of 'onEndQuiz' method.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#4188
Re:Run SQL after quiz ends 14 Years, 1 Month ago Karma: 0
Thanks. It's a bit fiddly but I can make it do what I want it to. I think.

Some more documentation on these features would be nice though!
The administrator has disabled public write access.
 
#4194
Re:Run SQL after quiz ends 14 Years, 1 Month ago Karma: 748
We'll take into account your suggestion about documentation, but all methods in 'ariquizevents.php' file are documented.

PS: If you have any difficulties with adding your code, we can help you.

Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 1