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
b6ff513e
Commit
b6ff513e
authored
Jul 25, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add in get last response functionality
parent
d23d354a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee
+9
-0
common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py
+6
-0
No files found.
common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee
View file @
b6ff513e
...
@@ -196,6 +196,8 @@ class @CombinedOpenEnded
...
@@ -196,6 +196,8 @@ class @CombinedOpenEnded
@
out_of_sync_message
=
'The problem state got out of sync. Try reloading the page.'
@
out_of_sync_message
=
'The problem state got out of sync. Try reloading the page.'
@
get_last_response
()
if
@
task_number
>
1
if
@
task_number
>
1
@
prompt_hide
()
@
prompt_hide
()
else
if
@
task_number
==
1
and
@
child_state
!=
'initial'
else
if
@
task_number
==
1
and
@
child_state
!=
'initial'
...
@@ -263,6 +265,13 @@ class @CombinedOpenEnded
...
@@ -263,6 +265,13 @@ class @CombinedOpenEnded
@
legend_container
.
after
(
response
.
html
).
remove
()
@
legend_container
.
after
(
response
.
html
).
remove
()
@
legend_container
=
$
(
@
legend_sel
)
@
legend_container
=
$
(
@
legend_sel
)
get_last_response
:
()
=>
data
=
{}
$
.
postWithPrefix
"
#{
@
ajax_url
}
/get_last_response"
,
data
,
(
response
)
=>
if
response
.
success
console
.
log
(
response
)
console
.
log
(
response
.
response
)
message_post
:
(
event
)
=>
message_post
:
(
event
)
=>
external_grader_message
=
$
(
event
.
target
).
parent
().
parent
().
parent
()
external_grader_message
=
$
(
event
.
target
).
parent
().
parent
().
parent
()
evaluation_scoring
=
$
(
event
.
target
).
parent
()
evaluation_scoring
=
$
(
event
.
target
).
parent
()
...
...
common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py
View file @
b6ff513e
...
@@ -7,6 +7,7 @@ from xmodule.progress import Progress
...
@@ -7,6 +7,7 @@ from xmodule.progress import Progress
from
xmodule.stringify
import
stringify_children
from
xmodule.stringify
import
stringify_children
import
self_assessment_module
import
self_assessment_module
import
open_ended_module
import
open_ended_module
from
functools
import
partial
from
.combined_open_ended_rubric
import
CombinedOpenEndedRubric
,
GRADER_TYPE_IMAGE_DICT
,
HUMAN_GRADER_TYPE
,
LEGEND_LIST
from
.combined_open_ended_rubric
import
CombinedOpenEndedRubric
,
GRADER_TYPE_IMAGE_DICT
,
HUMAN_GRADER_TYPE
,
LEGEND_LIST
log
=
logging
.
getLogger
(
"mitx.courseware"
)
log
=
logging
.
getLogger
(
"mitx.courseware"
)
...
@@ -445,6 +446,7 @@ class CombinedOpenEndedV1Module():
...
@@ -445,6 +446,7 @@ class CombinedOpenEndedV1Module():
'feedback_dicts'
:
feedback_dicts
,
'feedback_dicts'
:
feedback_dicts
,
'grader_ids'
:
grader_ids
,
'grader_ids'
:
grader_ids
,
'submission_ids'
:
submission_ids
,
'submission_ids'
:
submission_ids
,
'success'
:
True
}
}
return
last_response_dict
return
last_response_dict
...
@@ -608,6 +610,7 @@ class CombinedOpenEndedV1Module():
...
@@ -608,6 +610,7 @@ class CombinedOpenEndedV1Module():
'get_combined_rubric'
:
self
.
get_rubric
,
'get_combined_rubric'
:
self
.
get_rubric
,
'get_status'
:
self
.
get_status_ajax
,
'get_status'
:
self
.
get_status_ajax
,
'get_legend'
:
self
.
get_legend
,
'get_legend'
:
self
.
get_legend
,
'get_last_response'
:
self
.
get_last_response_ajax
,
}
}
if
dispatch
not
in
handlers
:
if
dispatch
not
in
handlers
:
...
@@ -617,6 +620,9 @@ class CombinedOpenEndedV1Module():
...
@@ -617,6 +620,9 @@ class CombinedOpenEndedV1Module():
d
=
handlers
[
dispatch
](
data
)
d
=
handlers
[
dispatch
](
data
)
return
json
.
dumps
(
d
,
cls
=
ComplexEncoder
)
return
json
.
dumps
(
d
,
cls
=
ComplexEncoder
)
def
get_last_response_ajax
(
self
,
data
):
return
self
.
get_last_response
(
self
.
current_task_number
)
def
next_problem
(
self
,
_data
):
def
next_problem
(
self
,
_data
):
"""
"""
Called via ajax to advance to the next problem.
Called via ajax to advance to the next 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