diff --git a/classes/course_renderer.php b/classes/course_renderer.php index d8af89a..70113f1 100644 --- a/classes/course_renderer.php +++ b/classes/course_renderer.php @@ -28,7 +28,9 @@ */ class format_vsf_course_renderer extends \core_course_renderer { + /** @var bool the module view button */ protected $moduleviewbutton = false; + /** @var bool the module description tooltip */ protected $moduledescriptiontooltip = false; /** diff --git a/classes/output/format_renderer_migration_toolbox.php b/classes/output/format_renderer_migration_toolbox.php index 92a7c10..bf39c6b 100644 --- a/classes/output/format_renderer_migration_toolbox.php +++ b/classes/output/format_renderer_migration_toolbox.php @@ -26,6 +26,9 @@ namespace format_vsf\output; +/** + * Migration trait. + */ trait format_renderer_migration_toolbox { /** @@ -59,7 +62,7 @@ protected function vsf_section_activity_summary($section, $course, $mods) { * @return string */ public function section_availability($section) { - // TODO: Update to a template! + // Todo: Update to a template! $widgetclass = $this->courseformat->get_output_classname('content\\section\\availability'); $widget = new $widgetclass($this->courseformat, $section); return $this->render($widget); diff --git a/classes/output/renderer.php b/classes/output/renderer.php index c97a63b..fb5e4bb 100644 --- a/classes/output/renderer.php +++ b/classes/output/renderer.php @@ -37,21 +37,32 @@ require_once($CFG->dirroot.'/course/format/lib.php'); // For course_get_format. +/** + * The renderer. + */ class renderer extends section_renderer { use format_renderer_migration_toolbox; + /** @var array section completion percentage */ private $sectioncompletionpercentage = []; + /** @var array section completion markup */ private $sectioncompletionmarkup = []; + /** @var array section completion calculated */ private $sectioncompletioncalculated = []; + /** @var bool show completion button */ private $showcontinuebutton = false; - private $courseformat = null; // Our course format object as defined in lib.php. + /** @var class Our course format object as defined in lib.php */ + private $courseformat = null; + /** @var class Course with settings */ private $course; // Course with settings. - private $moduleview; // Showing the modules in a grid. + /** @var bool Showing the modules in a grid? */ + private $moduleview; - protected $editing; // Are we editing? + /** @var bool Are we editing? */ + protected $editing; /** @var section control menu output class */ protected $controlmenuclass; diff --git a/classes/privacy/provider.php b/classes/privacy/provider.php index c065cc4..8518f7c 100644 --- a/classes/privacy/provider.php +++ b/classes/privacy/provider.php @@ -36,7 +36,7 @@ class provider implements \core_privacy\local\metadata\null_provider { * * @return string */ - public static function get_reason() : string { + public static function get_reason(): string { return 'privacy:nop'; } } diff --git a/js/vsf_colourpopup.php b/js/vsf_colourpopup.php index d9f07c7..d4f614c 100644 --- a/js/vsf_colourpopup.php +++ b/js/vsf_colourpopup.php @@ -17,13 +17,17 @@ /** * Progress Section Format * - * @package course/format - * @subpackage vsf - * @version See the value of '$plugin->version' in version.php. + * @package format_vsf * @copyright © 2017-onwards G J Barnard in respect to modifications of standard topics format. * @author G J Barnard - gjbarnard at gmail dot com and {@link http://moodle.org/user/profile.php?id=442195} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + +// phpcs:disable moodle.NamingConventions.ValidVariableName.MemberNameUnderscore +// phpcs:disable moodle.NamingConventions.ValidVariableName.VariableNameLowerCase +// phpcs:disable moodle.NamingConventions.ValidFunctionName.LowercaseMethod +// phpcs:disable PSR2.Methods.MethodDeclaration.Underscore + defined('MOODLE_INTERNAL') || die(); global $CFG; @@ -33,19 +37,23 @@ * HTML class for a colorpopup type element * * @author Iain Checkland - modified from ColourPicker by Jamie Pratt [thanks] - * @access public */ class MoodleQuickForm_vsfcolourpopup extends HTML_QuickForm_text implements templatable { use templatable_form_element { export_for_template as export_for_template_base; } - /* + /** * html for help button, if empty then no help * * @var string */ public $_helpbutton = ''; + /** + * Hidden label? + * + * @var bool + */ public $_hiddenLabel = false; public function __construct($elementName = null, $elementLabel = null, $attributes = null, $options = null) { diff --git a/lib.php b/lib.php index ca5583a..0e73edf 100644 --- a/lib.php +++ b/lib.php @@ -26,6 +26,9 @@ defined('MOODLE_INTERNAL') || die(); require_once($CFG->dirroot. '/course/format/lib.php'); +/** + * Format class. + */ class format_vsf extends core_courseformat\base { /** * Returns true if this course format uses sections