Forum Replies Created
Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
EliteParticipantAny workaround? Is it possible to activate by default any of the other visible tabs when entering to view the course?EliteParticipantThanks for response, I adjusted the code for the "Admin" and "Edit Course" tabs:
And it no longer shows the tabs to the instructor, only to the administrator, however, the content of the "Admin" tab continues loading by default for the instructor, which would still allow him to remove students from the course and that's one of the things I want to avoid. https://drive.google.com/file/d/1rFvtVVOE9AXiqPexivMjuw39EW1oAPrz/view?usp=sharingadd_filter('bp_course_api_get_instructor_tabs',function($tabs,$course_id,$user_id=null){ $t = []; if(!user_can($user_id,'manage_options')){ foreach($tabs as $k => $tab){ if($tab['key']=='admin' || $tab['key']=='edit_course'){ }else{ $t[] = $tab; } } }else{ return $tabs; } return $t; },10,3);
EliteParticipantThis reply has been marked as private.EliteParticipantMy settings are the same https://drive.google.com/file/d/1Ej1CAq72G10Is2gAIZGt8tW8bRU7iQVA/view?usp=sharing If I put the code in the WPLMS Customizer plugin the result is the same, both the administrator user and the instructor do not see the tabs (but the content of the "Admin" tab is shown at the bottom), if I remove the code, it shows me the "Admin" and "Edit Course" tabs for both. -
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)