From b8d2276de7ec485cb24aed44d517d39f4c1e792d Mon Sep 17 00:00:00 2001 From: Greg Price Date: Thu, 16 May 2013 13:57:34 -0400 Subject: [PATCH] Remove dashboard links for unstarted courses If a course is not started, the course image and title on the dashboard link to the course about page. Because the LMS course about pages do not exist (i.e. 404) with the marketing site enabled, we simply do not use a link if the course has not started. --- lms/static/sass/multicourse/_dashboard.scss | 2 +- lms/templates/dashboard.html | 23 ++++++++++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/lms/static/sass/multicourse/_dashboard.scss b/lms/static/sass/multicourse/_dashboard.scss index 5e7f59138c..cc54b9b242 100644 --- a/lms/static/sass/multicourse/_dashboard.scss +++ b/lms/static/sass/multicourse/_dashboard.scss @@ -327,7 +327,7 @@ color: $lighter-base-font-color; } - h3 a { + h3 a, h3 span { display: block; margin-bottom: 10px; font-family: $sans-serif; diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index 0bf66872fc..75c0cafabd 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -194,17 +194,20 @@
<% - if has_access(user, course, 'load'): course_target = reverse('info', args=[course.id]) - else: - course_target = reverse('about_course', args=[course.id]) %> - - - + % if course.id in show_courseware_links_for: + + + + % else: +
+ +
+ % endif
@@ -218,7 +221,13 @@ % endif

${get_course_about_section(course, 'university')}

-

${course.number} ${course.display_name_with_default}

+

+ % if course.id in show_courseware_links_for: + ${course.number} ${course.display_name_with_default} + % else: + ${course.number} ${course.display_name_with_default} + % endif +

<%