Hide quizzes after finished course in WPLMS 4

Home Forums Legacy Support Support queries How-to & Troubleshooting Hide quizzes after finished course in WPLMS 4

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #348850
    gabrielcapi
    Spectator
    Hello, We have this Ticket , where you helped us to change with custom code this requirement, we want that a student can finish a course and keep seeing only the units, but not the quizzes after finish, I tried with the same code in my wplms-customizer.php file but it's not working, I'm still seeing the quizzes after finish a course. My website
    #348851
    gabrielcapi
    Spectator
    This reply has been marked as private.
    #348969
    Diana
    Participant
    This reply has been marked as private.
    #349184
    gabrielcapi
    Spectator
    This reply has been marked as private.
    #349299
    Diana
    Participant
    This reply has been marked as private.
    #349476
    gabrielcapi
    Spectator
    We understand that it does not come with the original version but to keep our business running the accreditation bodies that certified our courses require that students do not have access to the exams after completing a course, that's why you helped us last time with that requirement. Actually in version 3 you told us the same, but after you helped us with the custom wplms-customizer code. We beg you to help us or let us know where we can ask for a paid customization if possible. Thank you.
    #349768
    Diana
    Participant
    I can try one more time, but in case I don't find any hook on which this custom code can be written, then I can't help you. Please give me some time
    #350103
    gabrielcapi
    Spectator
    That's great, thank you Diana! We hope you can help us.
    #350305
    Diana
    Participant
    Try this code
    
    //Remove Quiz Once Course is attempted
    add_filter('bp_course_get_course_curriculum',function($curriculum,$course_id){
    if(is_user_logged_in()){
    	$user_id = get_current_user_id();
    	if(bp_course_is_member($course_id,get_current_user_id())){
    
    		 $check = bp_course_get_user_course_status($user_id,$course_id);
    		 //print_r($check);
    
    		if($check >= 2){
    			
    			$bp_course_template = BP_Course_Template::init();
    			$course_curriculum= $bp_course_template->get_curriculum($course_id);
    			foreach($course_curriculum as $key=>$item_id){
    				if(get_post_type($item_id) == 'quiz'){
    					unset($course_curriculum[$key]);
    				}
    			}
    		}
    	}
    }
    return $course_curriculum;
    },10,2);
    
    #351435
    gabrielcapi
    Spectator
    Hello Diana, I took a look and the quizzes are shown even with this code, so I guess is not working.
    #351680
    Diana
    Participant
    On which course I can check the same on your site? Do share the URL
    #351793
    gabrielcapi
    Spectator
    Sure, you can try in this one: course image Thank you.
    #352164
    Diana
    Participant
    This reply has been marked as private.
    #352478
    gabrielcapi
    Spectator
    Hello Diana, I mean in the course status page, there is where I need the quizzes hidden after finish the course. Thank you
    #352487
    gabrielcapi
    Spectator
    I see that in the course page the quizzes are not shown, can we remove the click to see the unit detail? Thank you again
Viewing 15 posts - 1 through 15 (of 21 total)
  • The topic ‘Hide quizzes after finished course in WPLMS 4’ is closed to new replies.