Quote:
Originally posted by xxxsaint
if someone could figure out how to integrate this to award 10 points per correct answer into lesane's store it would be really really really really really really nice :P
|
Here's how you do it!
In quiz.php, find (around line 650):
PHP Code:
$date = vbdate($dateformat, time());
$line = str_repeat('-', 40);
$message = result_switch($totalcorrect, $question_count);
Add AFTER:
PHP Code:
$addpoints = $totalcorrect*10;
$DB_site->query("UPDATE user SET storep=storep+$addpoints WHERE userid='$userinfo[userid]'");
You can change the 10 to however many points you want...
In the email_quizresults template you can add:
Code:
You earned $addpoints points!
That's it!