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
9656880c
Commit
9656880c
authored
Feb 25, 2014
by
Stephen Sanchez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code Review tweaks
parent
883f6ba3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
apps/openassessment/peer/api.py
+2
-2
apps/openassessment/peer/serializers.py
+8
-1
No files found.
apps/openassessment/peer/api.py
View file @
9656880c
...
...
@@ -260,9 +260,9 @@ def get_assessment_median_scores(submission_id, must_be_graded_by):
# Once we have lists of values for each criterion, sort each value and set
# to the median value for each.
for
criterion
in
scores
.
key
s
():
for
criterion
,
criterion_scores
in
scores
.
iteritem
s
():
total_criterion_scores
=
len
(
scores
[
criterion
])
criterion_scores
=
sorted
(
scores
[
criterion
]
)
criterion_scores
=
sorted
(
criterion_scores
)
median
=
int
(
math
.
ceil
(
total_criterion_scores
/
float
(
2
)))
if
total_criterion_scores
==
0
:
criterion_score
=
0
...
...
apps/openassessment/peer/serializers.py
View file @
9656880c
...
...
@@ -4,7 +4,6 @@ Serializers are created to ensure models do not have to be accessed outside the
scope of the Tim APIs.
"""
from
copy
import
deepcopy
import
math
from
rest_framework
import
serializers
from
openassessment.peer.models
import
(
...
...
@@ -139,6 +138,14 @@ def get_assessment_review(submission):
the assessment, all assessment parts, all criterion options, and the
associated rubric.
Args:
submission (Submission): The Submission Model object to get
assessment reviews for.
Returns:
(list): A list of assessment reviews, combining assessments with
rubrics and assessment parts, to allow a cohesive object for
rendering the complete peer grading workflow.
"""
reviews
=
[]
assessments
=
Assessment
.
objects
.
filter
(
submission
=
submission
)
...
...
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