openedx / openedx/openedx-platform
Instructor can't request certificate on behalf of a learner when masquerading as a learner
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.2k
- Forks
- 4.4k
- Avg merge
- 6d 18h
- Merged PRs (30d)
- 42
Description
As an instructor, masquerading as a learner who has passed the course – I am unable to request a certificate on behalf of that leaner.
The generate_user_cert function uses request.user for the student object.
There is a note in the _progress function:
# NOTE: To make sure impersonation by instructor works, use # student instead of request.user in the rest of the function.
I believe this is how the generate_user_cert function should also work when an instructor is using the masquerade feature.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lms/djangoapps/courseware/views/views.py at generate_user_cert and compare its use of request.user with the student handling in _progress around lines 984-985. Done means an instructor masquerading as a learner who passed the course can request that learner's certificate, without changing behavior for ordinary requests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100