Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vBQuiz 1.0 Details »»
vBQuiz 1.0
Version: 1.00, by TWTCommish TWTCommish is offline
Developer Last Online: Dec 2022 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 06-10-2002 Last Update: Never Installs: 213
 
No support by the author.

vBQuiz 1.0

NOTE: all functionality-impairing bugs have been fixed. The attached files should work well on just about any PHP installation.

What's it do?
It allows you to setup a quiz center on your boards quickly and easily. This quiz center is FULLY templated, integrated with vBulletin, and has an advanced Admin script for managing the quizzes, categories, and questions. Here's an example: Movie Forums - Quizzes

A few of its features...
  • Tracks all results and displays high scores.
  • Upon completion, users are given a total quiz breakdown of the quiz, showing them how they fared on each question, and, on the ones they missed, showing them the correct answer.
  • Upon completion, users are shown a graphical bar representing their score, and a graphical bar representing the average score for the quiz. They are also emailed their information.
  • Main quiz page calculates and displays the easiest and most difficult quizzes automatically.
  • Quizzes can be split up into categories.
  • Quizzes can be approved or disapproved easily to add/remove them from public view/use.
  • Full integration with the Who's Online? page...IE: "Viewing Quizzes" or "Viewing So and So Quiz" and even "Taking So and So Quiz"
Admin Abilities:
  • Disallow multiple quiz takings.
  • Toggle to disinclude quiz results coming from the author of the quiz.
  • Change the display order of the answers to each question.
  • Add multiple questions and answers at once (no limit).
Here are some screenshots:That's it! Don't forget, however, to read ALL of the instructions.txt file in the enclosed vbquiz.zip file. It'll help guard against some common bugs.

Files Enclosed (in vbquiz.zip)
- instructions.txt (read it!)
- quiz.php (upload to main forum dir)
- admin_quiz.php (upload to admin dir)
- install_quiz.php (upload to admin dir and then run)

Enjoy!

Also: a HUGE, HUGE, HUGE thanks to GamerForums for beta testing this hack for me. His help was completely invaluable and surely saved me a lot of work in the long run. Thanks!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #682  
Old 02-20-2003, 01:29 AM
vpn vpn is offline
 
Join Date: Feb 2003
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just installed it on 2.2.9, great hack.

i was wondering if there was any way to have "Quizzes" displayed as a category on the forum index, with the quiz categories as forums, and then the quizzes in the individual category forums, displayed as posts or something similar?

thanks.
Reply With Quote
  #683  
Old 02-21-2003, 06:53 PM
LangTuDaTinh LangTuDaTinh is offline
 
Join Date: Dec 2001
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I noticed that when user put the answer text less than the one indicated when they make their quiz, it will appear as blank.

For example: user input 3 answers per question.
but when they input answer texts for a question, they put only 2 answers,

so when they display the quiz, it will appear two answers with one blank answer.

this solution will display only two answers.

one way to prevent this is prevent from display those blank answer

here is the solution
look for this code
PHP Code:
eval("\$answerbits .= \"".gettemplate("quiz_answerbit")."\";"); 
replace with this code

PHP Code:

   
if ($answer[answertext] !="") {
          eval(
"\$answerbits .= \"".gettemplate("quiz_answerbit")."\";");

Reply With Quote
  #684  
Old 02-23-2003, 01:13 AM
Silenced Soul's Avatar
Silenced Soul Silenced Soul is offline
 
Join Date: Apr 2002
Location: holdin' it down for tha 303
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

flawless install, beautiful usability. I love this hack .
Reply With Quote
  #685  
Old 02-26-2003, 04:38 PM
Zombie-F's Avatar
Zombie-F Zombie-F is offline
 
Join Date: Mar 2002
Location: Spook City, USA
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by LangTuDaTinh
search for

PHP Code:
    $quizzes $DB_site->query("SELECT q.quizid, q.quiztitle, q.description, q.timestamp,
                                       SUM(r.totalcorrect) AS correct, COUNT(r.resultid) AS total
                                FROM quiz q
                                LEFT JOIN quiz_results r
                                  ON (q.quizid = r.quizid)
                                WHERE q.approve  = 1
                                  
$clause
                                GROUP BY q.quizid ORDER BY q.timestamp DESC
                                LIMIT 
$start$per_page"); 
change to

PHP Code:
    $quizzes $DB_site->query("SELECT q.quizid, q.quiztitle, q.description, q.timestamp,
                                       SUM(r.totalcorrect) AS correct, COUNT(r.resultid) AS total
                                FROM quiz q
                                LEFT JOIN quiz_results r
                                  ON (q.quizid = r.quizid)
                                WHERE q.approve  = 1
                                  
$clause
                                GROUP BY q.quizid ORDER BY q.quiztitle ASC
                                LIMIT 
$start$per_page"); 
Thanks man. You rock! This will make finding a particular quiz to take 10x easier.
Reply With Quote
  #686  
Old 03-07-2003, 01:00 PM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After over 3 weeks of testing, I have one complaint.
Users are registering now simply to take the quizzes and not posting on the forums. I wouldn't mind this, but even users that haven't verified their e-mail address are able to take the quizzes. Is there any way to stop them from being able to do this?

Regards,
Oblivion Knight
Reply With Quote
  #687  
Old 03-08-2003, 12:24 AM
LangTuDaTinh LangTuDaTinh is offline
 
Join Date: Dec 2001
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

in quiz.php, near the top u will find this line
PHP Code:
if ($bbuserinfo[userid]==0) {
  
show_nopermission();

change 0 to number of usergroup that u want them to have access
if more than 2 usergroups then use "or" between them.
Reply With Quote
  #688  
Old 03-08-2003, 03:31 AM
Jethro
Guest
 
Posts: n/a
Default

Okay no idea why, but figure l will add this one and work out the exact reason in due course

Fine looking hack btw....

Could people stop posting links to show off their site's using the quiz hack, when you need to register to view those links.
Reply With Quote
  #689  
Old 03-08-2003, 01:05 PM
lynda's Avatar
lynda lynda is offline
 
Join Date: Nov 2001
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I didn't want to wade through 46 pages, but I had to make an adjustment in order for the percentages to work right. The % correct at the bottom was showing the right amount, but the % correct at the top was not (on the results page) It was showing 6 out of 6 - 102%

Anyway, here's the change I made, if it hasn't already been documented:

Find:
PHP Code:
    $avg  round($all $number2);
    
$base round(100 $question_count);

    
$multiplied_total   $total $base;
    
$multiplied_average round($avg $base);

    
$total_bar_multiply     $multiplied_total $resultsbarmultiply;
    
$avg_total_bar_multiply round($multiplied_average $resultsbarmultiply); 

Change to:
PHP Code:
    $avg  $all $number;
    
$base 100 $question_count;

    
$multiplied_total   ceil($total $base);
    
$multiplied_average ceil($avg $base);

    
$total_bar_multiply     $multiplied_total $resultsbarmultiply;
    
$avg_total_bar_multiply ceil($multiplied_average $resultsbarmultiply); 
Reply With Quote
  #690  
Old 03-08-2003, 06:16 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

.
Reply With Quote
  #691  
Old 03-08-2003, 11:07 PM
auz1111's Avatar
auz1111 auz1111 is offline
 
Join Date: Nov 2002
Location: columbia, sc
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

for some reason when I enter the author name in the ACP it does not get added to the database. everything else works fine. any suggestions?
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 06:34 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05470 seconds
  • Memory Usage 2,337KB
  • Queries Executed 27 (?)
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
  • (7)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (11)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_postinfo_query
  • fetch_postinfo
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete