instructor privacy not working

Home Forums Legacy Support Support queries How-to & Troubleshooting instructor privacy not working

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #387062
    sktulsyan
    Spectator
    Instructor privacy is not working. I've logged with instructor credential but all media files are visible while editing course. Please fix this bug at your earliest.
    #387140
    Veronica
    Moderator
    hi make sure you have enabled the setting in vibe>>settings
    #387198
    sktulsyan
    Spectator
    I could not found setting in vibebp>setting. I already enabled instructor privacy in wplms>course manager
    #387250
    Veronica
    Moderator
    hi the setting available there is: https://prnt.sc/EUKxpfchVywM
    #387274
    sktulsyan
    Spectator
    are you sure this setting is for "instructor privacy"? what I can understand from description given beside there, this setting is to allow selected user to upload files from frontend, while I'm talking about "instructor privacy"
    #387331
    Veronica
    Moderator
    hi you need to enable this: https://prnt.sc/4i23b-245a9z
    #387443
    sktulsyan
    Spectator
    this setting is already enabled but "instructor privacy" still not working. and please don't experiment with me, first decide which setting will work then guide me. Though this is a bug which must be fixed now.
    #387486
    Veronica
    Moderator
    hi well the last setting that i have mentioned is working please share video of the issue and share the credentials of the instructor so we can replicate the issue on your site.
    #387545
    sktulsyan
    Spectator
    This reply has been marked as private.
    #387571
    Veronica
    Moderator
    add_filter( 'ajax_query_attachments_args', 'wpb_show_current_user_attachments' );
     
    function wpb_show_current_user_attachments( $query ) {
        $user_id = get_current_user_id();
        if ( $user_id && !current_user_can('activate_plugins') && !current_user_can('edit_others_posts
    ') ) {
            $query['author'] = $user_id;
        }
        return $query;
    } 
    add this code in wp-admin>>plugins>>plugin-editor>>wplms-customizer.php
    #387579
    sktulsyan
    Spectator
    this too is not working.
    #387595
    Anshuman Sahu
    Keymaster
    Please add this code as well with the above :
    function posts_for_current_author($query) {
        global $pagenow;
     
     
        if( !current_user_can( 'manage_options' ) ) {
            global $user_ID;
            $query->set('author', $user_ID );
        }
        return $query;
    }
    add_filter('pre_get_posts', 'posts_for_current_author');
    #387597
    Anshuman Sahu
    Keymaster
    Note that it will not work for admin users , it will only work for instructors .
    #387660
    sktulsyan
    Spectator
    I already know and I'm checking with instructor's login. I've checked with existing instructor and created new one, but still not working with your code provided. You've site credentials, instead of delaying solution, why do you not check at your end?
Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.