%if user.is_authenticated and registered:
%if show_courseware_link:
%endif
${_("You are enrolled in this course")}
%if show_courseware_link:
${_("View Course")}
%endif
% 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")}
%elif allow_anonymous:
%if show_courseware_link:
${_("View Course")}
%endif
%else:
<%
if ecommerce_checkout:
reg_href = ecommerce_checkout_link
else:
reg_href="#"
if single_paid_mode:
href_class = "add-to-cart"
else:
href_class = "register"
%>
${_("Enroll Now")}
%endif