When creating a new certificate or updating an old one, they must be tested using the normal user experience. This is due to re-rendering an existing certificate or using the Template Viewer on /Pages/Dev does not catch all the issues that could be caused by custom code in the certificate.
To start go to the organizations home page. Then:
Edit > Links
Add > Course Home Page (use 'test' or similar)
Click on that newly create page and go to Edit > Links
Add > Exam From Repository
Select the 'Acknowledgement' and click 'Add'
Go to /Pages/Dev
Click on Custom DNS and set up an incoming DNS so the test student can log in:
Run the following commands:
AddRegistrationCompletionRule [coursePath] AllExamsComplete()
CreateCertificate [OrgPath] testCert "Testing Certificate" [TemplateFileName].cshtml
AddCertificateRule [coursePath] AllExamsComplete():testCertGo to that newly create course page
Add a default offering (Manage > Registrations)
Register a test student in the newly created course
In a new browser or incognito sign in as that test user and complete the acknowledgement
Note: The deferred actions must not be paused to award the certificate
ContinueAutomaticOfferingRuleProcessing
to verify if it has been processed use the following command (should read '0' ; e.g. processed):
GetUnprocessedDeferredActionCounts
Go to Manage > Reports > Grades (by student) Report on the course page.
Click on the test student's certificate to verify.