Skip to content

Download Student Applications as PDF (background process) and Excel#200

Open
betsyecastro wants to merge 29 commits intodevelopfrom
bulk-export-student-apps-pdf
Open

Download Student Applications as PDF (background process) and Excel#200
betsyecastro wants to merge 29 commits intodevelopfrom
bulk-export-student-apps-pdf

Conversation

@betsyecastro
Copy link
Copy Markdown
Contributor

@betsyecastro betsyecastro commented Sep 3, 2025

Adds support in the profile-students view for downloading both individual and multiple student applications. The "Download" option allows downloading a single application, while "Download Student Applications" enables exporting filtered applications by filing status in Excel or PDF formats to address issue #187

The job that generates the PDF file in the background, receives a PdfGeneratorService - an implementation of the PdfGenerationContract interface to support multiple PDF generation methods Browsershot, AWS Lambda, and container-based).

The queue connection has been changed from the sync driver, which executes jobs synchronously during the request, to the database driver, which queues jobs in the database. These jobs are then processed asynchronously by a queue worker.

image

Requirements:

  • .env updates:
    CACHE_DRIVER=redis
    REDIS_PORT=6379
    QUEUE_CONNECTION=database
  • Run composer install
  • Run php artisan queue:work

To clean up temporary files:

  • Run php artisan files:clean-up-pdfs. This command removes timestamped folders in the tmp/reports directory that are older than the specified threshold (default: 2 hours). Options:
    --root=tmp/reports Root directory where timestamped folders are stored
    --hours=2 Deletes folders older than the specified number of hours
    --disk= Filesystem disk to use (defaults to FILESYSTEM_DISK)

Replaces PR #192.

@betsyecastro betsyecastro self-assigned this Sep 3, 2025
@betsyecastro betsyecastro added the ✨ enhancement New feature or request label Sep 3, 2025
@betsyecastro betsyecastro force-pushed the bulk-export-student-apps-pdf branch from b05ac6f to 9b3f3de Compare September 25, 2025 22:42
@betsyecastro betsyecastro marked this pull request as ready for review September 26, 2025 14:58
@betsyecastro betsyecastro requested a review from wunc September 26, 2025 14:58
@betsyecastro betsyecastro added the 🔧 env-changes Requires .env changes label Sep 26, 2025
@shukla-m shukla-m self-requested a review November 12, 2025 22:05
@betsyecastro betsyecastro added the 📦️ dependencies Update, change, or remove a dependency label Nov 25, 2025
@betsyecastro betsyecastro force-pushed the bulk-export-student-apps-pdf branch from 8ba4fce to dc5330d Compare December 1, 2025 23:01
@betsyecastro betsyecastro force-pushed the bulk-export-student-apps-pdf branch from dc5330d to a13215e Compare December 1, 2025 23:02
Copy link
Copy Markdown

@shukla-m shukla-m left a comment

Choose a reason for hiding this comment

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

Hi @betsyecastro, this works great! I tested both bulk PDF downloads (with and without filters) and individual PDF download and everything seems to work as expected. I added a few comments for minor changes. Let me know if you have any questions. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📦️ dependencies Update, change, or remove a dependency ✨ enhancement New feature or request 🔧 env-changes Requires .env changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants