Skip to content

Add optional course certificate templates - #126

Open
johnwesely wants to merge 5 commits into
4.xfrom
lms-certificate-builder-CU-868m0zvvx
Open

Add optional course certificate templates#126
johnwesely wants to merge 5 commits into
4.xfrom
lms-certificate-builder-CU-868m0zvvx

Conversation

@johnwesely

Copy link
Copy Markdown
Contributor

Summary

  • Soft-integrate tapp/filament-certificate-builder so hosts can assign a custom template per course without making the builder a hard dependency.
  • Edit Course can create a template (and auto-associate it) or open the designer when one is already set.
  • Existing award Blade certificates and filament-lms::certificates.* routes stay the fallback when the integration is off, the package is missing, or no template is assigned.

Test plan

  • With the builder not installed / integration disabled, complete a course and confirm the default award certificate still shows and downloads.
  • Enable the integration in a host, publish/run the new certificate_template_id migration, and confirm Edit Course shows Create Certificate Template.
  • Create a template from Edit Course: token_set matches config, course is associated, redirect lands on the designer.
  • Reload Edit Course and confirm the action switches to Edit Certificate Template.
  • Course with a template: filament-lms::certificates.show / download render the builder view; course without a template still uses the award Blade.

Made with Cursor

John Wesely and others added 2 commits September 8, 2026 10:14
Hosts can assign a certificate-builder template per course
without making the builder a hard dependency. Award Blade
certificates stay the fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread src/Support/CertificateBuilder.php
Optional builder class-strings and EditRecord typing
tripped level 4 analysis.

Co-authored-by: Cursor <cursoragent@cursor.com>
John Wesely and others added 2 commits September 8, 2026 12:43
LMS ships no Course policy; Laravel denies update and hid
Create/Edit Certificate Template on Edit Course.

Co-authored-by: Cursor <cursoragent@cursor.com>
Hosts can convert existing LMS award certificates into
builder templates without waiting on pixel-perfect layouts.

Co-authored-by: Cursor <cursoragent@cursor.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b0144f8. Configure here.

$blueprint = $this->blueprints->make($awardKey);
$existing = $templateClass::query()
->where('name', $blueprint->templateName)
->first();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Migrator reuses mismatched templates

Medium Severity

Existing templates are looked up only by name. A {award label} Certificate from Edit Course or another token_set is reused and assigned to every untemplated course for that award. Without --force, token_set is left unchanged, so certificate rendering can resolve the wrong tokens and leave course or user fields blank.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b0144f8. Configure here.

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.

1 participant