diff --git a/lms/templates/courseware/program_marketing.html b/lms/templates/courseware/program_marketing.html index a2e1b8c069..3103147bd5 100644 --- a/lms/templates/courseware/program_marketing.html +++ b/lms/templates/courseware/program_marketing.html @@ -67,7 +67,7 @@ endorser_org = endorser_position.get('organization_name') or corporate_endorseme full_program_price = full_program_price_format.format(program['full_program_price']) %>
-
@@ -294,8 +294,9 @@ endorser_org = endorser_position.get('organization_name') or corporate_endorseme
% for course in courses: - <% - course_run = course['course_runs'][0] + <% + ## Sort course runs by start date, reverse so newest is first, then take newest run + course_run = sorted(course['course_runs'], key=lambda run: run['start'], reverse=True)[0] course_img = course_run.get('image') course_about_url = reverse('about_course', args=[course_run['key']]) course_purchase_url = course_run['upgrade_url'] if course_run['upgrade_url'] else course_about_url