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
88046f00
Commit
88046f00
authored
Sep 05, 2017
by
Eric Fischer
Committed by
GitHub
Sep 05, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1043 from edx/ri/fix-learning-training-assessment-access
EDUCATOR-1263 Fix Learner Training Assessment assess
parents
b0a9f6d3
f4986a86
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
openassessment/xblock/data_conversion.py
+1
-1
openassessment/xblock/student_training_mixin.py
+5
-1
openassessment/xblock/test/test_data_conversion.py
+2
-0
No files found.
openassessment/xblock/data_conversion.py
View file @
88046f00
...
...
@@ -92,7 +92,7 @@ def update_assessments_format(assessments):
{
'text'
:
example
[
'answer'
]}
]
}
if
isinstance
(
example
,
dict
)
and
isinstance
(
example
[
'answer'
],
list
)
and
example
[
'answer'
]
>
0
:
if
isinstance
(
example
,
dict
)
and
isinstance
(
example
[
'answer'
],
list
)
and
example
[
'answer'
]:
example
[
'answer'
]
=
{
'parts'
:
[
{
'text'
:
example
[
'answer'
][
0
]}
...
...
openassessment/xblock/student_training_mixin.py
View file @
88046f00
...
...
@@ -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'
]
...
...
openassessment/xblock/test/test_data_conversion.py
View file @
88046f00
...
...
@@ -55,6 +55,8 @@ class DataConversionTest(TestCase):
@ddt.data
(
([{
'answer'
:
'Ans'
}],
[{
'answer'
:
{
'parts'
:
[{
'text'
:
'Ans'
}]}}]),
([{
'answer'
:
[
'Ans'
]}],
[{
'answer'
:
{
'parts'
:
[{
'text'
:
'Ans'
}]}}]),
([{
'answer'
:
[]}],
[{
'answer'
:
[]}]),
)
@ddt.unpack
def
test_update_assessments_format
(
self
,
input
,
output
):
...
...
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