How to see total score of student in course in database

Hello everyone, I need to get data total score of student in course. I found this code and I don’t know how to access to view it more intuitive in database cause I want to get it from another system. So, is there anyway to meet that data. I’m using lilac version

_CACHE_NAMESPACE = “grades.models.PersistentCourseGrade”
def prefetch(cls, course_id, users):
Prefetches grades for the given users for the given course.
get_cache(cls._CACHE_NAMESPACE)[cls._cache_key(course_id)] = {
grade.user_id: grade
for grade in
cls.objects.filter(user_id__in=[ for user in users], course_id=course_id)

Hi, the table is called grades_persistentcoursegrade for the total grade of the course.

For this to work you need to enable the PERSISTENT_COURSE_GRADE waffle flag. Please read the following information:

hi @lan2012 , my edx does not enable waffle flag before, so how about data grade student before I enable waffle flag. That data is calculated on the fly (when needed) and once you enable the waffle flag, the data will be populate in the table. To facilitate this process there is a management command called recalculate_grades that allows you to update the information in the tables, I recommend doing this process using only 5-10 courses:

python lms compute_grades
python lms compute_grades --courses **<COURSE_ID>**

1 Like