vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Inferno Quiz v2.1 (https://vborg.vbsupport.ru/showthread.php?t=80780)

amykhar 05-27-2005 10:52 PM

Here's a quick and dirty mod to PM the person of your choice when a quiz has been submitted and is ready for review.

In quiz.php
Find:
Code:

header("Location: quiz.php?sub=1");
Add Above (change the word userid in both places to the userid of the member you want notified.):
Code:

        $PM = "A quiz has been submitted for review.";

        // Send PM
        SendPM($PM,"Quiz Submitted for Review",userid,userid);


Neutral Singh 05-28-2005 04:41 AM

First of all i must say ...

ZT & Inferno Quiz ROCKS !!!!

Thank You !!!!

Quote:

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

You may only view user stats if you have completed the quiz.
As an admin, when i click on view stats --> click on a membername option, i get this error, i think as an admin i should have the previliage to view the results without having to go to admincp everytime a members chooses to get quizzed. There should be no problem ethically as afterall i am the person who devised to quiz. :devious: Just a suggestion for future versions.


Quote:

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

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

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

Warning: in_array(): Wrong datatype for second argument in /includes/engine.quiz.php on line 540
I was moderating quiz results for one of the members when i encountered the above error. An snapshot is attached in this message.


And Lastly, a member should have the facility of taking the same quiz more than once. This is a must be there feature in my view.

Thanks and Best Regards

Zero Tolerance 05-28-2005 08:00 AM

It would appear that error is caused from the answer not being an array for some form of reason. You can change on line 540 of engine.quiz.php this:
PHP Code:

$Selected = (in_array($key,$Data) && trim($Data) != '')? " checked='checked'" ""

To:
PHP Code:

$Selected = (@in_array($key,$Data) && trim($Data) != '')? " checked='checked'" ""

It should solve the problem.

- Zero Tolerance

amykhar 05-29-2005 04:12 PM

Feature requests for the next version:
I love the quiz system, but I find two things tiresome.
1. When I create a quiz and start adding questions to the quiz, I don't like having to select the quiz from the dropdown each time I add a new question. Is it possible to store the name of the latest quiz that a question was added to, and remember that value in the dropdown for subsequent question additions? Then, if I need to change quizzes, I can but for those of us who generally add 10 or more questions at a time to the same quiz, we won't have to keep making that selection, which gets cumbersome once you have a significant number of quizzes.

2. If possible, allow us to set default permissions for taking quizzes and viewing the stats of quizzes. Then, we can use the default settings for most quizzes, but adjust for special quizzes that we want to restrict to certain user groups.

I'm willing to do the coding and send it to you if you are busy or need help. The only reason I make the suggestion here is that I am trying to keep my own private version from making two many forks from your standard.

Also Zero, give me a yell if you want my code to have quizzes show who wrote them, allow quiz authors to take their own quiz multiple times without showing their score, and to show a "Quiz already Taken" message for people who have taken a given quiz instead of the Take Quiz link.

Amy

banshee 05-29-2005 06:07 PM

I installed this hack and love it, however I use the quiz for contests for prizes. So it is hard to see what peoples scores are so i modified the quiz.php so it sorts the usernames and shows the %. Making it easy to see who the top Members are.

I hope this isn't against the rules if it is just delete the post

Modify the SQL statment to order the results by score so the highest scores are listed at the top.

Code:

// Get All The Results
                $Get_Results = $DB->query("
                select u.username,
                r.r_userid,r.r_score
                from ".TABLE_PREFIX."quiz_results r
                left join ".TABLE_PREFIX."user u on(u.userid=r.r_userid)
                where r.r_forquiz = '{$Quiz['qid']}' ORDER BY r.r_score DESC
                ");

Change the Result display so it formats and shows the % correct.

Code:

$Results[] = "<tr><td><a href='quiz.php?$session[sessionurl]do=UserStat&userid={$Result['r_userid']}&id={$Quiz['qid']}'>{$Result['username']}
</a></td> <td>{$Result['r_score']}%</td></tr>";

Hopefully everyone finds this useful like I do.

Neutral Singh 05-30-2005 04:39 AM

Quote:

Originally Posted by Zero Tolerance
It would appear that error is caused from the answer not being an array for some form of reason. You can change on line 540 of engine.quiz.php this:
PHP Code:

$Selected = (in_array($key,$Data) && trim($Data) != '')? " checked='checked'" ""

To:
PHP Code:

$Selected = (@in_array($key,$Data) && trim($Data) != '')? " checked='checked'" ""

It should solve the problem.

- Zero Tolerance

Yes Sir !! It did the trick !! The error seems to be gone... Thanks :)

Neutral Singh 05-30-2005 04:40 AM

And yeah i forgot to thank you for Quiz Packs... Thanks !!!!

amykhar 05-30-2005 04:38 PM

For those of you who downloaded my dead or alive quiz, you need to remove the Eddie Albert question or change the answer. He died this weekend.

Amy

axi 05-30-2005 04:40 PM

r.i.p.

updated :)

amykhar 05-30-2005 05:23 PM

Here's a little mod that some of you may find useful.

Right now, whenever you add a quiz question, the dropdown box comes up to the first Quiz in the list. This little mod makes the dropdown remember the last quiz that you added a question to. The next time you add a question, the dropdown list of Quizzes will be set to that last quiz.


All times are GMT. The time now is 11:09 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.01408 seconds
  • Memory Usage 1,763KB
  • 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
  • (4)bbcode_code_printable
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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