/**
  * Returns the filesystem path of the background image thumbnail
  *
  * @return string The filesystem path of the background image thumbnail
  */
 public static function getBackgroundImageThumbPath()
 {
     return ilObjCertificateSettingsAccess::getBackgroundImageDefaultFolder() . ilObjCertificateSettingsAccess::getBackgroundImageName() . ".thumb.jpg";
 }
Example #2
0
 /**
  * Builds an export file in ZIP format and delivers it
  */
 public function deliverExportFileXML()
 {
     include_once "./Services/Utilities/classes/class.ilUtil.php";
     $exportpath = $this->createArchiveDirectory();
     ilUtil::makeDir($exportpath);
     $xsl = file_get_contents($this->getXSLPath());
     $xslexport = str_replace($this->getAdapter()->getCertificatePath(), "", $xsl);
     // save export xsl file
     $this->saveCertificate($xslexport, $exportpath . $this->getXSLName());
     // save background image
     if ($this->hasBackgroundImage()) {
         copy($this->getBackgroundImagePath(), $exportpath . $this->getBackgroundImageName());
     } else {
         include_once "./Services/Certificate/classes/class.ilObjCertificateSettingsAccess.php";
         if (ilObjCertificateSettingsAccess::hasBackgroundImage()) {
             copy(ilObjCertificateSettingsAccess::getBackgroundImagePath(), $exportpath . ilObjCertificateSettingsAccess::getBackgroundImageName());
         }
     }
     $zipfile = time() . "__" . IL_INST_ID . "__" . $this->getAdapter()->getAdapterType() . "__" . $this->getAdapter()->getCertificateId() . "__certificate.zip";
     ilUtil::zip($exportpath, $this->getAdapter()->getCertificatePath() . $zipfile);
     ilUtil::delDir($exportpath);
     ilUtil::deliverFile($this->getAdapter()->getCertificatePath() . $zipfile, $zipfile, "application/zip");
 }