-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Make course dashboard more robust against bad courses (eg ErrorDescriptor) #399
Conversation
%> | ||
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dead whitespace
Great idea to show staff the error message; changed code to do this. I prefer not to use an |
Hi Ike, I most likely have to work in this code soon. I was originally thinking that in the views.py, you could enumerate through the course array and filter out the ErrorDescriptors into a separate array, pass it into the .html template rendering, and then have a separate enumerator in the .html to display all the error'ed courses (say at the bottom) for is_staff people. That would help keep the .html template cleaner (don't need all that conditional logic in the template). So, if you want, I can implement these protections as part of the work I need to do on the Dashboard. It's up to you. Let me know what you want to do. |
@ichuang @chrisndodge What's the status of this pull request? |
It's in production at MIT, but I gather not merged in or used by edX. It's On Wed, Aug 7, 2013 at 4:30 PM, David Baumgold notifications@github.comwrote:
|
@singingwolfboy I'll get back to this PR. |
course_target = reverse('info', args=[course.id]) | ||
try: | ||
course_target = reverse('info', args=[course.id]) | ||
except Exception as err: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might it be possible to use isinstance(ErrorDescriptor) to test if a given module is an error module rather than seeing if the reverse() blows up?
@ichuang can I take a pass on this branch and alter a few things? |
absolutely - go for it. On Thu, Aug 8, 2013 at 9:59 AM, chrisndodge notifications@github.comwrote:
|
Ike, I'm looking at this again. I'm having trouble reproducing the original error. If I (on master):
Might have the original problem been fixed on master outside of your PR? |
Yes - it's quite possible. On Wed, Sep 4, 2013 at 10:50 AM, chrisndodge notifications@github.comwrote:
|
Closing as 'inadvertently fixed'. We can re-open this if we notice this behavior again. |
…_effects Feature/fix replication side effects
…ltrics-xblock-sha Update SHA of qualtrics xblock
Currently, when bad course data is loaded, producing an ErrorDescriptor, this crashes the course dashboard, because the dashboard views assumes the course descriptor has valid methods like
has_ended()
and attributes likecourse.current_test_center_exam
.This PR modifies student.views and dashboard.html to not crash on bad courses.