Great Opomu
Forum Replies Created
-
Image 1: https://drive.google.com/file/d/1BMh0ix_2pCyL0LS9SGL6tfXlS_B6oWiT/view?usp=sharing
Image 2: https://drive.google.com/file/d/1lBVGEmvwHUcZQw_oR33vzNpwafhtNCNq/view?usp=drive_link
Image 1 is a screenshot of elementor loop in “Edit with Elementor”.
Image 2 is a screenshot of the live preview.
I’m on the latest version of Elementor Pro, Tutor LMS Elementor Addons and Tutor LMS.
I’m not referring to a single course page elementor template.
I want to design my custom course listing using elementor loop. Everything shows except the ratings, price and enrolled.
This needs to be fixed please.Forum: Plugins
In reply to: [Tutor LMS - eLearning and online course solution] Custom User Role IssuesThanks Jobayer.
Let me simplify the question,
I have created a custom user role called “super_adnin”. How can I give access to this user role to have access to all instructors’ courses from the wp-admin just as the administrator?
Forum: Plugins
In reply to: [Tutor LMS - eLearning and online course solution] Custom User Role IssuesSomeone said:
I have to resolve this issue with Tutor LMS developers.
” Tutor LMS automatically restricts all users, who are don’t have role ‘administrator’, but have role ‘tutor_instructor’, by posts created by current user – for all post types, including WooCommerce products, orders, etc. I think, this is a bug, and they should restrict access for the own custom post types only, not for all as they do currently.
I tested free version of Tutor LMS. I granted to user with editor role the 2nd role – tutor_instructor. Editor automatically lost access to the all posts and pages except his own.
Here is the code responsible for the problem (tutor/classes/Admin.php):`
add_action(‘admin_init’, array($this, ‘filter_posts_for_instructors’));
…
/**
* Filter posts for instructor
*/
public function filter_posts_for_instructors(){
if ( ! current_user_can(‘administrator’) && current_user_can(tutor()->instructor_role)){
@remove_menu_page( ‘edit-comments.php’ ); //Comments
add_filter( ‘posts_clauses_request’, array($this, ‘posts_clauses_request’) );
}
}public function posts_clauses_request($clauses){
global $wpdb;$user_id = get_current_user_id();
$get_assigned_courses_ids = $wpdb->get_col($wpdb->prepare(“SELECT meta_value from {$wpdb->usermeta} WHERE meta_key = ‘_tutor_instructor_course_id’ AND user_id = %d”, $user_id));
$custom_author_query = “AND {$wpdb->posts}.post_author = {$user_id}”;
if (is_array($get_assigned_courses_ids) && count($get_assigned_courses_ids)){
$in_query_pre = implode(‘,’, $get_assigned_courses_ids);
$custom_author_query = ” AND ( {$wpdb->posts}.post_author = {$user_id} OR {$wpdb->posts}.ID IN({$in_query_pre}) ) “;
}$clauses[‘where’] .= $custom_author_query;
return $clauses;`
}Sorry, It was my mistake. I’ve fixed it.