• Resolved provisia

    (@provisia)


    Hi,
    I got some questions from participants in the euro 2020 pool about points possibly not added to the total.
    I checked the questions (its about who is 1st, 2nd, 3rd and 4th in each group) and all settings are correct (score date, validate answers with text field, etc).
    To double check this I opened the database table bonusquestions_useranswers.
    Below is a small portion of this table.
    As u can see the answer is correct (according to the “1” below “answer), but correct points is 0 (should be 3).
    How are the points calculated when u use the validation on text? Are they stored somewhere else? Or are the points really not added tot the total in this case?

    question_id	user_id	answer	correct	points
    86	93	Itali?	1	0
    86	105	Itali?	1	0
    86	109	Itali?	1	0
    86	86	Itali?	1	0
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author AntoineH

    (@antoineh)

    Hi,
    The points in the user answers table are only used for the variable scoring. E.g. when you want to give a user less (or more) points than the default for that question.

    If the answer is correct, then the score calculation will take the points that are defined on the question, unless a value is defined on the user answer.

    Not sure what goes wrong here. But you can check the following:

    1. Did you do a calculation?
    2. Is the question part of the ranking that you have selected?

    If both are “yes”, I would suggest to deep dive in the score history table. I can give you hints what to look for.

    Thread Starter provisia

    (@provisia)

    Thanks for your quick reply!

    I did a calculation and the question indeed is part of the ranking.
    What do I have to look for in the score history table ? ??

    Thanks!

    Plugin Author AntoineH

    (@antoineh)

    If you execute the following query*), you will get all questions and points that the users scored for the questions that are eligible for the ranking. Your question should be in this result set. If not, then the score date is not correct or the calculation did not complete successfully.

    SELECT source_id AS question_id, user_id, score AS points_scored, score_date, ranking_id 
    FROM pool_wp_scorehistory_s1_t1
    WHERE type = 1 AND ranking_id = 1 
    ORDER BY source_id, user_id

    If the question is present, then excecute the following query to see if there are any other rankings defined. If so, then check if your ranking contains a question with ID 86. You can find your ranking ID on the ranking admin page. If not, then go to the admin screen for rankings and add the question to your custom ranking.

    SELECT source_id AS question_id, user_id, score AS points_scored, score_date, ranking_id 
    FROM pool_wp_scorehistory_s1_t1
    WHERE type = 1 AND ranking_id <> 1
    ORDER BY source_id, user_id

    Hope this helps in finding the issue.

    *) for each query I assume you use the default prefix and that the t1 table is filled with data. If not, then change the prefix accordingly and do one more calculation (or change the table name to end with t2).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Manual check points bonusquestions’ is closed to new replies.