Closed pdpinch closed 9 years ago
Hmmmmm. It looks like the ccx coach dashboard is showing up there (or at least being rendered). I did not realize that was a possibility. The dashboard code on line 34 is predicated on the course being a new-style course. I'll see what I can do to avoid the problem.
Thanks for the bug report @pdpinch.
Sorry, that's not the coach dashboard but rather the dashboard display of a CCX. @pdpinch, the one code path that leads to that template being rendered would indicate that there is a ccx in your database that has been created for a course which has an old-style key.
I believe that there is a way to have created a ccx for a course with an old-style key. And it would appear that having done so will leave you in this state, where the display of the dashboard will fail.
My plan is to attack this on two fronts:
@pdpinch just pushed a fix for this with 268345d2a419a9115bb6e6187acb1ff836ef85f7
Please update and test. I don't have any ccx memberships created for courses with deprecated ids so I cannot duplicate this locally.
Thanks. @bdero can you grab this one to for the sandbox?
@cewing our sandbox is set up so that courses are created first in old mongo. We can then re-run into split. Are you testing with defaulting to split mongo?
No, I have a course that is in old-style format, and when I first started this work, I suspect I saw the same problem because I'd created memberships in a ccx before I had the split version. When such a membership exists, then the student dashboard will attempt to render the CCX in the dashboard. That doesn't work when the course is in the deprecated format because attempting to make a URL for the link to the course cannot work with the CCXLocator as written.
What I've done here is to filter out of the list of memberships any membership that is connected to a course in the deprecated format. This will just prevent the dashboard from attempting to render that CCX for view. At the same time, I'm logging warnings that say that memberships exist for a CCX that is connected to a deprecated format course so that cleanup of the database could be feasible.
I've also put code into the coach dashboard that should prevent a CCX from ever being created for a deprecated course. That was technically feasible before, and so somehow one may have snuck through the cracks.
Ok. This is really just because we have a legacy data.
But it is worth fixing, because edge.edx.org will have the same situation.
On Jun 9, 2015, at 4:06 PM, Cris Ewing notifications@github.com wrote:
No, I have a course that is in old-style format, and when I first started this work, I suspect I saw the same problem because I'd created memberships in a ccx before I had the split version. When such a membership exists, then the student dashboard will attempt to render the CCX in the dashboard. That doesn't work when the course is in the deprecated format because attempting to make a URL for the link to the course cannot work with the CCXLocator as written.
What I've done here is to filter out of the list of memberships any membership that is connected to a course in the deprecated format. This will just prevent the dashboard from attempting to render that CCX for view. At the same time, I'm logging warnings that say that memberships exist for a CCX that is connected to a deprecated format course so that cleanup of the database could be feasible.
I've also put code into the coach dashboard that should prevent a CCX from ever being created for a deprecated course. That was technically feasible before, and so somehow one may have snuck through the cracks.
— Reply to this email directly or view it on GitHub.
yes, absolutely. I think these fixes will prevent legacy data from becoming a problem, but need verification from you because I have no legacy data on which to test.
@cewing I have lots of legacy data in my devstack and I continue to encounter errors using 268345d.
Here's a gist of the console output: https://gist.github.com/pwilkins/c03a5307c315ed536b46
hmmm. It would appear that we cannot update the usage_id
attribute of xblock.scope_ids
.
@pwilkins, can you give me exact steps to reproduce this error? I do have the one edx demo course in my local dev instance that is in the old mongo store. It would help immensely if I could see these errors first-hand.
@cewing I can try. I have a instructor that has been involved with CCX courses from the start. What I have done is log in as that instructor and attempt to open (in Studio) an edx demo course that is also old. That what generates the console output I shared.
Does that help, or do you need more information?
Let me just be sure I understand completely here. You are logged in as an instructor for an edx demo course that is old, and simply attempting to view that course is raising these errors? I will try that here and see if I can duplicate.
note that the course appears to be in the split format, though I didn't explicitly make that conversion.
I have been unable to reproduce this error locally. Any news from your end on it?
I can't reproduce this any more, so I'm closing this.
Well, @pwilkins was able to reproduce it, but it was in a disallowed case. This is the error you get if you try to access a CCX attached to an old mongo course, which isn't currently supported.
I'm getting the following error when I try to create a new course (in studio) in our sandbox:
InvalidKeyError: <class 'ccx_keys.locator.CCXLocator'>: cannot be deprecated
This is a new course, in old mongo. I haven't done anything to add a CCX to it.
Full traceback: