wooclap / moodle-mod_wooclap

Moodle plugin for Wooclap (https://www.wooclap.com/).
2 stars 5 forks source link

2023103100 #24

Closed marco-verbeek closed 9 months ago

marco-verbeek commented 9 months ago

Do not use PHP and HTML in the same file

PHP should only contain PHP code and should not include HTML. Separated in different files.

PHPUnit tests for Privacy failed

Some PHPUnit tests for the Privacy API and the data privacy plugin are failing because of a call to debugging().

Incorrect wrapping on class declaration

Fixed the incorrect wrapping when declaring a class.

Unused variables

There were some variables that were unused.

Use of and instead of &&

The operator “and” was being used instead of “&&”.

Any logged in user can call methods on some files

Some files were not checking the capabilities of the current user.

Parameter type not allowed

The use of the parameter type ‘PARAM_RAW_TRIMMED’ is not allowed. Changed it.

The Function names on the lib file should be unique

The name of the functions used in lib.php did not contain the name of the plugin as a prefix.

Update deprecated function to throw exceptions

We were using the (now deprecated) print_error function.

Linting

Fixed many linting issues.