Auto-enroll course staff to fix "View Live". - #578
Conversation
There was a problem hiding this comment.
I think this would be easier to read and understand:
def _get_course_id(self, test_course_data):
"""Returns the course ID (org/number/run)."""
return "{org}/{number}/{run}".format(**test_course_data)There was a problem hiding this comment.
STUD-554 Code review feedback.
|
@chrisndodge I added the helper methods. I decided to preface them with "_", though I'm not entirely sure that is appropriate. |
|
@chrisndodge I believe you are correct. We just sometimes use "_" for "private to us/I'm feeling a little dirty" methods. But I went ahead and removed the _ prefix (and rebased). |
There was a problem hiding this comment.
I see a try/catch in the LMS side call to this method. Do you know why it is needed there but not similarly in the CMS?
There was a problem hiding this comment.
This is the comment in the catch statement--
# If we've already created this enrollment in a separate transaction,
# then just continue
This certainly won't be the case in the CMS code path. In reality, I don't see how it is ever an issue because the method get_or_create returns the registration if the user is already registered, and else creates the registration. In other words, it is robust to call the method even if the user is already registered for the course. In fact, I have a unit test that does this to make sure there is no error.
|
I just tested this on local dev and seemed to work as expected. New courses created get auto enroll. |
|
Thanks! Nice work! +1 |
…rses. Remove _ Minor cleanup.
|
👍 |
Auto-enroll course staff to fix "View Live".
Add a wsgi file for the lms that loads the modulestores immediately afte...
…tic-feedback Adding XBlock Diagnostic-Feedback
…-merge-achievement Implements ga_achievement openedx#578, openedx#594
…l-centering Giulio/staff modal centering
Patch: April 29th, 2020
BC-19: upgrade eox-core to latest version
…x#578) This adds some links to the docs for general MFE instructions, plus documents the learning MFE specific ones. Also fixes the README badge links.
STUD-554
Add test points to existing BDD specs:
https://edx-wiki.atlassian.net/wiki/display/STU/Course+Creation+BDD
https://edx-wiki.atlassian.net/wiki/display/STU/Course+Team+BDD+spec