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
8e36dfed
Commit
8e36dfed
authored
Dec 31, 2013
by
Waheed Ahmed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed self assessment deadlines don't apply to the submission of the rubric.
ORA-202
parent
0c7e2036
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
5 deletions
+28
-5
common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee
+1
-1
common/lib/xmodule/xmodule/open_ended_grading_classes/self_assessment_module.py
+4
-0
common/lib/xmodule/xmodule/tests/test_self_assessment.py
+23
-4
No files found.
common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee
View file @
8e36dfed
...
...
@@ -452,7 +452,7 @@ class @CombinedOpenEnded
@
rebind
()
else
@
errors_area
.
html
(
response
.
error
)
@
gentle_alert
response
.
error
else
@
errors_area
.
html
(
@
out_of_sync_message
)
...
...
common/lib/xmodule/xmodule/open_ended_grading_classes/self_assessment_module.py
View file @
8e36dfed
...
...
@@ -219,6 +219,10 @@ class SelfAssessmentModule(openendedchild.OpenEndedChild):
score_list[]: A multivalue key containing all the individual scores
"""
closed
,
msg
=
self
.
check_if_closed
()
if
closed
:
return
msg
if
self
.
child_state
!=
self
.
ASSESSING
:
return
self
.
out_of_sync_error
(
data
)
...
...
common/lib/xmodule/xmodule/tests/test_self_assessment.py
View file @
8e36dfed
from
datetime
import
datetime
import
json
import
unittest
from
mock
import
Mock
,
MagicMock
from
webob.multidict
import
MultiDict
from
pytz
import
UTC
from
xmodule.open_ended_grading_classes.self_assessment_module
import
SelfAssessmentModule
from
xmodule.modulestore
import
Location
from
lxml
import
etree
...
...
@@ -113,10 +114,13 @@ class SelfAssessmentTest(unittest.TestCase):
"""
# Create a module with no state yet. Important that this start off as a blank slate.
test_module
=
SelfAssessmentModule
(
get_test_system
(),
self
.
location
,
test_module
=
SelfAssessmentModule
(
get_test_system
(),
self
.
location
,
self
.
definition
,
self
.
descriptor
,
self
.
static_data
)
self
.
static_data
)
saved_response
=
"Saved response."
submitted_response
=
"Submitted response."
...
...
@@ -127,7 +131,7 @@ class SelfAssessmentTest(unittest.TestCase):
self
.
assertEqual
(
test_module
.
get_display_answer
(),
""
)
# Now, store an answer in the module.
test_module
.
handle_ajax
(
"store_answer"
,
{
'student_answer'
:
saved_response
},
get_test_system
())
test_module
.
handle_ajax
(
"store_answer"
,
{
'student_answer'
:
saved_response
},
get_test_system
())
# The stored answer should now equal our response.
self
.
assertEqual
(
test_module
.
stored_answer
,
saved_response
)
self
.
assertEqual
(
test_module
.
get_display_answer
(),
saved_response
)
...
...
@@ -150,4 +154,19 @@ class SelfAssessmentTest(unittest.TestCase):
# Confirm that the right response is loaded.
self
.
assertEqual
(
test_module
.
get_display_answer
(),
submitted_response
)
def
test_save_assessment_after_closing
(
self
):
"""
Test storing assessment when close date is passed.
"""
responses
=
{
'assessment'
:
'0'
,
'score_list[]'
:
[
'0'
,
'0'
]}
self
.
module
.
save_answer
({
'student_answer'
:
"I am an answer"
},
self
.
module
.
system
)
self
.
assertEqual
(
self
.
module
.
child_state
,
self
.
module
.
ASSESSING
)
#Set close date to current datetime.
self
.
module
.
close_date
=
datetime
.
now
(
UTC
)
#Save assessment when close date is passed.
self
.
module
.
save_assessment
(
responses
,
self
.
module
.
system
)
self
.
assertNotEqual
(
self
.
module
.
child_state
,
self
.
module
.
DONE
)
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