Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, March 26th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
ce7b094c
Commit
ce7b094c
authored
6 years ago
by
Emma Green
Browse files
Options
Downloads
Patches
Plain Diff
don't error out to user programs with really old course runs not in lms
parent
e39e6e9f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openedx/core/djangoapps/programs/utils.py
+12
-3
12 additions, 3 deletions
openedx/core/djangoapps/programs/utils.py
with
12 additions
and
3 deletions
openedx/core/djangoapps/programs/utils.py
+
12
−
3
View file @
ce7b094c
...
...
@@ -494,10 +494,19 @@ class ProgramDataExtender(object):
for
course_run
in
course
[
'
course_runs
'
]:
# State to be shared across handlers.
self
.
course_run_key
=
CourseKey
.
from_string
(
course_run
[
'
key
'
])
self
.
course_overview
=
CourseOverview
.
get_from_id
(
self
.
course_run_key
)
self
.
enrollment_start
=
self
.
course_overview
.
enrollment_start
or
DEFAULT_ENROLLMENT_START_DATE
self
.
_execute
(
'
_attach_course_run
'
,
course_run
)
# Some (old) course runs may exist for a program which do not exist in LMS. In that case,
# continue without the course run.
try
:
self
.
course_overview
=
CourseOverview
.
get_from_id
(
self
.
course_run_key
)
except
CourseOverview
.
DoesNotExist
:
log
.
warning
(
'
Failed to get course overview for course run key: %s
'
,
self
.
course_run
.
get
(
'
key
'
),
exec_info
=
True
)
else
:
self
.
enrollment_start
=
self
.
course_overview
.
enrollment_start
or
DEFAULT_ENROLLMENT_START_DATE
self
.
_execute
(
'
_attach_course_run
'
,
course_run
)
def
_attach_course_run_certificate_url
(
self
,
run_mode
):
certificate_data
=
certificate_api
.
certificate_downloadable_status
(
self
.
user
,
self
.
course_run_key
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment