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
4d759e97
Commit
4d759e97
authored
May 08, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test full flow, including reset
parent
f26a2585
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py
+12
-0
common/lib/xmodule/xmodule/tests/test_combined_open_ended.py
+17
-0
No files found.
common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py
View file @
4d759e97
...
...
@@ -803,6 +803,18 @@ class CombinedOpenEndedV1Module():
return
progress_object
def
out_of_sync_error
(
self
,
get
,
msg
=
''
):
"""
return dict out-of-sync error message, and also log.
"""
#This is a dev_facing_error
log
.
warning
(
"Combined module state out sync. state:
%
r, get:
%
r.
%
s"
,
self
.
state
,
get
,
msg
)
#This is a student_facing_error
return
{
'success'
:
False
,
'error'
:
'The problem state got out-of-sync. Please try reloading the page.'
}
class
CombinedOpenEndedV1Descriptor
():
"""
...
...
common/lib/xmodule/xmodule/tests/test_combined_open_ended.py
View file @
4d759e97
...
...
@@ -604,8 +604,10 @@ class OpenEndedModuleXmlTest(unittest.TestCase):
#This error is okay. We don't have a grading service to connect to!
pass
#Try to get the rubric from the module
module
.
handle_ajax
(
"get_combined_rubric"
,
{})
#Make a fake reply from the queue
queue_reply
=
{
'queuekey'
:
""
,
'xqueue_body'
:
json
.
dumps
({
...
...
@@ -620,5 +622,20 @@ class OpenEndedModuleXmlTest(unittest.TestCase):
})
}
module
.
handle_ajax
(
"check_for_score"
,
{})
#Update the module with the fake queue reply
module
.
handle_ajax
(
"score_update"
,
queue_reply
)
#Get html and other data client will request
html
=
module
.
get_html
()
legend
=
module
.
handle_ajax
(
"get_legend"
,
{})
status
=
module
.
handle_ajax
(
"get_status"
,
{})
legend
=
module
.
handle_ajax
(
"skip_post_assessment"
,
{})
#Get all results
legend
=
module
.
handle_ajax
(
"get_results"
,
{})
log
.
info
(
module
.
task_states
)
#reset the problem
module
.
handle_ajax
(
"reset"
,
{})
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