diff --git a/main/inc/lib/certificate.lib.php b/main/inc/lib/certificate.lib.php index 645e9e025b..cd01ddf2a0 100644 --- a/main/inc/lib/certificate.lib.php +++ b/main/inc/lib/certificate.lib.php @@ -1,19 +1,21 @@ table = Database::get_main_table(TABLE_MAIN_GRADEBOOK_CERTIFICATE); $this->certificate_data = null; @@ -88,6 +93,11 @@ class Certificate extends Model { } } + /** + * Deletes the current certificate object. This is generally triggered by + * the teacher from the gradebook tool to re-generate the certificate because + * the original version wa flawed. + */ public function delete() { if (!empty($this->certificate_data)) { @@ -241,6 +251,7 @@ class Certificate extends Model { } /** + * Generates a QR code for the certificate. The QR code embeds the text given * @param string Text to be added in the QR code * @param string file path of the image * */ @@ -253,6 +264,12 @@ class Certificate extends Model { } } + /** + * Transforms certificate tags into text values. This function is very static + * (it doesn't allow for much flexibility in terms of what tags are printed). + * @param array Contains two array entris: first are the headers, second is an array of contents + * @return string The translated string + */ private function parse_certificate_variables($array) { $text = ''; $headers = $array[0];