Prechecker results: error


Overview

(0 errors, 0 warnings)

This section shows the general problems detected when processing the code [More info]


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

(92 errors, 60 warnings)

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

local/courselist/classes/privacy/provider.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#44) File must end with a newline character
local/courselist/db/access.php
(#54) File must end with a newline character
local/courselist/db/caches.php
(#1) Missing @copyright tag
(#1) Missing @license tag
(#1) Missing docblock for file caches.php
(#1) Moodle boilerplate not found
(#6) Whitespace found at end of line
(#7) There should be a comma after the last array item in a multi-line array.
(#8) File must end with a newline character
local/courselist/db/upgrade.php
(#27) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#29) Missing docblock for function xmldb_local_courselist_upgrade
(#38) Whitespace found at end of line
(#52) Variable "authenticateduser_role" must not contain underscores.
(#53) Variable "authenticateduser_role" must not contain underscores.
(#55) Variable "authenticateduser_role" must not contain underscores.
(#65) This comment is 61% valid code; is this commented out code?
(#96) Inline comments must end in full-stops, exclamation marks, or question marks
(#96) Line indented incorrectly; expected at least 4 spaces, found 0
(#98) Inline comments must end in full-stops, exclamation marks, or question marks
(#102) Inline comments must end in full-stops, exclamation marks, or question marks
(#103) Inline comments must end in full-stops, exclamation marks, or question marks
(#115) File must end with a newline character
local/courselist/edit.php
(#47) Short array syntax must be used to define arrays
(#53) Expected 1 space after "="; 2 found
local/courselist/edit_form.php
(#54) Inline comments must start with a capital letter, digit or 3-dots sequence
(#54) Inline comments must end in full-stops, exclamation marks, or question marks
(#80) Short array syntax must be used to define arrays
(#103) Short array syntax must be used to define arrays
(#109) Expected "} else {\n"; found "}else{\n"
(#112) Functions must not contain multiple empty lines in a row; found 2 empty lines
(#115) Short array syntax must be used to define arrays
(#116) Line exceeds maximum limit of 180 characters; contains 184 characters
(#117) Line exceeds 132 characters; contains 162 characters
(#121) Expected "} else {\n"; found "}else{\n"
(#130) Short array syntax must be used to define arrays
(#131) Short array syntax must be used to define arrays
(#134) Short array syntax must be used to define arrays
local/courselist/index.php
(#1) Missing @copyright tag
(#1) Missing @license tag
(#1) Missing docblock for file index.php
(#1) Moodle boilerplate not found
(#2) Expected login check (require_login, require_course_login, require_admin, admin_externalpage_setup) following config inclusion. None found.
(#5) Inline comments must end in full-stops, exclamation marks, or question marks
(#8) Inline comments must end in full-stops, exclamation marks, or question marks
(#10) Variable "redirectUrl" must be all lower-case
(#12) Variable "redirectUrl" must be all lower-case
(#12) Inline comments must end in full-stops, exclamation marks, or question marks
(#15) Inline comments must end in full-stops, exclamation marks, or question marks
(#17) Variable "redirectUrl" must be all lower-case
(#19) Variable "redirectUrl" must be all lower-case
(#21) Variable "redirectUrl" must be all lower-case
(#25) Inline comments must end in full-stops, exclamation marks, or question marks
(#26) Variable "redirectUrl" must be all lower-case
(#26) File must end with a newline character
local/courselist/lang/de/local_courselist.php
(#26) The string key "manage_course_list" is not in the correct order, it should be before "pluginname"
(#28) The string key "description" is not in the correct order, it should be before "time_period"
(#29) The string key "course_field_categories" is not in the correct order, it should be before "description"
(#31) The string key "enddate" is not in the correct order, it should be before "startdate"
(#33) The string key "add_new_list" is not in the correct order, it should be before "name"
(#38) The string key "free_seats" is not in the correct order, it should be before "unlimited"
(#41) The string key "add_new_courselist" is not in the correct order, it should be before "waitlist_possible"
(#43) The string key "copy_url" is not in the correct order, it should be before "edit_courselist"
(#45) Unexpected string end, it should be a line feed after a semicolon
(#45) File must end with a newline character
local/courselist/lang/en/local_courselist.php
(#26) The string key "manage_course_list" is not in the correct order, it should be before "pluginname"
(#28) The string key "description" is not in the correct order, it should be before "time_period"
(#29) The string key "course_field_categories" is not in the correct order, it should be before "description"
(#31) The string key "enddate" is not in the correct order, it should be before "startdate"
(#33) The string key "add_new_list" is not in the correct order, it should be before "name"
(#38) The string key "free_seats" is not in the correct order, it should be before "unlimited"
(#41) The string key "add_new_courselist" is not in the correct order, it should be before "waitlist_possible"
(#43) The string key "copy_url" is not in the correct order, it should be before "edit_courselist"
(#46) The string key "menuname" is not in the correct order, it should be before "startdate_lable"
(#47) The string key "add" is not in the correct order, it should be before "menuname"
(#49) The string key "courselist:manage" is not in the correct order, it should be before "courselist:view"
(#52) The string key "display_course_of_first_course_list_category" is not in the correct order, it should be before "dont_display_any_courses_until_user_selects_a_course_list_category"
(#55) Unexpected string end, it should be a line feed after a semicolon
(#55) File must end with a newline character
local/courselist/lib.php
(#30) Opening brace should be on the same line as the declaration
(#40) Opening brace should be on the same line as the declaration
(#42) Line exceeds 132 characters; contains 143 characters
(#50) Opening brace should be on the same line as the declaration
(#52) Whitespace found at end of line within string
(#53) Whitespace found at end of line within string
(#54) Whitespace found at end of line within string
(#71) Opening brace should be on the same line as the declaration
(#74) Whitespace found at end of line within string
(#75) Whitespace found at end of line within string
(#76) Whitespace found at end of line within string
(#77) Whitespace found at end of line within string
(#83) Line exceeds 132 characters; contains 138 characters
(#98) Opening brace should be on the same line as the declaration
(#101) This comment is 69% valid code; is this commented out code?
(#102) Whitespace found at end of line
(#107) Variable "fieldIds" must be all lower-case
(#108) Variable "fieldIdArray" must be all lower-case
(#108) Variable "fieldIds" must be all lower-case
(#109) Variable "fieldIdArray" must be all lower-case
(#110) Whitespace found at end of line within string
(#111) Whitespace found at end of line within string
(#112) Whitespace found at end of line within string
(#119) This comment is 57% valid code; is this commented out code?
(#135) Whitespace found at end of line within string
(#136) Whitespace found at end of line within string
(#137) Whitespace found at end of line within string
(#153) Opening brace should be on the same line as the declaration
(#155) Variable "fileUrl" must be all lower-case
(#156) Line exceeds 132 characters; contains 169 characters
(#158) Commas (,) must be followed by white space.
(#164) There should be a comma after the last array item in a multi-line array.
(#166) Variable "fileUrl" must be all lower-case
(#169) Variable "fileUrl" must be all lower-case
(#176) Opening brace should be on the same line as the declaration
(#178) Line exceeds maximum limit of 180 characters; contains 16373 characters
(#179) Line exceeds maximum limit of 180 characters; contains 4340 characters
(#179) There should be a comma after the last array item in a multi-line array.
local/courselist/manage.php
(#33) Expected "if (...) {\n"; found "if(...){\n"
local/courselist/renderer.php
(#31) Missing docblock for function render_manage_page
(#47) There should be a comma after the last array item in a multi-line array.
(#54) Missing docblock for function render_view_page
(#59) Line exceeds 132 characters; contains 168 characters
(#64) Line exceeds 132 characters; contains 175 characters
local/courselist/settings.php
(#27) Inline comments must start with a capital letter, digit or 3-dots sequence
(#27) Inline comments must end in full-stops, exclamation marks, or question marks
local/courselist/show.php
(#1) Missing @copyright tag
(#1) Missing @license tag
(#1) Missing docblock for file show.php
(#1) Moodle boilerplate not found
(#2) Expected login check (require_login, require_course_login, require_admin, admin_externalpage_setup) following config inclusion. None found.
(#5) Commas (,) must be followed by white space.
(#8) Commas (,) must be followed by white space.
(#8) Commas (,) must be followed by white space.
(#8) Commas (,) must be followed by white space.
(#8) Commas (,) must be followed by white space.
(#9) File must end with a newline character
local/courselist/version.php
(#29) Inline comments must end in full-stops, exclamation marks, or question marks
(#31) File must end with a newline character
local/courselist/view.php
(#48) Inline comments must end in full-stops, exclamation marks, or question marks
(#51) Line exceeds 132 characters; contains 140 characters
(#60) There should be a comma after the last array item in a multi-line array.
(#68) Variable "imageFile" must be all lower-case
(#69) Inline comments must start with a capital letter, digit or 3-dots sequence
(#69) This comment is 67% valid code; is this commented out code?
(#69) No space found before comment text; expected "// $imageFile = '';" but found "//$imageFile = '';"
(#70) Variable "imageFile" must be all lower-case
(#71) Variable "imageFile" must be all lower-case
(#119) Variable "htmlDesc" must be all lower-case
(#119) Line exceeds 132 characters; contains 135 characters
(#120) This comment is 77% valid code; is this commented out code?
(#126) Line exceeds maximum limit of 180 characters; contains 227 characters
(#131) Variable "htmlDesc" must be all lower-case

Javascript coding style problems

(0 errors, 0 warnings)

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


CSS problems

(8 errors, 1 warnings)

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

local/courselist/styles.css
(#55) Invalid value for "color" (csstree/validator)
(#57) Expected newline before "}" (block-closing-brace-newline-before)
(#100) Expected single space after ":" with a single-line declaration (declaration-colon-space-after)
(#101) Expected single space after ":" with a single-line declaration (declaration-colon-space-after)
(#44) Unexpected unit (length-zero-no-unit)
(#57) Unexpected whitespace at end of line (no-eol-whitespace)
(#55) Unexpected unknown unit "f6cbf" (unit-no-unknown)
(#43) Expected indentation of 4 spaces (indentation)
(#101) Expected indentation of 4 spaces (indentation)

PHPDocs style problems

(5 errors, 0 warnings)

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

local/courselist/lib.php
(#36) Phpdocs for function local_courselist_getcustomfield has incomplete parameters list
(#46) Phpdocs for function local_courselist_getcoursebycustomfield has incomplete parameters list
(#67) Phpdocs for function local_courselist_getfreeseats has incomplete parameters list
(#94) Phpdocs for function local_courselist_getcoursebykey has incomplete parameters list
(#149) Phpdocs for function local_courselist_getcourseimagebykey has incomplete parameters list

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 "stylelint:css" 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, 63 warnings)

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

local/courselist/templates/manage_page.mustache
(#1) Example context missing (@template section not found.)
local/courselist/templates/view_page.mustache
(#1) Example context missing (@template section not found.)
(#1) HTML Validation info, line 2: Empty heading. (ad><body><h2></h2>)
(#1) ESLint warning [camelcase]: Identifier 'search_key' is not in camel case. ( var search_key = document.getElementById('searchkey').value;
(#1) ESLint warning [camelcase]: Identifier 'current_fid' is not in camel case. ( var current_fid = document.getElementById('current_fid').value;
(#1) ESLint error [no-trailing-spaces]: Trailing spaces not allowed. ( if(current_fid != '' && defaultappearance != 1 && search_key == ''){
(#1) ESLint warning [keyword-spacing]: Expected space(s) after "if". ( if(current_fid != '' && defaultappearance != 1 && search_key == ''){
(#1) ESLint warning [camelcase]: Identifier 'current_fid' is not in camel case. ( if(current_fid != '' && defaultappearance != 1 && search_key == ''){
(#1) ESLint warning [camelcase]: Identifier 'search_key' is not in camel case. ( if(current_fid != '' && defaultappearance != 1 && search_key == ''){
(#1) ESLint warning [space-before-blocks]: Missing space before opening brace. ( if(current_fid != '' && defaultappearance != 1 && search_key == ''){
(#1) ESLint warning [space-infix-ops]: Operator '+' must be spaced. ( document.getElementById('field_'+current_fid).style.backgroundColor = "#ccc";
(#1) ESLint warning [camelcase]: Identifier 'current_fid' is not in camel case. ( document.getElementById('field_'+current_fid).style.backgroundColor = "#ccc";
(#1) ESLint error [no-trailing-spaces]: Trailing spaces not allowed. ( function getRandomInt(min, max) {
(#1) ESLint error [no-trailing-spaces]: Trailing spaces not allowed. ( min = Math.ceil(min);
(#1) ESLint error [no-trailing-spaces]: Trailing spaces not allowed. ( max = Math.floor(max);
(#1) ESLint error [no-trailing-spaces]: Trailing spaces not allowed. ( return Math.floor(Math.random() * (max - min + 1)) + min;
(#1) ESLint error [no-trailing-spaces]: Trailing spaces not allowed. ( }
(#1) ESLint error [no-trailing-spaces]: Trailing spaces not allowed. ( //window.onload = function() {
(#1) ESLint warning [capitalized-comments]: Comments should not begin with a lowercase character. ( //window.onload = function() {
(#1) ESLint warning [spaced-comment]: Expected space or tab after '//' in comment. ( //window.onload = function() {
(#1) ESLint error [no-trailing-spaces]: Trailing spaces not allowed. ( domNodes.forEach(function(node) {
(#1) ESLint error [no-trailing-spaces]: Trailing spaces not allowed. ( node.addEventListener('click', function(event) {
(#1) ESLint warning [keyword-spacing]: Expected space(s) after "if". ( if(event.target.getAttribute('class') == 'icon fa fa-chevron-right'){
(#1) ESLint warning [space-before-blocks]: Missing space before opening brace. ( if(event.target.getAttribute('class') == 'icon fa fa-chevron-right'){
(#1) ESLint warning [comma-spacing]: A space is required after ','. ( event.target.setAttribute('class','icon fa fa-chevron-down');
(#1) ESLint warning [keyword-spacing]: Expected space(s) after "if". ( if(document.getElementById('show_'+id).value == 0){
(#1) ESLint warning [space-infix-ops]: Operator '+' must be spaced. ( if(document.getElementById('show_'+id).value == 0){
(#1) ESLint warning [space-before-blocks]: Missing space before opening brace. ( if(document.getElementById('show_'+id).value == 0){
(#1) ESLint warning [space-infix-ops]: Operator '+' must be spaced. ( document.getElementById('load_'+id).innerHTML = "<img src='loading_small.gif'>";
(#1) ESLint error [no-trailing-spaces]: Trailing spaces not allowed. ( setTimeout(function() {
(#1) ESLint warning [space-infix-ops]: Operator '+' must be spaced. ( document.getElementById('content_'+id).style.display = "block";
(#1) ESLint warning [space-infix-ops]: Operator '+' must be spaced. ( document.getElementById('load_'+id).innerHTML = "";
(#1) ESLint warning [comma-spacing]: A space is required after ','. ( }, getRandomInt(200,1000));
(#1) ESLint warning [space-infix-ops]: Operator '+' must be spaced. ( document.getElementById('show_'+id).value = 1;
(#1) ESLint warning [keyword-spacing]: Expected space(s) before "else". ( }else{
(#1) ESLint warning [keyword-spacing]: Expected space(s) after "else". ( }else{
(#1) ESLint warning [space-infix-ops]: Operator '+' must be spaced. ( document.getElementById('content_'+id).style.display = "block";
(#1) ESLint warning [keyword-spacing]: Expected space(s) before "else". ( }else{
(#1) ESLint warning [keyword-spacing]: Expected space(s) after "else". ( }else{
(#1) ESLint warning [comma-spacing]: A space is required after ','. ( event.target.setAttribute('class','icon fa fa-chevron-right');
(#1) ESLint warning [space-infix-ops]: Operator '+' must be spaced. ( document.getElementById('content_'+id).style.display = "none";
(#1) ESLint warning [keyword-spacing]: Expected space(s) after "if". ( if(key != ""){
(#1) ESLint warning [space-before-blocks]: Missing space before opening brace. ( if(key != ""){
(#1) ESLint warning [space-infix-ops]: Operator '+' must be spaced. ( window.location.href = document.getElementById("searchurl").value + "&key="+key;
(#1) ESLint error [no-trailing-spaces]: Trailing spaces not allowed. ( });
(#1) ESLint error [no-trailing-spaces]: Trailing spaces not allowed. ( document.getElementById('searchbox').addEventListener('keypress', function(event) {
(#1) ESLint warning [keyword-spacing]: Expected space(s) after "if". ( if(key != ""){
(#1) ESLint warning [space-before-blocks]: Missing space before opening brace. ( if(key != ""){
(#1) ESLint warning [space-infix-ops]: Operator '+' must be spaced. ( window.location.href = document.getElementById("searchurl").value + "&key="+key;
(#1) ESLint error [no-trailing-spaces]: Trailing spaces not allowed. ( }
(#1) ESLint warning [spaced-comment]: Expected space or tab after '//' in comment. ( //}
(#1) ESLint warning [object-curly-spacing]: There should be no space after '{'. ( targetElement.scrollIntoView({ behavior: 'smooth' });
(#1) ESLint warning [object-curly-spacing]: There should be no space before '}'. ( targetElement.scrollIntoView({ behavior: 'smooth' });
(#1) ESLint error [semi]: Missing semicolon. ( }
(#1) ESLint error [no-trailing-spaces]: Trailing spaces not allowed. ( window.addEventListener('DOMContentLoaded', function() {
(#1) ESLint error [no-trailing-spaces]: Trailing spaces not allowed. ( var contentDiv = document.getElementById('field_desc');
(#1) ESLint error [no-trailing-spaces]: Trailing spaces not allowed. ( var contentHeight = contentDiv.offsetHeight;
(#1) ESLint error [no-trailing-spaces]: Trailing spaces not allowed. ( if (contentHeight < minHeightThreshold) {
(#1) ESLint error [no-trailing-spaces]: Trailing spaces not allowed. ( contentDiv.style.minHeight = minHeightThreshold + 'px';
(#1) ESLint error [no-trailing-spaces]: Trailing spaces not allowed. ( }
(#1) ESLint warning [keyword-spacing]: Expected space(s) after "if". ( if(element.querySelector('a').title == 'courselist'){
(#1) ESLint warning [space-before-blocks]: Missing space before opening brace. ( if(element.querySelector('a').title == 'courselist'){
(#1) ESLint warning [keyword-spacing]: Expected space(s) before "else". ( }else{
(#1) ESLint warning [keyword-spacing]: Expected space(s) after "else". ( }else{

Gherkin .feature problems

(0 errors, 0 warnings)

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