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)

Boofo 06-18-2002 02:16 AM

And we have a winner!!!

It works and it works well. :) Now, how do we get the border around it like we have in the other tables? Then we are all set for go! Good work! :)

Quote:

Originally posted by TWTCommish
Open the quiz_question template, and replace this:

$questiondata[questiontext]

...with this...

$question[questiontext]


TWTCommish 06-18-2002 02:18 AM

Well, which template you talkin' bout? :)

Boofo 06-18-2002 02:21 AM

It's the one where you first come into the quiz. Check it out. :)

Quiz

Quote:

Originally posted by TWTCommish
Well, which template you talkin' bout? :)

TWTCommish 06-18-2002 02:28 AM

In the quiz template replace this...

Code:

<table cellpadding="4" cellspacing="{ tableinnerborderwidth }" border="0" width="{ contenttablewidth }" { tableinvisibleextra }>
...with this...

Code:

<table cellpadding="{ tableouterborderwidth }" cellspacing="0" border="0" bgcolor="{ tablebordercolor }" { tableouterextra } width="{ contenttablewidth }" align="center"><tr><td>
<table cellpadding="4" cellspacing="{ tableinnerborderwidth }" border="0" width="{ contenttablewidth }" { tableinvisibleextra }>

Then replace this...

Code:

      <table cellpadding="4" cellspacing="0" border="0" width="{ contenttablewidth }" { tableinvisibleextra }>
        $quizbits
      </table>

...with this...
Code:

      <table cellpadding="4" cellspacing="0" border="0" width="{ contenttablewidth }" { tableinvisibleextra }>
        $quizbits
      </table>
</td></tr></table>

REMOVE the spaces...I had to add them to avoid parsing. :)

Boofo 06-18-2002 02:36 AM

Are you sure it is the QUIZ template? I don't find anything like the first code in there at all. And I haven't changed anything in it.

TWTCommish 06-18-2002 02:37 AM

Sorry, I edited my post about 20 times. :D Try it now.

Boofo 06-18-2002 02:40 AM

I don't find it still. There is no width=95% in there at all.

TWTCommish 06-18-2002 02:47 AM

Sorry, THIS forum was parsing those bb Code replacements. Try it now...but remove the spaces.

Boofo 06-18-2002 02:56 AM

This is my quiz template. Something is definately different in mine for some reason. I added the extra spaces.

Code:

<html>
<head>
<title>$bbtitle - Quizzes</title>
$headinclude
</head>

<body>
$header

<!-- breadcrumb -->
<table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth }" {tableinvisibleextra } align="center">
  <tr>
    <td width="100%"><normalfont><b><a href="index.php?s=$session[sessionhash]">$bbtitle</a> $joiner Quizzes</b></normalfont></td>
  </tr>
</table>
<!-- /breadcrumb -->

<br/>

<table cellpadding="4" cellspacing="0" border="0" width="{contenttablewidth }" {tableinvisibleextra } align="center">
  <tr>
    <td width="55%" valign="top">
      <table cellpadding="4" cellspacing="0" border="0" width="{contenttablewidth }" {tableinvisibleextra }>
        <tr>
          <td width="100%" valign="middle" bgcolor="{tableheadbgcolor }"><normalfont color="{tableheadtextcolor }"><b>Recently Added Quizzes</b></normalfont></td>
        </tr>
      </table>

      <table cellpadding="4" cellspacing="0" border="0" width="{contenttablewidth }" {tableinvisibleextra }>
        $quizbits
      </table>
    </td>

    <td width="1%">&nbsp;</td>

    <td width="44%" valign="top">
      <table cellpadding="4" cellspacing="0" border="0" width="{contenttablewidth }" {tableinvisibleextra } align="center">
        <tr>
          <td width="100%" valign="middle" bgcolor="{tableheadbgcolor }"><normalfont color="{tableheadtextcolor }"><b>Quiz Categories</b></normalfont></td>
        </tr>

        $categorybits
      </table>

      $easiest_hardest
    </td>
  </tr>
</table>


$footer
</body>
</html>

Quote:

Originally posted by TWTCommish
Sorry, THIS forum was parsing those bb Code replacements. Try it now...but remove the spaces.

TWTCommish 06-18-2002 02:59 AM

It looks the same to me, man. :)

Boofo 06-18-2002 03:05 AM

Then show me where the first line of code you wanted me to change is at in my original code. :)

Quote:

Originally posted by TWTCommish
It looks the same to me, man. :)

bandersen 06-18-2002 03:19 AM

I still have the 2 x question.. then "you may not resubmit"....error.

X-Fan 06-18-2002 06:12 AM

Same with me, bandersen, and have tried adding a new quiz, deleting that, then adding another one to no avail.

Any ideas to fix that bug, TWT? ASAP would be appreciated, as I really want to get this up and running at my forums!

And I'm not finding...

Code:

cellspacing="{ tableinnerborderwidth }"
(minus the extra spaces) in the quiz template, either.

Boofo 06-18-2002 07:06 AM

Thank you! I knew I wasn't the only one who didn't have that in the quiz template. :)

Quote:

Originally posted by X-Fan
And I'm not finding...

Code:

cellspacing="{ tableinnerborderwidth }"
(minus the extra spaces) in the quiz template, either.


cdcopyworld 06-18-2002 09:15 AM

My quiz questions wont save:( dis anyone else have this problem? how did you fix it?

Thankyou

TWTCommish 06-18-2002 12:26 PM

cdcopyworld: are you trying to add questions instead of the NUMBER of questions you want? The page that comes up on the Add Questions page first requires that you add the number of questions you want to add, then the number of answers for each, and THEN you're presented with a page where you can add the actual questions.

X-Fan: I don't understand the quiz problem. Can you give me a more detailed example?

bandersen 06-18-2002 12:34 PM

Good morning, X-Fan and I seem to have this happening:

you go to take a quiz - things look normal - you mark a radio button and click "next question" - and you get the same question up again. You mark a radio button again and click "next question"... and you get "you may not resubmit".

TWTCommish 06-18-2002 12:37 PM

Are you using the newly uploaded quiz.php file?

bandersen 06-18-2002 12:48 PM

Quote:

Originally posted by TWTCommish
Are you using the newly uploaded quiz.php file?
I uploaded the one in post#278... and it's working now! Thanks TWT... :)

bandersen 06-18-2002 12:59 PM

One more question... the Email that is sent out... comes from "nobody@myhost.com" / with text "unprivileged user"... where do I change that?

The email address / text showing in the body of the email is ok tho.... Seem like the from / subject info shows up in the body of the email rather than where they should be.
The subject line with me looks like this: <!-- BEGIN TEMPLATE: email_quizresults -->

X-Fan 06-18-2002 01:31 PM

The modified quiz.php worked for me, too. I hadn't tried it as you said it was for the 350 error, which I wasn't getting!

What was changed in the modified quiz.php that got it working, I wonder?

Anyway, now to start making some quizzes. Thanks, TWT!!!!

pgowder 06-18-2002 01:33 PM

Great hack! Had it installed and working withing 10 minutes. I already have people taking them!

Is there a way to let users submit quizes? How about moderators? Can they submit them from the mod cp?

I'd like to let others submit them, so that I could take them without having seen the answers.

X-Fan 06-18-2002 01:38 PM

I'd also like to know if it would be possible to randomize the question order, rather than having them come up in the order that they are entered?

If you allow a quiz to be taken more than once, it will be that bit more difficult if the questions are randomized rather than the same order as they were the first time you take a quiz.

TWTCommish 06-18-2002 04:42 PM

bandersen: you'll want to turn off the template comments to fix that. As for the email problem...I think it might be an issue with your host, as the script, I believe, uses your contact email straight out of the vB Options table.

pgowder: I think it might work okay if you upload it to /mod dir, but I haven't tried it personally. The ability for users to submit quizzes is something I'm thinking of for version 2.0

X-Fan: randomizing would be a little bit of a pain, but it could be done. I see your point, and it's a good one. I'll give it some thought. I think, in version 2.0, it'd be good if you could very easily change the display order of the questions, and perhaps check a box to have them randomized each time. That'd be cool. :D

bandersen 06-18-2002 05:19 PM

Quote:

Originally posted by TWTCommish
[B]bandersen: you'll want to turn off the template comments to fix that. As for the email problem...I think it might be an issue with your host, as the script, I believe, uses your contact email straight out of the vB Options table.
Hi... where do I turn the template comments off.....?

New edit: Found it!! :glasses: Admin Panel..
Also the errors in From / Subject went away too.

pgowder 06-18-2002 05:52 PM

I did upload it to the mod directory, and it appears to be working.

Thanks!

bandersen 06-18-2002 07:11 PM

This is the restult I get when having 100% correct answers:

Congratulations, you have successfully passed this quiz. You correctly answered 11 of 11 total questions - a grade of 101%.

- Date: 06-18-2002
- Total: 11 out of 11
- Percentage: 99 percent

The template shows 99% on the top - next to the bars
The template shows 101% at the bottom.

This is what I have in the quiz.php:

$base = 100 / $question_count;
$pct = ceil($totalcorrect * $base);

Lionel 06-19-2002 03:31 AM

this hack works well for me since day one. Is there a way to create subcategories?

X-Fan 06-19-2002 07:16 AM

I've just changed my quiz options to allow a user to take a quiz once only. Problem is there's already been a few people take it multiple times.

How would it be possible to have the system remove all their recorded attempts except for their first one?

EDIT:

Well I manually removed the entries from the database via phpMyAdmin, but it would still be a lot easier to have an option to automatically remove multiple attempts except the initial one.

Also, is there any way to completely reset a quiz's stats without having to delete it?

cdcopyworld 06-19-2002 08:20 AM

Quote:

Originally posted by TWTCommish
cdcopyworld: are you trying to add questions instead of the NUMBER of questions you want? The page that comes up on the Add Questions page first requires that you add the number of questions you want to add, then the number of answers for each, and THEN you're presented with a page where you can add the actual questions.

X-Fan: I don't understand the quiz problem. Can you give me a more detailed example?

its not giving me the option on how many questions:( it goes strait to the add question and answer page.

thanks

TWTCommish 06-19-2002 12:22 PM

What are you clicking on? You should be clicking on Add Questions, at which time you'll see three fields: a dropdown that allows you to select the quiz that the questions should be added to, and two text boxes...one for the number of questions, and one for the number of answers.

X-Fan: not automatically, no. But I'll consider that for a future release. And no, subcategories do not currently exist.

FleaBag 06-19-2002 05:05 PM

Hell I was the beta tester for this and I didn't even realise it was released! Great work Chris! :)

TWTCommish 06-19-2002 05:08 PM

Thats right, I'd forgotten! A HUGE thanks to GamerForums. His bug reports were completely invaluable to me.

FleaBag 06-19-2002 06:09 PM

LOL...
[high]* GamerForums takes a bow!
[/high]
Just upgraded to 2.2.6 [a little late I know], with minimal intervention and no problems at all. Again, great work. :)

wolfe 06-19-2002 09:43 PM

getting this error on my quiz.php file

Database error in vBulletin 2.2.0:

Invalid SQL: SELECT quizid, quiztitle, description, timestamp, userid, catid, imagename
FROM quiz
WHERE approve = 1
ORDER BY timestamp DESC
LIMIT
mysql error: You have an error in your SQL syntax near '' at line 5

mysql error number: 1064

TWTCommish 06-19-2002 09:44 PM

Read the instructions. :p They tell you how to deal with that.

Boofo 06-19-2002 10:05 PM

TWTCommish,

Any luck on the correct code for adding the lines to the tables for the quiz template? The code you gave me doesn't have the cellpadding part in it. :)

wolfe 06-19-2002 10:10 PM

sorted now m8 but my quiz screen is now blank

TWTCommish 06-19-2002 10:51 PM

wolfe: what do you mean? Are you sure the templates have been installed correctly.

wolfe 06-20-2002 09:43 AM

well they said installed properly i am using VBB 2.2.0 does it work on that


All times are GMT. The time now is 01:07 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.01979 seconds
  • Memory Usage 1,830KB
  • 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_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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