Add OAuth2 support for problem response reports endpoints

Description

This PR attempts to re-add functionality that was originally included with https://github.com/edx/edx-platform/pull/19635.

*JIRA tickets*:
(https://openedx.atlassian.net/browse/OSPR-4933)

*Sandbox URL*: TBD - sandbox is being provisioned.

*Testing instructions*:

1. Run tests related to this new endpoint:
```
paver test_system -t lms/djangoapps/instructor/tests/test_api.py
```
2. Go to the DemoX edX Demonstration Course as staff user.
3. Check if the generation of problem response reports is working correctly via the instructor interface.
4. Create an Oauth client here if one does not exists for testing.
5. Use the Oauth2 endpoint to get an auth token (cUrl, Postman or other tool).
6. Check get_response_report endpoint. Example:
```
POST /courses/course-v1:edX+DemoX+Demo_Course/instructor/api/get_problem_responses
Body:
{
"problem_location": "block-v1:edX+DemoX+Demo_Course+type@problem+block@c554538a57664fac80783b99d9d6da7c"
}
```
7. Check list_instructor_tasks endpoint. Example:
```
POST /courses/course-v1:edX+DemoX+Demo_Course/instructor/api/list_instructor_tasks
Body: {}
```
8. Check list_report_downloads endpoint. Example:
```
POST /courses/course-v1:edX+DemoX+Demo_Course/instructor/api/list_report_downloads
Body: {}
```

*Author notes and concerns*:

1. The code from the original PR was cherry-picked to the current master branch and then conflicts were manually resolved.

*Reviewers*

  • [ ] @xitij2000

  • [ ] edX reviewer[s] TBD

Won't Do
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Unassigned

Reporter

Open Source Pull Request Bot

Labels

Contributor Name

Patrick Cockwell

Repo

edx/edx-platform

Customer

Platform Map Area (Levels 1 & 2)

Educator Experiences - Content Blocks & interactives

Github Lines Added

335

Github Lines Deleted

118