Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-submissions
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-submissions
Commits
f9d4d6a2
Commit
f9d4d6a2
authored
Apr 03, 2017
by
J. Cliff Dyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make get_scores return serialized ScoreSummary objects.
parent
7deafc6d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
setup.py
+1
-1
submissions/__init__.py
+1
-0
submissions/api.py
+4
-5
No files found.
setup.py
View file @
f9d4d6a2
...
...
@@ -33,7 +33,7 @@ def load_requirements(*requirements_paths):
setup
(
name
=
'edx-submissions'
,
version
=
'
1.2
.0'
,
version
=
'
2.0
.0'
,
author
=
'edX'
,
description
=
'An API for creating submissions and scores.'
,
url
=
'http://github.com/edx/edx-submissions.git'
,
...
...
submissions/__init__.py
View file @
f9d4d6a2
__version__
=
u'2.0.0'
submissions/api.py
View file @
f9d4d6a2
...
...
@@ -626,7 +626,8 @@ def get_score(student_item):
def
get_scores
(
course_id
,
student_id
):
"""Return a dict mapping item_ids -> (points_earned, points_possible).
"""
Return a dict mapping item_ids -> [ScoreSerializer(ScoreSummary)].
This method would be used by an LMS to find all the scores for a given
student in a given course.
...
...
@@ -662,10 +663,8 @@ def get_scores(course_id, student_id):
logger
.
exception
(
msg
)
raise
SubmissionInternalError
(
msg
)
scores
=
{
summary
.
student_item
.
item_id
:
(
summary
.
latest
.
points_earned
,
summary
.
latest
.
points_possible
)
for
summary
in
score_summaries
if
not
summary
.
latest
.
is_hidden
()
summary
.
student_item
.
item_id
:
ScoreSerializer
(
summary
.
latest
)
.
data
for
summary
in
score_summaries
if
not
summary
.
latest
.
is_hidden
()
}
return
scores
...
...
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