From 39cf22d16d5a484452cca739105dadf24886b5ea Mon Sep 17 00:00:00 2001 From: Andrii Semenets Date: Wed, 20 Dec 2023 14:53:17 +0200 Subject: [PATCH] GitHub Linting: fix phpdoc for top-level pages, forms and /tests --- categoriesform.class.php | 23 ++++++++ db/mobile.php | 9 ++++ db/tasks.php | 8 +++ db/upgrade.php | 16 ++++++ edit_optiontemplates.php | 9 ++++ importexcel_form.php | 25 +++++++-- lang/de/booking.php | 8 +++ lang/en/booking.php | 8 +++ lib.php | 6 ++- mod_form.php | 52 +++++++++++++++++-- moveoption.php | 9 ++++ mybookings.php | 9 ++++ option_date_template.php | 9 ++++ otherbookingaddrule_form.php | 21 ++++++-- pricecategories.php | 5 +- sendmessage.php | 9 ++++ sendmessageform.class.php | 22 +++++++- subscribeusers.php | 6 +++ tag.php | 9 ++++ tagtemplatesadd_form.php | 30 +++++++++-- teachers_form.php | 12 +++++ tests/behat/behat_booking.php | 5 +- tests/booking_option_test.php | 17 +++++- tests/events_test.php | 17 +++++- .../generator/behat_mod_booking_generator.php | 5 +- tests/generator/lib.php | 24 +++++++-- tests/lib_test.php | 28 ++++++++++ version.php | 2 + view.php | 4 +- viewpolicy.php | 9 ++++ 30 files changed, 387 insertions(+), 29 deletions(-) diff --git a/categoriesform.class.php b/categoriesform.class.php index f746dc028..f13f9447c 100755 --- a/categoriesform.class.php +++ b/categoriesform.class.php @@ -26,8 +26,25 @@ require_once($CFG->libdir . '/formslib.php'); +/** + * Class for handling categories form + * + * @package mod_booking + * @copyright 2022 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class mod_booking_categories_form extends moodleform { + /** + * Show sub categories. + * + * @param int $catid + * @param string $dashes + * @param array $options + * + * @return array + * + */ private function show_sub_categories($catid, $dashes = '', $options = []) { global $DB; $dashes .= '  '; @@ -41,6 +58,12 @@ private function show_sub_categories($catid, $dashes = '', $options = []) { return $options; } + /** + * + * {@inheritDoc} + * @see moodleform::definition() + * + */ public function definition() { global $DB, $COURSE; diff --git a/db/mobile.php b/db/mobile.php index f81eb642f..f8e21f5d0 100755 --- a/db/mobile.php +++ b/db/mobile.php @@ -13,6 +13,15 @@ // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . + +/** + * Booking module mobile params script + * + * @package mod_booking + * @copyright 2009-2023 David Bogner + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + defined('MOODLE_INTERNAL') || die(); $addons = [ diff --git a/db/tasks.php b/db/tasks.php index c5ff47470..49ac665eb 100755 --- a/db/tasks.php +++ b/db/tasks.php @@ -14,6 +14,14 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +/** + * Booking module scheduled tasks definition + * + * @package mod_booking + * @copyright 2009-2023 David Bogner + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + defined('MOODLE_INTERNAL') || die(); $tasks = [ diff --git a/db/upgrade.php b/db/upgrade.php index dd4df6cc7..fa4b4cb89 100755 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -14,6 +14,22 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +/** + * Booking module databese upgrade script + * + * @package mod_booking + * @copyright 2009-2023 David Bogner + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +/** + * Xmldb booking upgrade + * + * @param string $oldversion + * + * @return bool + * + */ function xmldb_booking_upgrade($oldversion) { global $CFG, $DB; diff --git a/edit_optiontemplates.php b/edit_optiontemplates.php index 6c39ba327..344e92913 100644 --- a/edit_optiontemplates.php +++ b/edit_optiontemplates.php @@ -13,6 +13,15 @@ // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . + +/** + * Handling editing of option tepmplates + * + * @package mod_booking + * @copyright 2023 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + use mod_booking\form\option_form; use mod_booking\singleton_service; diff --git a/importexcel_form.php b/importexcel_form.php index 7ef5ada00..5cbf77517 100755 --- a/importexcel_form.php +++ b/importexcel_form.php @@ -13,11 +13,26 @@ // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . + +/** + * Handling importexcel form + * + * @package mod_booking + * @copyright 2023 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + defined('MOODLE_INTERNAL') || die(); require_once("$CFG->libdir/formslib.php"); - +/** + * Class to handle importexcel form + * + * @package mod_booking + * @copyright 2023 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class importexcel_form extends moodleform { /** @@ -38,9 +53,13 @@ public function definition() { } /** + * Form validation + * + * @param array $data + * @param array $files + * + * @return array * - * {@inheritDoc} - * @see moodleform::validation() */ public function validation($data, $files) { return []; diff --git a/lang/de/booking.php b/lang/de/booking.php index 6c626ebbe..5090a8523 100755 --- a/lang/de/booking.php +++ b/lang/de/booking.php @@ -14,6 +14,14 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +/** + * German translation of the booking module + * + * @package mod_booking + * @copyright 2023 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + global $CFG; // General strings. diff --git a/lang/en/booking.php b/lang/en/booking.php index af15dd634..d0beddf32 100755 --- a/lang/en/booking.php +++ b/lang/en/booking.php @@ -14,6 +14,14 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +/** + * English lang strings of the booking module + * + * @package mod_booking + * @copyright 2023 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + global $CFG; // General strings. diff --git a/lib.php b/lib.php index 3c53a9fd8..954a829e7 100755 --- a/lib.php +++ b/lib.php @@ -2828,13 +2828,15 @@ function booking_show_subcategories($catid, $courseid) { /** * Returns list of user objects that are subscribed to this booking * - * @param stdClass $course the course - * @param booking $booking the booking + * @param stdClass $course + * @param int $optionid * @param int $id * @param int $groupid group id, or 0 for all. * @param stdClass $context the booking context, to save re-fetching it where possible. * @param string $fields requested user fields (with "u." table prefix) + * * @return array list of users. + * */ function booking_subscribed_teachers($course, $optionid, $id, $groupid = 0, $context = null, $fields = null) { diff --git a/mod_form.php b/mod_form.php index a243f9d2e..a67b4f8b5 100755 --- a/mod_form.php +++ b/mod_form.php @@ -18,7 +18,7 @@ * Module setup form * * @package mod_booking - * @copyright 2021 Wunderbyte GmbH + * @copyright 2023 Wunderbyte GmbH * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -36,17 +36,29 @@ require_once($CFG->libdir . '/formslib.php'); require_once($CFG->dirroot . '/mod/booking/lib.php'); - +/** + * Class to handle booking module setup form + * + * @package mod_booking + * @copyright 2023 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class mod_booking_mod_form extends moodleform_mod { + /** + * $options + * + * @var array + */ public $options = []; /** * Return an array of categories catid as key and categoryname as value * - * @param int $cat_id + * @param int $catid * @param string $dashes * @param array $options + * * @return array of course category names indexed by category id */ public function show_sub_categories($catid, $dashes = '', $options = []) { @@ -63,6 +75,12 @@ public function show_sub_categories($catid, $dashes = '', $options = []) { return $options; } + /** + * Add completion rules. + * + * @return array + * + */ public function add_completion_rules() { $mform = & $this->_form; @@ -81,10 +99,23 @@ public function add_completion_rules() { return ['enablecompletiongroup']; } + /** + * Completion rule enabled. + * + * @param array $data + * + * @return bool + * + */ public function completion_rule_enabled($data) { return !empty($data['enablecompletion'] != 0); } + /** + * + * {@inheritDoc} + * @see moodleform_mod::definition() + */ public function definition() { global $CFG, $DB, $COURSE, $USER, $PAGE, $OUTPUT; @@ -1150,6 +1181,15 @@ public function data_preprocessing(&$defaultvalues) { } } + /** + * Form validation. + * + * @param array $data + * @param array $files + * + * @return array + * + */ public function validation($data, $files) { global $DB; $errors = parent::validation($data, $files); @@ -1206,6 +1246,12 @@ public function data_postprocessing($data) { // TODO: ... if mailtemplatessource is set to 1 on saving. } + /** + * Get form data. + * + * @return object + * + */ public function get_data() { $data = parent::get_data(); if ($data) { diff --git a/moveoption.php b/moveoption.php index 8569c698f..759694c8d 100644 --- a/moveoption.php +++ b/moveoption.php @@ -13,6 +13,15 @@ // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . + +/** + * Handling move option pahe + * + * @package mod_booking + * @copyright 2023 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + use mod_booking\singleton_service; require_once(__DIR__ . '/../../config.php'); diff --git a/mybookings.php b/mybookings.php index 436003725..f8ef4e088 100644 --- a/mybookings.php +++ b/mybookings.php @@ -13,6 +13,15 @@ // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . + +/** + * Handling my bookings page + * + * @package mod_booking + * @copyright 2023 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + require_once(__DIR__ . '/../../config.php'); require_once($CFG->dirroot . '/mod/booking/locallib.php'); diff --git a/option_date_template.php b/option_date_template.php index 5f03c8613..c30440dfc 100644 --- a/option_date_template.php +++ b/option_date_template.php @@ -13,6 +13,15 @@ // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . + +/** + * Handling option date template page + * + * @package mod_booking + * @copyright 2023 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + use mod_booking\booking; use mod_booking\singleton_service; diff --git a/otherbookingaddrule_form.php b/otherbookingaddrule_form.php index 0aa46f7bd..a57f91a86 100755 --- a/otherbookingaddrule_form.php +++ b/otherbookingaddrule_form.php @@ -26,7 +26,13 @@ require_once("$CFG->libdir/formslib.php"); - +/** + * Class to hanfling other booking add role form + * + * @package mod_booking + * @copyright 2021 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class otherbookingaddrule_form extends moodleform { /** @@ -73,14 +79,23 @@ public function definition() { } /** + * Form validation. + * + * @param array $data + * @param mixed $files + * + * @return array * - * {@inheritDoc} - * @see moodleform::validation() */ public function validation($data, $files) { return []; } + /** + * + * {@inheritDoc} + * @see moodleform::get_data() + */ public function get_data() { $data = parent::get_data(); diff --git a/pricecategories.php b/pricecategories.php index dd9376313..2f8c7d01c 100644 --- a/pricecategories.php +++ b/pricecategories.php @@ -135,8 +135,9 @@ * Helper function to return arrays containing all relevant pricecategories update changes. * The returned arrays will have the prepared stdClasses for update and insert in booking_pricecategories table. * - * @param $oldpricecategories the existing price categories - * @param $data the form data + * @param mixed $oldpricecategories the existing price categories + * @param array $data the form data + * * @return array */ function pricecategories_get_changes($oldpricecategories, $data) { diff --git a/sendmessage.php b/sendmessage.php index ccfab729f..b7fd8392b 100755 --- a/sendmessage.php +++ b/sendmessage.php @@ -13,6 +13,15 @@ // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . + +/** + * Handling send message page + * + * @package mod_booking + * @copyright 2023 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + require_once(__DIR__ . '/../../config.php'); require_once("lib.php"); require_once("sendmessageform.class.php"); diff --git a/sendmessageform.class.php b/sendmessageform.class.php index 2343d7a89..5c5c5c5c4 100755 --- a/sendmessageform.class.php +++ b/sendmessageform.class.php @@ -13,13 +13,33 @@ // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . + +/** + * Handling send message form + * + * @package mod_booking + * @copyright 2023 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + defined('MOODLE_INTERNAL') || die(); require_once($CFG->libdir . '/formslib.php'); - +/** + * Class to handling send message form + * + * @package mod_booking + * @copyright 2023 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class mod_booking_sendmessage_form extends moodleform { + /** + * + * {@inheritDoc} + * @see moodleform::definition() + */ public function definition() { $mform = $this->_form; diff --git a/subscribeusers.php b/subscribeusers.php index e8079a30f..32fb024c7 100755 --- a/subscribeusers.php +++ b/subscribeusers.php @@ -13,13 +13,19 @@ // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . + /** * This page allows a user to subscribe/unsubscribe other users from a booking option. + * * TODO: upgrade logging, add logging for added/deleted users * * @author David Bogner davidbogner@gmail.com * @package mod_booking + * @copyright 2023 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * */ + require_once(__DIR__ . '/../../config.php'); require_once($CFG->dirroot . '/mod/booking/locallib.php'); diff --git a/tag.php b/tag.php index 6f5f9878a..6de84b2ba 100755 --- a/tag.php +++ b/tag.php @@ -13,6 +13,15 @@ // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . + +/** + * Handling tag page of the booking module + * + * @package mod_booking + * @copyright 2021 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + require_once(__DIR__ . '/../../config.php'); require_once("lib.php"); require_once($CFG->dirroot . '/tag/lib.php'); diff --git a/tagtemplatesadd_form.php b/tagtemplatesadd_form.php index 2cc3d7a10..dc9382c32 100755 --- a/tagtemplatesadd_form.php +++ b/tagtemplatesadd_form.php @@ -13,11 +13,26 @@ // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . + +/** + * Handling tagtemplates add form + * + * @package mod_booking + * @copyright 2023 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + defined('MOODLE_INTERNAL') || die(); require_once("$CFG->libdir/formslib.php"); - +/** + * Class to handle tagtemplates add form + * + * @package mod_booking + * @copyright 2023 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class tagtemplatesadd_form extends moodleform { /** @@ -44,14 +59,23 @@ public function definition() { } /** + * Form validation. + * + * @param array $data + * @param array $files + * + * @return array * - * {@inheritDoc} - * @see moodleform::validation() */ public function validation($data, $files) { return []; } + /** + * + * {@inheritDoc} + * @see moodleform::get_data() + */ public function get_data() { $data = parent::get_data(); if ($data) { diff --git a/teachers_form.php b/teachers_form.php index 23220ebdb..632ce96a4 100755 --- a/teachers_form.php +++ b/teachers_form.php @@ -30,8 +30,20 @@ // No guest autologin. require_login(0, false); +/** + * Class to handling Teachers form + * + * @package mod_booking + * @copyright 2023 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class mod_booking_teachers_form extends moodleform { + /** + * + * {@inheritDoc} + * @see moodleform::definition() + */ public function definition() { global $DB, $CFG; diff --git a/tests/behat/behat_booking.php b/tests/behat/behat_booking.php index daa4e2c3e..e1ceee666 100644 --- a/tests/behat/behat_booking.php +++ b/tests/behat/behat_booking.php @@ -18,7 +18,8 @@ * Defines message providers (types of messages being sent) * * @package mod_booking - * @copyright 2021 Georg Maißer + * @copyright 2023 Wunderbyte GmbH + * @author Georg Maißer * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -34,7 +35,7 @@ class behat_booking extends behat_base { * Create booking option in booking instance * @Given /^I create booking option "(?P(?:[^"]|\\")*)" in "(?P(?:[^"]|\\")*)"$/ * @param string $optionname - * @param string $playerbname + * @param string $instancename * @return void */ public function i_create_booking_option($optionname, $instancename) { diff --git a/tests/booking_option_test.php b/tests/booking_option_test.php index f7018d848..22f0574d0 100755 --- a/tests/booking_option_test.php +++ b/tests/booking_option_test.php @@ -19,7 +19,8 @@ * * @package mod_booking * @category test - * @copyright 2017 Andraž Prinčič + * @copyright 2023 Wunderbyte GmbH + * @author 2017 Andraž Prinčič * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -34,6 +35,14 @@ use stdClass; use mod_booking\utils\csv_import; +/** + * Class handling tests for booking options. + * + * @package mod_booking + * @category test + * @copyright 2023 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class booking_option_test extends advanced_testcase { /** @@ -43,6 +52,12 @@ public function setUp():void { $this->resetAfterTest(); } + /** + * Tear Down. + * + * @return void + * + */ public function tearDown():void { } diff --git a/tests/events_test.php b/tests/events_test.php index d49cd052a..b29320d57 100755 --- a/tests/events_test.php +++ b/tests/events_test.php @@ -18,7 +18,8 @@ * Tests for booking events. * * @package mod_booking - * @copyright 2017 Andraž Prinčič + * @copyright 2023 Wunderbyte GmbH + * @author Andraž Prinčič * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -33,7 +34,7 @@ * * @package mod_booking * @category test - * @copyright 2021 Wunderbyte GmbH + * @copyright 2023 Wunderbyte GmbH * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class events_test extends advanced_testcase { @@ -45,9 +46,21 @@ public function setUp():void { $this->resetAfterTest(); } + /** + * Tear Down. + * + * @return void + * + */ public function tearDown():void { } + /** + * Return test data. + * + * @return array + * + */ private function returntestdata() { $bdata = ['name' => 'Test Booking', 'eventtype' => 'Test event', 'bookedtext' => ['text' => 'text'], 'waitingtext' => ['text' => 'text'], diff --git a/tests/generator/behat_mod_booking_generator.php b/tests/generator/behat_mod_booking_generator.php index 3c3e02afa..4de292025 100644 --- a/tests/generator/behat_mod_booking_generator.php +++ b/tests/generator/behat_mod_booking_generator.php @@ -19,7 +19,8 @@ * * @package mod_booking * @category test - * @copyright 2023 Andrii Semenets + * @copyright 2023 Wunderbyte GmbH + * @author Andrii Semenets * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class behat_mod_booking_generator extends behat_generator_base { @@ -70,7 +71,7 @@ protected function get_booking_id(string $bookingname): int { /** * Get the semesterID using an identifier. * - * @param string $idnumber + * @param string $identifier * @return int The semester id */ protected function get_semester_id(string $identifier): int { diff --git a/tests/generator/lib.php b/tests/generator/lib.php index 6a281422c..74346d87c 100755 --- a/tests/generator/lib.php +++ b/tests/generator/lib.php @@ -14,6 +14,15 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +/** + * Module booking data generator + * + * @package mod_booking + * @category test + * @copyright 2023 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + defined('MOODLE_INTERNAL') || die(); global $CFG; @@ -22,14 +31,14 @@ use mod_booking\customfield\booking_handler; /** - * mod_booking data generator + * Class to handle module booking data generator * * @package mod_booking * @category test - * @copyright 2017 Andraž Prinčič {@link https://www.princic.net} + * @copyright 2023 Wunderbyte GmbH + * @author 2023 Andrii Semenets * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ - class mod_booking_generator extends testing_module_generator { /** @@ -49,6 +58,15 @@ public function reset() { parent::reset(); } + /** + * Create booking instance + * + * @param mixed|null $record + * @param array|null $options + * + * @return stdClass + * + */ public function create_instance($record = null, array $options = null) { global $CFG; diff --git a/tests/lib_test.php b/tests/lib_test.php index 394f80928..0e048af4e 100755 --- a/tests/lib_test.php +++ b/tests/lib_test.php @@ -14,6 +14,16 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +/** + * Module booking tests common fuctions + * + * @package mod_booking + * @category test + * @copyright 2023 Wunderbyte GmbH + * @author Andraž Prinčič {@link https://www.princic.net} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + namespace mod_booking; defined('MOODLE_INTERNAL') || die(); @@ -25,12 +35,30 @@ require_once($CFG->dirroot . '/mod/booking/lib.php'); +/** + * Class to handle module booking tests common fuctions + * + * @package mod_booking + * @category test + * @copyright 2023 Wunderbyte GmbH + * @author Andraž Prinčič {@link https://www.princic.net} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class lib_test extends advanced_testcase { + /** + * Tests set up. + */ public function setUp():void { } + /** + * Tear Down. + * + * @return void + * + */ public function tearDown():void { } diff --git a/version.php b/version.php index 3bf962b44..d21fd1a1e 100755 --- a/version.php +++ b/version.php @@ -15,12 +15,14 @@ // along with Moodle. If not, see . /** + * Module Booking. * * @package mod_booking * @copyright 2023 Wunderbyte GmbH , * @author David Bogner, Georg Maißer, Bernhard Fischer, Andraž Prinčič * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + defined('MOODLE_INTERNAL') || die(); $plugin->version = 2023121100; diff --git a/view.php b/view.php index 375dc98c8..2aecbc925 100755 --- a/view.php +++ b/view.php @@ -15,8 +15,8 @@ // along with Moodle. If not, see . /** - * This is the main entrance point for the booking plugin - * showing a table of all booking options. + * This is the main entrance point for the booking plugin showing a table of all booking options. + * * Completely rebuilt in January 2023. * * @package mod_booking diff --git a/viewpolicy.php b/viewpolicy.php index 53c4ce80d..4743d4142 100755 --- a/viewpolicy.php +++ b/viewpolicy.php @@ -13,6 +13,15 @@ // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . + +/** + * Handling view policy page + * + * @package mod_booking + * @copyright 2023 Wunderbyte GmbH + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + use mod_booking\singleton_service; require_once(__DIR__ . '/../../config.php');