<%page args="course_overview, enrollment, entitlement, entitlement_session, course_card_index, enrollments_fbe_is_on, is_unfulfilled_entitlement, is_fulfilled_entitlement, entitlement_available_sessions, entitlement_expiration_date, entitlement_expired_at, show_courseware_link, cert_status, can_refund_entitlement, can_unenroll, credit_status, show_email_settings, course_mode_info, is_paid_course, is_course_voucher_refundable, course_requirements, dashboard_index, share_settings, related_programs, display_course_modes_on_dashboard, show_consent_link, enterprise_customer_name, resume_button_url, partner_managed_enrollment" expression_filter="h"/> <%! import datetime from django.conf import settings from django.utils.http import urlencode from urllib.parse import quote_plus from django.utils.translation import gettext as _ from django.utils.translation import ngettext from django.urls import reverse from common.djangoapps.course_modes.models import CourseMode from common.djangoapps.course_modes.helpers import enrollment_mode_display from common.djangoapps.student.helpers import user_has_passing_grade_in_course from lms.djangoapps.verify_student.services import IDVerificationService from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string from openedx.core.djangolib.markup import HTML, Text from openedx.features.course_experience import course_home_url from common.djangoapps.student.helpers import ( VERIFY_STATUS_NEED_TO_VERIFY, VERIFY_STATUS_SUBMITTED, VERIFY_STATUS_RESUBMITTED, VERIFY_STATUS_APPROVED, VERIFY_STATUS_MISSED_DEADLINE, VERIFY_STATUS_NEED_TO_REVERIFY, DISABLE_UNENROLL_CERT_STATES, ) from common.djangoapps.util.course import get_link_for_about_page, get_encoded_course_sharing_utm_params from lms.djangoapps.experiments.utils import UPSELL_TRACKING_FLAG %> <% reverify_link = IDVerificationService.get_verify_location() cert_name_short = course_overview.cert_name_short if cert_name_short == "": cert_name_short = settings.CERT_NAME_SHORT cert_name_long = course_overview.cert_name_long if cert_name_long == "": cert_name_long = settings.CERT_NAME_LONG is_course_expired = hasattr(show_courseware_link, 'error_code') and show_courseware_link.error_code == 'audit_expired' display_course_upgrade = ( use_ecommerce_payment_flow and course_mode_info and course_mode_info['show_upsell'] and not entitlement and course_mode_info['verified_sku'] ) %> <% is_non_certificate_enrollment = enrollment.mode == "audit" or enrollment.mode == "honor" is_passing_course = user_has_passing_grade_in_course(enrollment) course_ended_not_passing = course_overview.has_ended() and is_passing_course == False and is_non_certificate_enrollment == False %> <%namespace name='static' file='../static_content.html'/>
  • % if display_course_modes_on_dashboard: <% course_verified_certs = enrollment_mode_display( enrollment.mode, course_overview.id ) %> <% mode_class = course_verified_certs.get('display_mode', '') if mode_class: mode_class = ' ' + mode_class ; %> % else: <% mode_class = '' %> % endif
    <% course_target = course_home_url(course_overview.id) %>

    ${_('Course details')}

    % if show_courseware_link and not is_unfulfilled_entitlement: % if not is_course_expired: ${course_overview.display_name_with_default} % else: ${course_overview.display_name_with_default} % endif % else: ${course_overview.display_name_with_default} % endif ${course_overview.display_org_with_default}

    % if (show_courseware_link or is_unfulfilled_entitlement) and not is_course_expired: % if course_overview.has_ended(): % if not is_unfulfilled_entitlement: ${_('View Archived Course')} ${course_overview.display_name_with_default} % endif % else: <%include file="_dashboard_course_resume.html" args="resume_button_url=resume_button_url, course_overview=course_overview, enrollment=enrollment, is_unfulfilled_entitlement=is_unfulfilled_entitlement, course_target=course_target, related_programs=related_programs"/> % endif % endif
    <% enrollment_date = course_overview.self_paced and enrollment and enrollment.created if course_overview.start_date_is_still_default: container_string = _("Coming Soon") course_date = None else: format = 'shortDate' dashboard_start_display = course_overview.dashboard_start_display if course_overview.has_ended(): container_string = _("Ended - {date}") course_date = course_overview.end elif course_overview.has_started(): container_string = _("Started - {date}") if enrollment_date and isinstance(dashboard_start_display, datetime.datetime): course_date = max(enrollment_date, dashboard_start_display) else: course_date = enrollment_date or dashboard_start_display elif course_overview.starts_within(days=5): container_string = _("Starts - {date}") course_date = dashboard_start_display format = 'defaultFormat' else: ## hasn't started yet container_string = _("Starts - {date}") course_date = dashboard_start_display endif endif %> % if not is_unfulfilled_entitlement and is_course_expired: ${show_courseware_link.user_message}  ${_('for {course_display_name}').format(course_display_name=course_overview.display_name_with_default)} % elif is_unfulfilled_entitlement: % if not entitlement_expired_at: % if entitlement_expiration_date: ${_('You must select a session by {expiration_date} to access the course.').format(expiration_date=entitlement_expiration_date)} % else: ${_('You must select a session to access the course.')} % endif % endif % else: % if isinstance(course_date, str): ${container_string.format(date=course_date)} % elif course_date is not None: % endif % endif % if entitlement: % if not entitlement_expired_at: % endif % endif % if entitlement and not is_unfulfilled_entitlement and entitlement_expiration_date:
    % if entitlement_expired_at: ${_('You can no longer change sessions.')} % else: ${_('You can change sessions until {entitlement_expiration_date}.').format(entitlement_expiration_date=entitlement_expiration_date)} % endif
    % endif
  • % if share_settings.get('DASHBOARD_FACEBOOK', False) and share_settings.get('DASHBOARD_TWITTER', False): <%static:require_module_async module_name="js/course_sharing/course_sharing_events" class_name="CourseSharingEvents"> CourseSharingEvents("${course_overview.id | n, js_escaped_string}"); %endif <%static:require_module_async module_name="js/dateutil_factory" class_name="DateUtilFactory"> DateUtilFactory.transform(iterationKey=".localized-datetime"); % if UPSELL_TRACKING_FLAG.is_enabled(): <%static:require_module_async module_name="js/commerce/track_ecommerce_events" class_name="TrackECommerceEvents"> if (window.loadedECommerceEvents === undefined) { window.loadedECommerceEvents = true; TrackECommerceEvents.trackUpsellClick($(".track_course_dashboard_green_button"), 'course_dashboard_green', { pageName: "course_dashboard", linkType: "button", linkCategory: "green_upgrade" }); } %endif