Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
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-ora2
Commits
f4986a86
Commit
f4986a86
authored
Sep 05, 2017
by
Eric Fischer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle poorly-serialized training examples robustly
parent
3a727dea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
openassessment/xblock/student_training_mixin.py
+5
-1
No files found.
openassessment/xblock/student_training_mixin.py
View file @
f4986a86
...
...
@@ -129,7 +129,11 @@ class StudentTrainingMixin(object):
examples
)
if
example
:
context
[
'training_essay'
]
=
create_submission_dict
({
'answer'
:
example
[
'answer'
]},
self
.
prompts
)
# EDUCATOR-1263: some entries may be in an incorrect format, load them anyways
if
isinstance
(
example
,
dict
)
and
isinstance
(
example
[
'answer'
],
list
)
and
isinstance
(
example
[
'answer'
][
0
],
basestring
):
context
[
'training_essay'
]
=
create_submission_dict
({
'answer'
:
{
'parts'
:
[{
'text'
:
example
[
'answer'
][
0
]}]}},
self
.
prompts
)
else
:
context
[
'training_essay'
]
=
create_submission_dict
({
'answer'
:
example
[
'answer'
]},
self
.
prompts
)
context
[
'training_rubric'
]
=
{
'criteria'
:
example
[
'rubric'
][
'criteria'
],
'points_possible'
:
example
[
'rubric'
][
'points_possible'
]
...
...
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