diff --git a/block_badgeawarder.php b/block_badgeawarder.php index 5ebec22..06be93d 100644 --- a/block_badgeawarder.php +++ b/block_badgeawarder.php @@ -24,26 +24,52 @@ class block_badgeawarder extends block_base { + /** + * Ininitalizes the object. + */ public function init() { $this->title = get_string('blockname', 'block_badgeawarder'); } + /** + * Returns an array of applicable formats. + * + * @return array + */ public function applicable_formats() { return array('course' => true); } + /** + * Sets the title value. + */ public function specialization() { $this->title = get_string('blockname', 'block_badgeawarder'); } + /** + * Returns true. + * + * @return true + */ public function has_config() { return true; } + /** + * Returns false. + * + * @return bool + */ public function instance_allow_multiple() { return false; } + /** + * Retrieves the block content. + * + * @return object + */ public function get_content() { global $CFG; diff --git a/locallib.php b/locallib.php index eb5c6b2..6b1b088 100644 --- a/locallib.php +++ b/locallib.php @@ -15,6 +15,8 @@ // along with Moodle. If not, see . /** + * Contains the set up functions. + * * @package block_badgeawarder * @copyright 2013 Learning Technology Services, www.lts.ie - Lead Developer: Bas Brands * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/processor.php b/processor.php index 04c824c..579cb4e 100644 --- a/processor.php +++ b/processor.php @@ -49,7 +49,7 @@ class block_badgeawarder_processor { const UPDATE_NOTHING = 0; /** - * @bool true if there is really nothing to do. + * @var bool true if there is really nothing to do. */ public $nothingtodo; @@ -105,7 +105,6 @@ class block_badgeawarder_processor { * * @param csv_import_reader $cir import reader object * @param array $options options of the process - * @param array $defaults default data value */ public function __construct(csv_import_reader $cir, $options) { if (is_array($options)) { @@ -302,7 +301,7 @@ private function get_badge($name) { /** * Checks the criteria of a badge. * - * @param object $badge the badge object. + * @param badge $badge the badge object. * @return bool */ private function check_badge_criteria(badge $badge) { @@ -415,6 +414,7 @@ private function get_enrolmentinstance() { /** * Sends an email to the user with the awarded badge details. * + * @param object $user * @return bool */ private function send_email($user) { @@ -438,6 +438,7 @@ private function send_email($user) { /** * Enrols a user in a course. * + * @param object $user * @return void */ private function enrol_user($user) { @@ -519,6 +520,7 @@ protected function get_existing_usernames() { /** * Verifies that filecolumns has all the required fields. * + * @param array $data * @return bool */ protected function check_required_fields($data) { @@ -542,7 +544,6 @@ protected function check_required_fields($data) { * This only returns passed data, along with the errors. * * @param integer $rows number of rows to preview. - * @param object $tracker the output tracker to use. * @return array of preview data. */ public function preview($rows = 10) {