WordPress.org

Forums

Football Pool
[resolved] Shows bad points (4 posts)

  1. Maly77
    Member
    Posted 2 years ago #

    In the bonus questions admitted 4 points but shows that 8 (this is max on the question). Ranking has correctly ie. 4 points.

    http://wordpress.org/extend/plugins/football-pool/

  2. AntoineH
    Member
    Plugin Author

    Posted 2 years ago #

    The users prediction page (e.g. /user/?user=1) does indeed always show the max points. That is a bug. I will try and fix it. Thanks for reporting it.

  3. AntoineH
    Member
    Plugin Author

    Posted 2 years ago #

    Next update will contain a fix. If you don't want to wait you can change the function print_bonus_question_for_user() in file classes/class-football-pool-pool.php to:

    public function print_bonus_question_for_user( $questions ) {
    		$output = '';
    		$nr = 1;
    		$statspage = Football_Pool::get_page_link( 'statistics' );
    
    		foreach ( $questions as $question ) {
    			if ( ! $this->bonus_is_editable( $question['questionDate'] ) ) {
    				$output .= '<div class="bonus userview">';
    				$output .= sprintf( '<p class="question">%d. %s</p>', $nr++, $question['question'] );
    				$output .= '<span class="bonus points">';
    				if ( $question['scoreDate'] ) {
    					// standard points or alternate points as reward for question?
    					$points = ( $question['userPoints'] != 0 ) ? $question['userPoints'] : $question['points'];
    					$output .= sprintf( '%d %s ',
    										( $question['correct'] * $points ),
    										__( 'punten', FOOTBALLPOOL_TEXT_DOMAIN )
    								);
    				}
    				$output .= sprintf( '<a title="%s" href="%s?view=bonusquestion&question=%d">',
    									__( 'bekijk antwoorden van andere spelers', FOOTBALLPOOL_TEXT_DOMAIN ), $statspage, $question['id'] );
    				$output .= sprintf( '<img alt="%s" src="%sassets/images/site/charts.png" />',
    									__( 'bekijk antwoorden van andere spelers', FOOTBALLPOOL_TEXT_DOMAIN ), FOOTBALLPOOL_PLUGIN_URL );
    				$output .= '</a></span>';
    				$output .= sprintf( '<p>%s: %s</p>',
    									__( 'antwoord', FOOTBALLPOOL_TEXT_DOMAIN ),
    									( $question['answer'] != '' ? $question['answer'] : '...' )
    							);
    				$output .= '</div>';
    			}
    		}
    
    		return $output;
    	}
  4. Maly77
    Member
    Posted 2 years ago #

    Ok - I changed the code and it works.
    And one more thing - would be nice to under answer the user you could see the correct answer.
    Thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Football Pool
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.