Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
b8541db1
Commit
b8541db1
authored
May 05, 2014
by
Han Su Kim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renaming enrolled to active
parent
f32e2892
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
lms/djangoapps/certificates/management/commands/gen_cert_report.py
+4
-3
No files found.
lms/djangoapps/certificates/management/commands/gen_cert_report.py
View file @
b8541db1
...
@@ -58,12 +58,13 @@ class Command(BaseCommand):
...
@@ -58,12 +58,13 @@ class Command(BaseCommand):
for
course_id
in
ended_courses
:
for
course_id
in
ended_courses
:
# find students who are enrolled
# find students who are active
# enrolled students are always downloable + notpassing
print
"Looking up certificate states for {0}"
.
format
(
course_id
)
print
"Looking up certificate states for {0}"
.
format
(
course_id
)
enrolled
_students
=
User
.
objects
.
filter
(
active
_students
=
User
.
objects
.
filter
(
courseenrollment__course_id
=
course_id
,
courseenrollment__course_id
=
course_id
,
courseenrollment__is_active
=
True
)
courseenrollment__is_active
=
True
)
cert_data
[
course_id
]
=
{
'
enrolled'
:
enrolled
_students
.
count
()}
cert_data
[
course_id
]
=
{
'
active'
:
active
_students
.
count
()}
tallies
=
GeneratedCertificate
.
objects
.
filter
(
tallies
=
GeneratedCertificate
.
objects
.
filter
(
course_id__exact
=
course_id
)
.
values
(
'status'
)
.
annotate
(
course_id__exact
=
course_id
)
.
values
(
'status'
)
.
annotate
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment