mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 13:33:52 +02:00
Merge branch 'MDL-77336-master' of https://github.com/meirzamoodle/moodle
This commit is contained in:
commit
830c9fd7dd
@ -34,7 +34,7 @@ class adminpresets_admin_setting_configselect extends adminpresets_setting {
|
||||
*/
|
||||
protected function set_value($value) {
|
||||
// When we intantiate the class we need the choices.
|
||||
if (empty($this->settindata->choices) && method_exists($this->settingdata, 'load_choices')) {
|
||||
if (empty($this->settingdata->choices) && method_exists($this->settingdata, 'load_choices')) {
|
||||
$this->settingdata->load_choices();
|
||||
}
|
||||
|
||||
|
@ -68,6 +68,9 @@ class adminpresets_setting {
|
||||
*/
|
||||
protected $attributesvalues;
|
||||
|
||||
/** @var array To store the behaviors. */
|
||||
protected array $behaviors = [];
|
||||
|
||||
/**
|
||||
* Stores the setting data and the selected value
|
||||
*
|
||||
|
@ -86,6 +86,15 @@ abstract class area_base {
|
||||
*/
|
||||
const TYPE_FILE = 1;
|
||||
|
||||
/** @var string To store the filter. */
|
||||
protected string $filter = '';
|
||||
|
||||
/** @var array To store the filter parameters. */
|
||||
protected array $filterparams = [];
|
||||
|
||||
/** @var string To store the filter field name. */
|
||||
protected $filterfieldname;
|
||||
|
||||
/**
|
||||
* Return the name for the specified checkgroup value, or 'unknown' if no valid name for the value. Preferably, use this rather
|
||||
* than direct access to CHECKGROUP_NAMES, since it checks value boundaries.
|
||||
|
@ -45,6 +45,9 @@ class brickfield_accessibility_guideline {
|
||||
/** @var array An array of all the severity levels for every test */
|
||||
public $severity = [];
|
||||
|
||||
/** @var array To store all the tests. */
|
||||
public array $tests = [];
|
||||
|
||||
/**
|
||||
* The class constructor.
|
||||
* @param object $dom The current DOMDocument object
|
||||
|
@ -42,6 +42,9 @@ class brickfield_accessibility_report_item {
|
||||
/** @var object For issues with more than two possible states, this contains information about the state */
|
||||
public $state;
|
||||
|
||||
/** @var int the line number of the report item */
|
||||
public $line;
|
||||
|
||||
/**
|
||||
* Returns the line number of the report item. Unfortunately we can't use getLineNo
|
||||
* if we are before PHP 5.3, so if not we try to get the line number through a more
|
||||
|
@ -47,6 +47,9 @@ class brickfield_accessibility_reporter {
|
||||
/** @var array An array of attributes to search for to turn into absolute paths rather than relative paths */
|
||||
public $absoluteattributes = ['src', 'href'];
|
||||
|
||||
/** @var object|null A guideline object. */
|
||||
public ?object $guideline = null;
|
||||
|
||||
/**
|
||||
* The class constructor
|
||||
* @param object $dom The current DOMDocument object
|
||||
|
@ -67,6 +67,12 @@ class brickfield_accessibility_css {
|
||||
/** @var array A list of all the elements which support deprecated styles such as 'background' or 'bgcolor' */
|
||||
public $deprecatedstyleelements = ['body', 'table', 'tr', 'td', 'th'];
|
||||
|
||||
/** @var array */
|
||||
public array $path = [];
|
||||
|
||||
/** @var array To store additional CSS files to load. */
|
||||
public array $css_files = [];
|
||||
|
||||
/**
|
||||
* Class constructor. We are just building and importing variables here and then loading the CSS
|
||||
* @param \DOMDocument $dom The DOMDocument object
|
||||
|
@ -57,6 +57,9 @@ class brickfield_accessibility_test {
|
||||
/** @var array An array of translatable strings */
|
||||
public $strings = array('en' => '');
|
||||
|
||||
/** @var mixed Any additional options passed by htmlchecker. */
|
||||
public $options;
|
||||
|
||||
/**
|
||||
* The class constructor. We pass items by reference so we can alter the DOM if necessary
|
||||
* @param object $dom The DOMDocument object
|
||||
|
@ -28,11 +28,6 @@ use tool_brickfield\manager;
|
||||
*/
|
||||
class brickfield_guideline extends brickfield_accessibility_guideline {
|
||||
|
||||
/**
|
||||
* @var array An array of test class names which will be called for this guideline
|
||||
*/
|
||||
public $tests = [];
|
||||
|
||||
/**
|
||||
* brickfield_guideline constructor.
|
||||
* @param \DOMDocument $dom
|
||||
|
@ -30,7 +30,7 @@ class brickfield_textonly_guideline extends brickfield_accessibility_guideline {
|
||||
/**
|
||||
* @var array An array of test class names which will be called for this guideline
|
||||
*/
|
||||
public $tests = array(
|
||||
public array $tests = [
|
||||
'aSuspiciousLinkText',
|
||||
'cssTextHasContrast',
|
||||
'contentTooLong',
|
||||
@ -43,5 +43,5 @@ class brickfield_textonly_guideline extends brickfield_accessibility_guideline {
|
||||
'tableDataShouldHaveTh',
|
||||
'tableThShouldHaveScope',
|
||||
'tableTdShouldNotMerge',
|
||||
);
|
||||
];
|
||||
}
|
||||
|
@ -42,6 +42,12 @@ use table_sql;
|
||||
*/
|
||||
class cohort_role_assignments_table extends table_sql {
|
||||
|
||||
/** @var context_system */
|
||||
protected ?context_system $context = null;
|
||||
|
||||
/** @var array */
|
||||
protected array $rolenames = [];
|
||||
|
||||
/**
|
||||
* Sets up the table.
|
||||
*
|
||||
|
@ -36,6 +36,9 @@ class api_test extends \advanced_testcase {
|
||||
/** @var \stdClass $role */
|
||||
protected $role = null;
|
||||
|
||||
/** @var int $roleid */
|
||||
protected $roleid;
|
||||
|
||||
/**
|
||||
* Setup function- we will create a course and add an assign instance to it.
|
||||
*/
|
||||
|
@ -71,6 +71,9 @@ class data_requests_table extends table_sql {
|
||||
/** @var int[] The available options for the number of data request to be displayed per page. */
|
||||
protected $perpageoptions = [25, 50, 100, 250];
|
||||
|
||||
/** @var int[] The request creation method filters. */
|
||||
protected array $creationmethods = [];
|
||||
|
||||
/**
|
||||
* data_requests_table constructor.
|
||||
*
|
||||
|
@ -38,6 +38,13 @@ defined('MOODLE_INTERNAL') || die();
|
||||
* @property string $store short plugin name initialised in store trait.
|
||||
*/
|
||||
trait reader {
|
||||
|
||||
/** @var string Frankenstyle plugin name initialised in store trait. */
|
||||
protected $component;
|
||||
|
||||
/** @var string short plugin name initialised in store trait. */
|
||||
protected $store;
|
||||
|
||||
/**
|
||||
* Default get name api.
|
||||
*
|
||||
|
@ -75,6 +75,18 @@ class course_competencies_page implements renderable, templatable {
|
||||
/** @var string $manageurl manage url. */
|
||||
protected $manageurl = null;
|
||||
|
||||
/** @var bool */
|
||||
protected bool $canconfigurecoursecompetencies = false;
|
||||
|
||||
/** @var bool */
|
||||
protected bool $cangradecompetencies = false;
|
||||
|
||||
/** @var \core\persistent|null */
|
||||
protected $coursecompetencysettings = null;
|
||||
|
||||
/** @var \tool_lp\course_competency_statistics|null */
|
||||
protected $coursecompetencystatistics = null;
|
||||
|
||||
/**
|
||||
* Construct this renderable.
|
||||
* @param int $courseid The course record for this page.
|
||||
|
@ -65,6 +65,9 @@ class manage_competencies_page implements renderable, templatable {
|
||||
/** @var \core_competency\competency $competency The competency to show when the page loads. */
|
||||
protected $competency = null;
|
||||
|
||||
/** @var array */
|
||||
protected array $navigation = [];
|
||||
|
||||
/**
|
||||
* Construct this renderable.
|
||||
*
|
||||
|
@ -44,6 +44,12 @@ class related_competencies implements renderable, templatable {
|
||||
/** @var array Related competencies. */
|
||||
protected $relatedcompetencies = null;
|
||||
|
||||
/** @var \core_competency\competency|null */
|
||||
protected $competency = null;
|
||||
|
||||
/** @var \context|null */
|
||||
protected $context = null;
|
||||
|
||||
/**
|
||||
* Construct this renderable.
|
||||
*
|
||||
|
@ -34,6 +34,15 @@ defined('MOODLE_INTERNAL') || die();
|
||||
*/
|
||||
class template_cohorts_page implements \renderable {
|
||||
|
||||
/** @var \core_competency\template|null */
|
||||
protected $template = null;
|
||||
|
||||
/** @var \moodle_url|null */
|
||||
protected $url = null;
|
||||
|
||||
/** @var template_cohorts_table|null */
|
||||
public $table = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param \core_competency\template $template
|
||||
|
@ -68,6 +68,9 @@ class template_competencies_page implements renderable, templatable {
|
||||
/** @var template_statistics $templatestatistics The generated summary statistics for this template. */
|
||||
protected $templatestatistics = null;
|
||||
|
||||
/** @var bool true if the user has this capability. Otherwise false. */
|
||||
protected bool $canmanagetemplatecompetencies = false;
|
||||
|
||||
/**
|
||||
* Construct this renderable.
|
||||
*
|
||||
|
@ -34,6 +34,15 @@ defined('MOODLE_INTERNAL') || die();
|
||||
*/
|
||||
class template_plans_page implements \renderable {
|
||||
|
||||
/** @var \core_competency\template|null */
|
||||
protected $template = null;
|
||||
|
||||
/** @var \moodle_url|null */
|
||||
protected $url = null;
|
||||
|
||||
/** @var template_plans_table|null */
|
||||
public $table = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param \core_competency\template $template
|
||||
|
@ -51,6 +51,14 @@ class migrate_framework_results implements renderable, templatable {
|
||||
protected $pagecontext;
|
||||
/** @var framework_processor The processor. */
|
||||
protected $processor;
|
||||
/** @var array $unmappedfrom Competencies from unmapped. */
|
||||
protected array $unmappedfrom = [];
|
||||
/** @var array $unmappedto competencies to unmapped. */
|
||||
protected array $unmappedto = [];
|
||||
/* @var competency_framework|null $frameworkfrom Framework from. */
|
||||
protected $frameworkfrom = null;
|
||||
/* @var competency_framework|null $frameworkto Framework to. */
|
||||
protected $frameworkto = null;
|
||||
|
||||
/**
|
||||
* Construct.
|
||||
|
@ -28,6 +28,33 @@ use core_competency\course_module_competency;
|
||||
*/
|
||||
class processor_test extends \advanced_testcase {
|
||||
|
||||
/** @var \core_competency\competency_framework|null $f1 */
|
||||
protected $f1 = null;
|
||||
|
||||
/** @var \core_competency\competency_framework|null $f2 */
|
||||
protected $f2 = null;
|
||||
|
||||
/** @var object|null $c1 course instance. */
|
||||
protected ?object $c1 = null;
|
||||
|
||||
/** @var object|null $c2 course instance. */
|
||||
protected ?object $c2 = null;
|
||||
|
||||
/** @var array $f1comps */
|
||||
protected array $f1comps = [];
|
||||
|
||||
/** @var array $f2comps */
|
||||
protected array $f2comps = [];
|
||||
|
||||
/** @var array $cms */
|
||||
protected array $cms = [];
|
||||
|
||||
/** @var array $ccs */
|
||||
protected array $ccs = [];
|
||||
|
||||
/** @var array $cmcs */
|
||||
protected array $cmcs = [];
|
||||
|
||||
/**
|
||||
* This sets up a few things, and assign class variables.
|
||||
*
|
||||
|
@ -51,6 +51,9 @@ class page_viewalldoc implements renderable, templatable {
|
||||
/** @var string Return url */
|
||||
private $returnurl;
|
||||
|
||||
/** @var array List current (active) policy versions. */
|
||||
private array $policies = [];
|
||||
|
||||
/**
|
||||
* Prepare the page for rendering.
|
||||
*
|
||||
|
@ -55,6 +55,15 @@ class page_viewdoc implements renderable, templatable {
|
||||
/** @var int User id who wants to view this page. */
|
||||
protected $behalfid = null;
|
||||
|
||||
/** @var bool View the policy as a part of the management UI. */
|
||||
protected $manage;
|
||||
|
||||
/** @var int Position of the current policy with respect to the total of policy docs to display. */
|
||||
protected $numpolicy = 0;
|
||||
|
||||
/** @var int Total number of policy documents which the user has to agree to. */
|
||||
protected $totalpolicies = 0;
|
||||
|
||||
/**
|
||||
* Prepare the page for rendering.
|
||||
*
|
||||
|
@ -35,6 +35,24 @@ require_once($CFG->dirroot . '/user/externallib.php');
|
||||
*/
|
||||
class externallib_test extends externallib_advanced_testcase {
|
||||
|
||||
/** @var \tool_policy\policy_version $policy1 Policy document 1. */
|
||||
protected $policy1;
|
||||
|
||||
/** @var \tool_policy\policy_version $policy2 Policy document 2. */
|
||||
protected $policy2;
|
||||
|
||||
/** @var \tool_policy\policy_version $policy3 Policy document 3. */
|
||||
protected $policy3;
|
||||
|
||||
/** @var \stdClass $child user record. */
|
||||
protected $child;
|
||||
|
||||
/** @var \stdClass $parent user record. */
|
||||
protected $parent;
|
||||
|
||||
/** @var \stdClass $adult user record. */
|
||||
protected $adult;
|
||||
|
||||
/**
|
||||
* Setup function- we will create some policy docs.
|
||||
*/
|
||||
|
@ -38,6 +38,12 @@ use core\check\result;
|
||||
*/
|
||||
class adhocqueue extends check {
|
||||
|
||||
/** @var string adhocqueue id. */
|
||||
protected string $id = '';
|
||||
|
||||
/** @var string adhocqueue name. */
|
||||
protected string $name = '';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
@ -37,6 +37,15 @@ use core\check\result;
|
||||
*/
|
||||
class cronrunning extends check {
|
||||
|
||||
/** @var string adhocqueue id. */
|
||||
protected string $id = '';
|
||||
|
||||
/** @var string adhocqueue name. */
|
||||
protected string $name = '';
|
||||
|
||||
/** @var \action_link action link. */
|
||||
protected $actionlink;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
@ -30,6 +30,12 @@ use core\task\manager;
|
||||
*/
|
||||
class longrunningtasks extends check {
|
||||
|
||||
/** @var string adhocqueue id. */
|
||||
protected string $id = '';
|
||||
|
||||
/** @var string adhocqueue name. */
|
||||
protected string $name = '';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
@ -123,7 +123,7 @@ class cli_test extends \advanced_testcase {
|
||||
set_config('passwordpolicy', 0);
|
||||
$this->setAdminUser();
|
||||
|
||||
$this->field1 = $this->getDataGenerator()->create_custom_profile_field([
|
||||
$this->getDataGenerator()->create_custom_profile_field([
|
||||
'shortname' => 'superfield', 'name' => 'Super field',
|
||||
'datatype' => 'text', 'signup' => 1, 'visible' => 1, 'required' => 1, 'sortorder' => 1]);
|
||||
|
||||
|
@ -38,6 +38,10 @@ require_once($CFG->libdir . '/tablelib.php');
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class tour_list extends \flexible_table {
|
||||
|
||||
/** @var int The count of all tours. */
|
||||
protected int $tourcount = 0;
|
||||
|
||||
/**
|
||||
* Construct the tour table.
|
||||
*/
|
||||
|
@ -50,6 +50,9 @@ class role_filter_test extends \advanced_testcase {
|
||||
*/
|
||||
protected $roles;
|
||||
|
||||
/** @var array Roles. */
|
||||
protected array $testroles = [];
|
||||
|
||||
public function setUp(): void {
|
||||
global $DB;
|
||||
|
||||
|
@ -53,6 +53,12 @@ class XMLDBAction {
|
||||
/** @var bool Actions must be protected by sesskey mechanism*/
|
||||
protected $sesskey_protected;
|
||||
|
||||
/** @var mixed */
|
||||
protected $subaction;
|
||||
|
||||
/** @var bool Set own core attributes. */
|
||||
protected $can_subaction;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
@ -76,7 +76,7 @@ class generate_all_documentation extends XMLDBAction {
|
||||
$c .= '</p>';
|
||||
$this->output.=$c;
|
||||
|
||||
$this->docs = '';
|
||||
$docs = '';
|
||||
|
||||
if(class_exists('XSLTProcessor')) {
|
||||
|
||||
@ -97,16 +97,16 @@ class generate_all_documentation extends XMLDBAction {
|
||||
|
||||
$dir = trim(dirname(str_replace($CFG->dirroot, '', $path)), '/');
|
||||
$index .= '<a href="#file_' . str_replace('/', '_', $dir) . '">' . $dir . '</a>, ';
|
||||
$this->docs .= '<div class="file" id="file_' . str_replace('/', '_', $dir) . '">';
|
||||
$this->docs .= '<h2>' . $dir . '</h2>';
|
||||
$docs .= '<div class="file" id="file_' . str_replace('/', '_', $dir) . '">';
|
||||
$docs .= '<h2>' . $dir . '</h2>';
|
||||
|
||||
$doc->load($path . '/install.xml');
|
||||
$this->docs.=$xsl->transformToXML($doc);
|
||||
$docs .= $xsl->transformToXML($doc);
|
||||
|
||||
$this->docs .= '</div>';
|
||||
$docs .= '</div>';
|
||||
}
|
||||
|
||||
$this->output .= '<div id="file_idex">' . trim($index, ' ,') . '</div>' . $this->docs;
|
||||
$this->output .= '<div id="file_idex">' . trim($index, ' ,') . '</div>' . $docs;
|
||||
|
||||
$this->output.=$b;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user