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
c648db7f
Commit
c648db7f
authored
Nov 01, 2013
by
Jason Bau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add comment explaining child_history condition
parent
ec7d9578
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
common/lib/xmodule/xmodule/open_ended_grading_classes/open_ended_module.py
+4
-0
No files found.
common/lib/xmodule/xmodule/open_ended_grading_classes/open_ended_module.py
View file @
c648db7f
...
...
@@ -281,6 +281,10 @@ class OpenEndedModule(openendedchild.OpenEndedChild):
if
not
new_score_msg
[
'valid'
]:
new_score_msg
[
'feedback'
]
=
'Invalid grader reply. Please contact the course staff.'
# self.child_history is initialized as []. record_latest_score() and record_latest_post_assessment()
# operate on self.child_history[-1]. Thus we have to make sure child_history is not [].
# Handle at this level instead of in record_*() because this is a good place to reduce the number of conditions
# and also keep the persistent state from changing.
if
self
.
child_history
:
self
.
record_latest_score
(
new_score_msg
[
'score'
])
self
.
record_latest_post_assessment
(
score_msg
)
...
...
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