Page 16 of 32

Re: [BETA 4] Ultimate Quiz MOD v2.0.0 Progress

Posted: Fri Feb 05, 2010 2:41 pm
by subvertbeats
No problem - nice to be able to contribute something, even if so small, after all the help youve given me.


Quick question about the survey results in B4

As you recall, due to the nature of our quizzes (predictions) I disable the 'show answers' option as its meaningless in our context.

But Id still like to be able to show users a page with the 'survey graph' that shows the distribution of predictions.

Is it possible to formulate a link to show that based on the quiz ID?


Another couple of Q's about points:

a) is there a points mod that you recommend?
b) since updating to b4, I am unable to select 'yes' in the 'Turn on points compatibility' option. Is that because I dont have a point mod installed?

Re: [BETA 4] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sat Feb 06, 2010 1:01 am
by cs_ych
Hi battye, this mod is really great~! But I found there are few bugs requires to fix:
  • quiz.php line 632

    Code: Select all

    $save_type = request_var('submit', '');
    should be something like this:

    Code: Select all

    $save_type = utf8_normalize_nfc(request_var('submit', '', true));
    otherwise, non English language type cannot submit or save quizes
  • quiz.php line 722 and 670

    Code: Select all

    $given_user_input = request_var('question' . $give_question_id, '');
    should also be something like this:

    Code: Select all

    $given_user_input = utf8_normalize_nfc(request_var('question' . $give_question_id, '', true));
hope it could help~ Thanks!

Re: [BETA 4] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sat Feb 06, 2010 7:09 am
by battye
Thanks for telling me about those bugs cs_ych! I hope the next release will be RC1 (I'm giving Beta 4 a bit of time for public use in case people find any bugs :wink:) so those UTF8 bugs you pointed out are on the list of things to do. :)

Things to do for RC1 are:

- Stats high percentage bug (subvertbeats)
- UTF8 bugs (cs_ych)


:)

subvertbeats, I see no reason why you can't use the survey feature. Turn it on in the ACP and see what happens :)
I haven't used any phpBB3 points/cash modifications so I have no recommendations. And yes, you can't turn on points compatibility unless the points MOD is installed - that's why the field is not clickable (this was a good idea, thanks to mtrs for that idea).

Re: [BETA 4] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sat Feb 06, 2010 8:53 am
by subvertbeats
Hi battye

Well I had turned it on and to this point (even after recreating that quiz having uncommented that line out, per the PM) Im still not seeing any survey results on the submit page.

Re: [BETA 4] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sat Feb 06, 2010 9:04 am
by battye
It's most likely connected to this: http://forums.cricketmx.com/viewtopic.p ... 479#p99479
If there are no stats in the database, there are no surveys to display. :)

Re: [BETA 4] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sat Feb 06, 2010 9:07 am
by subvertbeats
as above, even having deleted the old quiz, recreated a new one, and several entries later....survey doesnt show.
I know that stats are correctly being recorded as i temporarily threw a couple of debug echos in various places to confirm.

is the quiz statistics overview table used for the survey (as the line that enters data into that table we still comment out from quiz.php) ?

Re: [BETA 4] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sat Feb 06, 2010 9:10 am
by battye
No, it is the quiz_statistics table that is responsible for the surveys. (this is the line you leave uncommented)

Is there any data in the quiz_statistics table?

Re: [BETA 4] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sat Feb 06, 2010 9:20 am
by subvertbeats
battye wrote:No, it is the quiz_statistics table that is responsible for the surveys. (this is the line you leave uncommented)

Is there any data in the quiz_statistics table?
yes its recording data as normal now....

in the template (quiz_results_body.html) I have commented out some lines (eg RESULTS_SUMMARY, TIME_SUMMARY) but the following code is still active

Code: Select all

	<!-- IF U_SURVEYS_ON -->
	<div class="panel">
	<div class="inner"><span class="corners-top"><span></span></span>
	<h3>{L_QUIZ_SURVEY_FEATURE}</h3>

	<p>{L_QUIZ_SURVEY_FEATURE_EXPLAIN}</p>

	<fieldset class="polls">
	<!-- BEGIN survey_question_row -->
		<dl class="">
			<dt><br /><strong>{survey_question_row.QUESTION}</strong><br /><br /></dt>
		</dl>
		<!-- BEGIN survey_row -->
		<dl>
			<dt>{survey_question_row.survey_row.ANSWER}</dt>
			<dd class="resultbar"><div class="pollbar1" style="width:{survey_question_row.survey_row.PERCENT}%;">{survey_question_row.survey_row.COUNT}</div></dd>
			<dd>{survey_question_row.survey_row.PERCENT}%</dd>
		</dl>
		<!-- END survey_row -->
	<!-- END survey_question_row -->
	</fieldset>
	<span class="corners-bottom"><span></span></span></div>
	</div>
	<!-- ENDIF -->
so not sure why it shouldnt be showing...

Re: [BETA 4] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sat Feb 06, 2010 9:35 am
by battye
Surveys are enabled in the ACP?

Re: [BETA 4] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sat Feb 06, 2010 9:46 am
by subvertbeats
indeed they are, and validated that fact in the DB too...

Re: [BETA 4] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sat Feb 06, 2010 9:58 am
by subvertbeats
by the way this is by no means urgent :)

Re: [BETA 4] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sat Feb 06, 2010 10:10 am
by battye
Have you purged the cache since you updated to Beta 4?

Re: [BETA 4] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sat Feb 06, 2010 10:20 am
by subvertbeats
yes, a few times now - both specifically deleted that template cache, and done a general purge cache.

Re: [BETA 4] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sat Feb 06, 2010 10:45 am
by battye
OPEN quiz.php

FIND

Code: Select all

				$template->assign_vars( array(
					'U_SURVEYS_ON'				=> ($survey_question_answers_progress && $survey_results_on),
BEFORE ADD:

Code: Select all

$test123 = ($survey_question_answers_progress && $survey_results_on);
echo 'RES: ' . $test123;
What is the output when trying to view a survey?

Re: [BETA 4] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sat Feb 06, 2010 4:27 pm
by subvertbeats
I will make that change and try - but is there a way to view a survey without going through the submit form?
Since we have the option set to only play once, I cant resubmit (I could create a new user for the purpose of the test but I dont want to affect the results)
Cheers!