Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Darren Comeau

    (@decomeau)

    PS, any reason not to have the ability to accept reject as implemented for quizzes? I’d be happy to try and add that in.

    All (1) | Unviewed (0) | Accepted (1) | Rejected (0)

    Thread Starter Darren Comeau

    (@decomeau)

    Hi Ollie/Team

    It does appear that the quiz behaves much better than the survey.

    I’ve not mentioned before; the whole plugin is very good and it has obviously taken lots of hard work.

    There are a number of bugs however. Do you have any bug tracking software or do you prefer a thread in this forum / bug? Most I’ve seen are minor admin interface glitches so don’t affect the user experience.

    Cheers,

    Darren.

    Thread Starter Darren Comeau

    (@decomeau)

    Ollie,

    It does seem that we’re doing two different things, are you looking at a survey or quiz? I assume they use the same code to display a question regardless of quiz or survey.

    I’ll have more of a poke around tonight as I’d like to know why we’re experiencing different things. My install may be a bit iffy.

    Cheers,

    Darren.

    Thread Starter Darren Comeau

    (@decomeau)

    Hi Ollie,

    I think I’ve fixed a bug with this radio/check box setup.

    As I’ve tried to report, when you choose the “multiple choice” option you end up with radio buttons instead of check boxes.

    I’ve traced this code to the file \wp-survey-and-quiz-tool.2.1\wp-survey-and-quiz-tool\pages\site\questions\multiple.php
    errors on lines 4 and 12

    <input type=”<?php echo ($question[‘type’] == ‘Single’ || $question[‘type’] == ‘Multiple Choice’ ) ? ‘radio’ : ‘checkbox’; ?>” name=”answers[<?php echo $questionKey; ?>][]” value=”<?php echo $answerKey; ?>” id=”answer_<?php echo $question[‘id’]; ?>_<?php echo $answerKey;?>” <?php if ( (isset($answer[‘default’]) && $answer[‘default’] == ‘yes’) || in_array($answerKey, $givenAnswer)) { ?> checked=”checked” <?php } ?> /> <label for=”answer_<?php echo $question[‘id’]; ?>_<?php echo $answerKey;?>”><?php echo htmlentities( $answer[‘text’] ); ?></label>

    <input type=”radio” name=”answers[<?php echo $questionKey; ?>]” value=”0″ id=”answer_<?php echo $question[‘id’]; ?>_other”>

    For line 4 I removed the section in bold. for Line 12 I replaced “radio” with checkbox. Now I can view the survey with checkboxes and when I submit with multiple boxes checked they are recorded in the results correctly. It looks like this was correct at one stage then perhaps modified to work around another bug? Any ideas?

    Below is the diff;

    4c4
    < <input type=”<?php echo ($question[‘type’] == ‘Single’ || $question[‘type’] == ‘Multiple Choice’ ) ? ‘radio’ : ‘checkbox’; ?>” name=”answers[<?php echo $questionKey; ?>][]” value=”<?php echo $answerKey; ?>” id=”answer_<?php echo $question[‘id’]; ?>_<?php echo $answerKey;?>” <?php if ( (isset($answer[‘default’]) && $answer[‘default’] == ‘yes’) || in_array($answerKey, $givenAnswer)) { ?> checked=”checked” <?php } ?> /> <label for=”answer_<?php echo $question[‘id’]; ?>_<?php echo $answerKey;?>”><?php echo htmlentities( $answer[‘text’] ); ?></label>

    > <input type=”<?php echo ($question[‘type’] == ‘Single’ ) ? ‘radio’ : ‘checkbox’; ?>” name=”answers[<?php echo $questionKey; ?>][]” value=”<?php echo $answerKey; ?>” id=”answer_<?php echo $question[‘id’]; ?>_<?php echo $answerKey;?>” <?php if ( (isset($answer[‘default’]) && $answer[‘default’] == ‘yes’) || in_array($answerKey, $givenAnswer)) { ?> checked=”checked” <?php } ?> /> <label for=”answer_<?php echo $question[‘id’]; ?>_<?php echo $answerKey;?>”><?php echo htmlentities( $answer[‘text’] ); ?></label>
    12c12
    < <input type=”radio” name=”answers[<?php echo $questionKey; ?>]” value=”0″ id=”answer_<?php echo $question[‘id’]; ?>_other”> <label for=”answer_<?php echo $question[‘id’]; ?>_other”>Other</label> <input type=”text” name=”other[<?php echo $questionKey; ?>]” value=”” />

    > <input type=”checkbox” name=”answers[<?php echo $questionKey; ?>]” value=”0″ id=”answer_<?php echo $question[‘id’]; ?>_other”> <label for=”answer_<?php echo $question[‘id’]; ?>_other”>Other</label> <input type=”text” name=”other[<?php echo $questionKey; ?>]” value=”” />
    15c15
    <
    \ No newline at end of file

    >

    I can’t find how to enable the ‘other’ option, might not be looking at the correct menu.

    Cheers,

    Darren.

    Thread Starter Darren Comeau

    (@decomeau)

    Hi Ollie,

    I’ve upgraded to 3.2.1 and checked that I’m running PHP version 5.3.3. Still getting the error but I also note that the plugin has a new version 2.1 and also wonder if there’s some data held in the tables so will try the upgrade of plugin and create a new survey and see where that leaves me.

    Regards,

    Darren.

    Thread Starter Darren Comeau

    (@decomeau)

    Ollie,

    That’s promising then. I shall do the upgrade tonight and see if that resolves the important issues. I’ll check PHP too.

    In my survey I have no need for default answers at this moment.

    Thanks for your suggestions.

    Darren.

    Thread Starter Darren Comeau

    (@decomeau)

    Hi Ollie,

    Thanks. I noted that the minimum version for WP supported is 3.1, I am using 3.0.5 that comes with Debian Larry so I will upgrade to elimitate this as cause.

    Cheers,

    Darren.

    Thread Starter Darren Comeau

    (@decomeau)

    NB,

    On the “WP Survey And Quiz Tool – Questions” page the count of all, multiple, single and free text questions is not correct.

    all (15)
    Multiple (0)
    Single (0)
    Free Text (5)

    Should be;

    all (15)
    Multiple (3)
    Single (7)
    Free Text (5)

Viewing 8 replies - 1 through 8 (of 8 total)