Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
8174e496
Commit
8174e496
authored
Feb 14, 2012
by
David Ormsbee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
echo change in 1a68a3047124 to remove outdated call to modules.get_module_class
--HG-- branch : pmitros-mod-template
parent
9ab2f591
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
courseware/capa/calc.py
+6
-0
courseware/module_render.py
+2
-2
No files found.
courseware/capa/calc.py
View file @
8174e496
import
copy
import
logging
import
math
import
operator
...
...
@@ -27,10 +28,15 @@ default_variables = {'j':numpy.complex(0,1),
}
log
=
logging
.
getLogger
(
"mitx.courseware.capa"
)
def
evaluator
(
variables
,
functions
,
string
):
''' Evaluate an expression. Variables are passed as a dictionary
from string to value. Unary functions are passed as a dictionary
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
.
update
(
variables
)
all_functions
=
copy
.
copy
(
default_functions
)
...
...
courseware/module_render.py
View file @
8174e496
...
...
@@ -60,10 +60,10 @@ def modx_dispatch(request, module=None, dispatch=None, id=None):
ajax_url
=
'/modx/'
+
module
+
'/'
+
id
+
'/'
id_tag
=
courseware
.
modules
.
get_module_class
(
module
.
id_attribut
e
)
# id_tag=courseware.modules.get_module_class(modul
e)
# 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
instance
=
courseware
.
modules
.
get_module_class
(
module
)(
xml
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment