I guess all unrated courses are being taken into consideration as zero stars, so the avarage result on the instructor's courses page is incorrect.
In my example there is only on 5* rated course and avarage is 3.2
You observation is absolutely correct .This is a miss from our side .
Thanks for reporting this .We will fix this in the upcoming updates of wplms .
Please track the development here :
https://trello.com/c/ocTGajni/201-all-unrated-courses-are-being-taken-into-consideration-as-zero-stars-so-the-avarage-result-on-the-instructor-s-courses-page-is-i
Moving topic to issue log
Unfortunately this is not true.
The Instructor average rating count is the sum of all the average rating counts of all the courses he has published.
note that the averate_rating meta value for any course is only set when a new user posts a review for the course or when the instructor or administrator edits a course review, in both the cases the average rating is re-calculated.
So the rating value of stars for instructors is absolutely correct.
The query in question is this :
SELECT avg(meta_value) FROM wp_postmeta as m LEFT JOIN wp_posts as p ON p.ID = m.post_id WHERE p.post_author = XX AND p.post_status = 'publish' AND p.post_type = 'course' AND m.meta_key = 'average_rating'
XX is the author ID.