From 71b70bce619837dec6b6d916fb25f072cf031202 Mon Sep 17 00:00:00 2001 From: Adam Palay Date: Fri, 8 Nov 2013 13:45:21 -0500 Subject: [PATCH] makes beta dash count active users in enrollment count [AN-115] --- CHANGELOG.rst | 3 +++ lms/djangoapps/instructor/views/instructor_dashboard.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e42e2548b6..cfb5c13b65 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,9 @@ These are notable changes in edx-platform. This is a rolling list of changes, in roughly chronological order, most recent first. Add your entries at or near the top. Include a label indicating the component affected. +LMS: Beta instructor dashboard will only count actively enrolled students for +course enrollment numbers. + LMS: Users with is_staff=True no longer have the STAFF label appear on their forum posts. diff --git a/lms/djangoapps/instructor/views/instructor_dashboard.py b/lms/djangoapps/instructor/views/instructor_dashboard.py index c7aa4a7c1e..2f4350eed3 100644 --- a/lms/djangoapps/instructor/views/instructor_dashboard.py +++ b/lms/djangoapps/instructor/views/instructor_dashboard.py @@ -108,7 +108,7 @@ def _section_course_info(course_id, access): 'course_num': course_num, 'course_name': course_name, 'course_display_name': course.display_name, - 'enrollment_count': CourseEnrollment.objects.filter(course_id=course_id).count(), + 'enrollment_count': CourseEnrollment.objects.filter(course_id=course_id, is_active=1).count(), 'has_started': course.has_started(), 'has_ended': course.has_ended(), 'list_instructor_tasks_url': reverse('list_instructor_tasks', kwargs={'course_id': course_id}),