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

(1 errors, 37 warnings)

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

mod/debate/backup/moodle2/backup_debate_stepslib.php
(#25) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/debate/backup/moodle2/restore_debate_stepslib.php
(#25) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/debate/classes/debate_constants.php
(#27) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/debate/classes/debate_response.php
(#27) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/debate/classes/debate_teams.php
(#27) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/debate/classes/debate_teams_page.php
(#27) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/debate/classes/event/course_module_viewed.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/debate/classes/event/debate_response_added.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/debate/classes/event/debate_response_deleted.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/debate/classes/event/debate_response_error.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/debate/classes/event/debate_response_updated.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/debate/classes/output/renderer.php
(#27) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/debate/classes/privacy/provider.php
(#35) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#49) Opening brace should be on the same line as the declaration for class provider
mod/debate/classes/search/activity.php
(#27) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/debate/db/install.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/debate/db/uninstall.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/debate/db/upgrade.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/debate/debate_teams_page.php
(#78) Logical operator "and" is prohibited; use "&&" instead
mod/debate/index.php
(#78) Logical operator "or" is prohibited; use "||" instead
mod/debate/lib.php
(#25) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/debate/locallib.php
(#43) Logical operator "and" is prohibited; use "&&" instead
(#55) Logical operator "and" is prohibited; use "&&" instead
mod/debate/tests/generator/lib.php
(#25) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/debate/tests/generator_test.php
(#25) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#34) PHPUnit testcase name "mod_debate_generator_testcase" does not match file name "generator_test"
(#34) PHPUnit class "mod_debate_generator_testcase" does not have any namespace. It is recommended to add it to the "mod_debate" namespace, using more levels if needed, in order to match the code being tested
(#40) Test method test_generator() is missing any coverage information, own or at class level
(#79) Test method test_add_response() is missing any coverage information, own or at class level
(#120) Test method test_create_team() is missing any coverage information, own or at class level
mod/debate/tests/lib_test.php
(#25) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#34) PHPUnit testcase name "mod_debate_lib_testcase" does not match file name "lib_test"
(#34) PHPUnit class "mod_debate_lib_testcase" does not have any namespace. It is recommended to add it to the "mod_debate" namespace, using more levels if needed, in order to match the code being tested
(#49) Test method test_debate_supports() is missing any coverage information, own or at class level
(#60) Test method test_debate_view() is missing any coverage information, own or at class level
(#102) Test method test_debate_delete_instance() is missing any coverage information, own or at class level
(#149) Test method test_debate_update_instance() is missing any coverage information, own or at class level
(#177) Test method test_debate_reset_userdata() is missing any coverage information, own or at class level

Javascript coding style problems

(3 errors, 37 warnings)

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

mod/debate/amd/src/debate_view.js
(#4) @package should be empty. (jsdoc/empty-tags)
(#10) Unexpected space before function parentheses. (space-before-function-paren)
(#13) Unexpected space before function parentheses. (space-before-function-paren)
(#25) Unexpected space before function parentheses. (space-before-function-paren)
(#27) Unexpected space before function parentheses. (space-before-function-paren)
(#33) Unexpected space before function parentheses. (space-before-function-paren)
(#39) Unexpected space before function parentheses. (space-before-function-paren)
(#40) Unexpected space before function parentheses. (space-before-function-paren)
(#53) Unexpected space before function parentheses. (space-before-function-paren)
(#57) Identifier 'found_response' is not in camel case. (camelcase)
(#61) Each then() should return a value or throw (promise/always-return)
(#61) Unexpected space before function parentheses. (space-before-function-paren)
(#61) 'js' is defined but never used. (no-unused-vars)
(#72) Unexpected space before function parentheses. (space-before-function-paren)
(#76) Unexpected space before function parentheses. (space-before-function-paren)
(#81) Unexpected space before function parentheses. (space-before-function-paren)
(#102) Unexpected space before function parentheses. (space-before-function-paren)
(#124) Unexpected space before function parentheses. (space-before-function-paren)
(#135) Unexpected space before function parentheses. (space-before-function-paren)
(#157) Unexpected space before function parentheses. (space-before-function-paren)
(#168) Unexpected space before function parentheses. (space-before-function-paren)
(#191) Unexpected space before function parentheses. (space-before-function-paren)
(#197) Unexpected space before function parentheses. (space-before-function-paren)
(#211) Unexpected space before function parentheses. (space-before-function-paren)
(#220) Identifier 'user_profile_image' is not in camel case. (camelcase)
(#221) Identifier 'user_full_name' is not in camel case. (camelcase)
(#225) Identifier 'user_capability' is not in camel case. (camelcase)
(#226) Identifier 'user_edit_capability' is not in camel case. (camelcase)
(#227) Identifier 'user_delete_capability' is not in camel case. (camelcase)
(#232) Each then() should return a value or throw (promise/always-return)
(#232) Unexpected space before function parentheses. (space-before-function-paren)
(#232) 'js' is defined but never used. (no-unused-vars)
(#250) Unexpected space before function parentheses. (space-before-function-paren)
(#253) Unexpected space before function parentheses. (space-before-function-paren)
(#254) Unexpected confirm. (no-alert)
(#264) Unexpected space before function parentheses. (space-before-function-paren)
(#275) Unexpected space before function parentheses. (space-before-function-paren)
(#283) Expected catch,fail() or return (promise/catch-or-return)
(#283) Each then() should return a value or throw (promise/always-return)
(#283) Unexpected space before function parentheses. (space-before-function-paren)

CSS problems

(1 errors, 0 warnings)

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

mod/debate/styles.css
(#7) Unexpected !important (declaration-no-important)

PHPDocs style problems

(0 errors, 0 warnings)

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


Update savepoints problems

(3 errors, 0 warnings)

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

mod/debate/db/upgrade.php
Detected more 'if' blocks (2) than 'savepoint' calls (0)
version 2021020802 is missing corresponding savepoint call
version 2021031301 is missing corresponding savepoint call

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, 27 warnings)

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

mod/debate/templates/action_buttons.mustache
(#1) Example context missing (@template section not found.)
mod/debate/templates/cancel_button.mustache
(#1) Example context missing (@template section not found.)
mod/debate/templates/debate.mustache
(#1) Example context missing (@template section not found.)
(#1) HTML Validation error, line 18: Attribute “type” not allowed on element “textarea” at this point. ( <textarea id="mod-debate-positive-response-input" class="mod-debate-response-input" type="text"></text)
(#1) HTML Validation error, line 21: Bad value “” for attribute “src” on element “img”: Must be non-empty. ( <img src="" class="mod-debate-user-image mr-1"> )
(#1) HTML Validation error, line 21: An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images. ( <img src="" class="mod-debate-user-image mr-1"> )
(#1) HTML Validation error, line 49: Attribute “type” not allowed on element “textarea” at this point. ( <textarea id="mod-debate-negative-response-input" class="mod-debate-response-input" type="text"></text)
(#1) HTML Validation error, line 52: Bad value “” for attribute “src” on element “img”: Must be non-empty. ( <img src="" class="mod-debate-user-image mr-1"> )
(#1) HTML Validation error, line 52: An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images. ( <img src="" class="mod-debate-user-image mr-1"> )
(#1) HTML Validation error, line 60: Duplicate ID “mod-debate-cancel-respose”. ( <div class="btn btn-primary mod-debate-button" id="mod-debate-cancel-respose">[[ )
(#1) HTML Validation info, line 29: The first occurrence of ID “mod-debate-cancel-respose” was here. ( <div class="btn btn-primary mod-debate-button" id="mod-debate-cancel-respose">[[ )
(#1) HTML Validation error, line 65: Duplicate ID “mod-debate-update-response”. ( <div class="btn btn-primary mod-debate-button" id="mod-debate-update-response">[[ sav)
(#1) HTML Validation info, line 34: The first occurrence of ID “mod-debate-update-response” was here. ( <div class="btn btn-primary mod-debate-button" id="mod-debate-update-response">[[ sav)
mod/debate/templates/debate_find_response.mustache
(#1) Example context missing (@template section not found.)
mod/debate/templates/debate_response_output.mustache
(#1) Example context missing (@template section not found.)
(#1) HTML Validation error, line 2: Bad value “” for attribute “id” on element “div”: An ID must not be the empty string. (ad><body><div class="p-3 mod-debate-border-style" id=""> <)
(#1) HTML Validation error, line 3: Duplicate ID “”. (d=""> <div class="mod-debate-response-text" id=""> )
(#1) HTML Validation info, line 2: The first occurrence of ID “” was here. (ad><body><div class="p-3 mod-debate-border-style" id=""> <)
(#1) HTML Validation error, line 3: Bad value “” for attribute “id” on element “div”: An ID must not be the empty string. (d=""> <div class="mod-debate-response-text" id=""> )
(#1) HTML Validation error, line 7: Bad value “” for attribute “src” on element “img”: Must be non-empty. (> <img src="" class="mod-debate-user-image mr-1"> )
(#1) HTML Validation error, line 7: An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images. (> <img src="" class="mod-debate-user-image mr-1"> )
mod/debate/templates/debate_teams.mustache
(#1) Example context missing (@template section not found.)
mod/debate/templates/debate_teams_form.mustache
(#1) Example context missing (@template section not found.)
(#1) HTML Validation info, line 4: Empty heading. (fix"> <h1></h1>)
mod/debate/templates/debate_teams_table.mustache
(#1) Example context missing (@template section not found.)
(#1) HTML Validation error, line 9: Named character reference was not terminated by a semicolon. (Or “&” should have been escaped as “&amp;”.) (plus"></i>&nbsp )
mod/debate/templates/view.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]