ILIAS
Release_3_10_x_branch Revision 61812
|
Export test results as PDF certificates. More...
Public Member Functions | |
ilTestCertificate (&$a_object) | |
ilTestCertificate constructor | |
getCertificatePath () | |
Returns the filesystem path of the certificate. | |
getBackgroundImagePath () | |
Returns the filesystem path of the background image. | |
getBackgroundImageName () | |
Returns the filename of the background image. | |
getBackgroundImageThumbPath () | |
Returns the filesystem path of the background image thumbnail. | |
getBackgroundImageTempfilePath () | |
Returns the filesystem path of the background image temp file during upload. | |
getXSLPath () | |
Returns the filesystem path of the XSL-FO file. | |
getXSLName () | |
Returns the filename of the XSL-FO file. | |
getBackgroundImagePathWeb () | |
Returns the web path of the background image. | |
deleteBackgroundImage () | |
Deletes the background image of a certificate. | |
deleteCertificate () | |
Deletes the certificate and all it's data. | |
checkCertificateInput ($form_fields) | |
Checks the certificate fields for errors prior to saving the certificate. | |
processFO2XHTML () | |
Convert the XSL-FO to the certificate text and the form settings using XSL transformation. | |
processXHTML2FO ($form_data, $for_export=FALSE) | |
Convert the certificate text to XSL-FO using XSL transformation. | |
saveCertificateVisibility ($a_value) | |
Saves the visibility settings of the certificate. | |
exchangeCertificateVariables ($certificate_text, $user_data=array()) | |
Exchanges the variables in the certificate text with given values. | |
createArchiveDirectory () | |
addPDFtoArchiveDirectory ($pdfdata, $dir, $filename) | |
outCertificates ($userfilter="", $passedonly=FALSE) | |
Creates a ZIP file with user certificates. | |
outCertificate ($active_id, $pass, $deliver=TRUE, $userfilter="", $passedonly=FALSE) | |
Creates a PDF preview of the XSL-FO certificate. | |
createPreview () | |
Creates a PDF preview of the XSL-FO certificate. | |
saveCertificate ($xslfo, $filename="") | |
Saves the XSL-FO code to the ILIAS web directory. | |
uploadBackgroundImage ($image_tempfilename) | |
Uploads a background image for the certificate. | |
hasBackgroundImage () | |
Checks for the background image of the certificate. | |
isComplete () | |
Checks the status of the certificate. | |
_isComplete ($obj_id) | |
Checks the status of the certificate. | |
getPageFormats () | |
Retrieves predefined page formats. | |
cloneCertificate ($new_id) | |
Clone the certificate for another test object. | |
deliverExportFileXML () | |
Builds an export file in ZIP format and delivers it. | |
importCertificate ($zipfile, $filename) | |
Reads an import ZIP file and creates a certificate of it. |
Data Fields | |
$object | |
$ctrl | |
$tree | |
$ilias | |
$tpl | |
$lng |
Export test results as PDF certificates.
This class defines everything to export test results as PDF certificates using XML-FO techniques
Definition at line 34 of file class.ilTestCertificate.php.
ilTestCertificate::_isComplete | ( | $obj_id | ) |
Checks the status of the certificate.
Checks the status of the certificate
Definition at line 799 of file class.ilTestCertificate.php.
References getXSLName().
Referenced by ilTestEvaluationGUI\outEvaluation().
ilTestCertificate::addPDFtoArchiveDirectory | ( | $pdfdata, | |
$dir, | |||
$filename | |||
) |
Definition at line 548 of file class.ilTestCertificate.php.
References $dir, and $filename.
Referenced by outCertificates().
ilTestCertificate::checkCertificateInput | ( | $form_fields | ) |
Checks the certificate fields for errors prior to saving the certificate.
Checks the certificate fields for errors prior to saving the certificate
array | $form_fields | An associative array containing the form fields of the certificate editor |
Definition at line 270 of file class.ilTestCertificate.php.
ilTestCertificate::cloneCertificate | ( | $new_id | ) |
Clone the certificate for another test object.
$new_id | ID of the new test object |
Definition at line 874 of file class.ilTestCertificate.php.
References getBackgroundImagePath(), getBackgroundImageThumbPath(), getCertificatePath(), getXSLPath(), and ilUtil\makeDirParents().
ilTestCertificate::createArchiveDirectory | ( | ) |
Definition at line 540 of file class.ilTestCertificate.php.
References $dir, getCertificatePath(), and ilUtil\makeDirParents().
Referenced by deliverExportFileXML(), importCertificate(), and outCertificates().
ilTestCertificate::createPreview | ( | ) |
Creates a PDF preview of the XSL-FO certificate.
Creates a PDF preview of the XSL-FO certificate and delivers it
private
Definition at line 671 of file class.ilTestCertificate.php.
References $result, ilUtil\deliverData(), exchangeCertificateVariables(), and getXSLPath().
ilTestCertificate::deleteBackgroundImage | ( | ) |
Deletes the background image of a certificate.
Deletes the background image of a certificate
Definition at line 222 of file class.ilTestCertificate.php.
References $ilLog, $result, getBackgroundImagePath(), getBackgroundImageTempfilePath(), and getBackgroundImageThumbPath().
ilTestCertificate::deleteCertificate | ( | ) |
Deletes the certificate and all it's data.
Deletes the certificate and all it's data
public
Definition at line 251 of file class.ilTestCertificate.php.
References $ilLog, ilUtil\delDir(), and getCertificatePath().
ilTestCertificate::deliverExportFileXML | ( | ) |
Builds an export file in ZIP format and delivers it.
Builds an export file in ZIP format and delivers it
private
Definition at line 902 of file class.ilTestCertificate.php.
References createArchiveDirectory(), ilUtil\delDir(), ilUtil\deliverFile(), getBackgroundImageName(), getBackgroundImagePath(), getCertificatePath(), getXSLName(), getXSLPath(), hasBackgroundImage(), ilUtil\makeDir(), saveCertificate(), and ilUtil\zip().
ilTestCertificate::exchangeCertificateVariables | ( | $certificate_text, | |
$user_data = array() |
|||
) |
Exchanges the variables in the certificate text with given values.
Exchanges the variables in the certificate text with given values
string | $certificate_text | The XSL-FO certificate text |
array | $user_data | An associative array containing the variables and the values to replace |
Definition at line 506 of file class.ilTestCertificate.php.
References ilFormat\formatDate(), ilUtil\prepareFormOutput(), and ilFormat\unixtimestamp2datetime().
Referenced by createPreview(), and outCertificate().
ilTestCertificate::getBackgroundImageName | ( | ) |
Returns the filename of the background image.
Returns the filename of the background image
Definition at line 142 of file class.ilTestCertificate.php.
Referenced by deliverExportFileXML(), getBackgroundImagePath(), getBackgroundImagePathWeb(), getBackgroundImageThumbPath(), and uploadBackgroundImage().
ilTestCertificate::getBackgroundImagePath | ( | ) |
Returns the filesystem path of the background image.
Returns the filesystem path of the background image
Definition at line 129 of file class.ilTestCertificate.php.
References getBackgroundImageName().
Referenced by cloneCertificate(), deleteBackgroundImage(), deliverExportFileXML(), hasBackgroundImage(), importCertificate(), processXHTML2FO(), and uploadBackgroundImage().
ilTestCertificate::getBackgroundImagePathWeb | ( | ) |
Returns the web path of the background image.
Returns the web path of the background image
Definition at line 207 of file class.ilTestCertificate.php.
References getBackgroundImageName(), ILIAS_ABSOLUTE_PATH, and ilUtil\removeTrailingPathSeparators().
ilTestCertificate::getBackgroundImageTempfilePath | ( | ) |
Returns the filesystem path of the background image temp file during upload.
Returns the filesystem path of the background image temp file during upload
Definition at line 168 of file class.ilTestCertificate.php.
Referenced by deleteBackgroundImage(), and uploadBackgroundImage().
ilTestCertificate::getBackgroundImageThumbPath | ( | ) |
Returns the filesystem path of the background image thumbnail.
Returns the filesystem path of the background image thumbnail
Definition at line 155 of file class.ilTestCertificate.php.
References getBackgroundImageName().
Referenced by cloneCertificate(), deleteBackgroundImage(), importCertificate(), and uploadBackgroundImage().
ilTestCertificate::getCertificatePath | ( | ) |
Returns the filesystem path of the certificate.
Returns the filesystem path of the certificate
Definition at line 116 of file class.ilTestCertificate.php.
Referenced by cloneCertificate(), createArchiveDirectory(), deleteCertificate(), deliverExportFileXML(), importCertificate(), isComplete(), outCertificates(), saveCertificate(), and uploadBackgroundImage().
ilTestCertificate::getPageFormats | ( | ) |
Retrieves predefined page formats.
Retrieves predefined page formats
Definition at line 821 of file class.ilTestCertificate.php.
Referenced by processXHTML2FO().
ilTestCertificate::getXSLName | ( | ) |
Returns the filename of the XSL-FO file.
Returns the filename of the XSL-FO file
Definition at line 194 of file class.ilTestCertificate.php.
Referenced by _isComplete(), deliverExportFileXML(), and getXSLPath().
ilTestCertificate::getXSLPath | ( | ) |
Returns the filesystem path of the XSL-FO file.
Returns the filesystem path of the XSL-FO file
Definition at line 181 of file class.ilTestCertificate.php.
References getXSLName().
Referenced by cloneCertificate(), createPreview(), deliverExportFileXML(), isComplete(), outCertificate(), processFO2XHTML(), and saveCertificate().
ilTestCertificate::hasBackgroundImage | ( | ) |
Checks for the background image of the certificate.
Checks for the background image of the certificate
Definition at line 759 of file class.ilTestCertificate.php.
References getBackgroundImagePath().
Referenced by deliverExportFileXML(), and processXHTML2FO().
ilTestCertificate::ilTestCertificate | ( | & | $a_object | ) |
ilTestCertificate constructor
The constructor takes possible arguments an creates an instance of the ilTestCertificate object.
object | $a_object | A reference to the test container object public |
Definition at line 96 of file class.ilTestCertificate.php.
ilTestCertificate::importCertificate | ( | $zipfile, | |
$filename | |||
) |
Reads an import ZIP file and creates a certificate of it.
Reads an import ZIP file and creates a certificate of it
Definition at line 930 of file class.ilTestCertificate.php.
References $file, $filename, ilUtil\convertImage(), createArchiveDirectory(), ilUtil\delDir(), getBackgroundImagePath(), getBackgroundImageThumbPath(), getCertificatePath(), ilUtil\getDir(), ilUtil\moveUploadedFile(), saveCertificate(), and ilUtil\unzip().
ilTestCertificate::isComplete | ( | ) |
Checks the status of the certificate.
Checks the status of the certificate
Definition at line 779 of file class.ilTestCertificate.php.
References getCertificatePath(), and getXSLPath().
ilTestCertificate::outCertificate | ( | $active_id, | |
$pass, | |||
$deliver = TRUE , |
|||
$userfilter = "" , |
|||
$passedonly = FALSE |
|||
) |
Creates a PDF preview of the XSL-FO certificate.
Creates a PDF preview of the XSL-FO certificate and delivers it
private
Definition at line 595 of file class.ilTestCertificate.php.
References $pass, $result, ilObjUser\_lookupFields(), ilUtil\deliverData(), exchangeCertificateVariables(), ilFormat\formatDate(), getXSLPath(), ilUtil\prepareFormOutput(), and ilFormat\unixtimestamp2datetime().
Referenced by outCertificates().
ilTestCertificate::outCertificates | ( | $userfilter = "" , |
|
$passedonly = FALSE |
|||
) |
Creates a ZIP file with user certificates.
Creates a ZIP file with user certificates
private
Definition at line 562 of file class.ilTestCertificate.php.
References addPDFtoArchiveDirectory(), createArchiveDirectory(), ilUtil\delDir(), ilUtil\deliverFile(), ilUtil\getASCIIFilename(), getCertificatePath(), outCertificate(), and ilUtil\zip().
ilTestCertificate::processFO2XHTML | ( | ) |
Convert the XSL-FO to the certificate text and the form settings using XSL transformation.
Convert the XSL-FO to the certificate text and the form settings using XSL transformation
private
Definition at line 340 of file class.ilTestCertificate.php.
References getXSLPath(), xslt_create(), xslt_error(), xslt_free(), and xslt_process().
ilTestCertificate::processXHTML2FO | ( | $form_data, | |
$for_export = FALSE |
|||
) |
Convert the certificate text to XSL-FO using XSL transformation.
Convert the certificate text to XSL-FO using XSL transformation
array | $form_data | The form data |
Definition at line 450 of file class.ilTestCertificate.php.
References getBackgroundImagePath(), getPageFormats(), hasBackgroundImage(), xslt_create(), xslt_error(), xslt_free(), and xslt_process().
ilTestCertificate::saveCertificate | ( | $xslfo, | |
$filename = "" |
|||
) |
Saves the XSL-FO code to the ILIAS web directory.
Saves the XSL-FO code to the ILIAS web directory
string | $xslfo | XSL-FO code private |
Definition at line 690 of file class.ilTestCertificate.php.
References $filename, getCertificatePath(), getXSLPath(), and ilUtil\makeDirParents().
Referenced by deliverExportFileXML(), and importCertificate().
ilTestCertificate::saveCertificateVisibility | ( | $a_value | ) |
Saves the visibility settings of the certificate.
Saves the visibility settings of the certificate
integer | $a_value | The value for the visibility settings (0 = always, 1 = only passed, 2 = never) private |
Definition at line 491 of file class.ilTestCertificate.php.
ilTestCertificate::uploadBackgroundImage | ( | $image_tempfilename | ) |
Uploads a background image for the certificate.
Uploads a background image for the certificate. Creates a new directory for the certificate if needed. Removes an existing certificate image if necessary
string | $image_tempfilename | Name of the temporary uploaded image file |
Definition at line 715 of file class.ilTestCertificate.php.
References ilUtil\convertImage(), getBackgroundImageName(), getBackgroundImagePath(), getBackgroundImageTempfilePath(), getBackgroundImageThumbPath(), getCertificatePath(), ilUtil\makeDirParents(), and ilUtil\moveUploadedFile().
ilTestCertificate::$ctrl |
Definition at line 51 of file class.ilTestCertificate.php.
ilTestCertificate::$ilias |
Definition at line 67 of file class.ilTestCertificate.php.
Referenced by ilTestCertificate().
ilTestCertificate::$lng |
Definition at line 85 of file class.ilTestCertificate.php.
Referenced by ilTestCertificate().
ilTestCertificate::$object |
Definition at line 43 of file class.ilTestCertificate.php.
ilTestCertificate::$tpl |
Definition at line 76 of file class.ilTestCertificate.php.
Referenced by ilTestCertificate().
ilTestCertificate::$tree |
Definition at line 59 of file class.ilTestCertificate.php.
Referenced by ilTestCertificate().