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?

Insert results in DB table after quiz finish
(1 viewing) (1) Guest
component
Go to bottomPage: 1234
TOPIC: Insert results in DB table after quiz finish
#58673
Re:Insert results in DB table after quiz finish 8 Years, 1 Month ago Karma: 760
If you need some data from $result variable ($resultInfo), place your code after AriEventController::raiseEvent('onEndQuiz', $resultInfo); code in <joomla_directory>/components/com_ariquiz/controllers/quizcomplete.php file.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#58674
Re:Insert results in DB table after quiz finish 8 Years, 1 Month ago Karma: 0
I try to put the code there and it didn't work (didn't create the record into the student DB
The administrator has disabled public write access.
 
#58675
Re:Insert results in DB table after quiz finish 8 Years, 1 Month ago Karma: 0
Again. I'm trying to accomplish this:

When the quiz is over (no matter if the time run out or the user hit save on the last question) the system to record this student data in one DB table we created. This is the query we are using right now:

$query = "INSERT INTO `xxxx_ariquiz_students` (`students_name`, `students_certification`, `students_certification_number`, `students_country`, `students_date_passed`) VALUES('{$result['UserName']}', '{$items->Certification}', '{$items->CertificationNumber}', '{$items->CountryName}', '{$result['EndDate']}')";
The administrator has disabled public write access.
 
#58676
Re:Insert results in DB table after quiz finish 8 Years, 1 Month ago Karma: 760
This is a problem with this code. At least $resultInfo variable is available in the file instead of $result and it seems $items is your own variable. We can recommend to enable "Development" mode in Joomla!, check web server error log and error in DB object.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#58677
Re:Insert results in DB table after quiz finish 8 Years, 1 Month ago Karma: 0
I send you the full code later today from the file. If you see the file you will see the code make sense
The administrator has disabled public write access.
 
#58678
Re:Insert results in DB table after quiz finish 8 Years, 1 Month ago Karma: 760
Obviously this is a problem with custom code. Use recommendation from our previous to find an error and correct it.

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