Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-04-2002, 02:21 PM
FASherman's Avatar
FASherman FASherman is offline
 
Join Date: Aug 2002
Posts: 289
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Another vbQuiz Hack

Perhaps not even a hack. Might be possible with a few sql statements.

At any rate, what we need is a way to leverage the work we've all done entering in quizzes. It would be nice to have a ACP command that would dump the contents of my quiz databases - without results, sessions, etc so that someone else could take that file execute it as an sql file and add my quizzes to his/her forums.

It seems it would have to be an import/export type program instead of just SQL after all because the kets between the different databases will have to be in sync, not to mention the problem with either assigning or adding a category.

More thoughts - thinking as I write - avoid the category issue altogether by just putting everything into an import category and forcing manual assignment prior to approval. Any imported quiz should be imported as still requiring approval.

So that makes it just an issue of importing the quiz, the quiz questions and quiz answers and keeping the linkage between keys correct.
Reply With Quote
  #2  
Old 09-04-2002, 10:40 PM
eXtremeTim eXtremeTim is offline
 
Join Date: Jun 2002
Location: eXtremewebtech.com
Posts: 1,201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is very simple if you have phpmyadmin just go into all the tables in the db that start with quiz on property veiw and then look down towards the bottom for

View dump (schema) of table
Set it to dump structure and data and check the save as file box.

You could also just go into the admin cp and then
Back-up Database and then deselect all the tables except for the quiz tables. You might also then want to warn people when you release it that it will clear out there current quiz tables. So they should follow these instructions as well to insure that there quiz tables are backed up.

Note:
DO NOT BACKUP THE FOLLOWING TABLES

QUIZ_RESULTS
QUIZ_TEMP
Reply With Quote
  #3  
Old 09-05-2002, 08:00 PM
FASherman's Avatar
FASherman FASherman is offline
 
Join Date: Aug 2002
Posts: 289
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This won't work because the dump will contain the quizid in the quiz table, the questionid in the quiz_question and the answerid in the quiz_answers table.

An import program will have to do this, in order

Get the number of rows in the quiz table,

Insert the quiz info substituting quizid with number of rows+1, incrementing as it goes...

Then it will have to do the same thing for quiz_questions, but it will have to remember what the original quizid was and what the new one is and make the substitution to keep the key field between quiz and quiz_question in sync.

Then it will have to move on to quiz_answers and perform the same function between quiz_questions and quiz_answers tables.

If you do it the way you suggest, we'd be over-writing current questions and generally corrupting the databases.
Reply With Quote
  #4  
Old 09-05-2002, 08:20 PM
FASherman's Avatar
FASherman FASherman is offline
 
Join Date: Aug 2002
Posts: 289
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've thought this hack through well enough that I can probably get it done in a few days. Is anyone interested in it?

If I do it, it means we can swap quizzes and not have to re-enter quizzes someone has already done.

If anyone is interested, respond. If I get enough responses, I'll get it done.
Reply With Quote
  #5  
Old 10-23-2002, 12:06 PM
saab340 saab340 is offline
 
Join Date: Dec 2001
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep looking for this import feature
Reply With Quote
  #6  
Old 10-23-2002, 12:08 PM
Mr_P Mr_P is offline
 
Join Date: Jan 2002
Location: Uk.
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yup nice idea m8

hate having to type quizzes from scratch
Reply With Quote
  #7  
Old 10-23-2002, 12:32 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That would be cool

Satan
Reply With Quote
  #8  
Old 11-18-2003, 09:37 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great idea imo, woudn't be too hard either, did this ever get released?
Reply With Quote
  #9  
Old 11-30-2004, 02:05 AM
TWTCommish's Avatar
TWTCommish TWTCommish is offline
 
Join Date: Oct 2001
Location: Pittsburgh, PA, USA
Posts: 783
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Importable/Exportable (and therefore tradeable) quizzes are planned for the next version of the hack. Just FYI.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:42 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04670 seconds
  • Memory Usage 2,236KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete