Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › Quiz results wrong
Tagged: quiz results wrong
- This topic has 23 replies, 3 voices, and was last updated 3 years ago by Diana.
-
AuthorPosts
-
March 11, 2021 at 9:54 am #345286studiomedicopavesi_0412SpectatorI hope that finally we can get to the solution of the problem.March 12, 2021 at 1:09 pm #345701DianaParticipantThis reply has been marked as private.March 12, 2021 at 5:18 pm #345762DianaParticipantThis reply has been marked as private.March 13, 2021 at 6:56 pm #345931studiomedicopavesi_0412SpectatorThank 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; }March 18, 2021 at 5:44 pm #347097studiomedicopavesi_0412SpectatorUpdate: 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/10p98w1March 18, 2021 at 5:47 pm #347098studiomedicopavesi_0412SpectatorAnother 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/10p9b12March 20, 2021 at 7:14 am #347465Anshuman SahuKeymasterOk 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 .March 25, 2021 at 5:42 pm #348528studiomedicopavesi_0412SpectatorThank 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/10vai30March 26, 2021 at 8:20 am #348661DianaParticipantThis reply has been marked as private.
-
AuthorPosts
- The topic ‘Quiz results wrong’ is closed to new replies.