Reset Course automatically if the student fails

Home Forums Legacy Support Support queries How-to & Troubleshooting Reset Course automatically if the student fails

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #362835
    sfcit
    Participant
    I want to reset the course automatically once the student fails the quiz even after the retakes and buy again the course.
    #362928
    Veronica
    Moderator
    hi suppose if a course has 2 or 3 quizzes in this scenario? we can do a thing that if student fails the COURSE then we remove that student from the course this will force the user to buy the course again
    #363004
    sfcit
    Participant
    Yes that is a plausible solution However I want to get notified that the student has been failed even after the quiz retakes.
    #363095
    Veronica
    Moderator
    hi we can provide a code for when student submit its course it will reset and remove the user from the course as your both queries are same in this topic and here https://wplms.io/support/forums/topic/remove-student-from-course-after-assigning-certificate/
    #363111
    sfcit
    Participant
    Haha When I click there it will redirect back to this query. Please be serious about my query as I will get only one response per day. and please provide me code here thanks.
    #363262
    Veronica
    Moderator
    well i have provided the link for your another topic link i need to check the code and then will provide you here NOTE: for your both queries the present one and this one https://wplms.io/support/forums/topic/remove-student-from-course-after-assigning-certificate/ i am providing a single code in which once the user submits the course the user will be removed from the course
    #363277
    sfcit
    Participant
    Ok, Just give the code here then.
    #363409
    Veronica
    Moderator
    hi add this code in customizer.php file in your customizer plugin
    add_action('wplms_evaluate_course','remove_user_after_course_submit_auto',99999,3);
    function remove_user_after_course_submit_auto($id,$marks,$user_id){
    
         bp_course_remove_user_from_course($user_id,$id);
    }
    this code will remove the student from the course when the user submits the quiz
    #363730
    sfcit
    Participant
    Does this removes the certificate from the certificate tab?
    #363766
    Veronica
    Moderator
    no it will not as this function: bp_course_remove_user_from_course only removes the user from the course
Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Reset Course automatically if the student fails’ is closed to new replies.