Open bryanlandia opened 5 years ago
Hi @bryanlandia,
Firstly apologies, the link to the commit in the Badgr Xblock readme doesn't exist anymore unfortunately. But there are a few changes you would have to implement in the grades
app of the edx-platform
. You can take a look at this version of the views.py
file. You will see it contains the section_scores
key.
https://github.com/proversity-org/edx-platform/blob/master/lms/djangoapps/grades/api/views.py#L79
I'll try find the original commit showing all the changes to all files in the grades
app.
Hi @lidijarad Thanks for the quick response! I'll give that a try. Is that commit something you have tried to push upstream?
Hello @bryanlandia,
I have the same JS error. I copied all the files from api folder from the link that gave @lidijarad and compiled them using the py_compile command. Then I restarted the platform but the lms displays Internal error.
Did you manage to fix the error and how?
I get the following JS error when checking for section completion and earning a badge:
The error is with these lines https://github.com/proversity-org/badgr-xblock/blob/7077d499b2f752c78bb41e9c17b4bbc7d57bcd55/badgr/static/js/src/badgr.js#L17-L19 :
No data for
section_scores
is returned in the JSON from a GET request to /api/grades/v0/course_grade/course-v1:Appsembler+002+2018_Q3/users/?username=bryanlandiawhat is returned is:
Were you using a custom branch of edx-platform for this? I don't see any
section_scores
returned by the view method herehttps://github.com/edx/edx-platform/blob/edx_master/lms/djangoapps/grades/api/views.py#L164-L186