vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vBQuiz 1.0 (https://vborg.vbsupport.ru/showthread.php?t=39719)

vpn 02-20-2003 01:29 AM

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.

LangTuDaTinh 02-21-2003 06:53 PM

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")."\";");



Silenced Soul 02-23-2003 01:13 AM

flawless install, beautiful usability. I love this hack :D.

Zombie-F 02-26-2003 04:38 PM

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. :D

Oblivion Knight 03-07-2003 01:00 PM

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

LangTuDaTinh 03-08-2003 12:24 AM

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.

Jethro 03-08-2003 03:31 AM

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. :confused:

lynda 03-08-2003 01:05 PM

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); 


Zachery 03-08-2003 06:16 PM

.

auz1111 03-08-2003 11:07 PM

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?


All times are GMT. The time now is 09:54 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.02203 seconds
  • Memory Usage 1,766KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete