<%! from django.utils.translation import ugettext as _ %> <%! from datetime import datetime, timedelta %> <%! import pytz %> <%page args="section_data"/> <%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" />

${_('Registration 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')}
%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: ")}${section_data['currency_symbol']}${section_data['course_price']} %if section_data['access']['finance_admin'] is True: + ${_('Set Price')} %endif
%endif %if section_data['access']['finance_admin']:

${_("Sales")}

%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")}

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


${_("Reports Available for Download")}

${_("The reports listed below are available for download. A link to every report remains available on this page, identified by the UTC date and time of generation. Reports are not deleted, so you will always be able to access previously generated reports from this page.")}

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

${_("Note: To keep student data secure, you cannot save or email these links for direct access. Copies of links expire within 5 minutes.")}


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

${_("Pending Instructor Tasks")}

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


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

${_("Coupons List")}

${_("Click to generate a CSV file of all Coupon Codes:")} ${_("Coupons Information")} + ${_("Add Coupon")}
%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
${_("Code")} ${_("Description")} ${_("Expiry Date")} ${_("Discount (%)")} ${_("Redeem Count")} ${_("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