Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Test Your Members' Knowledge Before Allowing Them to Post in Certain Forums Details »»
Test Your Members' Knowledge Before Allowing Them to Post in Certain Forums
Version: 1.00, by amykhar amykhar is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Version: 3.5.0 RC1 Rating:
Released: 07-31-2005 Last Update: 08-03-2005 Installs: 32
DB Changes Uses Plugins
 
No support by the author.

This mod is an addon to the Inferno Quiz System You must have that mod installed and working to use this.

What it does: It requires users to achieve a minimum score on a specified quiz to post in a forum.
Example: You have a PHP discusssion forum for advanced coders. You don't want novices bothering your members with trivial questions. So, you require anybody who wishes to post in that forum to achieve a minimum score of 70% on an advance PHP quiz that you created using Inferno Quiz.

How to install it: Import the Product. Done. No template edits, nothing else to do.

How to use it: In your admincp forum manager, edit the forum(s) you wish this to use this mod for. Enter a Quiz ID and the minimum acceptable score. Save the forum. You're done.

You can easily require users to pass different quizzes to be able to post in different forums. If a user has not taken the quiz, he is directed to do so. If he has failed the quiz, he sees an error message.

I don't expect many of you will use this. I'm not even using it. But, the idea hit me and it was fun to throw together.

Amy

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 06-08-2008, 04:38 AM
TFEX TFEX is offline
 
Join Date: May 2008
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It seems to be working fine for me in 3.7, no importing errors, but I am still configuring the adminCP options. They are there, however.

My questions are silly ones:

1. Where do I find the quiz id I need to enter?

2. What do I enter for a score? A percentage, or 10/10, etc.?

3. If a user fails, are they able to try again? Would be kind of silly if they were not.

4. Once the quiz is completed for a user, does it go away, or will they have to do it every time they enter the forum?

Thanks.
Reply With Quote
  #43  
Old 06-10-2008, 12:18 AM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, they are there, but there is no blockade for users. I can still access the forum, without entering any quiz. In fact I do not get anything that alerts to the existence of a quiz.

1. You can go to quiz.php and browse quizzes. quiz.php?do=Take&id=X where X is quizID.
2. Yes, a percentage.
3. I have no idea. I have not seen a function to stop retries. So I guess members cn try again and again. So multiple choice is not adviced.
4. So far they do not have to enter anything.
Reply With Quote
  #44  
Old 06-10-2008, 12:12 PM
TFEX TFEX is offline
 
Join Date: May 2008
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey thanks for answering Alfa!

Great info, thanks for your help. I'm just not too clear on #4...

What I am looking for is for members to be able to enter the forum after they pass the quiz, without having to take it every time. Is there a flag that is set or something so that the forum remembers they have passed?

Ahh I'll test it out myself tonight and let you know. I'm ready to give it a go. My forum isn't live yet so I'll be sure to keep you updated on any issues I might have in 3.7, and maybe we can work them out together. I'm setting it up to quiz members on the specific rules for that particular forum, so I consider this hack ESSENTIAL, and I intend to make it work any way I can with my limited knowledge, haha.
Reply With Quote
  #45  
Old 06-12-2008, 11:52 PM
TFEX TFEX is offline
 
Join Date: May 2008
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I apologize profusely, but I looked through the quiz.php and I do not find any mention of specific quiz id's. Shouldn't the quiz I import have the id somewhere in plain sight? This is getting frustrating now, I've been working on this hack for three days. I think I'll just scrap it and redesign my rules. Coders have great minds and come up with the most interesting things, but they're not very good at relating those things to regular people. This, for instance:

Quote:
p.s. If you want your users to have to pass the quiz before they can even read in your forum, copy the plugin code from newthread_start and create new plugins using forumdisplay_start and showthread_start as the hooks with the same source code.
Sure, no problem. Right after I design a better space shuttle for NASA, give me a few minutes.

Sadly, this could have been a great hack if it just had more user-friendly install and configuration options. I am bitterly disappointed, because I feel it's something my forum won't be able to do without.
Reply With Quote
  #46  
Old 06-13-2008, 09:56 AM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can find the quizID, by looking at the url. I know it is stupid to have to do it this way, but once you see it, it will be simple. For example:
- Browse to www.yoursite.com/forum/quiz.php
- Then select the category the quiz that you need the quizID from, is in. That url should look like this www.yoursite.com/forum/quiz.php?do=Cat&id=1
- Then select the quiz that you need the quizID from.
- This url should look like:
www.yoursite.com/forum/quiz.php?do=Take&id=1
In my example above '1' is the quizID. Please take a look at your url and note down your quizID.
Reply With Quote
  #47  
Old 06-13-2008, 08:03 PM
TFEX TFEX is offline
 
Join Date: May 2008
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok so I knocked that one off, thanks again, now I am getting (what appears to be standard from reading the other posts) the "cannot find phrase 'quiz_not_taken'" error.

I created the phrase and assigned it to the product "Must pass quiz to start", but no results. I saw others were having this problem, but there was no solution offered by the coder. Have you managed to figure this one out?

I altered the plugin code from this:

Code:
eval(standard_error(fetch_error('quiz_not_taken',
to this:

Code:
eval(standard_error(fetch_error($vbphrase[quiz_not_taken],
which changed the error message to this:

Quote:
Could not find phrase 'You have not yet taken the quiz to enter this forum. You must do so in order to access it.'.
which is the phrase I assigned to the variable.

I am not very proficient at this so I can only assume I am doing something wrong here. I am so close I can taste it though. Any other suggestions?
Reply With Quote
  #48  
Old 06-13-2008, 09:20 PM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

People will be able to enter the forum, even if they do not pass the quiz.
They will not be able to post if they do not pass.

It seems that there is only a reference to the phrase, but not the phrase itself. The only phrase that this mod seems to add, is quizID prase.

quiz_failed is also not there.
Maybe these phrases once where in Inferno Quiz.
Reply With Quote
  #49  
Old 06-14-2008, 12:25 AM
TFEX TFEX is offline
 
Join Date: May 2008
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
People will be able to enter the forum, even if they do not pass the quiz.
They will not be able to post if they do not pass.
Yeah I gathered that already from this:

Quote:
p.s. If you want your users to have to pass the quiz before they can even read in your forum, copy the plugin code from newthread_start and create new plugins using forumdisplay_start and showthread_start as the hooks with the same source code.

I haven't tested that, but it should work.
Although I have no idea how to go about implementing it... it will be the hurdle I undertake after I get it working.

Quote:
It seems that there is only a reference to the phrase, but not the phrase itself. The only phrase that this mod seems to add, is quizID prase.

quiz_failed is also not there.
Maybe these phrases once where in Inferno Quiz.
Interesting, so what you are saying is you've never solved the issue then? I'll have a look for those references in the plugin code and see what removing them altogether accomplishes, or possibly changing the reference to whatever similar phrase is currently used in Inferno. Would seem like the next logical step to take...
Reply With Quote
  #50  
Old 06-14-2008, 01:09 AM
TFEX TFEX is offline
 
Join Date: May 2008
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok there seems to be a problem with this code in Amy's plugin:

Code:
else 
		{

			eval(standard_error(fetch_error('quiz_failed', $foruminfo['score'], "<a href='quiz.php?do=Take&id=".$foruminfo[quizid]."'>$quizinfo[q_name]</a>")));   
		}
	}
	else
	{
	  
    eval(standard_error(fetch_error('quiz_not_taken', $foruminfo['score'], "<a href='quiz.php?do=Take&id=".$foruminfo[quizid]."'>$quizinfo[q_name]</a>")));  
	}
}
Now I am not sure if it's her code or Inferno's yet, so I am going to remove everything and re-install inferno from the ground up using the xml import and making all the necessary mods to the code for 3.7, essentially make sure it works beyond a doubt, and then I'll throw the plugin back in to see what happens. Shouldn't take long, I'll get back to ya.
Reply With Quote
  #51  
Old 06-14-2008, 03:23 AM
TFEX TFEX is offline
 
Join Date: May 2008
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, well I have managed to get it to work, as in I can set a quiz id to the forum and I get denied posting access, and after I take that particular quiz I can post no problem. What I am having difficulty with is getting the plugin to find the phrases we've been talking about. Once it finds them ok, I can edit them to say whatever I like, even point directly to the quiz if I want.

I edited the xml file for the plugin and added the phrases in there, uninstalled and re-imported, and it puts the phrases into the phrase manager, but the code in the plugin is still not pointing to them correctly. So basically I have confirmed what I said above, that there is a problem with those lines in the code. In particular, these parts of the lines:

Code:
eval(standard_error(fetch_error('quiz_not_taken',
same goes for the "quiz_failed" line.

Here is where my limited knowledge comes into play, as I do not know how to alter those lines to point to the proper phrase, ie "$vbphrase[quiz_not_taken]" So far my attempts have produced mixed results from the standard error:
Quote:
test, you do not have permission to access this page. This could be due to one of several reasons:

1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
to the one I mentioned before:
Quote:
Could not find phrase 'You have not yet taken the quiz to enter this forum. You must do so in order to access it.'.
Which is actually pretty close to what I want, minus the "Could not find phrase" of course...

I do not really need the plugin to jump right to the quiz, just to the phrase, and I can direct users to the quiz from there. Any suggestions? I was thinking the entire lines need to be reworked and the error references taken right out, replaced with something that simply directs users to that particular phrase. I will keep going, at least I am making some progress here.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:53 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.04418 seconds
  • Memory Usage 2,319KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete