vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Inferno Quiz v2.2 (https://vborg.vbsupport.ru/showthread.php?t=83130)

amykhar 08-18-2005 02:08 PM

Quote:

Originally Posted by Vizionz
http://www.eaforums.com/forums/quiz.php check out amys she hooked that bad boy up good job on that amy

Actually, it's not ready to look at just this moment. I accidentally wiped out my quiz-creation templates, which is where most of my work has been.

My code barely resembles zero's anymore :D

Boofo 08-18-2005 02:11 PM

Quote:

Originally Posted by amykhar
Actually, it's not ready to look at just this moment. I accidentally wiped out my quiz-creation templates, which is where most of my work has been.

My code barely resembles zero's anymore :D

Wanna share some of those quizzes? ;)

vBintense 08-18-2005 02:15 PM

Quote:

Originally Posted by Boofo
Wanna share some of those quizzes? ;)

I will second boobos idea (I think they call ya boobo or was it boboo I must search)

[high]* vBintense laughs and runs from boofo.[/high]

Boofo 08-18-2005 02:20 PM

* Boofo thinks Instant-Coffee can't run that fast. ;)

vBintense 08-18-2005 02:22 PM

/me thinks I can, but really I wish I had chosen the name I.T lol

Vizionz 08-18-2005 02:23 PM

Quote:

Originally Posted by amykhar
Actually, it's not ready to look at just this moment. I accidentally wiped out my quiz-creation templates, which is where most of my work has been.

My code barely resembles zero's anymore :D

i love how the template looks and the categories

Boofo 08-18-2005 02:23 PM

Oh, I could have had even more fun with that name. ;)

amykhar 08-18-2005 02:25 PM

Quote:

Originally Posted by Boofo
Wanna share some of those quizzes? ;)

I did. In the original 3.0 inferno quiz thread.

Thank you vizionz. That's not where my real changes are though. I've reworked the entire submission process to stream-line it. I've added report cards, author accredation, the ability to find quizzes by a given author, quizzes posted since last login, reworked the approval process, hooked it into the forums, and a few other things that I don't remember right now :D

Amy

Vizionz 08-18-2005 02:55 PM

wow good job. i am not a coder so that is amazing to me between you and zt your both are changing the game around here lately :) i really need to learn how to code haha

taffy056 08-18-2005 03:23 PM

Hi Zero,

Thank you very much for this hack, this will blow my users away :)

taffy

Michael-DLR 08-20-2005 03:35 AM

Hi,

This is a great hack! I am running into an issue though. After selecting all the questions, I click submit and it hangs until it times out. I am receiving the private message, the results are hitting the database. I did review the thread here and the 3.0.7 version and the only answer I came up with was to optimize my database. I did do that but the quiz.php?do=Take&id=2 page freezes at that point.

Help! Thank you!

Michael

badblu 08-20-2005 08:32 AM

I have made a quiz for scifi fans its based on Stargate Sg1 its easy

Michael-DLR 08-21-2005 02:17 AM

Quote:

Originally Posted by Michael-DLR
Hi,

This is a great hack! I am running into an issue though. After selecting all the questions, I click submit and it hangs until it times out. I am receiving the private message, the results are hitting the database. I did review the thread here and the 3.0.7 version and the only answer I came up with was to optimize my database. I did do that but the quiz.php?do=Take&id=2 page freezes at that point.

Help! Thank you!

Michael

Hi,

Just wondering if anyone can help or suggest anything about this problem I am having?

Thank you!

Michael

Michael-DLR 08-24-2005 12:45 AM

Hi there,

Is this hack no longer supported?

Thank You,

Michael

amykhar 08-24-2005 02:00 AM

The author is a high school student and it's back to school time. I'd give him some time.

I'm sorry, but I don't have an answer for your question.

GrendelKhan{TSU 08-24-2005 02:37 AM

Quote:

The author is a high school student and it's back to school time.
I knew that but everytime I hear it I still can't tell if I find that more impressive...or depressing. lol :p :D



wonder how he does in his computer sci class. ;) Zero rocks!!

Gizmo5h1t3 08-24-2005 06:44 AM

keepposting your quizzes guys!!..ure saving me hours in doin em...lmao

FrozenCreations 08-25-2005 02:51 PM

umm, i was wonderign if this mods could instead or letting the in 1 fourm, if it could set them to different usergroups? like if teh got a 90+ they go 2 Usergroup #1, if they get 75+ they go to Usergroup #2, if they get 45+ they go to Usergroup #3, if they get 0+ they go to Usergroup #4

ive been looking for somethign like this 4 a long long long time! i hope someone could do it!!

+ can this be used on 3.5 rc2? because, if not, i would love it if some1 upgraded it!

Boofo 08-25-2005 03:05 PM

It works fine on RC 2. ;)

FrozenCreations 08-25-2005 03:13 PM

kool ,how about my first question, about teh usergroup thing?

FrozenCreations 08-25-2005 11:51 PM

bump ^^;

albn 08-28-2005 05:23 AM

Hmm, I have a question. Is there a way to make the quizzes give an answer based on the choices the user makes, then have an output based on those choices? For instance:

"What kind of animal are you?" and if the user answers the questions, it will output that animal.

Thanks for your help.

rinkrat 08-28-2005 04:47 PM

Easy install, works great.

amykhar 08-28-2005 07:25 PM

Easy to modify too :D

Boofo 08-28-2005 07:28 PM

Quote:

Originally Posted by amykhar
Easy to modify too :D

If you know what you are doing it is.

Michael-DLR 08-28-2005 08:13 PM

Quote:

Originally Posted by rinkrat
Easy install, works great.

And does your quiz work properly using windows internet explorer 6.0?

Thank you,

Michael

Forumi Shqiptar 08-30-2005 05:44 PM

love it its great thanks clicked install :)

peterska2 09-03-2005 08:44 PM

installed. thanks.

Michael-DLR 09-05-2005 03:29 AM

Just checking in to see is this will still be supported or not.

Thank You,

Michael

y2krazy 09-05-2005 03:52 AM

Installed and modding the ____ out of the templates atm. They're much more oriented towards the original look of the board, so when my site goes live, I'll send a link your way. ;)

kall 09-07-2005 09:12 AM

Hmm...

The Quiz name links on my Leaderboard don't appear to do anything. They link to the leaderboard page with a # at the end.

Anyone?

Zelda-King 09-07-2005 06:11 PM

Funny, I just downloaded and installed this on 3.5 RC2, then got the following error after taking my own quiz as an admin;

Warning: in_array(): Wrong datatype for second argument in /quiz.php on line 352

and the following message;

An error has occured, the following message has been left below:

Your usergroup does not have access to participate in this particular quiz.

I checked and administrators ARE set to have the permissions.

Update: Figured it out. I needed to set the permissions in the admin cp. But.. it's still weird getting the PHP error.

Suggestion: It would be nice to be able to set the userid of the PM sender for the results.

Still, very nice feature!

Update 2: Something seems to be bugged in the Multiple Selection Checkbox: I set two answers, got one of them correct and it gave me 0% for that question.

amykhar 09-08-2005 01:47 AM

If you set an extra answer that's not correct, it cancels out the correct one.

y2krazy 09-08-2005 04:41 PM

I made several changes to the basic templates and I added a footer to most of them as well, like I do with all the other hacks to make them look more streamlined with the forums. Screenshots are included.

Phrase Manager -> Add New Phrase
Varname: quiz_footer
Text: Powered by <b>Inferno Quiz</b> v2.2 by <a href="http://www.infernotechnologies.net/" target="_blank">Zero Tolerance</a>

Style Manager -> Choose the Style to Edit -> "QUIZ"
Replace entire template with:

Code:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
        <title>$vboptions[bbtitle] - $pagetitle</title>
$headinclude
</head>
<body>
$header
$navbar

<if condition="$bbuserinfo[userid]=='0'">


<table class="tborder" cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr>
        <td class="tcat" colspan="3">Guest - No Permissions</td>
</tr>
<tr>
        <td class="thead">Unable To View</td>
</tr>
<tr>
        <td class="alt1" colspan="1">Guests Are Unable To Use The Inferno Quiz System</td>
</tr>
</table>
<br/>

<else />

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
        <tr align="center">
          <td class="alt1"><span class="smallfont"><b><a href="quiz.php">Quiz Home</a></b>  |  <b><a href='quiz.php?{$session[sessionurl]}do=Leaderboard&type={$LB['link']}'>{$LB['text']}</a></b>  |  <b><a href='quiz.php?{$session[sessionurl]}do=SubmitQuiz'>Submit A Quiz</a></b></span></td>
        </tr>
      </table>

<br/>

<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td width='175' valign='top'>
        <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="175" align="center">
        <if condition="is_array($NewestQuiz)">
        <tr>
        <td class="tcat" style="white-space:nowrap">Newest Quiz</td>
        </tr>
        <tr>
        <td class="alt2" align='center'>
        <span class="smallfont">{$NewestQuiz['q_name']}<br />
        {$NewestQuiz['q_image']}</span>
        <br />
        <span class="smallfont"><a href='quiz.php?{$session['sessionurl']}do=Take&id={$NewestQuiz['qid']}'>Take Quiz</a> | <a href='quiz.php?{$session['sessionurl']}do=Stats&id={$NewestQuiz['qid']}'>View Stats</a></span>
        </td>
        </tr>
        </if>
        </table>
</td>

<!-- Spacer Cell -->
<td width="15"><img alt="" src="$vboptions[bburl]/$vboptions[cleargifurl]" width="15" /></td>
<!-- / Spacer Cell -->

        <td width='100%' valign='top'>
        {$quiz_page}
        </td>
</tr>
</table>
{$MenuBuild}
</if>

$footer
</body>
</html>

Style Manager -> Choose the Style to Edit -> "quiz_do_end"
Replace entire template with:

Code:

</tbody>
<tr>
<td class='tfoot' colspan='2' align='center'>
<input type='submit' value='Submit' class='button' />
</td>
</tr>
<tr>
<td class="tcat" align="right" colspan="2"><span class="smallfont">$vbphrase[quiz_footer]</span></td>
</tr>
</table>
</form>

Style Manager -> Choose the Style to Edit -> "quiz_do_question"
Replace entire template with:

Code:

<tr>
                <td class='thead' colspan='2' width='100%'>
                Question Number: {$n}
                </td>
        </tr>
        <tr>
                <td class='alt2' align='left' width='60%'>
                <span class="smallfont"><b>Question:</b> {$Q['q_question']}</span>
                </td>
                <td class='alt1' align='center' width='40%'>
                <span class="smallfont">{$Select}</span>
                </td>
        </tr>

Style Manager -> Choose the Style to Edit -> "quiz_do_top"
Replace entire template with:

Code:

<if condition="$Quiz['q_timelimit'] > 0">
<script type='text/javascript'>
<!--
TimeLeft = 60 * {$Quiz['q_timelimit']}
Submit  = false

        function QuizTime(){
        TimeLeft--

                if(TimeLeft < 1){
                Submit = true
                document.forms['quiz_form'].submit(true)
                }

        Minutes = Math.floor(TimeLeft / 60)
        Seconds = (TimeLeft - (Minutes * 60))

        window.status = "Time Left: "+Minutes+" minute(s), "+Seconds+" second(s)"

                if(!Submit){
                setTimeout("QuizTime()",1000)
                }
        }

setTimeout("QuizTime()",1000)

-->
</script>
</if>

<form action="quiz.php?$session[sessionurl]" method="post" name="quiz_form">
<input type='hidden' name='do' value='subQuiz' />
<input type='hidden' name='qid' value='{$Quiz['qid']}' />


<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<thead>
    <tr>
        <td class="tcat" colspan='2'>
            <a style="float:right" href="#top" onclick="return toggle_collapse('forumhome_quiz_take')"><img id="collapseimg_forumhome_quiz_take" src="$stylevar[imgdir_button]/collapse_tcat.gif" alt="" border="0" /></a>
            <div>Quiz: {$Quiz['q_name']}</div></td>
    </tr>
</thead>
<tbody id="collapseobj_forumhome_quiz_take" style="{$vbcollapse['collapseobj_forumhome_quiz_take']}">
        <tr>
                <td class='thead' align='center' width='60%'>
                Question
                </td>
                <td class='thead' align='center' width='40%'>
                Answer
                </td>
        </tr>

Style Manager -> Choose the Style to Edit -> "quiz_leaderboard_end"
Replace entire template with:

Code:

</tbody>
<tr>
<td class='tfoot' colspan='4'>
<span class="smallfont"><a href='quiz.php?$session[sessionurl]do=Leaderboard&type={$Type}&num=10'>Top 10</a> |
<a href='quiz.php?$session[sessionurl]do=Leaderboard&type={$Type}&num=20'>Top 20</a> |
<a href='quiz.php?$session[sessionurl]do=Leaderboard&type={$Type}&num=30'>Top 30</a> |
<a href='quiz.php?$session[sessionurl]do=Leaderboard&type={$Type}&num=40'>Top 40</a> |
<a href='quiz.php?$session[sessionurl]do=Leaderboard&type={$Type}&num=50'>Top 50</a> |
<a href='quiz.php?$session[sessionurl]do=Leaderboard&type={$Type}&num=60'>Top 60</a> |
<a href='quiz.php?$session[sessionurl]do=Leaderboard&type={$Type}&num=70'>Top 70</a> |
<a href='quiz.php?$session[sessionurl]do=Leaderboard&type={$Type}&num=80'>Top 80</a> |
<a href='quiz.php?$session[sessionurl]do=Leaderboard&type={$Type}&num=90'>Top 90</a> |
<a href='quiz.php?$session[sessionurl]do=Leaderboard&type={$Type}&num=100'>Top 100</a></span>
</td>
</tr>
<tr>
<td class="tcat" align="right" colspan="4"><span class="smallfont">$vbphrase[quiz_footer]</span></td>
</tr>
</table>

Style Manager -> Choose the Style to Edit -> "quiz_leaderboard_row"
Replace entire template with:

Code:

<tr>
                <td class='alt2' align='center' width='1%'>
                <span class="smallfont">{$Count})</span>
                </td>
                <td class='alt2' align='center' width='40%'>
                <span class="smallfont"><a href='quiz.php?{$session['sessionurl']}do=UserStat&userid={$gData['r_userid']}&id={$gData['qid']}'>{$gData['username']}</a></span>
                </td>
                <td class='alt2' align='center' width='1%'>
                <span class="smallfont">{$gData['r_score']}%</span>
                </td>
                <td class='alt2' align='center' width='40%'>
<div id="leaderboard_{$gData['rid']}" width='1%' style='white-space:nowrap;'><span class="smallfont"><a href="#">{$gData['q_name']}</a>  <script type="text/javascript"> vbmenu_register("leaderboard_{$gData['rid']}",1); </script></span></div>
                </td>
        </tr>

Style Manager -> Choose the Style to Edit -> "quiz_main_end"
Replace entire template with:

Code:

</tbody>
<tr>
<td class="tcat" align="right" colspan="4"><span class="smallfont">$vbphrase[quiz_footer]</span></td>
</tr>
</table>

Style Manager -> Choose the Style to Edit -> "quiz_main_row"
Replace entire template with:

Code:

<tr>
                <td class='alt2' align='center' width='1%'>
                <table border='0' width='100%' cellpadding='3' cellspacing='0'>
                <tr>
                <if condition="$Quiz[q_image] != ''"><td width='1%'>{$Quiz['q_image']}</td></if>
                <td>
                        <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
                        <tr>
                        <td class="thead" colspan='4'>{$Quiz['q_name']}</td>
                        </tr>
                        <tr>
                        <td class="alt2" colspan='4'><span class="smallfont">{$Quiz['q_desc']}</span></td>
                        </tr>
                        <tr>
                        <td class="thead">End Date</td>
                        <td class="thead">Take Quiz</td>
                        <td class="thead">View Stats</td>
                        <td class="thead">View Leaderboard</td>
                        </tr>
                        <tr>
                        <td class="alt2"><span class="smallfont">{$Quiz['q_autoend']}</span></td>
                        <td class="alt2"><span class="smallfont"><a href="quiz.php?$session[sessionurl]do=Take&id={$Quiz['qid']}">Take Quiz</a></span></td>
                        <td class="alt2"><span class="smallfont"><a href="quiz.php?$session[sessionurl]do=Stats&id={$Quiz['qid']}">View Stats</a></span></td>
                        <td class="alt2"><span class="smallfont"><a href="quiz.php?$session[sessionurl]do=Leaderboard&type={$Quiz['qid']}">View Leaderboard</a></span></td>
                        </tr>
                        </table>
                </td>
                </tr>
                </table>
                </td>
        </tr>

Style Manager -> Choose the Style to Edit -> "quiz_start"
Replace entire template with:

Code:

<script type='text/javascript'>
<!--

        function rectifyForm(Form){
        Form.action = 'quiz.php?$session[sessionurl]do=Take&id=$_GET[id]'
        }

-->
</script>

<form action="quiz.php?nojs=1" method="post" onsubmit='rectifyForm(this)'>
<input type='hidden' name='quiz_start' value='1' />

<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<thead>
    <tr>
        <td class="tcat" colspan='2'>
            <a style="float:right" href="#top" onclick="return toggle_collapse('forumhome_quiz_start')"><img id="collapseimg_forumhome_quiz_start" src="$stylevar[imgdir_button]/collapse_tcat.gif" alt="" border="0" /></a>
            <div>Start Quiz: {$Quiz['q_name']}</div></td>
    </tr>
</thead>
<tbody id="collapseobj_forumhome_quiz_start" style="{$vbcollapse['collapseobj_forumhome_quiz_start']}">
<tr>
<td class='alt2' colspan='2' align='center'>
        <if condition="$Quiz['q_timelimit'] > 0">
<span class="smallfont">You are about to start this quiz, a time limit has been set, you have exactly {$Quiz['q_timelimit']} minute(s) to complete this quiz, if you don't finish in time, the quiz will auto submit.</span>
        <else />
<span class="smallfont">You are about to start this quiz, there is no time limit set.</span>
        </if>
<br /><br />
<span class="smallfont">Click "Start Quiz" below when you are ready.</span>
</td>
</tr>
</tbody>
<tr>
<td class='tfoot' colspan='2' align='center'>
<input type='submit' value='Start Quiz' class='button' />
</td>
</tr>
<tr>
<td class="tcat" align="right" colspan="2"><span class="smallfont">$vbphrase[quiz_footer]</span></td>
</tr>
</table>
</form>

Style Manager -> Choose the Style to Edit -> "quiz_stats"
Replace entire template with:

Code:

<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<thead>
    <tr>
        <td class="tcat" colspan='2'>
            <a style="float:right" href="#top" onclick="return toggle_collapse('forumhome_quiz_stat')"><img id="collapseimg_forumhome_quiz_stat" src="$stylevar[imgdir_button]/collapse_tcat.gif" alt="" border="0" /></a>
            <div>Quiz Stats: {$Quiz['q_name']}</div></td>
    </tr>
</thead>
<tbody id="collapseobj_forumhome_quiz_stat" style="{$vbcollapse['collapseobj_forumhome_quiz_stat']}">

        <tr>
                <td class='thead' align='center'>
                Average Score
                </td>
                <td class='thead' align='center'>
                Submissions
                </td>
        </tr>

        <tr>
                <td class='alt2' align='center'>
                <span class="smallfont">{$Average}</span>
                </td>
                <td class='alt2' align='center'>
                <span class="smallfont">{$Done}</span>
                </td>
        </tr>

        <tr>
                <td class='thead' colspan='2' align='left'>
                Submissions From (Click To View Results)
                </td>
        </tr>

        <tr>
                <td class='alt1' colspan='2' align='left'>
                <span class="smallfont">{$Submissions}</span>
                </td>
        </tr>
</tbody>
<tr>
<td class="tcat" align="right" colspan="2"><span class="smallfont">$vbphrase[quiz_footer]</span></td>
</tr>
</table>

Style Manager -> Choose the Style to Edit -> "quiz_submit_quiz"
Replace entire template with:

Code:

<script type='text/javascript'>
<!--
Counter = 1

        function PA(){
        txt =  "'Part-Answer' enables a more fluxuating answer check, and example would be:\n"
        txt += "User Answer: in london\n"
        txt += "Actual Answer: London\n\n"
        txt += "This would be classed as correct with 'Part-Answer' turned on."
        txt += "\n\n - This is recommended to be used for answers which contain 'one' (1) word."
        alert(txt)

        return false
        }

        function isBlank(Value){
                if(!Value || Value.replace(/ /g,'') == ''){
                return true
                } else {
                return false
                }
        }

        function stripNQ(Data){
                if(Data.match(/No Questions Currently Added/i)){
                Data = Data.replace(/No Questions Currently Added/i,'')
                }

        return Data
        }

        function getAnswerType(Type){
        OptA    = "<textarea class='bginput' name=\"QuestionData["+Counter+"][Options]\" cols='40' rows='3'></textarea>"
        AnsA    = "<input type='text' class='bginput' name=\"QuestionData["+Counter+"][Answer]\" />"
        AnsB    = "<textarea class='bginput' name=\"QuestionData["+Counter+"][Answer]\" cols='40' rows='3'></textarea>"
        AllowPA = false
       

                switch(Type){

                case '1':
                Options = '<i>You do not need to fill this out for this answer format.</i>'
                Answers = AnsA
                AllowPA = true
                break

                case '2':
                Options = OptA
                Answers = AnsA
                break

                case '3':
                Options = OptA
                Answers = AnsB
                break

                default:
                alert('Invalid answer format type specified')
                return false
                break

                }

        return [Options,Answers,AllowPA,Type]
        }

        function removeQ(Obj){
        Obj.parentNode.parentNode.parentNode.removeChild(Obj.parentNode.parentNode)

                if(document.getElementById('quiz_questions').innerHTML.replace(/ /g) == ''){
                document.getElementById('quiz_questions').innerHTML = "No Questions Currently Added"
                }

        return false
        }

        function wrapBuild(Build){
        return "<tr><td class='panelsurround' align='center'><div class='panel'><div style='width:$stylevar[formwidth_usercp]' align='$stylevar[left]'>"+Build+"</div></div></td></tr>"
        }

        function clearAQForm(){
        document.forms['quiz'].q_new_question.value = ''
        document.forms['quiz'].q_new_type.options.selectedIndex = 0
        }

        function addQuestion(){
        Question = document.forms['quiz'].q_new_question.value.replace(/'/g,"'") // Stop ' choke - change to HTML entity
        AnsType  = document.forms['quiz'].q_new_type
        AnsType  = AnsType.options[AnsType.options.selectedIndex].value
        AnsType  = getAnswerType(AnsType)

        TypeText    = []
        TypeText[1] = "TextBox"
        TypeText[2] = "Radio"
        TypeText[3] = "Multi"

                if(isBlank(Question)){
                alert('You must enter a question!')
                return false
                }


        Build  = "<fieldset class='fieldset'>"
        Build += "<legend class='legend'>Question [<a href='#' title='Remove Question?' onclick='return removeQ(this)'><b>Delete This Question</b></a>]</legend>"
        Build += "<table cellpadding='0' cellspacing='$stylevar[formspacer]' border='0' width='100%'>"
        Build += "<tr>"
        Build += "<td>Type the question you would like to ask here. <a href='misc.php?do=bbcode' target='_blank'>vB Code</a> may be used.<input type='hidden' name='QuestionData["+Counter+"][Type]' value='"+TypeText[AnsType[3]]+"' /></td>"
        Build += "</tr>"
        Build += "<tr>"
        Build += "<td><input type='text' class='bginput' name='QuestionData["+Counter+"][Q]' value='"+Question+"' size='25' maxlength='100' /></td>"
        Build += "</tr>"
        Build += "</table>"
        Build += "</fieldset>"
        Build += "<fieldset class='fieldset'>"
        Build += "<legend>Answer Options</legend>"
        Build += "<table cellpadding='0' cellspacing='$stylevar[formspacer]' border='0' width='100%'>"
        Build += "<tr>"
        Build += "<td>Enter the answers you would like the user to choose from here. Split each answer option with a line-break.</td>"
        Build += "</tr>"
        Build += "<tr>"
        Build += "<td>"+AnsType[0]+"</td>"
        Build += "</tr>"
        Build += "</table>"
        Build += "</fieldset>"
        Build += "<fieldset class='fieldset'>"
        Build += "<legend>Actual Answer(s)</legend>"
        Build += "<table cellpadding='0' cellspacing='$stylevar[formspacer]' border='0' width='100%'>"
        Build += "<tr>"
        Build += "<td>Enter the correct answer(s) to this question here. Split each answer with a line-break(if applicable). What you type here must be <u>exactly</u> the same as one or more of your answer options.</td>"
        Build += "</tr>"
        Build += "<tr>"
        Build += "<td>"+AnsType[1]+"</td>"
        Build += "</tr>"
        Build += "</table>"
        Build += "</fieldset>"
                               
                if(AnsType[2]){
                Build += "<fieldset class='fieldset'>"
                Build += "<legend>Enable Part Answer For This Question</legend>"
                Build += "<table cellpadding='0' cellspacing='$stylevar[formspacer]' border='0' width='100%'>"
                Build += "<tr>"
                Build += "<td><span style='float:$stylevar[right]'><select name=\"QuestionData["+Counter+"][QA]\" class='bginput'><option value='0'>No</option><option value='1'>Yes</option></select></span><a href='#' onclick='return PA()'>What's This?</a></td>"
                Build += "</tr>"
                Build += "</table>"
                Build += "</fieldset>"
                }
        Build  = wrapBuild(Build)

        document.getElementById('quiz_questions').innerHTML  = stripNQ(document.getElementById('quiz_questions').innerHTML)
        document.getElementById('quiz_questions').innerHTML += Build

        Counter++
        clearAQForm()
        return false
        }
-->
</script>

<form action="quiz.php?do=doSubmitQuiz" enctype="multipart/form-data" name="quiz" method="post">

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="tcat">Submit A Quiz</td>
</tr>
<tr>
        <td class="thead">Quiz Settings</td>
</tr>
<tr>
        <td class="panelsurround" align="center">
        <div class="panel">
                <div style="width:$stylevar[formwidth_usercp]" align="$stylevar[left]">
                       
                        <fieldset class="fieldset">
                                <legend>Quiz Title</legend>
                                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
                                <tr>
                                        <td>What would you like your quiz to be called? Use this as a <i>general</i> overview of what the quiz will be asking the user questions over.</td>
                                </tr>
                                <tr>
                                        <td><input type="text" class="bginput" name="q_name" size="25" maxlength="30" /></td>
                                </tr>
                                </table>
                        </fieldset>

                        <fieldset class="fieldset">
                                <legend>Quiz Description</legend>
                                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
                                <tr>
                                        <td>Give a brief description of what your quiz is about. Keep in mind that there is a limit of 255 characters, so if you run out of space, go back and revise your description to be more specific to what your quiz is about.</td>
                                </tr>
                                <tr>
                                        <td><input type="text" class="bginput" name="q_desc" size="25" maxlength="255" /></td>
                                </tr>
                                </table>
                        </fieldset>

                        <fieldset class="fieldset">
                                <legend>Quiz Category</legend>
                                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
                                <tr>
                                        <td>Choose what category your quiz falls under.</td>
                                </tr>
                                <tr>
                                        <td><span style="float:$stylevar[right]"><select name="q_cat" />{$CatBuild}</select></span>
                                        Quiz Category:</td>
                                </tr>
                                </table>
                        </fieldset>

                        <fieldset class="fieldset">
                                <legend>Quiz Image</legend>
                                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                                <tr>
                                        <td>As an additional feature to the Quiz system, you are allowed to upload an image that will help users identify with what you quiz is to be about, such as if it were for a specific TV show, you could include a picture of the cast to prevent confusion with a smiliar quiz.</td>
                                </tr>
                                <tr>
                                        <td>
                                                <input type="hidden" name="MAX_FILE_SIZE" value="999999999" />
                                                <input type="file" class="bginput" name="q_image" size="50" />
                                        </td>
                                </tr>
                                <tr>
                                        <td>Allowed Extensions: .gif, .bmp, .png, .jpg, .jpeg</td>
                                </tr>
                                </table>
                        </fieldset>
                       
                </div>
        </div>
        </td>
</tr>
</table>

<br />

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="thead">Quiz Questions</td>
</tr>
<tr>
        <td class="panelsurround" align="center">
        <div class="panel">
                <div style="width:$stylevar[formwidth_usercp]" align="$stylevar[left]">
                       
                        <fieldset class="fieldset">
                                <legend>Add a Question</legend>
                                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
                                <tr>
                                        <td>Type the question you would like to ask here. Each time you add a question to your quiz, this field will go blank so that you can add another question if you choose to do so.</td>
                                </tr>
                                <tr>
                                        <td><input type="text" class="bginput" name="q_new_question" size="25" maxlength="100" /></td>
                                </tr>
                                </table>
                        </fieldset>

                        <fieldset class="fieldset">
                                <legend>Answer Format</legend>
                                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
                                <tr>
                                        <td>Choose what format you wish your question's answers to be displayed in. The text box will allow the user to <b>type</b> in his or her answer, the radio buttons will allow the user to select only <b>one</b> answer for the question and the checkboxes will allow the user to select <b>one or more</b> of the answers that you specify.</td>
                                </tr>
                                <tr>
                                        <td><span style="float:$stylevar[right]"><select name="q_new_type" />
                                <option value='1'>Single-Line Text Box</option>
                                <option value='2'>Single-Selection Radio Buttons</option>
                                <option value='3'>Multiple-Selection Checkbox</option>
                                </select></span>
                                Answer Format:</td>
                                </tr>
                                </table>
                        </fieldset>

                        <div style="margin-top:$stylevar[cellpadding]px" align="center">
                                <input type="button" class="button" value="Add This Question To Your Quiz" onclick="addQuestion()" />
                        </div>

                </div>
        </div>
        </td>

</tr>
<tr>
<td id="quiz_questions" align="center">
No Questions Currently Added
</td>
</tr>
<tr>
<td class='tfoot' colspan='2' align='center'>
        <div style="margin-top:$stylevar[cellpadding]px">
                <input type="submit" class="button" value="Submit Quiz" accesskey="s" />
                <input type="reset" class="button" value="$vbphrase[reset_fields]" accesskey="r" />
        </div>
</td>
</tr>
<tr>
<td class="tcat" align="right" colspan="2"><span class="smallfont">$vbphrase[quiz_footer]</span></td>
</tr>
</table>
</form>

Style Manager -> Choose the Style to Edit -> "quiz_userstats_end"
Replace entire template with:

Code:

</tbody>
<tr>
<td align="center" colspan="4"><span class="smallfont">Overall Score: {$Overall}%</span></td>
</tr>
<tr>
<td class="tcat" align="right" colspan="4"><span class="smallfont">$vbphrase[quiz_footer]</span></td>
</tr>
</table>

Style Manager -> Choose the Style to Edit -> "quiz_userstats_row"
Replace entire template with:

Code:

<tr>
                <td class='alt2' align='left' width='50%'>
                <span class="smallfont"><b>{$Count})</b> {$Quest['q_question']}</span>
                </td>
                <td class='alt2' align='center' width='10%'>
                <span class="smallfont">{$Result[0]}%</span>
                </td>
                <td class='alt1' align='center' width='20%'>
                <span class="smallfont">{$User_Answers}</span>
                </td>
                <td class='alt1' align='center' width='20%'>
                <span class="smallfont">{$Real_Answers}</span>
                </td>
        </tr>

Style Manager -> Choose the Style to Edit -> "quiz_userstats_top"
Replace entire template with:

Code:

<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<thead>
    <tr>
        <td class="tcat" colspan='4'>
            <a style="float:right" href="#top" onclick="return toggle_collapse('forumhome_quiz_userstat')"><img id="collapseimg_forumhome_quiz_userstat" src="$stylevar[imgdir_button]/collapse_tcat.gif" alt="" border="0" /></a>
            <div>Quiz Stats For User: {$Quiz['username']}</div></td>
    </tr>
</thead>
<tbody id="collapseobj_forumhome_quiz_userstat" style="{$vbcollapse['collapseobj_forumhome_quiz_userstat']}">
        <tr>
                <td class='thead' align='left' width='50%'>
                Question
                </td>
                <td class='thead' align='center' width='10%'>
                Correct
                </td>
                <td class='thead' align='center' width='20%'>
                Users Answer(s)
                </td>
                <td class='thead' align='center' width='20%'>
                Actual Answer(s)
                </td>
        </tr>

You can test the Inferno Quiz out yourself at my site if you wish, too(see my sig for a link).

Paul_Hollibone 09-15-2005 11:17 PM

This may sound crazy, but from a noobs point of view, I believe I have a good question.

How do you "remove" this addition?

kall 09-15-2005 11:21 PM

*engages AWOOGA subroutine*

Conflict Alert!!

Cannot redeclare pm_send (or whatever it is) when using AWS Advanced Warning hack.

I temp fixed it by adding an IF THIS_SCRIPT != 'quiz'{ wrapper to the global thing from AWS. :)

Kru 09-16-2005 04:46 AM

Quote:

Originally Posted by kall
*engages AWOOGA subroutine*

Conflict Alert!!

Cannot redeclare pm_send (or whatever it is) when using AWS Advanced Warning hack.

I temp fixed it by adding an IF THIS_SCRIPT != 'quiz'{ wrapper to the global thing from AWS. :)

I have this problem but don't really understand how you fixed it? :(

freebase69 09-16-2005 10:09 PM

I got 4 quizzes, with images, I would like to share with everyone. They are Star Wars quizzes that I think most people will enjoy. Check em out.

Laterz

-woops almost forgot. I don't know if it makes any difference but I am running 3.5 RC3. I guess they will work unless someone tells me differently hehe.

sportfishermen 09-17-2005 02:43 PM

Hi

this quiz only allows a user to take the quiz once. is there a way that users can take the quiz more than once. i'll be using this quiz for a practice test site.

Thanks in advance.

kylek 09-17-2005 06:54 PM

Is there any way to increase the amount of characters allowed for the questions, looks like it is set for 100 only, have some questions that cant be shortened or edited down.


All times are GMT. The time now is 04:22 PM.

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.02033 seconds
  • Memory Usage 1,998KB
  • 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
  • (14)bbcode_code_printable
  • (10)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