File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -86,11 +86,11 @@ public static function process_student_accounts() {
86
86
$ deleteaftermonths = get_config ('tool_disable_delete_students ' , 'delete_after_months ' );
87
87
88
88
// Get all active student accounts.
89
- $ sql = "SELECT DISTINCT u.*
89
+ $ sql = "SELECT DISTINCT u.*
90
90
FROM {user} u
91
91
JOIN {role_assignments} ra ON ra.userid = u.id
92
92
JOIN {role} r ON r.id = ra.roleid
93
- WHERE u.deleted = 0
93
+ WHERE u.deleted = 0
94
94
AND r.shortname = 'student' " ;
95
95
96
96
$ students = $ DB ->get_records_sql ($ sql );
Original file line number Diff line number Diff line change 23
23
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24
24
*/
25
25
26
+ namespace tool_disable_delete_students \task ;
26
27
use tool_disable_delete_students \util ;
27
28
28
29
/**
@@ -74,7 +75,7 @@ protected function setUp(): void {
74
75
* Create a course with valid start and end dates
75
76
*
76
77
* @param int $endoffset Number of seconds to offset the end date from start
77
- * @return stdClass The created course
78
+ * @return \ stdClass The created course
78
79
*/
79
80
private function create_course_with_dates (int $ endoffset ): \stdClass {
80
81
$ startdate = time () - (360 * DAYSECS ); // Start date 360 days ago.
@@ -208,7 +209,6 @@ public function test_delete_after_months(): void {
208
209
// Check if student account was deleted.
209
210
$ userexists = $ DB ->record_exists ('user ' , ['id ' => $ student ->id , 'deleted ' => 0 ]);
210
211
211
-
212
212
// Capture the output.
213
213
$ output = ob_get_clean ();
214
214
Original file line number Diff line number Diff line change 27
27
defined ('MOODLE_INTERNAL ' ) || die ();
28
28
29
29
$ plugin ->version = 2024021500 ;
30
- $ plugin ->requires = 2022112800 ; // Moodle 4.1
30
+ $ plugin ->requires = 2022112800 ; // Moodle 4.1.
31
31
$ plugin ->component = 'tool_disable_delete_students ' ;
32
32
$ plugin ->maturity = MATURITY_STABLE ;
33
33
$ plugin ->release = '1.0 ' ;
You can’t perform that action at this time.
0 commit comments