Clean up construction of program detail page links

We used to link program cards on the LMS program listing page to the marketing site. Those cards now link to detail pages also hosted by the LMS, rendering that functionality obsolete.

ECOM-5063
This commit is contained in:
Renzo Lucioni
2016-11-21 17:19:34 -05:00
parent f77c351244
commit 84c42ae1b8
3 changed files with 6 additions and 28 deletions

View File

@@ -149,13 +149,8 @@ def attach_program_detail_url(programs):
marketing_url = get_program_marketing_url(programs_config)
for program in programs:
if programs_config.show_program_details:
base = reverse('program_details_view', kwargs={'program_id': program['id']}).rstrip('/')
slug = slugify(program['name'])
else:
# TODO: Remove. Learners should always be sent to the LMS' program details page.
base = marketing_url
slug = program['marketing_slug']
base = reverse('program_details_view', kwargs={'program_id': program['id']}).rstrip('/')
slug = slugify(program['name'])
program['detail_url'] = '{base}/{slug}'.format(base=base, slug=slug)