Skip to content

fix: prevent invalidation of allowlisted certificates [BB-4287]#369

Merged
Agrendalath merged 1 commit intoopencraft-release/koa.3from
agrendalath/bb-4358-fix_allowlist_certificate_invalidation
Jul 7, 2021
Merged

fix: prevent invalidation of allowlisted certificates [BB-4287]#369
Agrendalath merged 1 commit intoopencraft-release/koa.3from
agrendalath/bb-4358-fix_allowlist_certificate_invalidation

Conversation

@Agrendalath
Copy link
Member

@Agrendalath Agrendalath commented Jul 5, 2021

The allowlisted certificates were getting invalidated upon visiting the Course Progress page by users.

This is a rough backport of the Lilac fix (edx#26356). In Lilac, this is gated by the certificates_revamp.use_allowlist Waffle flag. In post-Lilac branches, this is working out of the box (the flag has been removed in edx#27576).

Note: if you are using the Lilac release, you don't need these changes - you can get them by enabling the certificates_revamp.use_allowlist flag in Django admin

Testing instructions

  1. Add FEATURES['CERTIFICATES_HTML_VIEW'] = True to {lms,cms}/envs/private.py.
  2. Add a "Verified" mode (set "price" to 1) to Course Modes, if it doesn't exist - it should already be on devstack.
  3. Enable generating certificates here.
  4. Go to Manual verifications and add an entry for user verified with the status approved.
  5. Go to Waffle Switches and add:
    1. certificates.auto_certificate_generation, marked as Active.
    2. student.courseenrollment_admin, marked as Active.
  6. Go to student enrollments and change the enrollment mode of user verified: from audit to verified.
  7. Go to Advanced Settings and set "Certificates Display Behavior" to "early_with_info".
  8. Go to Certificates, set up a new certificate, and click the "Activate" button.
  9. Go to Instructor Dashboard/Certificates.
  10. Check All users on the Exception list and click the "Generate Exception Certificates" button (if the verified@example.com user is not in the list below the button, you should add it).
  11. Log in as verified@example.com, visit the dashboard, and use the "View Certificate" button (it should be under the course listing item).
  12. Visit the progress page and use the "View Certificate" button (it should be above the progress graph).

The allowlisted certificates were getting invalidated upon visiting the Course
Progress page by users.

This is a rough backport of the Lilac fix (edx#26356). In Lilac, this is gated
by the `certificates_revamp.use_allowlist` Waffle flag. In post-Lilac branches,
this is working out of the box (the flag has been removed in edx#27576).

Jira ticket: BB-4287
@Agrendalath Agrendalath self-assigned this Jul 5, 2021
Copy link

@giovannicimolin giovannicimolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

  • I tested this:
  1. Set up using the provided instructions.
  2. Checked that a certificate was generated, even without passing grades.
  3. Went through a full flow (register->purchase->verify) and then added the user in the cert whitelist.
  4. Checked that the certificate works.
  • I read through the code
  • I checked for accessibility issues NA
  • Includes documentation NA

@Agrendalath Nice work! Good to merge.

@Agrendalath Agrendalath merged commit 94fba05 into opencraft-release/koa.3 Jul 7, 2021
@Agrendalath Agrendalath deleted the agrendalath/bb-4358-fix_allowlist_certificate_invalidation branch July 7, 2021 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants