-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the standard enrollment table instead of a custom CCX table #78
Comments
Now that the custom opaque-key implementation for ccx is in place, this should be approachable. |
Ok, I will be taking care of this issue. I'm not familiar with it, so first I'll review the code and see what's required. |
Dave Ormsbee keeps claiming that all we need to do is remove the code for the custom CCX enrollment table.
|
Started work on this. After removing membership models, there are a bunch of tests that need fixing, so I'm doing that now. |
In addition to the tests, I've been having to rewire functionality from the enrollment pages that required queries to the ccx membership tables. So it was not just a matter of removing the models, because they power up the whole membership tab and some other places, like the list of currently subscribed ccx courses. I have not finished test fixing either, so I will be working on this for at least the rest of the week. |
I'm running a bit behind, but shooting for Thursday morning. |
I still have more work to do here, plus #80. Will keep you posted. |
Sorry that this has taken me more time than expected. I had a meeting with @cewing late last week and that helped me get unstuck. I have pushed my progress to this branch: https://github.com/jazkarta/edx-platform/tree/remove-ccx-enrollment There is only one failing ccx test at this point. I will keep working on this today, but I think it can be tested now. |
All tests are passing now. This is definitely ready for testing. I'll work on #80 while you try it out. |
Thanks Carlos. We are reviewing this now on sandbox2o.mitx.mit.edu |
Carlos, we're getting an error on creating CCXs -- although we're running off yestersday's version of your branch. Do you think a pull and re-deploy will fix this? |
Looks to me like a typo in the https://gist.github.com/bdero/d63c3c0cc393bd26e9b0#file-ccx_traceback-L11 The comma in the |
Yes, @cewing is right. Fixed the typo. The reason I didn't get that on my testing is that this url is only used when trying to create a ccx from a course with a deprecated id, which is not allowed. |
With a completely new student, I'm getting duplicate enrollments in my course dashboard -- although they both lead to the same URL (https://sandbox2o.mitx.mit.edu/courses/ccx-v1:ODLEng+DemoX+2015_T2+ccx@37/info) ?? Is this because we are double-enrolling the student -- in the root course and in the CCX? Is that still necessary? |
I think we could probably remove our custom list from the dashboard. However, we would be losing the CCX name. What do you think @cewing? |
@cguardia, @pwilkins I do not know that we can yet. If we do, we'll need to figure out how to fork the display logic for a given "course" based on whether it's a CCX or a regular course. CCXs do not support the same exact API that a course does (yet). I think what's likely happening here is that there is a single enrollment only for a CCX. That enrollment is being found once by the list of CCXs that the student is enrolled in (that's our code) and that is producing the second listing in the screenshot. The same enrollment is also being found by the code that lists a student's enrollments in courses, and it is returning the course from which the ccx was made, which results in the first listing. If we are going to get rid of our list of CCX enrollments on the dashboard, then we'll need to figure out how to make enrollments for CCXs that appear in that first list grab their display information from the CCX, not from the course object. |
That seems like a likely explanation, as you see in the screenshot there's different titles and start dates, but the same links.
|
Enrolling a student with the "Student List Management" works but "revoking access" does not. At the moment, it is only possible to unenroll a student using "Batch Enrollment". In addition, after the student is unenrolled, the student still appears in "Student List Management" despite having no access to the CCX. |
For the dashboard, am I correct that students are never supposed to join both the regular course and the CCX at the same time? If that's the case, should we look into modifying the main dashboard to show the CCX info instead when the user is actually enrolled in that? |
I'm not sure that's a safe assumption, though obviously @pdpinch would know better. I do think that if we've retrieved the enrollment object using a CCXLocator rather than a CourseID object, we should be able to assert that we want to see the CCX data. |
Assuming the student shouldn't enroll in the master course is an acceptable compromise, BUT I would prefer a solution that allows the student to enroll in the CCX without an enrollment in the master course. Is that feasible? In other words, I can live with hiding the incidental enrollment, but I'd rather not require it at all. I am mobile.
|
In further testing, I've confirmed that my CCX student, when enrolled in the CCX is not enrolled in the master course. This is a good thing, but it makes the duplicate in the student dashboard all the more puzzling. |
In that case, I propose to remove our list of courses form the dashboard, then change the original dashboard to check for a ccx for each course and use its information if found. We can do this on the same branch that we are working on, and see how it goes. |
@pdpinch I actually don't think it's completely surprising. But it is troubling. Here's what I believe is happening. The list of 'courses' in which a student is enrolled is arrived at by selecting records from the enrollment table, and then looking up the courses by 'course id'. Because the CCXLocator (which is the custom version of a course id for a ccx) is "unwrapped" on the way through the modulestore wrapper the information for the course from which a ccx was created is found when looking up the enrollment that has a CCX id. The student isn't actually enrolled in that course, but the information for that course is retrieved and displayed. The links are rendered correctly for the CCX because the CCXLocator is re-wrapped as the data for the course comes out of the modulestore wrapper. I agree with @cguardia that the best approach is to make the dashboard listing of courses aware of the difference between a CCXLocator and a regular Course ID, and then to remove the secondary listing of CCXs. |
Ok. This makes sense to me now, and I agree with the solution. I presume the conditional in the dashboard listing template will be keyed off the use of a CCXLocator instead of a CourseLocator? When there is a CCXLocator, we want to be sure to display the overridden course name and start dates (as we do currently in the "secondary listing of CCXs").
|
My plan is, for each course, we will check if the course_id is a CCXLocator. If it is, we will use the CCX data, if not we'll simply use the old display code to show the course info. |
This is sensible. There is an alternate template used by our listing that should be used an example of how to display the CCX information. It skips a great deal of the display options for the standard course because those options don't make sense for a CCX |
I did the dashboard change and pushed into this same remove-ccx-enrollment branch. It seems to work OK. |
Great! I think this is ready to be PRed to edX. I am mobile.
|
@pdpinch PR was just made. It took a bit longer than expected because it turns out edx very recently refactored the dashboard code and I had to make sure what we did worked under the new structure. |
I'm encountering the same issue that @jetej reported above. Revoking access in CCX doesn't remove the student from the |
@pdpinch I added a data migration, rebased and have all tests passing. Should I continue fixing issues like the one above as part of this PR? |
We opened a new issue for this (#119) and it doesn't seem to me to be a blocker, so I'd like to handle it in another PR.
|
Closed via 34526dd |
Depends on #43
The text was updated successfully, but these errors were encountered: