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
efbb5ed6
Commit
efbb5ed6
authored
May 15, 2017
by
Renzo Lucioni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tighten up program details view
Condense view logic left over from removal of Waffle switch. ECOM-6602
parent
131cc0bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
lms/djangoapps/learner_dashboard/views.py
+6
-11
No files found.
lms/djangoapps/learner_dashboard/views.py
View file @
efbb5ed6
...
...
@@ -57,6 +57,10 @@ def program_details(request, program_uuid):
raise
Http404
program_data
=
ProgramDataExtender
(
program_data
,
request
.
user
)
.
extend
()
course_data
=
meter
.
progress
(
programs
=
[
program_data
],
count_only
=
False
)[
0
]
certificate_data
=
get_certificates
(
request
.
user
,
program_data
)
program_data
.
pop
(
'courses'
)
urls
=
{
'program_listing_url'
:
reverse
(
'program_listing_view'
),
...
...
@@ -66,25 +70,16 @@ def program_details(request, program_uuid):
'commerce_api_url'
:
reverse
(
'commerce_api:v0:baskets:create'
),
}
# TODO: Tighten this up!
context
=
{
'urls'
:
urls
,
'show_program_listing'
:
programs_config
.
enabled
,
'nav_hidden'
:
True
,
'disable_courseware_js'
:
True
,
'uses_pattern_library'
:
True
,
'user_preferences'
:
get_user_preferences
(
request
.
user
)
}
course_data
=
meter
.
progress
(
programs
=
[
program_data
],
count_only
=
False
)[
0
]
certificate_data
=
get_certificates
(
request
.
user
,
program_data
)
program_data
.
pop
(
'courses'
)
context
.
update
({
'user_preferences'
:
get_user_preferences
(
request
.
user
),
'program_data'
:
program_data
,
'course_data'
:
course_data
,
'certificate_data'
:
certificate_data
,
}
)
}
return
render_to_response
(
'learner_dashboard/program_details.html'
,
context
)
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