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
bea90c1a
Commit
bea90c1a
authored
9 years ago
by
Peter Fogg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow certificates with 'auditing' status to be regenerated.
ECOM-3401
parent
9cf16cd2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletions
+26
-1
lms/djangoapps/certificates/queue.py
+2
-1
lms/djangoapps/certificates/tests/test_queue.py
+24
-0
No files found.
lms/djangoapps/certificates/queue.py
View file @
bea90c1a
...
@@ -220,7 +220,8 @@ class XQueueCertInterface(object):
...
@@ -220,7 +220,8 @@ class XQueueCertInterface(object):
status
.
deleted
,
status
.
deleted
,
status
.
error
,
status
.
error
,
status
.
notpassing
,
status
.
notpassing
,
status
.
downloadable
status
.
downloadable
,
status
.
auditing
,
]
]
cert_status
=
certificate_status_for_student
(
student
,
course_id
)[
'status'
]
cert_status
=
certificate_status_for_student
(
student
,
course_id
)[
'status'
]
...
...
This diff is collapsed.
Click to expand it.
lms/djangoapps/certificates/tests/test_queue.py
View file @
bea90c1a
...
@@ -181,6 +181,30 @@ class XQueueCertInterfaceAddCertificateTest(ModuleStoreTestCase):
...
@@ -181,6 +181,30 @@ class XQueueCertInterfaceAddCertificateTest(ModuleStoreTestCase):
self
.
assertFalse
(
certificate
.
eligible_for_certificate
)
self
.
assertFalse
(
certificate
.
eligible_for_certificate
)
self
.
assertEqual
(
certificate
.
mode
,
expected_mode
)
self
.
assertEqual
(
certificate
.
mode
,
expected_mode
)
@ddt.data
(
(
CertificateStatuses
.
restricted
,
False
),
(
CertificateStatuses
.
deleting
,
False
),
(
CertificateStatuses
.
generating
,
True
),
(
CertificateStatuses
.
unavailable
,
True
),
(
CertificateStatuses
.
deleted
,
True
),
(
CertificateStatuses
.
error
,
True
),
(
CertificateStatuses
.
notpassing
,
True
),
(
CertificateStatuses
.
downloadable
,
True
),
(
CertificateStatuses
.
auditing
,
True
),
)
@ddt.unpack
def
test_add_cert_statuses
(
self
,
status
,
should_generate
):
"""
Test that certificates can or cannot be generated with the given
certificate status.
"""
with
patch
(
'certificates.queue.certificate_status_for_student'
,
Mock
(
return_value
=
{
'status'
:
status
})):
mock_send
=
self
.
add_cert_to_queue
(
'verified'
)
if
should_generate
:
self
.
assertTrue
(
mock_send
.
called
)
else
:
self
.
assertFalse
(
mock_send
.
called
)
@attr
(
'shard_1'
)
@attr
(
'shard_1'
)
@override_settings
(
CERT_QUEUE
=
'certificates'
)
@override_settings
(
CERT_QUEUE
=
'certificates'
)
...
...
This diff is collapsed.
Click to expand it.
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