Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
025c76bc
Unverified
Commit
025c76bc
authored
3 years ago
by
Justin Hynes
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #27400 from edx/jhynes/microba-1080_doc-update
docs: Add doc for recent cert revocation changes
parents
50d57a64
8902a945
No related branches found
Branches containing commit
Tags
release-2021-04-26-14.10
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lms/djangoapps/certificates/models.py
+18
-5
18 additions, 5 deletions
lms/djangoapps/certificates/models.py
with
18 additions
and
5 deletions
lms/djangoapps/certificates/models.py
+
18
−
5
View file @
025c76bc
...
...
@@ -341,7 +341,14 @@ class GeneratedCertificate(models.Model):
def
invalidate
(
self
):
"""
Invalidate Generated Certificate by marking it
'
unavailable
'
.
Invalidate Generated Certificate by marking it
'
unavailable
'
. This will prevent the learner from being able to
access their certiticate in the associated Course. In addition, we remove any errors and grade information
associated with the certificate record.
We remove the `download_uuid` and the `download_url` as well, but this is only important to PDF certificates.
Invalidating a certificate fires the `COURSE_CERT_REVOKED` signal. This kicks off a task to determine if there
are any program certificates that need to be revoked from the learner.
"""
log
.
info
(
f
'
Marking certificate as unavailable for
{
self
.
user
.
id
}
:
{
self
.
course_id
}
'
)
...
...
@@ -362,7 +369,8 @@ class GeneratedCertificate(models.Model):
def
mark_notpassing
(
self
,
grade
):
"""
Invalidates a Generated Certificate by marking it as notpassing
Invalidates a Generated Certificate by marking it as
'
notpassing
'
. For additional information, please see the
comments of the `invalidate` function above as they also apply here.
"""
log
.
info
(
f
'
Marking certificate as notpassing for
{
self
.
user
.
id
}
:
{
self
.
course_id
}
'
)
...
...
@@ -389,9 +397,14 @@ class GeneratedCertificate(models.Model):
def
save
(
self
,
*
args
,
**
kwargs
):
# pylint: disable=signature-differs
"""
After the base save() method finishes, fire the COURSE_CERT_AWARDED
signal iff we are saving a record of a learner passing the course.
As well as the COURSE_CERT_CHANGED for any save event.
After the base save() method finishes, fire the COURSE_CERT_CHANGED signal. If the learner is currently passing
the course we also fire the COURSE_CERT_AWARDED signal.
The COURSE_CERT_CHANGED signal helps determine if a Course Certificate can be awarded to a learner in the
Credentials IDA.
The COURSE_CERT_AWARDED signal helps determine if a Program Certificate can be awarded to a learner in the
Credentials IDA.
"""
super
().
save
(
*
args
,
**
kwargs
)
COURSE_CERT_CHANGED
.
send_robust
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment