Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter BingDai

    (@bingdai)

    I went ahead and did some hacking.

    I changed the “function ssquiz_print_question( &$current_question, &$info )” function in client-quiz.php. Now the “click text to select a button” mechanism is gone, so users have to click the actual radio button.

    The part I changed is echo ‘<span class=”ssquiz_answer_span”><input type=”radio” name=”ssquiz_answer” class=”ssquiz_answer”/>’
    . $answer->answer . ‘</span></br>’;

    function ssquiz_print_question( &$current_question, &$info ) {
    	ob_start();
    	$number = $info->questions_counter + 1;
    	echo '<div class="ssquiz_question">';
    	echo "<strong>" . __("Question") . (( $info->all ) ? " $number" : " $number/{$info->total_questions}" ) . ":</strong><br />";
    	echo apply_filters( 'the_content', $current_question->question );
    
    	if ( $current_question->type == 'fill' ) {
    		$input = '<input type="text" name="ssquiz_answer" class="ssquiz_answer" value="" style="width: 130px;" />';
    			echo $input . '</br>';
    		$run_js = '<script>jQuery.fn.run_standard_types();</script>';
    	}
    	if( $current_question->type == 'single' || $current_question->type == 'multi' ) {
    		if( true == $info->arandom )
    			shuffle($current_question->answers);
    		foreach ( $current_question->answers as $answer ) {
    			if ($current_question->type == 'single' )
    				echo '<span class="ssquiz_answer_span"><input type="radio" name="ssquiz_answer" class="ssquiz_answer"/>'
    					. $answer->answer . '</span></br>';
    			else
    				echo '<input type="checkbox" name="ssquiz_answer" class="ssquiz_answer" /><span class="ssquiz_answer_span">'
    					. $answer->answer . '</span></br>';
    		}
    		$run_js = '<script>jQuery.fn.run_standard_types();</script>';
    	}
    
    	if ( ! $info->all )
    		echo $run_js;
    	echo '</div>';
    	$output = ob_get_contents();
    	ob_end_clean();
    	return $output;
    }
    Thread Starter BingDai

    (@bingdai)

    I would also like to add that the bug also exists when I use my phone to access http://aamavancouver.com/test-quiz-3.

    Thanks in advance!

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