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
1d55c981
Commit
1d55c981
authored
Mar 11, 2014
by
Stephen Sanchez
Committed by
Brian Talbot
Mar 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing some of the grade meta data for the template
parent
b266ea39
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
14 deletions
+52
-14
apps/openassessment/assessment/peer_api.py
+1
-1
apps/openassessment/assessment/serializers.py
+7
-3
apps/openassessment/templates/openassessmentblock/grade/oa_grade_complete.html
+26
-0
apps/openassessment/xblock/grade_mixin.py
+18
-10
No files found.
apps/openassessment/assessment/peer_api.py
View file @
1d55c981
...
...
@@ -347,7 +347,7 @@ def get_assessments(submission_id):
"""
try
:
submission
=
Submission
.
objects
.
get
(
uuid
=
submission_id
)
return
get_assessment_review
(
submission
)
return
get_assessment_review
(
submission
,
"PE"
)
except
DatabaseError
:
error_message
=
_
(
u"Error getting assessments for submission {}"
.
format
(
submission_id
)
...
...
apps/openassessment/assessment/serializers.py
View file @
1d55c981
...
...
@@ -134,7 +134,7 @@ class AssessmentSerializer(serializers.ModelSerializer):
)
def
get_assessment_review
(
submission
):
def
get_assessment_review
(
submission
,
score_type
):
"""Get all information pertaining to an assessment for review.
Given an assessment serializer, return a serializable formatted model of
...
...
@@ -144,6 +144,8 @@ def get_assessment_review(submission):
Args:
submission (Submission): The Submission Model object to get
assessment reviews for.
score_type (str): The score type we want to get assessments back for
to review.
Returns:
(list): A list of assessment reviews, combining assessments with
...
...
@@ -151,7 +153,7 @@ def get_assessment_review(submission):
rendering the complete peer grading workflow.
Examples:
>>> get_assessment_review(submission)
>>> get_assessment_review(submission
, score_type
)
[{
'submission': 1,
'rubric': {
...
...
@@ -186,7 +188,9 @@ def get_assessment_review(submission):
"""
return
[
full_assessment_dict
(
assessment
)
for
assessment
in
Assessment
.
objects
.
filter
(
submission
=
submission
)
for
assessment
in
Assessment
.
objects
.
filter
(
submission
=
submission
,
score_type
=
score_type
)
]
...
...
apps/openassessment/templates/openassessmentblock/grade/oa_grade_complete.html
View file @
1d55c981
...
...
@@ -83,6 +83,32 @@
</li>
{% endwith %}
{% endfor %}
<li
class=
"question question--001 question--feedback ui-toggle-visibility"
>
<h4
class=
"question__title ui-toggle-visibility__control"
>
How well did this response answer the overall question?
</h4>
{% for assessment in peer_assessments %}
{% with peer_num=forloop.counter %}
{% if assessment.feedback %}
<ul
class=
"question__answers ui-toggle-visibility__content"
>
<li
class=
"answer peer-evaluation--{{ peer_num }}"
id=
"question--001__answer-{{ peer_num }}"
>
<h5
class=
"answer__title"
>
<span
class=
"answer__source"
>
<span
class=
"label sr"
>
Evaluator:
</span>
<span
class=
"value"
>
Peer {{ peer_num }}
</span>
</span>
</h5>
<div
class=
"answer__value"
>
<h6
class=
"label sr"
>
Evaluator's Assessment:
</h6>
<div
class=
"value"
>
<p>
{{ assessment.feedback }}
</p>
</div>
</div>
</li>
</ul>
{% endif %}
{% endwith %}
{% endfor %}
</li>
</ol>
</article>
...
...
apps/openassessment/xblock/grade_mixin.py
View file @
1d55c981
from
xblock.core
import
XBlock
from
openassessment.assessment.peer_api
import
get_assessments
from
openassessment.assessment
import
peer_api
class
GradeMixin
(
object
):
"""Grade Mixin introduces all handlers for displaying grades
...
...
@@ -21,14 +20,23 @@ class GradeMixin(object):
context
=
{}
if
status
==
"done"
:
path
=
'openassessmentblock/grade/oa_grade_complete.html'
context
=
{
"score"
:
workflow
[
"score"
],
"assessments"
:
[
assessment
for
assessment
in
get_assessments
(
self
.
submission_uuid
)
],
}
elif
status
==
"waiting"
:
assessment_ui_model
=
self
.
get_assessment_module
(
'peer-assessment'
)
student_submission
=
self
.
get_user_submission
(
workflow
[
"submission_uuid"
]
)
student_score
=
workflow
[
"score"
]
assessments
=
peer_api
.
get_assessments
(
student_submission
[
"uuid"
])
median_scores
=
peer_api
.
get_assessment_median_scores
(
student_submission
[
"uuid"
],
assessment_ui_model
[
"must_be_graded_by"
]
)
context
[
"student_submission"
]
=
student_submission
context
[
"peer_assessments"
]
=
assessments
context
[
"rubric_criteria"
]
=
self
.
rubric_criteria
context
[
"score"
]
=
student_score
for
criterion
in
context
[
"rubric_criteria"
]:
criterion
[
"median_score"
]
=
median_scores
[
criterion
[
"name"
]]
elif
workflow
.
get
(
'status'
)
==
"waiting"
:
path
=
'openassessmentblock/grade/oa_grade_waiting.html'
elif
not
status
:
path
=
'openassessmentblock/grade/oa_grade_not_started.html'
...
...
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