From 516506e8f192aae37333acefc4274fb6778db2c4 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Tue, 28 May 2013 16:33:46 +0800 Subject: [PATCH] Corrected PHPDocs --- elements/element.class.php | 14 ++++++++------ lib.php | 9 ++++----- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/elements/element.class.php b/elements/element.class.php index f69aa10..4b6125d 100644 --- a/elements/element.class.php +++ b/elements/element.class.php @@ -218,9 +218,10 @@ class customcert_element_base { * Can be overridden if more functionality is needed. * * @param stdClass $data the form data. + * @return string the unique data to save */ public function save_unique_data($data) { - return null; + return ''; } /** @@ -228,7 +229,8 @@ class customcert_element_base { * to a template to be loaded later. * Can be overridden if more functionality is needed. * - * @param stdClass $data the form data. + * @param stdClass $data the form data + * @return bool returns true if the data was saved to the template, false otherwise */ public function save_data_to_template($data) { return true; @@ -239,7 +241,8 @@ class customcert_element_base { * from a template to an existing customcert. * Can be overridden if more functionality is needed. * - * @param stdClass $data the form data. + * @param stdClass $data the form data + * @return bool returns true if the data was loaded from the template, false otherwise */ public function load_data_from_template($data) { return true; @@ -254,7 +257,6 @@ class customcert_element_base { */ public function render($pdf, $userid) { // Must be overridden. - return false; } /** @@ -319,8 +321,8 @@ class customcert_element_base { /** * Validates the colour selected. * - * @param string $data - * @return string|false + * @param string $colour + * @return bool returns true if the colour is valid, false otherwise */ protected function validate_colour($colour) { /** diff --git a/lib.php b/lib.php index 17e0e35..86c0a77 100644 --- a/lib.php +++ b/lib.php @@ -54,7 +54,7 @@ define('CUSTOMCERT_MAX_PER_PAGE', 300); /** * Add customcert instance. * - * @param stdClass $customcert + * @param stdClass $data * @param stdClass $mform * @return int new customcert instance id */ @@ -254,7 +254,7 @@ function customcert_user_outline($course, $user, $mod, $customcert) { * @param stdClass $course * @param stdClass $user * @param stdClass $mod - * @param stdClass $page + * @param stdClass $customcert * @return string the user complete information */ function customcert_user_complete($course, $user, $mod, $customcert) { @@ -377,7 +377,7 @@ function customcert_get_images() { /** * Handles uploading an image for the customcert module. * - * @param stdClass $draftiemtid the draft area containing the files + * @param int $draftitemid the draft area containing the files */ function customcert_upload_imagefiles($draftitemid) { // Get the filestorage object. @@ -649,8 +649,7 @@ function customcert_delete_page($pageid) { /** * Returns a list of all the templates. * - * @param stdClass $element the element - * @param bool returns true if success, false otherwise + * @return bool returns true if success, false otherwise */ function customcert_get_templates() { global $DB;