<%page args="course, enrollment, show_courseware_link, cert_status, credit_status, show_email_settings, course_mode_info, show_refund_option, is_paid_course, is_course_blocked, verification_status, course_requirements, dashboard_index, share_settings" /> <%! import urllib from django.utils.translation import ugettext as _ from django.utils.translation import ungettext from django.core.urlresolvers import reverse from markupsafe import escape from courseware.courses import course_image_url, get_course_about_section from course_modes.models import CourseMode from student.helpers import ( VERIFY_STATUS_NEED_TO_VERIFY, VERIFY_STATUS_SUBMITTED, VERIFY_STATUS_APPROVED, VERIFY_STATUS_MISSED_DEADLINE, VERIFY_STATUS_NEED_TO_REVERIFY ) %> <% cert_name_short = course.cert_name_short if cert_name_short == "": cert_name_short = settings.CERT_NAME_SHORT cert_name_long = course.cert_name_long if cert_name_long == "": cert_name_long = settings.CERT_NAME_LONG billing_email = settings.PAYMENT_SUPPORT_EMAIL %> <%namespace name='static' file='../static_content.html'/>
  • % if settings.FEATURES.get('ENABLE_VERIFIED_CERTIFICATES'): <% course_verified_certs = CourseMode.enrollment_mode_display(enrollment.mode, verification_status.get('status')) %> <% mode_class = course_verified_certs.get('display_mode', '') if mode_class != '': mode_class = ' ' + mode_class ; %> % else: <% mode_class = '' %> % endif
    <% course_target = reverse('info', args=[unicode(course.id)]) %>

    % if show_courseware_link: % if not is_course_blocked: ${course.display_name_with_default} % else: ${course.display_name_with_default} % endif % else: ${course.display_name_with_default} % endif

    ${get_course_about_section(course, 'university')} - ${course.display_number_with_default | h} % if course.has_ended(): ${_("Ended - {end_date}").format(end_date=course.end_datetime_text("SHORT_DATE"))} % elif course.has_started(): ${_("Started - {start_date}").format(start_date=course.start_datetime_text("SHORT_DATE"))} % elif course.start_date_is_still_default: # Course start date TBD ${_("Coming Soon")} % else: # hasn't started yet ${_("Starts - {start_date}").format(start_date=course.start_datetime_text("SHORT_DATE"))} % endif
    % if show_courseware_link: % if course.has_ended(): % if not is_course_blocked: ${_('View Archived Course')} ${course.display_name_with_default} % else: ${_('View Archived Course')} ${course.display_name_with_default} % endif % else: % if not is_course_blocked: ${_('View Course')} ${course.display_name_with_default} % else: ${_('View Course')} ${course.display_name_with_default} % endif % endif % if share_settings: <% if share_settings.get("CUSTOM_COURSE_URLS", False): if course.social_sharing_url: share_url = urllib.quote_plus(course.social_sharing_url) else: share_url = '' else: share_url = urllib.quote_plus(request.build_absolute_uri(reverse('about_course', args=[unicode(course.id)]))) share_window_name = 'shareWindow' share_window_config = 'toolbar=no, location=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=640, height=480' %> % if share_url and share_settings.get('DASHBOARD_FACEBOOK', False): <% facebook_url = 'https://www.facebook.com/sharer/sharer.php?u=' + share_url %> % endif % if share_url and share_settings.get('DASHBOARD_TWITTER', False): <% share_text_default = _("I'm learning on {platform_name}:").format(platform_name=settings.PLATFORM_NAME) %> <% share_text = urllib.quote_plus(share_settings.get('DASHBOARD_TWITTER_TEXT', share_text_default)) %> <% twitter_url = 'https://twitter.com/intent/tweet?text=' + share_text + '%20' + share_url %> % endif % endif % endif