About to fix correct_map. Working save point

This commit is contained in:
Piotr Mitros
2011-12-26 19:34:45 -05:00
parent 37896ac5b0
commit 5dab18fe44
5 changed files with 6 additions and 17 deletions

View File

@@ -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

View File

@@ -1,7 +1,5 @@
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

View File

@@ -1,7 +1,6 @@
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

View File

@@ -1,7 +1,5 @@
from x_module import XModule
from xml.dom.minidom import parse, parseString
import json
## TODO: Abstract out from Django

View File

@@ -1,7 +1,5 @@
from x_module import XModule
from xml.dom.minidom import parse, parseString
import json
## TODO: Abstract out from Django