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)

Stefano Virgill 04-25-2008 12:54 PM

Installing their integration plugin:
http://www.vbcredits.com/forum/showthread.php?t=18

321Go 05-03-2008 02:28 PM

Could someone wip up a script and where to put it for me to increase the size of my submit question box?

TimberFloorAu 05-30-2008 03:54 AM

Has anyone managed to enable people to take the test again and again?

We keep getting error when ppl try to retake the test/quiz

Vinyljunky 06-05-2008 11:16 AM

Ability in main options to choose default usergroups to participate/view results to be auto filled in when adding quizzes.

I have a small problem in that the admincp keeps asking me to login again, and again in a loop. It only happens when i try and set multiple quizzes to open :confused:

Can anybody help?

Thanks

VJ

smokey 06-10-2008 06:20 AM

Quote:

Originally Posted by Vinyljunky (Post 1541439)
Ability in main options to choose default usergroups to participate/view results to be auto filled in when adding quizzes.

I have a small problem in that the admincp keeps asking me to login again, and again in a loop. It only happens when i try and set multiple quizzes to open :confused:

Can anybody help?

Thanks

VJ

I get that trying to open even one quiz. Assuming the author does not have time to fix, I'll get it working and post a fix if I have time to review the code. Hopefully he'll update. :)

Boofo 06-13-2008 09:59 AM

Does anyone have a fixed 3.7.1 update for this that I might be able to talk them out of? ;)

TFEX 06-14-2008 07:51 PM

I am using this hack solely for the purpose of restricting entry to certain forums based on a user's knowledge of the rules.

Alfa1 and I have worked together and applied a band-aid solution for Amy's hack Test Your Members' Knowledge Before Allowing Them to Post in Certain Forums. My coding knowledge is limited, but the addon at least works again.

My question now, has been asked no less than four other times by others in this thread with no response, so please do not tell me to go read. I have.

Where do I have to edit to allow users to take a quiz over and over again? I noticed Amy's addon (above) has a phrase that redirects users back to a quiz if they fail, but what's the point in that if they can't take it more than once?

I have spent well over 72 hours working on this hack and the addon, and I am almost finished, so if anyone knows how to do this, please take the time to share the info as I have. Thanks.

TFEX 06-14-2008 08:14 PM

Well here's the answer:

Edit your Quiz.php file and look for this:
Code:

                {
                RunError("You have already taken this quiz.");
                }

Replace with this:
Code:

;
You will find it twice. Replace both instances, re-upload. Good to go.

TFEX 06-15-2008 01:27 AM

OK I finally have it all set up the way I want it. Users can take the quiz as many times as they need to, and (as per Amy's mod) now have to take a quiz and pass to post in a specific forum. Although the access does not take effect until the quiz submissions have been moderated and all failing results removed (even if the user has passed in a subsequent attempt). So my next hurdle:

Is there a way to bypass the moderation altogether and have a user's latest score overwrite their previous one? In a forum of xx thousand users I could see moderating all the results everyday becoming quite tedious.

If not that, then perhaps some kind of "mass-moderation" option that simply checks for test scores in the moderation queue that are lower than the passing requirement and deletes them?

Either of these would be a viable option, I would prefer the first one though. Any suggestions as to where to start?

TFEX 06-15-2008 03:00 AM

I am assuming I could alter the admin_quiz.php file in this area somehow:

Code:

// ###################### Do Inferno Quiz Delete Result ########################
if ($_POST['do'] == "do_delete_result") {

        // ----------------------------
        // Assume The Result Exists
        // ----------------------------

        if(!$result = $DB->query_first("select u.username,r.* from ".TABLE_PREFIX."quiz_results r left join ".TABLE_PREFIX."user u on(u.userid=r.r_userid) where r.rid = '".intval($_POST['id'])."'")){
        echo "Result Was Unable To Be Found In Your Database [<a href='javascript:history.go(-1);'>Back</a>]";
        exit;
        }

        // ----------------------------
        // Did we want to delete?
        // ----------------------------

        if($_POST['verify']){

        // ----------------------------
        // Yes we did...
        // ----------------------------

        // Delete Result

        $DB->query("delete from ".TABLE_PREFIX."quiz_results where rid = ".intval($_POST['id'])."");

        $Engine->Redirect(
        "Result Deleted Successfully",
                array(
                        array("Moderate Quiz Results","?do=results"),
                )
        );

        } else {

        // ----------------------------
        // No we didn't...
        // ----------------------------

        $Engine->Redirect(
        "Result Not Deleted",
                array(
                        array("Moderate This Result","?do=moderate_user_results&id={$_POST['id']}"),
                        array("Moderate Quiz Results","?do=results"),
                )
        );

        }



}


using the code from this line:

Code:

        $DB->query("delete from ".TABLE_PREFIX."quiz_results where rid = ".intval($_POST['id'])."");
and adding these variables taken from Amy's mod:

Quote:

$foruminfo['score'] $quiztaken['r_score']
but I have no idea how to put it together, or where to put it after it is together... so as to automatically check and delete at set intervals etc. and, of course, we don't want to be constantly querying the database now, do we? Perhaps even a button added in the code above that performs this function manually, rather than on an automatic timer (ie "hit the button, all results below a certain percentage are deleted").

These reasons are why overwriting the results on each subsequent attempt would be a much more attractive option. I don't care if I have to hard-code it in rather than make it a selectable option, as I only plan to use this mod for the aforementioned purpose anyway.


Any coders out there interested in breezing through this one? If I can get this far with no coding knowledge whatsoever, I imagine you guys could throw something useable up here between lighting up your smoke and putting it out. I'd appreciate any help you could offer. Thanks.


All times are GMT. The time now is 06:12 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.01711 seconds
  • Memory Usage 1,756KB
  • 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
  • (2)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