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
fde370bd
Commit
fde370bd
authored
Jan 25, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix notification issue, sanitize input html
parent
a5daf1f3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
common/lib/xmodule/xmodule/open_ended_module.py
+1
-1
common/lib/xmodule/xmodule/openendedchild.py
+3
-2
lms/djangoapps/courseware/tabs.py
+1
-1
No files found.
common/lib/xmodule/xmodule/open_ended_module.py
View file @
fde370bd
...
...
@@ -554,7 +554,7 @@ class OpenEndedModule(openendedchild.OpenEndedChild):
# add new history element with answer and empty score and hint.
self
.
new_history_entry
(
get
[
'student_answer'
])
get
[
'student_answer'
]
=
self
.
sanitize_html
(
get
[
'student_answer'
])
get
[
'student_answer'
]
=
OpenEndedModule
.
sanitize_html
(
get
[
'student_answer'
])
self
.
send_to_grader
(
get
[
'student_answer'
],
system
)
self
.
change_state
(
self
.
ASSESSING
)
...
...
common/lib/xmodule/xmodule/openendedchild.py
View file @
fde370bd
...
...
@@ -131,7 +131,8 @@ class OpenEndedChild(object):
return
""
return
self
.
history
[
-
1
]
.
get
(
'post_assessment'
,
""
)
def
sanitize_html
(
self
,
answer
):
@staticmethod
def
sanitize_html
(
answer
):
cleaner
=
Cleaner
(
style
=
True
,
links
=
True
,
add_nofollow
=
True
,
page_structure
=
True
,
safe_attrs_only
=
True
)
clean_html
=
cleaner
.
clean_html
(
answer
)
return
clean_html
...
...
@@ -142,7 +143,7 @@ class OpenEndedChild(object):
@param answer: The student supplied answer
@return: None
"""
answer
=
self
.
sanitize_html
(
answer
)
answer
=
OpenEndedChild
.
sanitize_html
(
answer
)
self
.
history
.
append
({
'answer'
:
answer
})
def
record_latest_score
(
self
,
score
):
...
...
lms/djangoapps/courseware/tabs.py
View file @
fde370bd
...
...
@@ -133,7 +133,7 @@ def _peer_grading(tab, user, course, active_page):
return
[]
def
_combined_open_ended_grading
(
tab
,
user
,
course
,
active_page
):
if
user
.
is_authenticated
:
if
user
.
is_authenticated
()
:
link
=
reverse
(
'open_ended_notifications'
,
args
=
[
course
.
id
])
tab_name
=
"Open Ended Panel"
...
...
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