Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
c648db7f
Commit
c648db7f
authored
11 years ago
by
Jason Bau
Browse files
Options
Downloads
Patches
Plain Diff
add comment explaining child_history condition
parent
ec7d9578
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/lib/xmodule/xmodule/open_ended_grading_classes/open_ended_module.py
+4
-0
4 additions, 0 deletions
...e/xmodule/open_ended_grading_classes/open_ended_module.py
with
4 additions
and
0 deletions
common/lib/xmodule/xmodule/open_ended_grading_classes/open_ended_module.py
+
4
−
0
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment