Commit f840e241 by Piotr Mitros

Merge

parents 7c6e33ac e4831106
...@@ -292,6 +292,8 @@ class LoncapaModule(XModule): ...@@ -292,6 +292,8 @@ class LoncapaModule(XModule):
self.lcp.done=False self.lcp.done=False
self.lcp.answers=dict() self.lcp.answers=dict()
self.lcp.correct_map=dict() self.lcp.correct_map=dict()
self.lcp.student_answers = dict()
if self.rerandomize: if self.rerandomize:
self.lcp.context=dict() self.lcp.context=dict()
......
...@@ -5,17 +5,16 @@ ...@@ -5,17 +5,16 @@
from djangomako.shortcuts import render_to_response, render_to_string from djangomako.shortcuts import render_to_response, render_to_string
from django.shortcuts import redirect from django.shortcuts import redirect
from django.core.context_processors import csrf
from auth.views import csrf
#valid_templates=['index.html', 'staff.html', 'info.html', 'credits.html'] #valid_templates=['index.html', 'staff.html', 'info.html', 'credits.html']
valid_templates=['mitx.html', 'index.html', 'courseinfo.html'] valid_templates=['mitx_global.html', 'index.html']
def index(request, template): def index(request, template):
csrf_token = csrf(request)['csrf_token'] csrf_token = csrf(request)['csrf_token']
if template in valid_templates: if template in valid_templates:
return render_to_response(template,{'error' : '', return render_to_response(template, {'error' : '',
'csrf': csrf_token}) 'csrf': csrf_token })
else: else:
return redirect('/') return redirect('/')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment