Merge pull request #18478 from edx/tasawer/LEARNER-4744/inactive-enrollments-in-support-tool

inactive enrollments in support tool
This commit is contained in:
Tasawer Nawaz
2018-07-03 15:55:34 +05:00
committed by GitHub
6 changed files with 49 additions and 6 deletions

View File

@@ -27,6 +27,7 @@
<th><%- gettext('Verified mode price') %></th>
<th><%- gettext('Reason') %></th>
<th><%- gettext('Last modified by') %></th>
<th><%- gettext('Active') %></th>
<th></th>
</tr>
</thead>
@@ -43,6 +44,7 @@
<td><% print(enrollment.get('verified_price')) %></td>
<td><% print(enrollment.get('manual_enrollment').reason || gettext('N/A')) %></td>
<td><% print(enrollment.get('manual_enrollment').enrolled_by || gettext('N/A')) %></td>
<td><% print(enrollment.get('is_active')) %></td>
<td>
<button
class="change-enrollment-btn"

View File

@@ -62,7 +62,7 @@ class EnrollmentSupportListView(GenericAPIView):
except User.DoesNotExist:
return JsonResponse([])
enrollments = get_enrollments(user.username)
enrollments = get_enrollments(user.username, include_inactive=True)
for enrollment in enrollments:
# Folds the course_details field up into the main JSON object.
enrollment.update(**enrollment.pop('course_details'))