Commit 8174e496 by David Ormsbee

echo change in 1a68a3047124 to remove outdated call to modules.get_module_class

--HG--
branch : pmitros-mod-template
parent 9ab2f591
import copy import copy
import logging
import math import math
import operator import operator
...@@ -27,10 +28,15 @@ default_variables = {'j':numpy.complex(0,1), ...@@ -27,10 +28,15 @@ default_variables = {'j':numpy.complex(0,1),
} }
log = logging.getLogger("mitx.courseware.capa")
def evaluator(variables, functions, string): def evaluator(variables, functions, string):
''' Evaluate an expression. Variables are passed as a dictionary ''' Evaluate an expression. Variables are passed as a dictionary
from string to value. Unary functions are passed as a dictionary from string to value. Unary functions are passed as a dictionary
from string to function ''' from string to function '''
log.debug(u"Evaluating: {0} with vars: {1}, funcs: {2}"
.format(string, variables, functions))
all_variables = copy.copy(default_variables) all_variables = copy.copy(default_variables)
all_variables.update(variables) all_variables.update(variables)
all_functions = copy.copy(default_functions) all_functions = copy.copy(default_functions)
......
...@@ -60,10 +60,10 @@ def modx_dispatch(request, module=None, dispatch=None, id=None): ...@@ -60,10 +60,10 @@ def modx_dispatch(request, module=None, dispatch=None, id=None):
ajax_url = '/modx/'+module+'/'+id+'/' ajax_url = '/modx/'+module+'/'+id+'/'
id_tag=courseware.modules.get_module_class(module.id_attribute) # id_tag=courseware.modules.get_module_class(module)
# 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 = content_parser.module_xml(content_parser.course_file(request.user), module, 'id', id)
# Create the module # Create the module
instance=courseware.modules.get_module_class(module)(xml, instance=courseware.modules.get_module_class(module)(xml,
......
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