disable editing of instructors to courses

Home Forums Legacy Support Support queries How-to & Troubleshooting disable editing of instructors to courses

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #344939
    pablopapes
    Spectator
    How can I disable an instructor from editing a course from the frontend menu? https://prnt.sc/10hjhsh
    #344984
    Diana
    Participant
    Can you please tell me which version are you on? Using Vibecourse module plugin, vibe customtypes plugin etc. Or using vibebp and wplms_plugin So I can share code according to the theme version you are using
    #345457
    pablopapes
    Spectator
    WPLS 4.0.97 Vibe Course Module 3.9.9.7 Vibe Custom Types 3.9.9.3
    #345560
    Diana
    Participant
    
    add_action('init','remove_edit_course_for_instructor',999);
    
    function remove_edit_course_for_instructor(){
    
    if(!current_user_can('manage_options') || !is_user_logged_in()){
    
    if(class_exists('WPLMS_Front_End')){
    
    $frontend = WPLMS_Front_End::instance();
    
    remove_action('bp_course_options_nav',array($frontend,'wplms_edit_course_menu_link'));
    
    }
    
    }
    
    }
    
    Add this code in wp-admin > Plugins > editor > WPLMS Customizer Plugin > wplms-customizer.php and this will hide the "edit course' from frontend
    #345778
    pablopapes
    Spectator
    its works!
    #345860
    Diana
    Participant
    Thanks for updating here :) Closing
Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘disable editing of instructors to courses’ is closed to new replies.