Commit 5dab18fe by Piotr Mitros

About to fix correct_map. Working save point

parent 37896ac5
......@@ -7,7 +7,6 @@ from django.http import Http404
import dateutil
import datetime
#from xml.dom.minidom import parse, parseString
import content_parser
import libxml2
......@@ -68,7 +67,7 @@ class LoncapaModule(XModule):
# User submitted a problem, and hasn't reset. We don't want
# more submissions.
if self.lcp.done and not self.rerandomize:
if self.lcp.done and self.rerandomize:
#print "!"
check_button = False
save_button = False
......@@ -235,7 +234,11 @@ class LoncapaModule(XModule):
for key in get:
answers['_'.join(key.split('_')[1:])]=get[key]
js=json.dumps(self.lcp.grade_answers(answers))
correct_map = self.lcp.grade_answers(answers)
success = False # TODO
js=json.dumps({'correct_map' : correct_map,
'success' : success})
return js
......
from x_module import XModule
from xml.dom.minidom import parse, parseString
import json
## TODO: Abstract out from Django
......@@ -23,10 +21,3 @@ class HtmlModule(XModule):
def __init__(self, xml, item_id, ajax_url=None, track_url=None, state=None):
print "item id" , item_id
XModule.__init__(self, xml, item_id, ajax_url, track_url, state)
# template_source=module.getAttribute('filename')
# return {'content':render_to_string(template_source, {})}
# print state
# if state!=None and "time" not in json.loads(state):
# self.video_time = 0
from django.http import HttpResponse
from django.template import Context, loader
from djangomako.shortcuts import render_to_response, render_to_string
from xml.dom.minidom import parse, parseString
import json, os, sys
from django.core.context_processors import csrf
......
from x_module import XModule
from xml.dom.minidom import parse, parseString
import json
## TODO: Abstract out from Django
......
from x_module import XModule
from xml.dom.minidom import parse, parseString
import json
## TODO: Abstract out from Django
......
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