diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index db2ce5b4a4..8c84d9557e 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -295,8 +295,6 @@ def dashboard(request): cert_statuses = {course.id: cert_info(request.user, course) for course, _enrollment in courses} - exam_registrations = {course.id: exam_registration_info(request.user, course) for course, _enrollment in courses} - # get info w.r.t ExternalAuthMap external_auth_map = None try: @@ -312,7 +310,6 @@ def dashboard(request): 'errored_courses': errored_courses, 'show_courseware_links_for': show_courseware_links_for, 'cert_statuses': cert_statuses, - 'exam_registrations': exam_registrations, } return render_to_response('dashboard.html', context) diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index a3c3fd25e0..d6d708a0c6 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -2,14 +2,6 @@ <%! from django.core.urlresolvers import reverse - from courseware.courses import course_image_url, get_course_about_section - from courseware.access import has_access - from certificates.models import CertificateStatuses - - from xmodule.modulestore import MONGO_MODULESTORE_TYPE - from xmodule.modulestore.django import modulestore - - import waffle %> <%inherit file="main.html" /> @@ -163,127 +155,9 @@ % if len(courses) > 0: diff --git a/lms/templates/dashboard/dashboard_course_listing.html b/lms/templates/dashboard/dashboard_course_listing.html new file mode 100644 index 0000000000..98cdebca3c --- /dev/null +++ b/lms/templates/dashboard/dashboard_course_listing.html @@ -0,0 +1,133 @@ +<%page args="course, enrollment, show_courseware_link, cert_status" /> + +<%! from django.utils.translation import ugettext as _ %> +<%! + from django.core.urlresolvers import reverse + from courseware.courses import course_image_url, get_course_about_section + from courseware.access import has_access + from certificates.models import CertificateStatuses + + from xmodule.modulestore import MONGO_MODULESTORE_TYPE + from xmodule.modulestore.django import modulestore + + import waffle +%> +
  • +
    + <% + if waffle.flag_is_active(request, 'merge_course_tabs'): + course_target = reverse('courseware', args=[course.id]) + else: + course_target = reverse('info', args=[course.id]) + %> + + % if show_courseware_link: + + ${_('{course_number} {course_name} Cover Image').format(course_number=course.number, course_name=course.display_name_with_default) |h} + + % else: +
    + ${_('{course_number} {course_name} Cover Image').format(course_number=course.number, course_name=course.display_name_with_default) | h} +
    + % endif + + % if enrollment.mode == "verified": + + ${_("Enrolled as: ")} + ID Verified Ribbon/Badge + ${_("ID Verified")} + + % endif + +
    +
    +

    + % if course.has_ended(): + ${_("Course Completed - {end_date}").format(end_date=course.end_date_text)} + % elif course.has_started(): + ${_("Course Started - {start_date}").format(start_date=course.start_date_text)} + % else: # hasn't started yet + ${_("Course Starts - {start_date}").format(start_date=course.start_date_text)} + % endif +

    +

    ${get_course_about_section(course, 'university')}

    +

    + % if show_courseware_link: + ${course.display_number_with_default | h} ${course.display_name_with_default} + % else: + ${course.display_number_with_default | h} ${course.display_name_with_default} + % endif +

    +
    + + % if course.has_ended() and cert_status: + <% + if cert_status['status'] == 'generating': + status_css_class = 'course-status-certrendering' + elif cert_status['status'] == 'ready': + status_css_class = 'course-status-certavailable' + elif cert_status['status'] == 'notpassing': + status_css_class = 'course-status-certnotavailable' + else: + status_css_class = 'course-status-processing' + %> +
    + + % if cert_status['status'] == 'processing': +

    ${_("Final course details are being wrapped up at this time. Your final standing will be available shortly.")}

    + % elif cert_status['status'] in ('generating', 'ready', 'notpassing', 'restricted'): +

    ${_("Your final grade:")} + ${"{0:.0f}%".format(float(cert_status['grade'])*100)}. + % if cert_status['status'] == 'notpassing': + ${_("Grade required for a certificate:")} + ${"{0:.0f}%".format(float(course.lowest_passing_grade)*100)}. + % elif cert_status['status'] == 'restricted': +

    + ${_("Your certificate is being held pending confirmation that the issuance of your certificate is in compliance with strict U.S. embargoes on Iran, Cuba, Syria and Sudan. If you think our system has mistakenly identified you as being connected with one of those countries, please let us know by contacting {email}.").format(email='{email}.'.format(email=settings.CONTACT_EMAIL))} +

    + % endif +

    + % endif + + % if cert_status['show_disabled_download_button'] or cert_status['show_download_url'] or cert_status['show_survey_button']: + + % endif +
    + + % endif + + % if show_courseware_link: + % if course.has_ended(): + ${_('View Archived Course')} + % else: + ${_('View Course')} + % endif + % endif + + + + ${_('Unregister')} + +% if settings.MITX_FEATURES['ENABLE_INSTRUCTOR_EMAIL'] and modulestore().get_modulestore_type(course.id) == MONGO_MODULESTORE_TYPE: + + +% endif + +
    +
    +