Update

Tagged: 

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #355432
    Hello, please tell me if now it's possible: 1 hide quizzes once passed 2 Randomize quiz answers in multiple choice quiz. Thank you
    #355466
    Diana
    Participant
    Point 1: There is no functionality available for this Point 2: randomize quiz option is not available in wplms4 for multiple choice questions
    #355729
    It will be possible in the future, as it was with previous Wplms version?
    #355906
    Veronica
    Moderator
    hi 1. what passed course or quiz and where to hide? 2. will be great if you can share screenshot
    #355931
    1. As you can see I selected Randomize quiz question, but they appear always in the same order, in previous Wplms version it worked http://prnt.sc/12h8olu 2 Once passed quiz it was possible to hide it with no chanche to retake it, I added a code in wplms customizer.php, something like this: 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; }
    #356092
    Veronica
    Moderator
    hi for1 we have setting but it's not working so created a Trello card https://trello.com/c/OCe040NY and for 2: we need to check this on local
    #356908
    This reply has been marked as private.
    #357011
    Veronica
    Moderator
    hi please check this topic link https://wplms.io/support/forums/topic/hide-quizzes-when-passed/
    #357088
    Hi Veronica, I asked if there was an update because at the end of the topic you suggested to me there was this issue: Sorry to say but this is all I can provide for this issue. This does not remove the retake button just after submitting but disables the button and when refreshing the page retake button is removed.
    #357172
    Veronica
    Moderator
    hi a. Enable Quiz passing score in WP-Admin – LMS – Settings b. Set a passing score in Quiz settings. c. Add this code in child theme functions.php or WPLMS customizer:
    add_filter('bp_course_fetch_user_quiz_retake_count',function ($retake_count,$quiz_id,$user_id){
    $passing_score = get_post_meta($quiz_id,'vibe_quiz_passing_score',true);
    if(isset($passing_score) && is_numeric($passing_score)){
    $score = get_post_meta($quiz_id,$user_id,true);
    if($score > $passing_score){
    return get_post_meta($quiz_id,'vibe_quiz_retakes',true);
    }
    }
    return $retake_count;
    },10,3);
    please try this and let me know
    #357186
    This reply has been marked as private.
    #357388
    Veronica
    Moderator
    hi please remove the old code and add the above code i have updated the code so please check that and let us know
    #357806
    Hi Veronica, WOW, now it works! Thank you hor your help!
    #357898
    Veronica
    Moderator
    good to know this works thanks for your confirmation
Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Update’ is closed to new replies.