Commit f3eb22e0 by Piotr Mitros

working on import issues

parent 150fbc80
...@@ -5,7 +5,7 @@ from lxml import etree ...@@ -5,7 +5,7 @@ from lxml import etree
from lxml.etree import Element from lxml.etree import Element
import copy import copy
from mako.template import Template from mako.template import Template
from content_parser import xpath_remove from courseware.content_parser import xpath_remove
import calc, eia import calc, eia
from util import contextualize_text from util import contextualize_text
......
...@@ -30,7 +30,7 @@ import urllib ...@@ -30,7 +30,7 @@ import urllib
from django.conf import settings from django.conf import settings
import content_parser import courseware.content_parser
import sys import sys
...@@ -79,7 +79,7 @@ def modx_dispatch(request, module=None, dispatch=None, id=None): ...@@ -79,7 +79,7 @@ def modx_dispatch(request, module=None, dispatch=None, id=None):
id_tag=modx_modules[module].id_attribute id_tag=modx_modules[module].id_attribute
# Grab the XML corresponding to the request from course.xml # Grab the XML corresponding to the request from course.xml
xml = content_parser.module_xml(content_parser.course_file(request.user), module, id_tag, id) xml = courseware.content_parser.module_xml(content_parser.course_file(request.user), module, id_tag, id)
# Create the module # Create the module
instance=modx_modules[module](xml, instance=modx_modules[module](xml,
......
...@@ -20,7 +20,7 @@ from lxml import etree ...@@ -20,7 +20,7 @@ from lxml import etree
from auth.models import UserProfile from auth.models import UserProfile
from models import StudentModule from models import StudentModule
from module_render import * # TODO: Clean up from module_render import * # TODO: Clean up
import courseware.content_parser import courseware.content_parser as content_parser
log = logging.getLogger("mitx.courseware") log = logging.getLogger("mitx.courseware")
...@@ -63,7 +63,7 @@ def profile(request): ...@@ -63,7 +63,7 @@ def profile(request):
correct=response.grade correct=response.grade
else: else:
correct=0 correct=0
total=courseware.modules.capa_module.LoncapaModule(etree.tostring(p), "id").max_score() # TODO: Add state. Not useful now, but maybe someday problems will have randomized max scores? total=modules.capa_module.LoncapaModule(etree.tostring(p), "id").max_score() # TODO: Add state. Not useful now, but maybe someday problems will have randomized max scores?
scores.append((int(correct),total)) scores.append((int(correct),total))
score={'course':course, score={'course':course,
'section':s.get("name"), 'section':s.get("name"),
......
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