Skip to content

ingoj/ParticipationCertificate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

412 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ParticipationCertificate

This plugin adds the user interface for the ParticipationCertificate plugin:

  • Adds a new tab 'Certificate' for printing Certificates

Installation

Start at your ILIAS root directory

mkdir -p Customizing/global/plugins/Services/UIComponent/UserInterfaceHook
cd Customizing/global/plugins/Services/UIComponent/UserInterfaceHook
git clone https://git.studer-raimann.ch/ILIAS-Kunde-DHBW-Karlsruhe/ParticipationCertificate.git 

As an ILIAS administrator, go to "Administration -> Plugins" and install/activate the plugin.

Update

After updating version 1.2.0, a function is executed that scans all files and directories within the certifications path. It then inserts relevant data into the dhbw_part_cert_files table.

This table is used to track whether a logo and signature already exist for a certificate. If they do, the existing file is retrieved using:

$src = $DIC->fileDelivery()->buildTokenURL(
$stream,
$fileName,
\ILIAS\FileDelivery\Delivery\Disposition::INLINE,
$DIC->user()->getId(),
6
);

If the logo or signature does not already exist in the table, the system falls back to retrieving the resource via:

$src = $DIC->resourceStorage()->consume()
->src($resource)
->getSrc();

In this case, the file is assumed to have been imported using Kitchen Sink.

Testing Image Uploads in Docker (Development Environment)

To enable testing of image uploads in a Docker-based development environment, you should modify the generatePDF() function in the ./classes/Report/ilParticipationCertificatePDFGenerator.php file.

Add the following line:

$rendered = str_replace('http://localhost:<port>', 'http://host.docker.internal:<port>', $rendered);

This ensures that image URLs referencing localhost are correctly resolved from within the Docker container by redirecting them to host.docker.internal.

Replace with the actual port number your application is running on.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • PHP 98.3%
  • HTML 1.3%
  • CSS 0.4%