diff --git a/lms/djangoapps/courseware/courses.py b/lms/djangoapps/courseware/courses.py index 7bf3cd729f..688da8d98e 100644 --- a/lms/djangoapps/courseware/courses.py +++ b/lms/djangoapps/courseware/courses.py @@ -8,6 +8,7 @@ from django.http import Http404 from xmodule.course_module import CourseDescriptor from xmodule.modulestore.django import modulestore +from xmodule.modulestore.exceptions import ItemNotFoundError log = logging.getLogger(__name__) @@ -29,7 +30,7 @@ def check_course(course_id, course_must_be_open=True, course_required=True): try: course_loc = CourseDescriptor.id_to_location(course_id) course = modulestore().get_item(course_loc) - except KeyError: + except (KeyError, ItemNotFoundError): raise Http404("Course not found.") if course_must_be_open and not course.has_started(): diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index 038bc4684c..b5d81c7e2c 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -33,14 +33,20 @@ % for course in courses:
- + <% + if course.has_started(): + course_target = reverse('info', args=[course.id]) + else: + course_target = reverse('about_course', args=[course.id]) + %> +
${get_course_about_section(course, 'university')} -

${get_course_about_section(course, "title")}

+

${get_course_about_section(course, "title")}

Class Starts - 9/2/2012