<%! 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 %> <%inherit file="main.html" /> <%namespace name='static' file='static_content.html'/> <%block name="title">${_("Dashboard")} <%block name="js_extra">
%if message:
${message}
%endif

${ user.username }

${_("Current Courses")}

% if len(courses) > 0: % for course in courses:
<% course_target = reverse('info', args=[course.id]) %> % if course.id in show_courseware_links_for: ${_('{course_number} {course_name} Cover Image').format(course_number='${course.number}', course_name='${course.display_name_with_default}')} % else:
${_('{course_number} {course_name} Cover Image').format(course_number='${course.number}', course_name='${course.display_name_with_default}')}
% 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 course.id in show_courseware_links_for: ${course.number} ${course.display_name_with_default} % else: ${course.number} ${course.display_name_with_default} % endif

<% testcenter_exam_info = course.current_test_center_exam registration = exam_registrations.get(course.id) testcenter_register_target = reverse('begin_exam_registration', args=[course.id]) %> % if testcenter_exam_info is not None: % if registration is None and testcenter_exam_info.is_registering():
${_("Register for Pearson exam")}

${_("Registration for the Pearson exam is now open and will close on {end_date}").format(end_date="{}".format(testcenter_exam_info.registration_end_date_text))}

% endif % if registration is not None: % if registration.is_accepted:
${_("Schedule Pearson exam")}

${_("{link_start}Registration{link_end} number: {number}").format( link_start=''.format(url=testcenter_register_target), link_end='', number=registration.client_candidate_id, )}

${_("Write this down! You'll need it to schedule your exam.")}

% endif % if registration.is_rejected:

${_("Your registration for the Pearson exam has been rejected. Please {link_start}see your registration status details{link_end}.").format( link_start=''.format(url=testcenter_register_target), link_end='')} ${_("Otherwise {link_start}contact edX at {email}{link_end} for further help.").format( link_start=''.format(email="exam-help@edx.org", about=get_course_about_section(course, 'university'), number=course.number), link_end='', email="exam-help@edx.org", )}

% endif % if not registration.is_accepted and not registration.is_rejected:

${_("Your {link_start}registration for the Pearson exam{link_end} is pending.").format(link_start=''.format(url=testcenter_register_target), link_end='')} ${_("Within a few days, you should see a confirmation number here, which can be used to schedule your exam.")}

% endif % endif % endif <% cert_status = cert_statuses.get(course.id) %> % 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 course.id in show_courseware_links_for: % if course.has_ended(): ${_('View Archived Course')} % else: ${_('View Course')} % endif % endif ${_('Unregister')}
% endfor % else:

${_("Looks like you haven't registered for any courses yet.")}

${_("Find courses now!")}
% endif % if staff_access and len(errored_courses) > 0:

${_("Course-loading errors")}

% for course_dir, errors in errored_courses.items():

${course_dir | h}

    % for (msg, err) in errors:
  • ${msg}
    • ${err}
  • % endfor
% endfor % endif