Hi Vibe,
Rating & review section is available to all users , users who do not take course or finish course are able to give reviews and ratings to any course.
And Instructors are able to give reveiws and ratings to their own courses as well? How do we avoid this? Instructors should not be able give themselves ratings and reviews & users must give reviews and ratings to the courses they purchase or enroll or complete.
No the reviews form do not show to the users who have not taken that course unless she is instructor of that course or admin of the site .
We are using a function to check if the user is member of the course and this function skips the check if the logged in user is instructor or admin and returns true and this is hardcoded in the theme as of now and cannot be changed .
But we can hide this with the help of css .
Add the given code in your wplms-customizer.php file in wplms customizer plugin .
add_action('wp_head','hide_ratings_that_by_css');
function hide_ratings_that_by_css(){
if(is_singular('course') && is_user_logged_in() && current_user_can('edit_posts')){
echo '<style>
.single.single-course div#respond {
display: none;
}
</style>';
}
}
SO the above will hide the reviews for all instructors and admins ? or won't allow instructors to see others?
Instructors can see other reviews but they will not see the
Review form that is actually meant for the students .