Quiz Stats Reset

All web design discussion, including Ultimate Quiz MOD support.

Moderator: CricketMX Forum Moderators

Post Reply
User avatar
DakotaSurfer
Greenhorn
Greenhorn
Posts: 15
Joined: Thu Mar 20, 2008 10:54 pm
Location: Illinois, U.S.A.
Contact:

I want to reset all the stats for the current quizzes. I'd like to be able to do it with one swoop, truncate the plays, stats and members but keep all the quizzes so everyone can start over and so I can start a new contest. We get new members so the questions will always be good so even maybe a cut-off date using their "Joined" date as a key element rather than the user_id. In other words, newer members need only play. I have been using the code "batty" gave me from earlier where I can delete the quiz entries by user_id and quiz _id but it never effects the "Most Played Quizzes" stats and I'd like to reset that as well. Plus it does take forever to remove the entires of 300+ entires. Any thoughts?
Michael
a.k.a. DakotaSurfer
Official John Wayne Message Board
Site Administrator
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

If you look in phpMyAdmin at the database, can you confirm that there is a table called "phpbb_quiz_statistics" or similar?
Within that there should be a few columns saying "stats_id, quiz_id, user_id, stats_correct, stats_incorrect, stats_percentage"

Thanks for posting this in the forum.
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
User avatar
DakotaSurfer
Greenhorn
Greenhorn
Posts: 15
Joined: Thu Mar 20, 2008 10:54 pm
Location: Illinois, U.S.A.
Contact:

Absolutely... sorry for the delay, gets hectic sometimes. These were all created with the mod installation. You should have copies of the original files you sent me for deleting users info and quiz info from my PM to you.

Tables and Fields
  • phpbb_quiz
    quiz_id
    quiz_name
    quiz_author
    quiz_enabled
    quiz_category
    quiz_type
    quiz_plays
  • phpbb_quiz_categories
    category_id
    category_password
    category_name
    category_permissions
    category_description
  • phpbb_quiz_input_data
    quiz_id
    question_id
    quiz_question
    quiz_answer
  • phpbb_quiz_multiple_choice_data
    quiz_id
    question_id
    quiz_question
    quiz_alternates
    quiz_answer
  • phpbb_quiz_statistics
    stats_id
    quiz_id
    user_id
    stats_correct
    stats_incorrect
    stats_percentage
  • phpbb_quiz_true_false_data
    quiz_id
    question_id
    quiz_question
    quiz_answer
Michael
a.k.a. DakotaSurfer
Official John Wayne Message Board
Site Administrator
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

Hi,

Sorry for the delay. By the look of it all stats data is kept in phpbb_quiz_statistics, so to completely wipe this you can truncate that table. In phpMyAdmin the query for this is: TRUNCATE TABLE phpbb_quiz_statistics;

Back up that table first of course, just in case you realise down the track you need something from those stats.

To reset the amount of plays, use this query: UPDATE phpbb_quiz SET quiz_plays = 0;

Let me know if you have any other questions :)
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
User avatar
DakotaSurfer
Greenhorn
Greenhorn
Posts: 15
Joined: Thu Mar 20, 2008 10:54 pm
Location: Illinois, U.S.A.
Contact:

I'll try this out the next time I want to reset all the stats. I've already started a new contest so I don't want to disturb the data for now. Thanks for the help. It's been a busy 1st quarter.
Michael
a.k.a. DakotaSurfer
Official John Wayne Message Board
Site Administrator
Post Reply