Adds staff and instructor users of the master course to CCX - #11787
Conversation
|
Thanks for the pull request, @amir-qayyum-khan! I've created OSPR-1184 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. |
|
@aamir-khan can you tell me why this was reverted the first time and anything else we should be aware of for this go round? |
|
Thanks for asking @macdiesel. Migrations failed due to legacy data on stage and edge. The updated PR now skips CCX with deprecated course keys. We have also been working with @edx/devops to remove those legacy CCX. Also, we added more tests. Unfortunately it looks like the coverage results have gone stale. |
|
jenkins run python |
|
Thanks @pdpinch. Since we had issues with the migration last time I would like to get a thumb from @edx/devops as well on this one. |
| for staff in list_staff: | ||
| if staff in list_staff_ccx: | ||
| # allow 'staff' access on ccx to staff of master course | ||
| revoke_access(course_ccx, staff, 'staff') |
There was a problem hiding this comment.
I'm confused that the comment says to allow staff access but then the function called is revoke_access. Are these 2 lines congruous?
eecb6d4 to
98421e3
Compare
There was a problem hiding this comment.
Documentation is not aligned correctly here.
Also please add documentation for the Argument:
https://sphinxcontrib-napoleon.readthedocs.org/en/latest/example_google.html
|
@amir-qayyum-khan Thank you for the submission. I have finished my first pass on this PR. |
3f3a660 to
41f6796
Compare
|
From talking to Max, neither of us can remember code in util vs the migration causing us issues on a rollback. I thought this migration died so hard that it never finished / needed rollback. Perhaps you folks remember. I will review the migration itself tomorrow. |
|
Sorry if I confused you all. The concern about the rollback code came from our developers. My recollection is the same as yours -- the migration on stage.edx.org failed early enough that no rollback was needed. In any case, @amir-qayyum-khan has already DRYed everything out, so the migration imports the util code. Do you think the guard against deprecated course keys is sufficient to merge? |
|
@macdiesel @jibsheet can we merge this? I'd very much like to get this PR into the release getting cut this morning. |
|
@pdpinch this doesn't look DRY to me? migrations/0003 contains a complete copy of add_master_course_staff_to_ccx from utils.py except the send_email is set to false by default. Maybe I've misunderstood the conversation you had with @macdiesel but it seems weird to me to copy when nobody can remember why it would be necessary. |
|
You're right. I was looking at the wrong thing. @amir-qayyum-khan please remove the duplicate code. We're not going to make the release, are we? |
|
@pdpinch given test runs, probably not. You can reach out to @sanfordstudent if you think you can make the changes this morning. I have meetings until 11:30 unfortunately, so won't be able to look again after 10 (and my team is in those meetings with me). Sorry I didn't have time to look yesterday, was buried in other work but had carved out this morning for it. |
|
FWIW, the reason to do the copy was discussed in https://github.com/edx/edx-platform/pull/11787/files/98421e3f1dfb5a4de62ed3b7619c8bb80529cca0#r57002351 https://github.com/edx/edx-platform/pull/11787/files/98421e3f1dfb5a4de62ed3b7619c8bb80529cca0#r57002351 We had two PRs in progress that made changes to ccx/utils.py. When this migration had a dependency on it, you couldn't successfully roll it back.
|
c77ffe9 to
e01fc5a
Compare
|
@macdiesel @jibsheet should we or you merge this PR? I think it is ready. |
|
@pdpinch unfortunately, github tells me those files/comments were force pushed away |
|
Thanks. We missed the cut anyway, so whenever you have time. |
There was a problem hiding this comment.
It looks like ccx_course is also a lift from utils.py, back from when the with ccx_course(ccx_key) as course_ccx existed in the migration, so that should also go away. You can also clean up the unused import.
|
@amir-qayyum-khan see my one note about other code I believe can go away, after that does, 👍 |
e01fc5a to
b594a77
Compare
b594a77 to
795ead8
Compare
|
@pdpinch Done with changes, just rebased now. |
|
LGTM. 👍 |
|
@macdiesel done with verification of this PR on stage. Every thing working as expected. cc @pdpinch |
Background
fixes mitocw#126, fixes mitocw#155, fixes mitocw#115 and fixes mitocw#205
This is an updated version of https://github.com/edx/edx-platform/pull/10877 which had to be reverted.
What is done in this PR
Studio Updates:
LMS Updates:
To run migration manually on devstack
python manage.py lms migrate ccx 0003 --settings=devstackTo reverse migration manually on devstack
python manage.py lms migrate ccx 0002 --settings=devstack@pdpinch @giocalitri
Fixed view as student
Fixed display name of ccx on coach dashboard.