Prechecker results: error


PHP lint problems

(0 errors, 0 warnings)

This section shows php lint problems in the code detected by php -l [More info]


PHP coding style problems

(51 errors, 45 warnings)

This section shows the coding style problems detected in the code by phpcs [More info]

blocks/use_stats/adminlib.php
(#27) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
blocks/use_stats/block_use_stats.php
(#72) global $PAGE cannot be used in block classes. Use $this->page.
(#77) global $PAGE cannot be used in block classes. Use $this->page.
(#591) Method name "_seeother" should not be prefixed with an underscore to indicate visibility
(#600) global $PAGE cannot be used in block classes. Use $this->page.
(#606) global $PAGE cannot be used in block classes. Use $this->page.
(#608) global $PAGE cannot be used in block classes. Use $this->page.
(#609) global $PAGE cannot be used in block classes. Use $this->page.
(#610) global $PAGE cannot be used in block classes. Use $this->page.
(#611) global $PAGE cannot be used in block classes. Use $this->page.
(#612) global $PAGE cannot be used in block classes. Use $this->page.
(#612) Line exceeds 132 characters; contains 134 characters
blocks/use_stats/classes/engine/session.class.php
(#28) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#111) Line indented incorrectly; expected 4 spaces, found 5
(#113) Line indented incorrectly; expected 4 spaces, found 5
(#135) Whitespace found at end of line
(#148) File must end with a newline character
blocks/use_stats/classes/engine/session_manager.class.php
(#140) Inline comments must start with a capital letter, digit or 3-dots sequence
(#149) Inline comments must start with a capital letter, digit or 3-dots sequence
(#162) Line indented incorrectly; expected 4 spaces, found 5
(#164) Inline comments must start with a capital letter, digit or 3-dots sequence
(#173) Line indented incorrectly; expected 4 spaces, found 5
(#175) Whitespace found at end of line
blocks/use_stats/classes/event/block_use_stats_keepalive.php
(#27) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
blocks/use_stats/classes/privacy/provider.php
(#19) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#31) File must end with a newline character
blocks/use_stats/classes/task/cache_ttl_task.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#51) File must end with a newline character
blocks/use_stats/classes/task/cleanup_task.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#51) File must end with a newline character
blocks/use_stats/classes/task/compile_task.php
(#27) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#52) File must end with a newline character
blocks/use_stats/db/caches.php
(#33) File must end with a newline character
blocks/use_stats/db/upgrade.php
(#24) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
blocks/use_stats/edit_form.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
blocks/use_stats/externallib.php
(#123) Line exceeds 132 characters; contains 134 characters
(#205) File must end with a newline character
blocks/use_stats/lang/en/block_use_stats.php
(#122) File is being unconditionally included; use "require" instead
(#122) File must end with a newline character
blocks/use_stats/lang/en/pro_additional_strings.php
(#2) The opening <?php tag must be followed by exactly one newline.
(#14) Inline comments must start with a capital letter, digit or 3-dots sequence
(#14) Inline comments must end in full-stops, exclamation marks, or question marks
blocks/use_stats/lang/fr/block_use_stats.php
(#102) Inline comments must start with a capital letter, digit or 3-dots sequence
(#110) File is being unconditionally included; use "require" instead
(#110) File must end with a newline character
blocks/use_stats/lang/fr/pro_additional_strings.php
(#2) The opening <?php tag must be followed by exactly one newline.
(#14) Inline comments must start with a capital letter, digit or 3-dots sequence
(#14) Inline comments must end in full-stops, exclamation marks, or question marks
blocks/use_stats/lib.php
(#23) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#53) Spaces must be used to indent lines; tabs are not allowed
(#53) Tab found within whitespace
(#113) File must end with a newline character
blocks/use_stats/locallib.php
(#41) Line exceeds 132 characters; contains 147 characters
(#195) Line exceeds 132 characters; contains 134 characters
(#199) Variable "CMSECTIONS" must be all lower-case
(#403) Inline comments must start with a capital letter, digit or 3-dots sequence
(#429) Variable "CMSECTIONS" must be all lower-case
(#430) Variable "CMSECTIONS" must be all lower-case
(#446) Variable "CMSECTIONS" must be all lower-case
(#447) Line exceeds 132 characters; contains 147 characters
(#535) Variable "CMSECTIONS" must be all lower-case
(#536) Variable "CMSECTIONS" must be all lower-case
(#536) Line exceeds 132 characters; contains 139 characters
(#538) Variable "CMSECTIONS" must be all lower-case
(#550) Inline comments must start with a capital letter, digit or 3-dots sequence
(#551) Line exceeds 132 characters; contains 136 characters
(#554) Inline comments must start with a capital letter, digit or 3-dots sequence
(#575) Line exceeds 132 characters; contains 155 characters
(#1210) This comment is 61% valid code; is this commented out code?
(#1314) File must end with a newline character
blocks/use_stats/renderer.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#234) File must end with a newline character
blocks/use_stats/rpclib.php
(#328) Declaring a required parameter after an optional one is deprecated since PHP 8.0. Parameter $scorescope is optional, while parameter $courseidfield is required.
(#329) Declaring a required parameter after an optional one is deprecated since PHP 8.0. Parameter $scorescope is optional, while parameter $courseidentifier is required.
blocks/use_stats/test/test_client.php
(#2) The opening <?php tag must be followed by exactly one newline.
(#3) Expected MOODLE_INTERNAL check or config.php inclusion. Change in global state detected.
(#5) Inline comments must start with a capital letter, digit or 3-dots sequence
(#11) Inline comments must end in full-stops, exclamation marks, or question marks
(#13) Inline comments must start with a capital letter, digit or 3-dots sequence
(#20) Line exceeds 132 characters; contains 146 characters
(#43) Line exceeds 132 characters; contains 138 characters
(#66) Line exceeds 132 characters; contains 145 characters
(#97) The use of function print_r() is forbidden
(#111) The use of function print_r() is forbidden
(#116) Inline comments must end in full-stops, exclamation marks, or question marks
(#120) This comment is 64% valid code; is this commented out code?
(#127) This comment is 74% valid code; is this commented out code?
(#132) Commas (,) must be followed by white space.
(#132) Commas (,) must be followed by white space.
(#133) Commas (,) must be followed by white space.
(#133) Commas (,) must be followed by white space.
(#133) Line exceeds 132 characters; contains 133 characters
(#135) This comment is 61% valid code; is this commented out code?
(#143) File must end with a newline character
blocks/use_stats/version.php
(#38) File must end with a newline character
blocks/use_stats/xlib.php
(#46) File must end with a newline character

Javascript coding style problems

(11 errors, 7 warnings)

This section shows the coding style problems detected in the code by eslint [More info]

blocks/use_stats/amd/src/pro.js
(#34) Identifier 'check_product_key' is not in camel case. (camelcase)
(#81) Missing JSDoc @param "keypayload" declaration. (jsdoc/require-param)
(#81) Missing JSDoc @returns for function. (valid-jsdoc)
(#81) Missing JSDoc for parameter 'keypayload'. (valid-jsdoc)
blocks/use_stats/js/usestats.js
(#8) Missing JSDoc comment. (require-jsdoc)
(#8) 'toggleusestatsto' is defined but never used. (no-unused-vars)
(#9) 'fid' is not defined. (no-undef)
(#10) '$' is not defined. (no-undef)
(#10) 'fid' is not defined. (no-undef)
(#10) Statement inside of curly braces should be on next line. (brace-style)
(#10) Closing curly brace should be on the same line as opening curly brace or on the line after the previous block. (brace-style)
(#13) Missing JSDoc comment. (require-jsdoc)
(#13) 'initusestatsto' is defined but never used. (no-unused-vars)
(#14) 'fid' is not defined. (no-undef)
(#16) '$' is not defined. (no-undef)
(#16) 'fid' is not defined. (no-undef)
(#18) '$' is not defined. (no-undef)
(#18) 'fid' is not defined. (no-undef)

CSS problems

(0 errors, 0 warnings)

This section shows CSS problems detected by stylelint [More info]


PHPDocs style problems

(102 errors, 23 warnings)

This section shows the phpdocs problems detected in the code by local_moodlecheck [More info]

blocks/use_stats/adminlib.php
(#19) Category blocks is not valid
(#17) No one-line description found in phpdocs for file
blocks/use_stats/block_use_stats.php
(#21) Category blocks is not valid
(#38) Class block_use_stats is not documented
(#40) Function block_use_stats::init is not documented
(#240) Function block_use_stats::get_range is not documented
(#520) Function block_use_stats::prepare_coursetable is not documented
(#591) Function block_use_stats::_seeother is not documented
(#599) Function block_use_stats::get_required_javascript is not documented
blocks/use_stats/classes/engine/session.class.php
(#20) Package blocks_use_stats is not valid
(#21) Category blocks is not valid
(#57) Function session::__construct is not documented
(#39) Variable session::$userid is not documented
(#41) Variable session::$courses is not documented
(#43) Variable session::$start is not documented
(#45) Variable session::$end is not documented
(#33) No one-line description found in phpdocs for class session
(#108) There is no description in phpdocs for function is_null_session
(#66) Phpdocs for function session::extend_endtime has incomplete parameters list
(#75) Phpdocs for function session::extend_elapsed has incomplete parameters list
(#82) Phpdocs for function session::extend_events has incomplete parameters list
(#89) Phpdocs for function session::add_course has incomplete parameters list
(#47) Phpdocs for variable session::$elapsed does not contain @var or incorrect
(#52) Phpdocs for variable session::$events does not contain @var or incorrect
blocks/use_stats/classes/engine/session_manager.class.php
(#20) Package blocks_use_stats is not valid
(#21) Category blocks is not valid
(#35) No one-line description found in phpdocs for class session_manager
(#188) There is no description in phpdocs for function aggregate
(#85) Phpdocs for function session_manager::set_mode has incomplete parameters list
(#95) Phpdocs for function session_manager::set_log_buffer has incomplete parameters list
(#102) Phpdocs for function session_manager::extend_last_session has incomplete parameters list
(#109) Phpdocs for function session_manager::extend_events has incomplete parameters list
(#116) Phpdocs for function session_manager::extend_elapsed has incomplete parameters list
(#123) Phpdocs for function session_manager::last_session_add_course has incomplete parameters list
(#159) Phpdocs for function session_manager::start_session has incomplete parameters list
(#188) Phpdocs for function session_manager::aggregate has incomplete parameters list
(#41) Phpdocs for variable session_manager::$mode does not contain @var or incorrect
(#48) Phpdocs for variable session_manager::$sessions does not contain @var or incorrect
(#53) Phpdocs for variable session_manager::$lastsession does not contain @var or incorrect
(#58) Phpdocs for variable session_manager::$logbuffer does not contain @var or incorrect
blocks/use_stats/classes/event/block_use_stats_keepalive.php
(#21) Category blocks is not valid
(#43) Phpdocs for function block_use_stats_keepalive::create_from_cm has incomplete parameters list
(#118) Phpdocs for function block_use_stats_keepalive::set_legacy_logdata has incomplete parameters list
blocks/use_stats/classes/privacy/provider.php
(#21) Package is not specified for class provider. It is also not specified in file-level phpdocs
(#21) Class provider is not documented
blocks/use_stats/classes/task/cache_ttl_task.php
(#17) No one-line description found in phpdocs for file
blocks/use_stats/classes/task/cleanup_task.php
(#17) No one-line description found in phpdocs for file
blocks/use_stats/classes/task/compile_task.php
(#19) Category blocks is not valid
(#17) No one-line description found in phpdocs for file
blocks/use_stats/db/access.php
(#19) Category blocks is not valid
(#17) No one-line description found in phpdocs for file
blocks/use_stats/db/caches.php
(#19) Category blocks is not valid
(#17) No one-line description found in phpdocs for file
blocks/use_stats/db/mnet.php
(#19) Category blocks is not valid
(#17) No one-line description found in phpdocs for file
blocks/use_stats/db/upgrade.php
(#19) Category blocks is not valid
(#17) No one-line description found in phpdocs for file
(#26) Phpdocs for function xmldb_block_use_stats_upgrade has incomplete parameters list
blocks/use_stats/edit_form.php
(#20) Package blocks_use_stats is not valid
(#21) Category blocks is not valid
(#36) Function block_use_stats_edit_form::specific_definition is not documented
blocks/use_stats/externallib.php
(#19) Category blocks is not valid
(#31) Class block_use_stats_external is not documented
(#33) Function block_use_stats_external::get_user_stats_parameters is not documented
(#48) Function block_use_stats_external::get_user_stats is not documented
(#59) Function block_use_stats_external::get_user_stats_returns is not documented
(#118) Function block_use_stats_external::get_users_course_stats is not documented
(#129) Function block_use_stats_external::get_users_course_stats_returns is not documented
(#137) Function block_use_stats_external::get_users_stats_parameters is not documented
(#156) Function block_use_stats_external::get_users_stats is not documented
(#167) Function block_use_stats_external::get_users_stats_returns is not documented
(#175) Function block_use_stats_external::get_user_course_stats_returns is not documented
(#17) No one-line description found in phpdocs for file
(#17) File-level phpdocs block does not have @copyright tag
blocks/use_stats/lang/en/block_use_stats.php
(#18) File-level phpdocs block is not found
blocks/use_stats/lang/en/pro_additional_strings.php
(#2) Empty line found after PHP open tag
(#3) File-level phpdocs block is not found
blocks/use_stats/lang/fr/block_use_stats.php
(#18) File-level phpdocs block is not found
blocks/use_stats/lang/fr/pro_additional_strings.php
(#2) Empty line found after PHP open tag
(#3) File-level phpdocs block is not found
blocks/use_stats/lib.php
(#19) Category blocks is not valid
(#106) Function block_use_stats_setup_theme_notification is not documented
(#17) No one-line description found in phpdocs for file
(#29) Phpdocs for function block_use_stats_supports_feature has incomplete parameters list
blocks/use_stats/locallib.php
(#20) Package blocks_use_stats is not valid
(#21) Category blocks is not valid
(#33) Function debug_trace is not documented
(#48) Function use_stats_get_reader is not documented
(#1189) Function block_use_stats_is_login_event is not documented
(#1193) Function block_use_stats_is_logout_event is not documented
(#1267) Function use_stats_fix_last_course_access is not documented
(#799) Phpdocs for function use_stats_site_aggregate_time has incomplete parameters list
(#1031) Phpdocs for function block_use_stats_format_time has incomplete parameters list
(#1053) Phpdocs for function block_use_stats_render_aggregate has incomplete parameters list
blocks/use_stats/renderer.php
(#21) Category blocks is not valid
(#28) Class block_use_stats_renderer is not documented
(#30) Function block_use_stats_renderer::per_course is not documented
(#198) Function block_use_stats_renderer::calendar is not documented
(#91) There is no description in phpdocs for function change_params_form
(#217) There is no description in phpdocs for function button_pdf
(#95) Phpdocs for function block_use_stats_renderer::change_params_form has incomplete parameters list
(#218) Phpdocs for function block_use_stats_renderer::button_pdf has incomplete parameters list
(#92) Not recommended phpdocs tag @global used
(#92) Not recommended phpdocs tag @global used
(#92) Not recommended phpdocs tag @global used
blocks/use_stats/rpclib.php
(#21) Category blocks is not valid
(#311) Function use_stats_rpc_get_stats_wrapped is not documented
(#456) Function use_stats_rpc_get_scores_wrapped is not documented
(#115) Phpdocs for function use_stats_rpc_get_stats has incomplete parameters list
blocks/use_stats/settings.php
(#19) Category blocks is not valid
(#17) No one-line description found in phpdocs for file
blocks/use_stats/test/test_client.php
(#3) Package is not specified for class test_client. It is also not specified in file-level phpdocs
(#2) Empty line found after PHP open tag
(#3) Class test_client is not documented
(#7) Function test_client::__construct is not documented
(#20) Function test_client::test_get_user_stats is not documented
(#43) Function test_client::test_get_users_stats is not documented
(#66) Function test_client::test_get_users_course_stats is not documented
(#89) Function test_client::send is not documented
(#5) Variable test_client::$t is not documented
blocks/use_stats/version.php
(#21) Category blocks is not valid
blocks/use_stats/xlib.php
(#19) Category blocks is not valid
(#29) Function block_use_stats_get_coursetable is not documented
(#44) Function block_use_stats_x_format_time is not documented
(#17) No one-line description found in phpdocs for file

Update savepoints problems

(1 errors, 0 warnings)

This section shows problems detected with the handling of upgrade savepoints [More info]

blocks/use_stats/db/upgrade.php
'return true;' not found

Third party library modification problems

(0 errors, 0 warnings)

This section shows problems detected with the modification of third party libraries [More info]


grunt changes

(1 errors, 1 warnings)

This section shows files built by grunt and not commited [More info]

Problems running grunt
Task "eslint:amd" failed. Use --force to continue.

shifter problems

(0 errors, 0 warnings)

This section shows problems detected by shifter [More info]


Mustache template problems

(0 errors, 1 warnings)

This section shows problems detected in mustache templates [More info]

blocks/use_stats/templates/pro_purchase_options.mustache
(#1) Example context missing (@template section not found.)

Gherkin .feature problems

(0 errors, 0 warnings)

This section shows problems detected in behat .feature files [More info]