Quiz results wrong

Home Forums Legacy Support Support queries How-to & Troubleshooting Quiz results wrong

Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • #345286
    I hope that finally we can get to the solution of the problem.
    #345701
    Diana
    Participant
    This reply has been marked as private.
    #345762
    Diana
    Participant
    This reply has been marked as private.
    #345931
    Thank you so much Diana!!! Now Pass/Fail message is correct :-) I noticed that if for example passing score is set to 2 and I get 1, Fail message is correct, but it's not possible to retake the quiz. I tryed to correct the following code (it's rcopied on the bottom of this page): if($user_marks >= $quiz_passing_marks)... into this one "if($user_marks > $quiz_passing_marks)" removing = and this seems to allow to retake quiz. Please tell me if it's correct. But now there is a new issue: it's possible to go to next unit even if quiz is failed and complete course also with a very low score. I enabled Passing score for quiz on LMS Settings and also in Course settings "Previous units must be completed". What happened now? add_filter('wplms_quiz_retake_count','remove_retake_button_if_user_passed_the_quiz',10,4); function remove_retake_button_if_user_passed_the_quiz($retakes,$quiz_id,$course,$user_id){ $user_marks=get_post_meta($quiz_id,$user_id,true); $quiz_passing_marks=get_post_meta($quiz_id,'vibe_quiz_passing_score',true); if(empty($quiz_passing_marks)) return $retakes; if($user_marks >= $quiz_passing_marks){ ?> <style> .vibebp_main .incourse.quiz_retake { display:none !important; } </style> <?php return 0;} else return $retakes; }
    #347097
    Update: now if user gets a score = passing score your message says fail and my message says passed. (I set 1 point less than the expected passing score)- Example: Passing score: 1 Mark to pass: 2 http://prnt.sc/10p98w1
    #347098
    Another thing I have to add: 1 It's possible to go to next unit even if the score is failed 2 I set unimited time 9999 but time appears http://prnt.sc/10p9b12
    #347465
    Anshuman Sahu
    Keymaster
    Ok to make it uniform everywhere I changed the pass_fail shortcode again by the logic that you have to provide 1 marks lesser than the expected passing marks in a quiz .
    #348528
    Thank you so much Diana & Alex! :-) Now it seems to work correctly! It's incredible! Please tell me what you did. If something happens and I loose your codes I want to be able to reinsert them. P.S. In quiz page reappeared all the elements I removed. It is due to your codes? http://prnt.sc/10vai30
    #348661
    Diana
    Participant
    This reply has been marked as private.
Viewing 9 posts - 16 through 24 (of 24 total)
  • The topic ‘Quiz results wrong’ is closed to new replies.