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
ad1e73fa
Commit
ad1e73fa
authored
Jan 14, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up capa by removing message post actions that aren't needed
parent
a6480665
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
33 deletions
+0
-33
common/lib/capa/capa/capa_problem.py
+0
-18
common/lib/xmodule/xmodule/capa_module.py
+0
-15
No files found.
common/lib/capa/capa/capa_problem.py
View file @
ad1e73fa
...
...
@@ -186,24 +186,6 @@ class LoncapaProblem(object):
maxscore
+=
responder
.
get_max_score
()
return
maxscore
def
message_post
(
self
,
event_info
):
"""
Handle an ajax post that contains feedback on feedback
Returns a boolean success variable
Note: This only allows for feedback to be posted back to the grading controller for the first
open ended response problem on each page. Multiple problems will cause some sync issues.
TODO: Handle multiple problems on one page sync issues.
"""
success
=
False
message
=
"Could not find a valid responder."
log
.
debug
(
"in lcp"
)
for
responder
in
self
.
responders
.
values
():
if
hasattr
(
responder
,
'handle_message_post'
):
success
,
message
=
responder
.
handle_message_post
(
event_info
)
if
success
:
break
return
success
,
message
def
get_score
(
self
):
"""
Compute score for this problem. The score is the number of points awarded.
...
...
common/lib/xmodule/xmodule/capa_module.py
View file @
ad1e73fa
...
...
@@ -380,7 +380,6 @@ class CapaModule(XModule):
'problem_save'
:
self
.
save_problem
,
'problem_show'
:
self
.
get_answer
,
'score_update'
:
self
.
update_score
,
'message_post'
:
self
.
message_post
,
}
if
dispatch
not
in
handlers
:
...
...
@@ -395,20 +394,6 @@ class CapaModule(XModule):
})
return
json
.
dumps
(
d
,
cls
=
ComplexEncoder
)
def
message_post
(
self
,
get
):
"""
Posts a message from a form to an appropriate location
"""
event_info
=
dict
()
event_info
[
'state'
]
=
self
.
lcp
.
get_state
()
event_info
[
'problem_id'
]
=
self
.
location
.
url
()
event_info
[
'student_id'
]
=
self
.
system
.
anonymous_student_id
event_info
[
'survey_responses'
]
=
get
success
,
message
=
self
.
lcp
.
message_post
(
event_info
)
return
{
'success'
:
success
,
'message'
:
message
}
def
closed
(
self
):
''' Is the student still allowed to submit answers? '''
if
self
.
attempts
==
self
.
max_attempts
:
...
...
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