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.
hi
make sure you have enabled the setting in vibe>>settings
I could not found setting in vibebp>setting.
I already enabled instructor privacy in wplms>course manager
hi
the setting available there is:
https://prnt.sc/EUKxpfchVywM
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"
hi
you need to enable this:
https://prnt.sc/4i23b-245a9z
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.
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.
This reply has been marked as private.
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
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');
Note that it will not work for admin users , it will only work for instructors .
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?