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
08ee7c8d
Commit
08ee7c8d
authored
Aug 07, 2014
by
gradyward
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #605 from edx/grady/ORA-784
Fixes Student Training Labels on Import
parents
70510333
6b2bdd8b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
openassessment/xblock/studio_mixin.py
+2
-2
openassessment/xblock/test/test_studio.py
+13
-0
No files found.
openassessment/xblock/studio_mixin.py
View file @
08ee7c8d
...
@@ -258,7 +258,7 @@ class StudioMixin(object):
...
@@ -258,7 +258,7 @@ class StudioMixin(object):
student_training_module
=
self
.
get_assessment_module
(
'student-training'
)
student_training_module
=
self
.
get_assessment_module
(
'student-training'
)
student_training_template
=
{
'answer'
:
""
}
student_training_template
=
{
'answer'
:
""
}
criteria_list
=
copy
.
deepcopy
(
self
.
rubric_criteria
)
criteria_list
=
copy
.
deepcopy
(
self
.
rubric_criteria
_with_labels
)
for
criterion
in
criteria_list
:
for
criterion
in
criteria_list
:
criterion
[
'option_selected'
]
=
""
criterion
[
'option_selected'
]
=
""
student_training_template
[
'criteria'
]
=
criteria_list
student_training_template
[
'criteria'
]
=
criteria_list
...
@@ -267,7 +267,7 @@ class StudioMixin(object):
...
@@ -267,7 +267,7 @@ class StudioMixin(object):
example_list
=
[]
example_list
=
[]
# Adds each example to a modified version of the student training module dictionary.
# Adds each example to a modified version of the student training module dictionary.
for
example
in
student_training_module
[
'examples'
]:
for
example
in
student_training_module
[
'examples'
]:
criteria_list
=
copy
.
deepcopy
(
self
.
rubric_criteria
)
criteria_list
=
copy
.
deepcopy
(
self
.
rubric_criteria
_with_labels
)
# Equivalent to a Join Query, this adds the selected option to the Criterion's dictionary, so that
# Equivalent to a Join Query, this adds the selected option to the Criterion's dictionary, so that
# it can be easily referenced in the template without searching through the selected options.
# it can be easily referenced in the template without searching through the selected options.
for
criterion
in
criteria_list
:
for
criterion
in
criteria_list
:
...
...
openassessment/xblock/test/test_studio.py
View file @
08ee7c8d
...
@@ -311,3 +311,16 @@ class StudioViewTest(XBlockHandlerTestCase):
...
@@ -311,3 +311,16 @@ class StudioViewTest(XBlockHandlerTestCase):
self
.
assertEqual
(
criterion
[
'label'
],
criterion
[
'name'
])
self
.
assertEqual
(
criterion
[
'label'
],
criterion
[
'name'
])
for
option
in
criterion
[
'options'
]:
for
option
in
criterion
[
'options'
]:
self
.
assertEqual
(
option
[
'label'
],
option
[
'name'
])
self
.
assertEqual
(
option
[
'label'
],
option
[
'name'
])
# Verify the same thing for the training example template
for
criterion
in
context
[
'assessments'
][
'training'
][
'template'
][
'criteria'
]:
self
.
assertEqual
(
criterion
[
'label'
],
criterion
[
'name'
])
for
option
in
criterion
[
'options'
]:
self
.
assertEqual
(
option
[
'label'
],
option
[
'name'
])
# Verify the same thing for the context for student training examples
for
example
in
context
[
'assessments'
][
'training'
][
'examples'
]:
for
criterion
in
example
[
'criteria'
]:
self
.
assertEqual
(
criterion
[
'label'
],
criterion
[
'name'
])
for
option
in
criterion
[
'options'
]:
self
.
assertEqual
(
option
[
'label'
],
option
[
'name'
])
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