[BB-728] Add problem response report API - #19635
Conversation
|
Thanks for the pull request, @giovannicimolin! I've created OSPR-3008 to keep track of it in JIRA. JIRA is a place for product owners to prioritize feature reviews by the engineering development teams. Feel free to add as much of the following information to the ticket:
All technical communication about the code itself will still be done via the GitHub pull request interface. As a reminder, our process documentation is here. |
|
jenkins run all |
fd5ec25 to
5c07848
Compare
|
@giovannicimolin Thank you for your contribution, please let me know once tests pass. |
|
@xitij2000 This is ready for review. |
|
jenkins run bokchoy |
1 similar comment
|
jenkins run bokchoy |
xitij2000
left a comment
There was a problem hiding this comment.
I'd like to see if we can organise the API similar to other APIs since we're changing things anyway.
So something like:
GET /api/instructor/v1/course/{}/tasks
GET /api/instructor/v1/course/{}/reports
POST /api/instructor/v1/course/{}/reports/problem_responses
etc.
I am not sure why some of these list endpoints need POST. Perhaps someone from edX can comment with more information or context on that.
If we make these changes, I think only the changed APIs should go under /api/instructor/v1 the rest should stay in their current location.
92c8a2b to
3c7aa6a
Compare
|
@xitij2000 I've addressed most of your comments. I just left out the method change because I'm waiting on someone from edx commenting about this. |
|
@natabene This is ready for review. |
|
@giovannicimolin Thanks for letting me know. @ormsbee Can you give this a look or would you recommend someone else as a reviewer? |
|
Thank you for this PR! Quick question on compatibility before I start the main review: The Instructor Dashboard URLs you're moving around aren't an officially supported API, but it's likely that our power users have scripts that rely on the current behavior (and use session auth to get their info). That's not necessarily a blocker to moving things, particularly if we message it properly for Juniper -- but I'd rather keep compatibility for another release if it's not too expensive to do so. Would it be difficult to maintain backwards compatibility (e.g. have the old URLs work, but also place them in the approved new location)? Again, this not necessarily a blocker, but I'd like to understand how difficult it would be to do something like that. FYI @pdpinch ^ |
|
@ormsbee All the checks are green now. Ping me if there's anything else for me to address 😁 |
|
@ormsbee Thank you for the heads-up. It sounds like the old endpoints will be maintained, so I don't have any concern about this. I'll have to remember to ask you all later about your plans for API lifecycles in a microfrontend future. |
|
@ormsbee I think it is ready for your review, can you give this a look? |
|
@giovannicimolin 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production on Wednesday, February 27, 2019. |
|
EdX Release Notice: This PR has been deployed to the production environment. |
|
@giovannicimolin: We have reason to suspect this PR might have been the cause of a large spike in CSRF errors when rolled out to production. Investigating, but we may need to revert this. |
|
@ormsbee Ok, ping me if you need any help with this PR. |
|
Okay, I'm beginning to suspect that it has to do with the removal of |
|
Going to try to recreate this locally. |
|
That's strange. I didn't bump into any issue while testing it with my master devstack. Sorry for the trouble and thanks for pinging me. |
|
I agree that it's strange, and I'm having difficulty reproducing as well. I mean, I can reproduce trivially by killing my |
|
@ormsbee Thanks for the investigation. Please, ping me if you find the root cause of the issue or if you need any help fixing this. |
|
EdX Release Notice: This PR has been deployed to the production environment. |
|
@ormsbee Did the investigation for this produce any useful information as the cause of the problems? Could you describe what was happening such that these errors were occurring and/or how to reproduce them? Any information you have on this would be appreciated |
This PR enables endpoints related to the problem response reports to be accessible by OAuth clients instead of just the LMS internal views.
JIRA tickets: OSPR-3008
Dependencies: None
Sandbox URL: https://pr19635.sandbox.opencraft.hosting/
Merge deadline: None.
Testing instructions:
DemoX edX Demonstration Courseas staff user.Request:
Request:
Request:
Author notes and concerns:
edx-platform/openedx/core/lib/api/permissions.pybut I needed to use some methods from thecoursewaremodule, and it didn't felt right to import them there. So until I figure out the best place to put the permissions, I've create apermissions.pyinside the app.Reviewers