From b452f3d5f37f8cd2951b948c4e26996d8350d4e1 Mon Sep 17 00:00:00 2001
From: Christie Rice <8483753+crice100@users.noreply.github.com>
Date: Mon, 29 Mar 2021 09:53:50 -0400
Subject: [PATCH] docs: Add ADR on regular course certificate requirements
 (#27140)

MICROBA-1039
---
 ...st => 001-allowlist-cert-requirements.rst} |  8 ++--
 .../docs/decisions/002-cert-requirements.rst  | 37 +++++++++++++++++++
 2 files changed, 42 insertions(+), 3 deletions(-)
 rename lms/djangoapps/certificates/docs/decisions/{001-allowlist-requirements.rst => 001-allowlist-cert-requirements.rst} (91%)
 create mode 100644 lms/djangoapps/certificates/docs/decisions/002-cert-requirements.rst

diff --git a/lms/djangoapps/certificates/docs/decisions/001-allowlist-requirements.rst b/lms/djangoapps/certificates/docs/decisions/001-allowlist-cert-requirements.rst
similarity index 91%
rename from lms/djangoapps/certificates/docs/decisions/001-allowlist-requirements.rst
rename to lms/djangoapps/certificates/docs/decisions/001-allowlist-cert-requirements.rst
index f007ef7d33a..38961278cd2 100644
--- a/lms/djangoapps/certificates/docs/decisions/001-allowlist-requirements.rst
+++ b/lms/djangoapps/certificates/docs/decisions/001-allowlist-cert-requirements.rst
@@ -1,4 +1,4 @@
-Course Certificate Allowlist Requirements
+Allowlist Course Certificate Requirements
 =========================================
 
 Status
@@ -7,6 +7,8 @@ Accepted
 
 Background
 ----------
+This doc covers requirements for allowlist course certificates.
+
 Users can earn a course certificate in a particular course run (the certificate
 is stored in the *GeneratedCertificate* model). If a user has not earned a certificate
 but the course staff would like them to have a certificate anyway, the user can
@@ -22,16 +24,16 @@ won't necessarily have a course certificate available to them. To receive a
 downloadable allowlist course certificate, the following things must be true at
 the time the certificate is generated:
 
-* The user must have an enrollment in the course
+* The user must have an enrollment in the course run
 
   * The enrollment mode must be eligible for a certificate
   * The enrollment does not need to be active
 
 * The user must have an approved, unexpired, ID verification
-* The user must be on the allowlist for the course run (see the *CertificateWhitelist* model)
 * The user must not have an invalidated certificate for the course run (see the *CertificateInvalidation* model)
 * Automatic certificate generation must be globally enabled
 * HTML (web) certificates must be globally enabled, and also enabled for the course run
+* The user must be on the allowlist for the course run (see the *CertificateWhitelist* model)
 
 Note: the above requirements were written for the allowlist, which assumes the
 CourseWaffleFlag *certificates_revamp.use_allowlist* has been enabled for the
diff --git a/lms/djangoapps/certificates/docs/decisions/002-cert-requirements.rst b/lms/djangoapps/certificates/docs/decisions/002-cert-requirements.rst
new file mode 100644
index 00000000000..bf9e32695bd
--- /dev/null
+++ b/lms/djangoapps/certificates/docs/decisions/002-cert-requirements.rst
@@ -0,0 +1,37 @@
+Regular Course Certificate Requirements
+=======================================
+
+Status
+------
+Accepted
+
+Background
+----------
+This doc covers requirements for regular (non-allowlist) course certificates.
+
+Users can earn a course certificate in a particular course run if they meet a
+number of criteria, and the course run is configured to grant them the certificate.
+The certificates are stored in the *GeneratedCertificate* model.
+
+Requirements
+------------
+For a user to receive a course certificate in the *downloadable* state (for the
+user to have a course certificate available to them), the following things must
+be true at the time the certificate is generated:
+
+* The user must have an enrollment in the course run
+
+  * The enrollment mode must be eligible for a certificate
+  * The enrollment does not need to be active
+
+* The user must have an approved, unexpired, ID verification
+* The user must not have an invalidated certificate for the course run (see the *CertificateInvalidation* model)
+* Automatic certificate generation must be globally enabled
+* HTML (web) certificates must be globally enabled, and also enabled for the course run
+* The user must have passed the course run
+* The user must not be a beta tester in the course run
+* The course run must not be a CCX (custom edX course)
+
+Note: the above requirements were written for V2 of course certificates, which
+assumes the CourseWaffleFlag *certificates_revamp.use_updated* has been enabled
+for the course run. If it has not been enabled, the prior logic will apply.
-- 
GitLab