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
21b47b01
Commit
21b47b01
authored
May 29, 2014
by
Stephen Sanchez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating Staff Debug section for AI
parent
d9f28950
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
9 deletions
+62
-9
apps/openassessment/templates/openassessmentblock/staff_debug/student_info.html
+37
-0
apps/openassessment/xblock/staff_info_mixin.py
+10
-6
apps/openassessment/xblock/test/test_staff_info.py
+15
-3
No files found.
apps/openassessment/templates/openassessmentblock/staff_debug/student_info.html
View file @
21b47b01
...
...
@@ -16,6 +16,7 @@
</div>
</div>
{% if peer_assessments %}
<div
class=
"staff-info__status ui-staff__content__section"
>
<h3
class=
"title"
>
{% trans "Peer Assessments for This Student" %}
</h3>
{% for assessment in peer_assessments %}
...
...
@@ -55,7 +56,9 @@
{% endwith %}
{% endfor %}
</div>
{% endif %}
{% if submitted_assessments %}
<div
class=
"staff-info__status ui-staff__content__section"
>
<h3
class=
"title"
>
{% trans "Peer Assessments Completed by This Student" %}
</h3>
{% for assessment in submitted_assessments %}
...
...
@@ -95,7 +98,9 @@
{% endwith %}
{% endfor %}
</div>
{% endif %}
{% if self_assessment %}
<div
class=
"staff-info__status ui-staff__content__section"
>
<h3
class=
"title"
>
{% trans "Student's Self Assessment" %}
</h3>
<table
class=
"staff-info__status__table"
summary=
"{% trans "
Self
Assessment
"
%}"
>
...
...
@@ -124,6 +129,38 @@
</tbody>
</table>
</div>
{% endif %}
{% if example_based_assessment %}
<div
class=
"staff-info__status ui-staff__content__section"
>
<h3
class=
"title"
>
{% trans "Example Based Assessment" %}
</h3>
<table
class=
"staff-info__status__table"
summary=
"{% trans "
Example
Based
Assessment
"
%}"
>
<thead>
<tr>
<th
abbr=
"Criterion"
scope=
"col"
>
{% trans "Criterion" %}
</th>
<th
abbr=
"Selected Option"
scope=
"col"
>
{% trans "Selected Option" %}
</th>
<th
abbr=
"Points"
scope=
"col"
>
{% trans "Points" %}
</th>
<th
abbr=
"Points Possible"
scope=
"col"
>
{% trans "Points Possible" %}
</th>
</tr>
</thead>
<tbody>
{% for criterion in rubric_criteria %}
{% for part in example_based_assessment.parts %}
{% if part.option.criterion.name == criterion.name %}
<tr>
<td
class=
"label"
>
{{ criterion.name }}
</td>
<td
class=
"value"
>
{{ part.option.name }}
</td>
<td
class=
"value"
>
{{ part.option.points }}
</td>
<td
class=
"value"
>
{{ criterion.total_value }}
</td>
</tr>
{% endif %}
{% endfor %}
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
</div>
{% else %}
{% trans "Couldn't find a response for this student." %}
...
...
apps/openassessment/xblock/staff_info_mixin.py
View file @
21b47b01
...
...
@@ -152,27 +152,31 @@ class StaffInfoMixin(object):
submission
=
submissions
[
0
]
submission_uuid
=
submissions
[
0
][
'uuid'
]
example_based_assessment
=
None
self_assessment
=
None
peer_assessments
=
[]
submitted_assessments
=
[]
if
"peer-assessment"
in
assessment_steps
:
peer_assessments
=
peer_api
.
get_assessments
(
submission_uuid
)
submitted_assessments
=
peer_api
.
get_submitted_assessments
(
submission_uuid
,
scored_only
=
False
)
else
:
peer_assessments
=
[]
submitted_assessments
=
[]
if
"self-assessment"
in
assessment_steps
:
self_assessment
=
self_api
.
get_assessment
(
submission_uuid
)
else
:
self_assessment
=
None
if
"example-based-assessment"
in
assessment_steps
:
example_based_assessment
=
ai_api
.
get_latest_assessment
(
submission_uuid
)
context
=
{
'submission'
:
submission
,
'peer_assessments'
:
peer_assessments
,
'submitted_assessments'
:
submitted_assessments
,
'self_assessment'
:
self_assessment
,
'example_based_assessment'
:
example_based_assessment
,
'rubric_criteria'
:
copy
.
deepcopy
(
self
.
rubric_criteria
),
}
if
peer_assessments
or
self_assessment
:
if
peer_assessments
or
self_assessment
or
example_based_assessment
:
max_scores
=
peer_api
.
get_rubric_max_scores
(
submission_uuid
)
for
criterion
in
context
[
"rubric_criteria"
]:
criterion
[
"total_value"
]
=
max_scores
[
criterion
[
"name"
]]
...
...
apps/openassessment/xblock/test/test_staff_info.py
View file @
21b47b01
...
...
@@ -254,8 +254,20 @@ class TestCourseStaff(XBlockHandlerTestCase):
self
.
assertEquals
([],
context
[
'peer_assessments'
])
self
.
assertEquals
(
"openassessmentblock/staff_debug/student_info.html"
,
path
)
@scenario
(
'data/basic_scenario.xml'
,
user_id
=
'Bob'
)
@override_settings
(
ORA2_AI_ALGORITHMS
=
AI_ALGORITHMS
)
@scenario
(
'data/example_based_assessment.xml'
,
user_id
=
'Bob'
)
def
test_staff_debug_student_info_full_workflow
(
self
,
xblock
):
# Train classifiers.
example_based_assessment
=
xblock
.
get_assessment_module
(
'example-based-assessment'
)
example_based_assessment
[
'algorithm_id'
]
=
ALGORITHM_ID
train_classifiers
({
'criteria'
:
xblock
.
rubric_criteria
},
CLASSIFIER_SCORE_OVERRIDES
)
# Commonly chosen options for assessments
options_selected
=
{
"Ideas"
:
"Good"
,
"Content"
:
"Poor"
,
}
# Simulate that we are course staff
xblock
.
xmodule_runtime
=
self
.
_create_mock_runtime
(
xblock
.
scope_ids
.
usage_id
,
True
,
False
,
"Bob"
...
...
@@ -280,7 +292,7 @@ class TestCourseStaff(XBlockHandlerTestCase):
peer_api
.
create_assessment
(
submission
[
"uuid"
],
STUDENT_ITEM
[
"student_id"
],
ASSESSMENT_DICT
[
'options_selected'
]
,
dict
(),
""
,
options_selected
,
dict
(),
""
,
{
'criteria'
:
xblock
.
rubric_criteria
},
1
,
)
...
...
@@ -289,7 +301,7 @@ class TestCourseStaff(XBlockHandlerTestCase):
self_api
.
create_assessment
(
submission
[
'uuid'
],
STUDENT_ITEM
[
"student_id"
],
ASSESSMENT_DICT
[
'options_selected'
]
,
options_selected
,
{
'criteria'
:
xblock
.
rubric_criteria
},
)
...
...
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