Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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-platform
Commits
d48a1d5f
Unverified
Commit
d48a1d5f
authored
Dec 18, 2017
by
Michael Frey
Committed by
GitHub
Dec 18, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16926 from edx/mjfrey/LEARNER-3606
Get only the first program from the list of matching entitlements.
parents
79d95e9c
3305a7c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
openedx/core/djangoapps/programs/utils.py
+2
-4
No files found.
openedx/core/djangoapps/programs/utils.py
View file @
d48a1d5f
...
...
@@ -222,10 +222,8 @@ class ProgramProgressMeter(object):
completed
,
in_progress
,
not_started
=
[],
[],
[]
for
course
in
program_copy
[
'courses'
]:
try
:
entitlement
=
CourseEntitlement
.
objects
.
get
(
user
=
self
.
user
,
course_uuid
=
course
[
'uuid'
])
except
CourseEntitlement
.
DoesNotExist
:
entitlement
=
None
entitlement
=
CourseEntitlement
.
objects
.
filter
(
user
=
self
.
user
,
course_uuid
=
course
[
'uuid'
])
.
first
()
if
self
.
_is_course_complete
(
course
):
completed
.
append
(
course
)
...
...
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