Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spike] Generate PDF Certificates #625

Merged
merged 9 commits into from
Jan 16, 2025

Conversation

steventux
Copy link
Contributor

@steventux steventux commented Apr 10, 2024

Context

Users download their PDF certificate from AYTQ.
The certificate is currently generated in the API which, given this is a frontend concern, isn’t ideal architecturally and adds complexity to the API and infrastructure.

Changes proposed in this pull request

This PR is a proof of concept for Certificate PDF generation. It covers the basic use case of generating a QTS Certificate.

image

TODO:

  • View templates for all certificate types
  • Replicate current certificate file names
  • Excluding non-certificate requests from PDF generation
  • Port any conditional rendering logic from DQT-API
  • Secure HTML format of certificates
  • PDF assets - fonts and images
  • System specs

Guidance to review

Link to Trello card

https://trello.com/c/gyZSM5bs/1980-spike-generate-pdf-certificates-in-aytq

See https://trello.com/c/xdaplb8l/2022-implement-aytq-certificate-pdf-generation for implementation story

Checklist

  • Attach to Trello card
  • Rebased main
  • Cleaned commit history
  • Tested by running locally

@steventux
Copy link
Contributor Author

@steventux steventux force-pushed the 1980-spike-generate-pdf-certificates-in-aytq branch from 9415d99 to 532072e Compare April 10, 2024 15:36
@richardpattinson richardpattinson force-pushed the 1980-spike-generate-pdf-certificates-in-aytq branch from a2a9411 to ca411d5 Compare July 30, 2024 07:34
@richardpattinson richardpattinson marked this pull request as ready for review August 6, 2024 13:50
@richardpattinson richardpattinson force-pushed the 1980-spike-generate-pdf-certificates-in-aytq branch from ca411d5 to 1f62c85 Compare November 12, 2024 16:00
@richardpattinson richardpattinson force-pushed the 1980-spike-generate-pdf-certificates-in-aytq branch 4 times, most recently from 4ffad25 to aabf6ad Compare November 15, 2024 09:06
Copy link

github-actions bot commented Nov 15, 2024

The review apps Access Your Teaching Qualifications & Check A Teacher's Record have been deleted.
The following domains are not available anymore:

@richardpattinson richardpattinson force-pushed the 1980-spike-generate-pdf-certificates-in-aytq branch from aabf6ad to 737a288 Compare November 15, 2024 15:54
@richardpattinson richardpattinson force-pushed the 1980-spike-generate-pdf-certificates-in-aytq branch from 737a288 to a6cfb37 Compare November 15, 2024 16:03
@richardpattinson richardpattinson force-pushed the 1980-spike-generate-pdf-certificates-in-aytq branch from a6cfb37 to 3704790 Compare November 15, 2024 16:20
@richardpattinson richardpattinson force-pushed the 1980-spike-generate-pdf-certificates-in-aytq branch from e5f06a1 to 2badc65 Compare November 20, 2024 16:58
@richardpattinson richardpattinson force-pushed the 1980-spike-generate-pdf-certificates-in-aytq branch from 2badc65 to 12b0588 Compare November 20, 2024 17:09
@richardpattinson richardpattinson force-pushed the 1980-spike-generate-pdf-certificates-in-aytq branch 2 times, most recently from c9c45a8 to 4d0bde2 Compare January 15, 2025 15:54
@richardpattinson richardpattinson force-pushed the 1980-spike-generate-pdf-certificates-in-aytq branch from 4d0bde2 to 8ec8b12 Compare January 15, 2025 15:58
@richardpattinson richardpattinson force-pushed the 1980-spike-generate-pdf-certificates-in-aytq branch from 8ec8b12 to da419c5 Compare January 16, 2025 13:08
@richardpattinson richardpattinson force-pushed the 1980-spike-generate-pdf-certificates-in-aytq branch from da419c5 to 5151546 Compare January 16, 2025 13:34
steventux and others added 8 commits January 16, 2025 13:44
@richardpattinson richardpattinson force-pushed the 1980-spike-generate-pdf-certificates-in-aytq branch from 5151546 to 7715629 Compare January 16, 2025 13:45
Dockerfile Outdated

# Open port 2222 for Azure SSH access
EXPOSE 2222
>>>>>>> 5151546 (mend)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this line be here?

Dockerfile Outdated
Comment on lines 100 to 109
# SSH access specific to Azure
# Install OpenSSH and set the password for root to "Docker!".
RUN apk add --no-cache openssh && echo "root:Docker!" | chpasswd

# Copy the Azure specific sshd_config file to the /etc/ssh/ directory
RUN ssh-keygen -A && mkdir -p /var/run/sshd
COPY azure/.sshd_config /etc/ssh/sshd_config

# Open port 2222 for Azure SSH access
EXPOSE 2222
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure any of these lines are required any more.

@richardpattinson richardpattinson force-pushed the 1980-spike-generate-pdf-certificates-in-aytq branch from 7715629 to 63fc0a9 Compare January 16, 2025 14:09
institution. The holder of this certificate is a qualified teacher and has obtained the required<br/>
qualifications and completed the necessary training for the profession of school teacher in England.</p>
<p>&#160;</p>
<p class="text">Date Induction Completed:&#160;<strong><%= qualification.details.periods.first.end_date.to_date.to_fs(:long_uk) %></strong></p>
Copy link
Contributor

Choose a reason for hiding this comment

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

Induction periods are going away from the API very shortly; we should use the dates on the top-level induction property

Copy link
Contributor

Choose a reason for hiding this comment

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

Should be fixed now

@richardpattinson richardpattinson force-pushed the 1980-spike-generate-pdf-certificates-in-aytq branch from 63fc0a9 to 216ba81 Compare January 16, 2025 14:30
@richardpattinson richardpattinson merged commit 5500e44 into main Jan 16, 2025
10 checks passed
@richardpattinson richardpattinson deleted the 1980-spike-generate-pdf-certificates-in-aytq branch January 16, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants