Commit ea654200 by Douglas Hall

Put shopping cart bulk purchase behind a settings flag

parent 40386b31
......@@ -1240,8 +1240,15 @@ def get_students_features(request, course_id, csv=False): # pylint: disable=red
available_features = instructor_analytics.basic.AVAILABLE_FEATURES
# Allow for microsites to be able to define additional columns (e.g. )
query_features = microsite.get_value('student_profile_download_fields')
# Allow for microsites to be able to define additional columns.
# Note that adding additional columns has the potential to break
# the student profile report due to a character limit on the
# asynchronous job input which in this case is a JSON string
# containing the list of columns to include in the report.
# TODO: Refactor the student profile report code to remove the list of columns
# that should be included in the report from the asynchronous job input.
# We need to clone the list because we modify it below
query_features = list(microsite.get_value('student_profile_download_fields', []))
if not query_features:
query_features = [
......
......@@ -190,6 +190,7 @@ def show_cart(request):
'form_html': form_html,
'currency_symbol': settings.PAID_COURSE_REGISTRATION_CURRENCY[1],
'currency': settings.PAID_COURSE_REGISTRATION_CURRENCY[0],
'enable_bulk_purchase': microsite.get_value('ENABLE_SHOPPING_CART_BULK_PURCHASE', True)
}
return render_to_response("shoppingcart/shopping_cart.html", context)
......
......@@ -101,6 +101,7 @@ from openedx.core.lib.courses import course_image_url
% endif
</div>
<div class="col-2">
% if enable_bulk_purchase:
<div class="numbers-row" aria-live="polite">
<label for="field_${item.id}">${_('Students:')}</label>
<div class="counter">
......@@ -116,8 +117,9 @@ from openedx.core.lib.courses import course_image_url
</button>
<!--<a name="updateBtn" class="updateBtn hidden" id="updateBtn-${item.id}" href="#">update</a>-->
<span class="error-text hidden" id="students-${item.id}"></span>
</div>
</div>
% endif
</div>
<div class="col-3">
<button href="#" class="btn-remove" data-item-id="${item.id}">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment