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

(64 errors, 14 warnings)

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

question/type/shortmath/classes/external/editor_config.php
(#104) Functions must not contain multiple empty lines in a row; found 2 empty lines
question/type/shortmath/classes/external/editor_template.php
(#145) Whitespace found at end of line
(#174) Whitespace found at end of line
(#175) Inline comments must end in full-stops, exclamation marks, or question marks
(#189) TRUE, FALSE and NULL must be lowercase; expected "true" but found "True"
(#192) TRUE, FALSE and NULL must be lowercase; expected "false" but found "False"
(#200) TRUE, FALSE and NULL must be lowercase; expected "true" but found "True"
(#204) TRUE, FALSE and NULL must be lowercase; expected "false" but found "False"
(#278) TRUE, FALSE and NULL must be lowercase; expected "true" but found "True"
question/type/shortmath/classes/form/view/editor_template_form.php
(#47) Possible useless method overriding detected
(#89) Variable "delete_btn" must not contain underscores.
(#97) Line exceeds 132 characters; contains 137 characters
(#99) Variable "delete_btn" must not contain underscores.
(#118) Visibility must be declared on method "validation"
question/type/shortmath/classes/output/editor_page.php
(#72) Whitespace found at end of line
(#89) Whitespace found at end of line
(#91) Whitespace found at end of line
(#94) File must end with a newline character
question/type/shortmath/classes/output/manager_page.php
(#76) Whitespace found at end of line
(#92) File must end with a newline character
question/type/shortmath/classes/output/templates_table.php
(#46) Inline doc block comments are not allowed; use "// Comment." instead
(#49) The 'var' keyword is not permitted.Visibility must be explicitly declared with public, private or protected
(#49) Scope modifier not specified for member variable "$returnurl"
(#63) Whitespace found at end of line
(#103) Inline comments must start with a capital letter, digit or 3-dots sequence
(#104) Inline comments must end in full-stops, exclamation marks, or question marks
(#111) Expected 6 space(s) before asterisk; 5 found
(#112) Expected 6 space(s) before asterisk; 5 found
(#113) Expected 6 space(s) before asterisk; 5 found
(#114) Expected 6 space(s) before asterisk; 5 found
(#119) Whitespace found at end of line
(#127) Line exceeds 132 characters; contains 135 characters
(#128) Line exceeds 132 characters; contains 157 characters
(#129) Whitespace found at end of line
(#223) This comment is 61% valid code; is this commented out code?
(#234) Functions must not contain multiple empty lines in a row; found 2 empty lines
(#247) Whitespace found at end of line
question/type/shortmath/classes/privacy/provider.php
(#50) File must end with a newline character
question/type/shortmath/classes/templates.php
(#60) Whitespace found at end of line
(#61) Whitespace found at end of line
(#69) Whitespace found at end of line
(#73) Whitespace found at end of line
(#77) Whitespace found at end of line
(#81) Whitespace found at end of line
(#85) Whitespace found at end of line
(#99) Whitespace found at end of line
(#103) Whitespace found at end of line
(#107) Whitespace found at end of line
(#111) Whitespace found at end of line
(#115) Whitespace found at end of line
(#119) Whitespace found at end of line
(#129) Whitespace found at end of line
(#132) Whitespace found at end of line
question/type/shortmath/db/access.php
(#27) Expected MOODLE_INTERNAL check or config.php inclusion. Change in global state detected.
question/type/shortmath/db/upgrade.php
(#68) Whitespace found at end of line
(#71) Whitespace found at end of line
(#82) Whitespace found at end of line
(#88) Whitespace found at end of line
(#93) Whitespace found at end of line
(#101) Whitespace found at end of line
(#105) Whitespace found at end of line
(#109) Whitespace found at end of line
(#112) Whitespace found at end of line
(#115) Whitespace found at end of line
question/type/shortmath/edit_shortmath_form.php
(#75) Functions must not contain multiple empty lines in a row; found 2 empty lines
(#87) Functions must not contain multiple empty lines in a row; found 2 empty lines
(#90) Line exceeds 132 characters; contains 167 characters
(#96) Functions must not contain multiple empty lines in a row; found 2 empty lines
question/type/shortmath/editor_manager.php
(#52) Inline comments must start with a capital letter, digit or 3-dots sequence
(#52) This comment is 75% valid code; is this commented out code?
(#52) No space found before comment text; expected "// $PAGE->navbar->ignore_active();" but found "//$PAGE->navbar->ignore_active();"
(#70) File must end with a newline character
question/type/shortmath/lib.php
(#92) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#95) File must end with a newline character
question/type/shortmath/tests/privacy_provider_test.php
(#50) File must end with a newline character
question/type/shortmath/view_editor.php
(#60) Inline comments must start with a capital letter, digit or 3-dots sequence
(#60) This comment is 75% valid code; is this commented out code?
(#60) No space found before comment text; expected "// $PAGE->navbar->ignore_active();" but found "//$PAGE->navbar->ignore_active();"

Javascript coding style problems

(16 errors, 90 warnings)

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

question/type/shortmath/amd/src/api_helpers.js
(#32) Unexpected space before function parentheses. (space-before-function-paren)
(#36) Avoid creating new promises. (promise/avoid-new)
(#36) "Promise" is not defined. (promise/no-native)
(#40) There should be no space after '{'. (object-curly-spacing)
(#40) There should be no space after '{'. (babel/object-curly-spacing)
(#40) There should be no space before '}'. (object-curly-spacing)
(#40) There should be no space before '}'. (babel/object-curly-spacing)
(#57) Unexpected space before function parentheses. (space-before-function-paren)
(#61) Avoid creating new promises. (promise/avoid-new)
(#61) "Promise" is not defined. (promise/no-native)
(#65) There should be no space after '{'. (object-curly-spacing)
(#65) There should be no space after '{'. (babel/object-curly-spacing)
(#65) There should be no space before '}'. (object-curly-spacing)
(#65) There should be no space before '}'. (babel/object-curly-spacing)
(#78) Trailing spaces not allowed. (no-trailing-spaces)
(#84) Unexpected space before function parentheses. (space-before-function-paren)
(#86) Avoid creating new promises. (promise/avoid-new)
(#86) "Promise" is not defined. (promise/no-native)
(#89) There should be no space after '{'. (object-curly-spacing)
(#89) There should be no space after '{'. (babel/object-curly-spacing)
(#89) There should be no space before '}'. (object-curly-spacing)
(#89) There should be no space before '}'. (babel/object-curly-spacing)
(#107) Unexpected space before function parentheses. (space-before-function-paren)
(#108) Avoid creating new promises. (promise/avoid-new)
(#108) "Promise" is not defined. (promise/no-native)
(#111) There should be no space after '{'. (object-curly-spacing)
(#111) There should be no space after '{'. (babel/object-curly-spacing)
(#111) There should be no space before '}'. (object-curly-spacing)
(#111) There should be no space before '}'. (babel/object-curly-spacing)
(#117) Missing semicolon. (semi)
(#117) Missing semicolon. (babel/semi)
(#120) There should be no space after '{'. (object-curly-spacing)
(#120) There should be no space after '{'. (babel/object-curly-spacing)
(#120) There should be no space before '}'. (object-curly-spacing)
(#120) There should be no space before '}'. (babel/object-curly-spacing)
question/type/shortmath/amd/src/editor_manager.js
(#26) There should be no space after '{'. (object-curly-spacing)
(#26) There should be no space after '{'. (babel/object-curly-spacing)
(#26) There should be no space before '}'. (object-curly-spacing)
(#26) There should be no space before '}'. (babel/object-curly-spacing)
(#27) There should be no space after '{'. (object-curly-spacing)
(#27) There should be no space after '{'. (babel/object-curly-spacing)
(#27) There should be no space before '}'. (object-curly-spacing)
(#27) There should be no space before '}'. (babel/object-curly-spacing)
(#30) Unexpected space before function parentheses. (space-before-function-paren)
(#64) Unexpected space before function parentheses. (space-before-function-paren)
question/type/shortmath/amd/src/editor_page.js
(#26) There should be no space after '{'. (object-curly-spacing)
(#26) There should be no space after '{'. (babel/object-curly-spacing)
(#26) There should be no space before '}'. (object-curly-spacing)
(#26) There should be no space before '}'. (babel/object-curly-spacing)
(#29) 'lastFocusedInput' is assigned a value but never used. (no-unused-vars)
(#37) Trailing spaces not allowed. (no-trailing-spaces)
(#38) Trailing spaces not allowed. (no-trailing-spaces)
(#45) Comments should not begin with a lowercase character. (capitalized-comments)
(#92) Comments should not begin with a lowercase character. (capitalized-comments)
(#92) Expected space or tab after '//' in comment. (spaced-comment)
(#97) Comments should not begin with a lowercase character. (capitalized-comments)
(#103) Comments should not begin with a lowercase character. (capitalized-comments)
(#103) Expected space or tab after '//' in comment. (spaced-comment)
(#121) Missing JSDoc parameter type for 'buttonMathInput'. (valid-jsdoc)
(#122) Missing JSDoc parameter type for 'expressionMathInput'. (valid-jsdoc)
(#133) ["name"] is better written in dot notation. (dot-notation)
(#134) ["button"] is better written in dot notation. (dot-notation)
(#135) ["expression"] is better written in dot notation. (dot-notation)
(#150) Missing JSDoc for parameter 'templateName'. (valid-jsdoc)
(#150) Missing JSDoc for parameter 'managerPath'. (valid-jsdoc)
(#154) Expected JSDoc for 'templateId' but found 'importIdString'. (valid-jsdoc)
(#156) Unexpected space before function parentheses. (space-before-function-paren)
(#157) 'editorPage' is assigned a value but never used. (no-unused-vars)
(#228) Unnecessary semicolon. (no-extra-semi)
(#270) Comments should not begin with a lowercase character. (capitalized-comments)
(#270) Expected space or tab after '//' in comment. (spaced-comment)
(#286) Comments should not begin with a lowercase character. (capitalized-comments)
(#286) Expected space or tab after '//' in comment. (spaced-comment)
(#291) Comments should not begin with a lowercase character. (capitalized-comments)
(#291) Expected space or tab after '//' in comment. (spaced-comment)
(#297) Unnecessary semicolon. (no-extra-semi)
(#316) Expected space or tab after '//' in comment. (spaced-comment)
(#333) Unnecessary semicolon. (no-extra-semi)
(#362) Unnecessary semicolon. (no-extra-semi)
(#366) 'event' is defined but never used. (no-unused-vars)
(#372) ["name"] is better written in dot notation. (dot-notation)
(#373) ["text"] is better written in dot notation. (dot-notation)
(#374) ["command"] is better written in dot notation. (dot-notation)
(#381) Unnecessary semicolon. (no-extra-semi)
question/type/shortmath/amd/src/input.js
(#24) There should be no space after '{'. (object-curly-spacing)
(#24) There should be no space after '{'. (babel/object-curly-spacing)
(#24) There should be no space before '}'. (object-curly-spacing)
(#24) There should be no space before '}'. (babel/object-curly-spacing)
(#26) Unexpected space before function parentheses. (space-before-function-paren)
(#38) Unexpected space before function parentheses. (space-before-function-paren)
(#62) ["button"] is better written in dot notation. (dot-notation)
(#63) ["expression"] is better written in dot notation. (dot-notation)
question/type/shortmath/amd/src/template_preview.js
(#24) There should be no space after '{'. (object-curly-spacing)
(#24) There should be no space after '{'. (babel/object-curly-spacing)
(#24) There should be no space before '}'. (object-curly-spacing)
(#24) There should be no space before '}'. (babel/object-curly-spacing)
(#26) Unexpected space before function parentheses. (space-before-function-paren)
(#32) Unexpected space before function parentheses. (space-before-function-paren)
(#33) Missing semicolon. (semi)
(#33) Missing semicolon. (babel/semi)
(#40) ["button"] is better written in dot notation. (dot-notation)
(#41) ["expression"] is better written in dot notation. (dot-notation)
(#47) Missing JSDoc comment. (require-jsdoc)
(#53) Closing curly brace does not appear on the same line as the subsequent block. (brace-style)
(#54) Empty block statement. (no-empty)
(#57) Unnecessary semicolon. (no-extra-semi)

CSS problems

(0 errors, 0 warnings)

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


PHPDocs style problems

(14 errors, 0 warnings)

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

question/type/shortmath/classes/external/editor_config.php
(#67) Phpdocs for function editor_config::get_editor_config has incomplete parameters list
question/type/shortmath/classes/external/editor_template.php
(#151) Phpdocs for function editor_template::save_template has incomplete parameters list
question/type/shortmath/classes/form/view/editor_template_form.php
(#118) Function editor_template_form::validation is not documented
(#44) Phpdocs for function editor_template_form::__construct has incomplete parameters list
question/type/shortmath/classes/output/editor_page.php
(#54) Phpdocs for function editor_page::__construct has incomplete parameters list
question/type/shortmath/classes/output/manager_page.php
(#58) Phpdocs for function manager_page::__construct has incomplete parameters list
question/type/shortmath/classes/output/templates_table.php
(#54) Phpdocs for function templates_table::__construct has incomplete parameters list
(#112) Phpdocs for function templates_table::col_creator has incomplete parameters list
(#122) Phpdocs for function templates_table::col_actions has incomplete parameters list
question/type/shortmath/edit_shortmath_form.php
(#134) Function qtype_shortmath_edit_form::js_call is not documented
(#139) Function qtype_shortmath_edit_form::css_call is not documented
(#145) Function qtype_shortmath_edit_form::data_preprocessing is not documented
question/type/shortmath/lib.php
(#87) Phpdocs for function template_require_capability_on has incomplete parameters list
question/type/shortmath/questiontype.php
(#50) Function qtype_shortmath::save_question_options is not documented

Update savepoints problems

(0 errors, 0 warnings)

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


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

(1 errors, 0 warnings)

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

question/type/shortmath/templates/editor_page.mustache
(#1) Mustache syntax exception: Example context JSON is unparsable, fails with: Syntax error

Gherkin .feature problems

(0 errors, 0 warnings)

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