%if regularly_registered:
%if show_courseware_link:
%endif
${_("You are registered for this course")}
%if show_courseware_link:
${_("View Courseware")}
%endif
%elif in_cart:
${_('This course is in your cart.').format(cart_link=cart_link)}
%elif settings.FEATURES.get('ENABLE_PAID_COURSE_REGISTRATION') and registration_price:
<%
if user.is_authenticated():
reg_href = "#"
reg_element_id = "add_to_cart_post"
else:
reg_href = reg_then_add_to_cart_link
reg_element_id = "reg_then_add_to_cart"
%>
${_("Add {course.display_number_with_default} to Cart ({currency_symbol}{cost})")\
.format(course=course, currency_symbol=settings.PAID_COURSE_REGISTRATION_CURRENCY[1],
cost=registration_price)}
% elif is_course_full:
${_("Course is full")}
% elif invitation_only and not can_enroll:
${_("Enrollment in this course is by invitation only")}
## Shib courses need the enrollment button to be displayed even when can_enroll is False,
## because AnonymousUsers cause can_enroll for shib courses to be False, but we need them to be able to click
## so that they can register and become a real user that can enroll.
% elif not is_shib_course and not can_enroll:
${_("Enrollment is Closed")}
%else:
${_("Register for {course.display_number_with_default}").format(course=course) | h}
% if sneakpeek_allowed and not regularly_registered:
${_("Explore Course")} *
% endif
%endif