Better/more AJAXy problem rendering

This commit is contained in:
Piotr Mitros
2011-12-16 11:06:53 -05:00
parent 0fec3df85f
commit e31356b1bd
3 changed files with 1612 additions and 14 deletions

View File

@@ -188,7 +188,7 @@ def render_x_module(request, xml_module):
return content
def modx_dispatch(request, module=None, dispatch=None, id=None):
''' Generic module for extensions. This handles AJAX. '''
''' Generic module for extensions. '''
s = StudentModule.objects.filter(module_type=module, student=request.user, module_id=id)
if len(s) == 0:
raise Http404
@@ -229,7 +229,8 @@ def index(request, course="6.002 Spring 2012", chapter="Using the System", secti
if not request.user.is_authenticated():
return redirect('/')
# Fix URLs
# Fixes URLs -- we don't get funny encoding characters from spaces
# so they remain readable
course=course.replace("_"," ")
chapter=chapter.replace("_"," ")
section=section.replace("_"," ")