If as admin i go and see what my users' answers are and i evaluate them, i get user's points. It also happens when i go to quiz results and click on submit of the form. Points are added to the user that performs the operation, not to the one that took the quiz.

thanks

Comments

Sivaji_Ganesh_Jojodae’s picture

Status: Active » Needs review

Please check whether the patch below helps.

Essentially you need to set uid in $params passed to userpoints_userpointsapi().

diff --git a/quiz.module b/quiz.module
index 1c06c77..1701018 100644
--- a/quiz.module
+++ b/quiz.module
@@ -2347,6 +2347,7 @@ function quiz_quiz_finished($quiz, $score, $rid) {
       'points' => $score['numeric_score'],
       'description' => t('Attened @title @quiz on @time', $variables),
       'tid' => $selected_tid,
+      'uid' => $taker->uid,
     );
     userpoints_userpointsapi($params);
   }
falcon’s picture

Status: Needs review » Closed (fixed)
falcon’s picture

I commited sivajis code

  • Commit 1bf34d4 on 7.x-4.x, 7.x-5.x by sivaji:
    #1269976 When admin scores a question, gets user points.
    
    

  • Commit 1bf34d4 on 7.x-4.x, 7.x-5.x, quiz-pages by sivaji:
    #1269976 When admin scores a question, gets user points.
    
    

  • Commit 1bf34d4 on 7.x-4.x, 7.x-5.x, quiz-pages, 2269219 by sivaji:
    #1269976 When admin scores a question, gets user points.
    
    

  • Commit 1bf34d4 on 7.x-4.x, 7.x-5.x, 2269219 by sivaji:
    #1269976 When admin scores a question, gets user points.