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

(56 errors, 46 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/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?
(#76) 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
(#104) Short array syntax must be used to define arrays
(#105) Short array syntax must be used to define arrays
(#108) 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) Unexpected string end, it should be a line feed after a semicolon
(#49) 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
(#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
(#59) Expected "foreach (...) {\n"; found "foreach(...){\n"
(#60) Expected "if (...) {\n"; found "if(...){\n"
(#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
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/templates/view.php
(#33) Inline comments must start with a capital letter, digit or 3-dots sequence
(#33) This comment is 60% valid code; is this commented out code?
(#33) No space found before comment text; expected "// $context = context_course::instance(1);" but found "//$context = context_course::instance(1);"
(#107) Expected "if (...) {\n"; found "if(...){\n"
local/courselist/version.php
(#29) Inline comments must end in full-stops, exclamation marks, or question marks
local/courselist/view.php
(#33) Inline comments must start with a capital letter, digit or 3-dots sequence
(#33) This comment is 60% valid code; is this commented out code?
(#33) No space found before comment text; expected "// $context = context_course::instance(1);" but found "//$context = context_course::instance(1);"
(#106) Expected "if (...) {\n"; found "if(...){\n"

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

(5 errors, 0 warnings)

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

local/courselist/styles.css
(#54) Invalid value for "color" (csstree/validator)
(#57) Expected newline before "}" (block-closing-brace-newline-before)
(#57) Unexpected whitespace at end of line (no-eol-whitespace)
(#54) Unexpected unknown unit "f6cbf" (unit-no-unknown)
(#42) Expected indentation of 4 spaces (indentation)

PHPDocs style problems

(4 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

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, 57 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 'current_fid' is not in camel case. ( var current_fid = document.getElementById('current_fid').value;
(#1) ESLint warning [keyword-spacing]: Expected space(s) after "if". ( if(current_fid != ''){
(#1) ESLint warning [camelcase]: Identifier 'current_fid' is not in camel case. ( if(current_fid != ''){
(#1) ESLint warning [space-before-blocks]: Missing space before opening brace. ( if(current_fid != ''){
(#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 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]