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
1e74df29
Commit
1e74df29
authored
Aug 15, 2012
by
ichuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do replace_urls within capa_module get_answer (eg for img in <solution>s)
parent
dede4a61
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
common/lib/xmodule/xmodule/capa_module.py
+5
-2
No files found.
common/lib/xmodule/xmodule/capa_module.py
View file @
1e74df29
...
...
@@ -376,14 +376,17 @@ class CapaModule(XModule):
'''
For the "show answer" button.
TODO: show answer events should be logged here, not just in the problem.js
Returns the answers: {'answers' : answers}
'''
event_info
=
dict
()
event_info
[
'problem_id'
]
=
self
.
location
.
url
()
self
.
system
.
track_function
(
'show_answer'
,
event_info
)
if
not
self
.
answer_available
():
raise
NotFoundError
(
'Answer is not available'
)
else
:
answers
=
self
.
lcp
.
get_question_answers
()
# answers (eg <solution>) may have embedded images
answers
=
dict
(
(
k
,
self
.
system
.
replace_urls
(
answers
[
k
],
self
.
metadata
[
'data_dir'
]))
for
k
in
answers
)
return
{
'answers'
:
answers
}
# Figure out if we should move these to capa_problem?
...
...
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