mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 13:33:52 +02:00
Merge branch 'MDL-77337-master' of https://github.com/meirzamoodle/moodle
This commit is contained in:
commit
49e8e72196
@ -70,6 +70,9 @@ abstract class action {
|
||||
*/
|
||||
protected $text = null;
|
||||
|
||||
/** @var string Store the action type. */
|
||||
protected string $type = '';
|
||||
|
||||
/**
|
||||
* Returns the action name.
|
||||
*
|
||||
|
@ -126,6 +126,9 @@ class course implements \core_analytics\analysable {
|
||||
*/
|
||||
protected $ntotallogs = null;
|
||||
|
||||
/** @var int Store current Unix timestamp. */
|
||||
protected int $now = 0;
|
||||
|
||||
/**
|
||||
* Course manager constructor.
|
||||
*
|
||||
|
@ -64,6 +64,9 @@ class user implements \core_analytics\analysable {
|
||||
*/
|
||||
protected $usercontext = null;
|
||||
|
||||
/** @var int Store current Unix timestamp. */
|
||||
protected int $now = 0;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
|
@ -25,6 +25,33 @@ namespace core_analytics;
|
||||
*/
|
||||
class course_test extends \advanced_testcase {
|
||||
|
||||
/** @var \stdClass Course record. */
|
||||
protected $course;
|
||||
|
||||
/** @var \stdClass Student 1 user record. */
|
||||
protected $stu1;
|
||||
|
||||
/** @var \stdClass Student 2 user record. */
|
||||
protected $stu2;
|
||||
|
||||
/** @var \stdClass Student both user record. */
|
||||
protected $both;
|
||||
|
||||
/** @var \stdClass Editing teacher user record. */
|
||||
protected $editingteacher;
|
||||
|
||||
/** @var \stdClass Teacher user record. */
|
||||
protected $teacher;
|
||||
|
||||
/** @var int Student role ID record. */
|
||||
protected $studentroleid;
|
||||
|
||||
/** @var int Editing teacher role ID record. */
|
||||
protected $editingteacherroleid;
|
||||
|
||||
/** @var int Teacher role ID record. */
|
||||
protected $teacherroleid;
|
||||
|
||||
public function setUp(): void {
|
||||
global $DB;
|
||||
|
||||
|
@ -25,6 +25,9 @@ namespace core_analytics;
|
||||
*/
|
||||
class dataset_manager_test extends \advanced_testcase {
|
||||
|
||||
/** @var array Store dataset top rows. */
|
||||
protected array $sharedtoprows = [];
|
||||
|
||||
/**
|
||||
* setUp
|
||||
*
|
||||
|
@ -43,6 +43,12 @@ require_once(__DIR__ . '/fixtures/test_analysis.php');
|
||||
*/
|
||||
class model_test extends \advanced_testcase {
|
||||
|
||||
/** @var model Store Model. */
|
||||
protected $model;
|
||||
|
||||
/** @var \stdClass Store model object. */
|
||||
protected $modelobj;
|
||||
|
||||
public function setUp(): void {
|
||||
|
||||
$this->setAdminUser();
|
||||
|
@ -30,6 +30,30 @@ require_once(__DIR__ . '/fixtures/test_target_shortname.php');
|
||||
*/
|
||||
class prediction_actions_test extends \advanced_testcase {
|
||||
|
||||
/** @var model Store Model. */
|
||||
protected $model;
|
||||
|
||||
/** @var \stdClass Store model object. */
|
||||
protected $modelobj;
|
||||
|
||||
/** @var \stdClass Course 1 record. */
|
||||
protected $course1;
|
||||
|
||||
/** @var \stdClass Course 2 record. */
|
||||
protected $course2;
|
||||
|
||||
/** @var \context_course Store Model. */
|
||||
protected $context;
|
||||
|
||||
/** @var \stdClass Teacher 1 user record. */
|
||||
protected $teacher1;
|
||||
|
||||
/** @var \stdClass Teacher 2 user record. */
|
||||
protected $teacher2;
|
||||
|
||||
/** @var \stdClass Teacher 3 user record. */
|
||||
protected $teacher3;
|
||||
|
||||
/**
|
||||
* Common startup tasks
|
||||
*/
|
||||
|
@ -45,6 +45,48 @@ require_once(__DIR__ . '/../fixtures/test_target_course_users.php');
|
||||
*/
|
||||
class provider_test extends \core_privacy\tests\provider_testcase {
|
||||
|
||||
/** @var \core_analytics\model Store Model 1. */
|
||||
protected $model1;
|
||||
|
||||
/** @var \core_analytics\model Store Model 2. */
|
||||
protected $model2;
|
||||
|
||||
/** @var \stdClass $modelobj1 Store Model 1 object. */
|
||||
protected $modelobj1;
|
||||
|
||||
/** @var \stdClass $modelobj2 Store Model 2 object. */
|
||||
protected $modelobj2;
|
||||
|
||||
/** @var \stdClass $u1 User 1 record. */
|
||||
protected $u1;
|
||||
|
||||
/** @var \stdClass $u2 User 2 record. */
|
||||
protected $u2;
|
||||
|
||||
/** @var \stdClass $u3 User 3 record. */
|
||||
protected $u3;
|
||||
|
||||
/** @var \stdClass $u4 User 4 record. */
|
||||
protected $u4;
|
||||
|
||||
/** @var \stdClass $u5 User 5 record. */
|
||||
protected $u5;
|
||||
|
||||
/** @var \stdClass $u6 User 6 record. */
|
||||
protected $u6;
|
||||
|
||||
/** @var \stdClass $u7 User 7 record. */
|
||||
protected $u7;
|
||||
|
||||
/** @var \stdClass $u8 User 8 record. */
|
||||
protected $u8;
|
||||
|
||||
/** @var \stdClass $c1 Course 1 record. */
|
||||
protected $c1;
|
||||
|
||||
/** @var \stdClass $c2 Course 2 record. */
|
||||
protected $c2;
|
||||
|
||||
public function setUp(): void {
|
||||
|
||||
$this->resetAfterTest(true);
|
||||
|
@ -35,6 +35,12 @@ require_once(__DIR__ . '/../../lib/enrollib.php');
|
||||
*/
|
||||
class time_splittings_test extends \advanced_testcase {
|
||||
|
||||
/** @var \stdClass course record. */
|
||||
protected $course;
|
||||
|
||||
/** @var course Moodle course analysable. */
|
||||
protected $analysable;
|
||||
|
||||
/**
|
||||
* setUp
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user