<%page args="section_data" expression_filter="h"/> <%! from django.utils.translation import ugettext as _ from datetime import datetime, timedelta from openedx.core.djangolib.js_utils import js_escaped_string import pytz %> <%include file="add_coupon_modal.html" args="section_data=section_data" /> <%include file="edit_coupon_modal.html" args="section_data=section_data" /> <%include file="set_course_mode_price_modal.html" args="section_data=section_data" /> <%include file="generate_registarion_codes_modal.html" args="section_data=section_data" /> <%include file="invalidate_registration_code_modal.html" args="section_data=section_data" />

${_('Enrollment Codes')}

%if section_data['sales_admin']:

${_('Create one or more pre-paid course enrollment codes. Students can use these codes to enroll in the course.')}

${_('Create Enrollment Codes')}

${_('Cancel, restore, or mark an enrollment code as unused.')}

${_('Change Enrollment Code Status')}
%endif

${_('Download a .csv file of all enrollment codes for this course.')}

${_('Download a .csv file of all unused enrollment codes for this course.')}

${_('Download a .csv file of all used enrollment codes for this course.')}

%if section_data['coupons_enabled']:

${_("Course Price")}

${_("Course price per seat: ")}${section_data['currency_symbol']}${section_data['course_price']} %if section_data['access']['finance_admin'] is True: + ${_('Edit Price')} %endif
%endif %if section_data['access']['finance_admin']:

${_("Course Seat Purchases")}

%if section_data['total_amount'] is not None: ${_("Total Credit Card Purchases: ")}${section_data['currency_symbol']}${section_data['total_amount']} %endif

${_("Download a .csv file for all credit card purchases or for all invoices, regardless of status.")}


${_("To cancel or resubmit an invoice, enter the invoice number below.")}

%endif %if section_data['reports_enabled']:

${_("Reports")}

${_("Create a .csv file that contains enrollment information for your course.")}


${_("Create an HTML file that contains an executive summary for this course.")}


${_("Available Reports")}

${_("The following reports are available for download. Reports are not deleted. A link to every report remains available on this page, identified by the date and time (in UTC) that the report was generated.")}

## Translators: a table of URL links to report files appears after this sentence.

${_("Note: To help protect learner data, links to these reports that you save outside of this page or that you send or receive in email expire after five minutes.")}


%if settings.FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'):

${_("Pending Tasks")}

${_("The status for any active tasks appears in a table below.")}


%endif
%endif %if section_data['coupons_enabled']:

${_("Coupon Code List")}

${_("Download a .csv file of all coupon codes for this course.")} ${_("Coupon Codes")} + ${_("Add Coupon Code")}
%if len(section_data['coupons']): %for coupon in section_data['coupons']: <% current_date = datetime.now(pytz.UTC) %> <% coupon_expiry_date = coupon.expiration_date %> %if coupon.is_active == False: %elif coupon_expiry_date is not None and current_date >= coupon_expiry_date: %else: %endif %endfor
${_("Coupon Code")} ${_("Description")} ${_("Expiration Date")} ${_("Coupon (%)")} ${_("Number Redeemed")} ${_("Actions")}
${_('{code}').format(code=coupon.code)} ${_('{description}').format(description=coupon.description)} ${coupon.display_expiry_date} ${_('{discount}').format(discount=coupon.percentage_discount)} ${ coupon.couponredemption_set.filter(order__status='purchased').count() } [x]${_('Edit')}
%endif
%endif