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
b83df64f
Commit
b83df64f
authored
Jan 07, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inline response to feedback
parent
f7043497
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletions
+10
-1
common/lib/xmodule/xmodule/combined_open_ended_module.py
+3
-0
common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee
+2
-1
common/lib/xmodule/xmodule/open_ended_module.py
+5
-0
No files found.
common/lib/xmodule/xmodule/combined_open_ended_module.py
View file @
b83df64f
...
@@ -213,8 +213,11 @@ class CombinedOpenEndedModule(XModule):
...
@@ -213,8 +213,11 @@ class CombinedOpenEndedModule(XModule):
last_response
=
task
.
latest_answer
()
last_response
=
task
.
latest_answer
()
last_score
=
task
.
latest_score
()
last_score
=
task
.
latest_score
()
last_post_assessment
=
task
.
latest_post_assessment
()
last_post_assessment
=
task
.
latest_post_assessment
()
last_post_feedback
=
""
if
task_type
==
"openended"
:
if
task_type
==
"openended"
:
last_post_assessment
=
task
.
latest_post_assessment
(
short_feedback
=
True
)
last_post_assessment
=
task
.
latest_post_assessment
(
short_feedback
=
True
)
last_post_evaluation
=
task
.
format_feedback_with_evaluation
(
last_post_assessment
)
last_post_assessment
=
last_post_evaluation
max_score
=
task
.
max_score
()
max_score
=
task
.
max_score
()
state
=
task
.
state
state
=
task
.
state
last_response_dict
=
{
'response'
:
last_response
,
'score'
:
last_score
,
last_response_dict
=
{
'response'
:
last_response
,
'score'
:
last_score
,
...
...
common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee
View file @
b83df64f
...
@@ -30,6 +30,8 @@ class @CombinedOpenEnded
...
@@ -30,6 +30,8 @@ class @CombinedOpenEnded
@
hint_wrapper
=
@
$
(
'.hint-wrapper'
)
@
hint_wrapper
=
@
$
(
'.hint-wrapper'
)
@
message_wrapper
=
@
$
(
'.message-wrapper'
)
@
message_wrapper
=
@
$
(
'.message-wrapper'
)
@
submit_button
=
@
$
(
'.submit-button'
)
@
submit_button
=
@
$
(
'.submit-button'
)
@
submit_evaluation_button
=
@
$
(
'.submit-evaluation-button'
)
@
submit_evaluation_button
.
click
@
message_post
@
child_state
=
@
el
.
data
(
'state'
)
@
child_state
=
@
el
.
data
(
'state'
)
@
child_type
=
@
el
.
data
(
'child-type'
)
@
child_type
=
@
el
.
data
(
'child-type'
)
if
@
child_type
==
"openended"
if
@
child_type
==
"openended"
...
@@ -134,7 +136,6 @@ class @CombinedOpenEnded
...
@@ -134,7 +136,6 @@ class @CombinedOpenEnded
else
else
@
errors_area
.
html
(
'Problem state got out of sync. Try reloading the page.'
)
@
errors_area
.
html
(
'Problem state got out of sync. Try reloading the page.'
)
save_hint
:
(
event
)
=>
save_hint
:
(
event
)
=>
event
.
preventDefault
()
event
.
preventDefault
()
if
@
child_state
==
'post_assessment'
if
@
child_state
==
'post_assessment'
...
...
common/lib/xmodule/xmodule/open_ended_module.py
View file @
b83df64f
...
@@ -404,6 +404,11 @@ class OpenEndedModule(openendedchild.OpenEndedChild):
...
@@ -404,6 +404,11 @@ class OpenEndedModule(openendedchild.OpenEndedChild):
correct
=
(
score_ratio
>=
0.66
)
correct
=
(
score_ratio
>=
0.66
)
return
correct
return
correct
def
format_feedback_with_evaluation
(
self
,
feedback
):
context
=
{
'msg'
:
feedback
,
id
:
"1"
,
rows
:
30
,
cols
:
30
}
html
=
render_to_string
(
'open_ended_evaluation.html'
,
context
)
return
html
def
handle_ajax
(
self
,
dispatch
,
get
,
system
):
def
handle_ajax
(
self
,
dispatch
,
get
,
system
):
'''
'''
This is called by courseware.module_render, to handle an AJAX call.
This is called by courseware.module_render, to handle an AJAX call.
...
...
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