mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-77346 mod_workshop: Added missing class properties
In PHP 8.2 and later, setting a value to an undeclared class property is deprecated and emits a deprecation notice. So we need to add missing class properties that still need to be declared.
This commit is contained in:
parent
09fd61415e
commit
98c55a725e
10 changed files with 148 additions and 3 deletions
|
@ -731,6 +731,8 @@ class workshop_random_allocator_setting {
|
|||
public $assesswosubmission;
|
||||
/** @var bool add self-assessments */
|
||||
public $addselfassessment;
|
||||
/** @var bool scheduled allocation status */
|
||||
public $enablescheduled;
|
||||
|
||||
/**
|
||||
* Use the factory method {@link self::instance_from_object()}
|
||||
|
|
|
@ -35,9 +35,6 @@ require_once($CFG->libdir . '/gradelib.php');
|
|||
*/
|
||||
class workshop_best_evaluation extends workshop_evaluation {
|
||||
|
||||
/** @var workshop the parent workshop instance */
|
||||
protected $workshop;
|
||||
|
||||
/** @var the recently used settings in this workshop */
|
||||
protected $settings;
|
||||
|
||||
|
|
|
@ -31,6 +31,9 @@ require_once($CFG->dirroot . '/lib/formslib.php');
|
|||
*/
|
||||
abstract class workshop_evaluation {
|
||||
|
||||
/** @var workshop the parent workshop instance */
|
||||
protected $workshop;
|
||||
|
||||
/**
|
||||
* Calculates grades for assessment and updates 'gradinggrade' fields in 'workshop_assessments' table
|
||||
*
|
||||
|
|
|
@ -39,6 +39,36 @@ use core_privacy\tests\provider_testcase;
|
|||
*/
|
||||
class provider_test extends provider_testcase {
|
||||
|
||||
/** @var \testing_data_generator data generator. */
|
||||
protected $generator;
|
||||
|
||||
/** @var \mod_workshop_generator workshop generator. */
|
||||
protected $workshopgenerator;
|
||||
|
||||
/** @var \stdClass course data. */
|
||||
protected $course1;
|
||||
|
||||
/** @var \stdClass student data. */
|
||||
protected $student1;
|
||||
|
||||
/** @var \stdClass student data. */
|
||||
protected $student2;
|
||||
|
||||
/** @var \stdClass first workshop in course1 */
|
||||
protected $workshop11;
|
||||
|
||||
/** @var int ID of the submission in workshop11 by student1 */
|
||||
protected $submission111;
|
||||
|
||||
/** @var int ID of the assessment of submission111 by student2 */
|
||||
protected $assessment1112;
|
||||
|
||||
/** @var bool|int true or new id */
|
||||
protected $dim1;
|
||||
|
||||
/** @var bool|int true or new id */
|
||||
protected $dim2;
|
||||
|
||||
/**
|
||||
* Test {@link workshopform_accumulative\privacy\provider::export_assessment_form()} implementation.
|
||||
*/
|
||||
|
|
|
@ -37,6 +37,18 @@ require_once($CFG->libdir . '/formslib.php'); // parent class definition
|
|||
*/
|
||||
class workshop_assessment_form extends moodleform {
|
||||
|
||||
/** @var string Mode to open the form in: preview/assessment. */
|
||||
public $mode;
|
||||
|
||||
/** @var workshop_strategy workshop strategy */
|
||||
public $strategy;
|
||||
|
||||
/** @var workshop workshop. */
|
||||
public $workshop;
|
||||
|
||||
/** @var array options. */
|
||||
public $options;
|
||||
|
||||
/**
|
||||
* Add the fields that are common for all grading strategies.
|
||||
*
|
||||
|
|
|
@ -39,6 +39,36 @@ use core_privacy\tests\provider_testcase;
|
|||
*/
|
||||
class provider_test extends provider_testcase {
|
||||
|
||||
/** @var \testing_data_generator data generator. */
|
||||
protected $generator;
|
||||
|
||||
/** @var \mod_workshop_generator workshop generator. */
|
||||
protected $workshopgenerator;
|
||||
|
||||
/** @var \stdClass course data. */
|
||||
protected $course1;
|
||||
|
||||
/** @var \stdClass student data. */
|
||||
protected $student1;
|
||||
|
||||
/** @var \stdClass student data. */
|
||||
protected $student2;
|
||||
|
||||
/** @var \stdClass first workshop in course1 */
|
||||
protected $workshop11;
|
||||
|
||||
/** @var int ID of the submission in workshop11 by student1 */
|
||||
protected $submission111;
|
||||
|
||||
/** @var int ID of the assessment of submission111 by student2 */
|
||||
protected $assessment1112;
|
||||
|
||||
/** @var bool|int true or new id */
|
||||
protected $dim1;
|
||||
|
||||
/** @var bool|int true or new id */
|
||||
protected $dim2;
|
||||
|
||||
/**
|
||||
* Test {@link workshopform_comments\privacy\provider::export_assessment_form()} implementation.
|
||||
*/
|
||||
|
|
|
@ -40,6 +40,9 @@ class workshop_edit_strategy_form extends moodleform {
|
|||
/** strategy logic instance that this class is editor of */
|
||||
protected $strategy;
|
||||
|
||||
/** @var workshop workshop. */
|
||||
protected $workshop;
|
||||
|
||||
/**
|
||||
* Add the fields that are common for all grading strategies.
|
||||
*
|
||||
|
|
|
@ -39,6 +39,36 @@ use core_privacy\tests\provider_testcase;
|
|||
*/
|
||||
class provider_test extends provider_testcase {
|
||||
|
||||
/** @var \testing_data_generator data generator. */
|
||||
protected $generator;
|
||||
|
||||
/** @var \mod_workshop_generator workshop generator. */
|
||||
protected $workshopgenerator;
|
||||
|
||||
/** @var \stdClass course data. */
|
||||
protected $course1;
|
||||
|
||||
/** @var \stdClass student data. */
|
||||
protected $student1;
|
||||
|
||||
/** @var \stdClass student data. */
|
||||
protected $student2;
|
||||
|
||||
/** @var \stdClass first workshop in course1 */
|
||||
protected $workshop11;
|
||||
|
||||
/** @var int ID of the submission in workshop11 by student1 */
|
||||
protected $submission111;
|
||||
|
||||
/** @var int ID of the assessment of submission111 by student2 */
|
||||
protected $assessment1112;
|
||||
|
||||
/** @var bool|int true or new id */
|
||||
protected $dim1;
|
||||
|
||||
/** @var bool|int true or new id */
|
||||
protected $dim2;
|
||||
|
||||
/**
|
||||
* Test {@link workshopform_numerrors\privacy\provider::export_assessment_form()} implementation.
|
||||
*/
|
||||
|
|
|
@ -39,6 +39,36 @@ use core_privacy\tests\provider_testcase;
|
|||
*/
|
||||
class provider_test extends provider_testcase {
|
||||
|
||||
/** @var \testing_data_generator data generator. */
|
||||
protected $generator;
|
||||
|
||||
/** @var \mod_workshop_generator workshop generator. */
|
||||
protected $workshopgenerator;
|
||||
|
||||
/** @var \stdClass course data. */
|
||||
protected $course1;
|
||||
|
||||
/** @var \stdClass student data. */
|
||||
protected $student1;
|
||||
|
||||
/** @var \stdClass student data. */
|
||||
protected $student2;
|
||||
|
||||
/** @var \stdClass first workshop in course1 */
|
||||
protected $workshop11;
|
||||
|
||||
/** @var int ID of the submission in workshop11 by student1 */
|
||||
protected $submission111;
|
||||
|
||||
/** @var int ID of the assessment of submission111 by student2 */
|
||||
protected $assessment1112;
|
||||
|
||||
/** @var bool|int true or new id */
|
||||
protected $dim1;
|
||||
|
||||
/** @var bool|int true or new id */
|
||||
protected $dim2;
|
||||
|
||||
/**
|
||||
* Test {@link workshopform_rubric\privacy\provider::export_assessment_form()} implementation.
|
||||
*/
|
||||
|
|
|
@ -65,6 +65,14 @@ class external_test extends externallib_advanced_testcase {
|
|||
private $studentrole;
|
||||
/** @var stdClass teacher role object */
|
||||
private $teacherrole;
|
||||
/** @var \stdClass student object. */
|
||||
private $anotherstudentg1;
|
||||
/** @var \stdClass student object. */
|
||||
private $anotherstudentg2;
|
||||
/** @var \stdClass group object. */
|
||||
private $group1;
|
||||
/** @var \stdClass group object. */
|
||||
private $group2;
|
||||
|
||||
/**
|
||||
* Set up for every test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue