SQL queries to get ratings data from discussion forum

SQL queries to get ratings data from discussion forum

by Alan Zaitchik -
Number of replies: 0

Can anyone help me figure out how to query the database (Moodle 3.1 or 3.2) to retrieve the following information? I need to retrieve (1) the ratings (average rating will be fine) that each student in a course received for all his or her postings to a specified discussion forum, and (2) for any given pair of students in the course what were the (average) ratings given by each to the other (for the specified forum)?

"Why?" you may be wondering... The idea is to see what co-relations exist between the ratings two students give each other's postings and various other factors we'll retrieve from a network analysis of the students participating in the forum.

From what I can see the Forum Graph plugin doesn't address ratings, and anyway it doesn't return the data in any downloadable form. That's why I am looking to execute some SQL statements directly in the database. I can easily retrieve counts for how many times student A responded to student B, for any student A and B, but I am lost trying to get the ratings. I don't understand where the ratings are stored and what's the easiest way to retrieve them.

Thanks for any guidance you can offer.

A

Average of ratings: -