Skip to content

Commit d60618c

Browse files
author
David Monllao
committed
Merge branch 'MDL-62228_33' of git://github.com/markn86/moodle into MOODLE_33_STABLE
2 parents ac897ae + e8279ab commit d60618c

File tree

8 files changed

+0
-29
lines changed

8 files changed

+0
-29
lines changed

admin/roles/classes/privacy/provider.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,6 @@ public static function delete_data_for_all_users_in_context(\context $context) {
313313
// Don't belong to the modifier user.
314314

315315
// Remove data from role_assignments.
316-
if (empty($context)) {
317-
return;
318-
}
319316
$DB->delete_records('role_assignments', ['contextid' => $context->id]);
320317
}
321318
/**

auth/mnet/classes/privacy/provider.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,6 @@ public static function export_user_data(approved_contextlist $contextlist) {
211211
public static function delete_data_for_all_users_in_context(\context $context) {
212212
global $DB;
213213

214-
if (empty($context)) {
215-
return;
216-
}
217-
218214
if ($context->contextlevel != CONTEXT_USER) {
219215
return;
220216
}

auth/oauth2/classes/privacy/provider.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,6 @@ public static function export_user_data(approved_contextlist $contextlist) {
120120
* @param \context $context The context to delete data for.
121121
*/
122122
public static function delete_data_for_all_users_in_context(\context $context) {
123-
if (empty($context)) {
124-
return;
125-
}
126-
127123
if ($context->contextlevel != CONTEXT_USER) {
128124
return;
129125
}

calendar/classes/privacy/provider.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,6 @@ public static function export_user_preferences($userid) {
183183
* @param context $context Transform the specific context to delete data for.
184184
*/
185185
public static function delete_data_for_all_users_in_context(\context $context) {
186-
if (empty($context)) {
187-
return;
188-
}
189-
190186
// Delete all Calendar Events in the specified context in batches.
191187
if ($eventids = array_keys(self::get_calendar_event_ids_by_context($context))) {
192188
self::delete_batch_records('event', 'id', $eventids);

cohort/classes/privacy/provider.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,6 @@ public static function export_user_data(approved_contextlist $contextlist) {
143143
* @param context $context A user context.
144144
*/
145145
public static function delete_data_for_all_users_in_context(\context $context) {
146-
if (empty($context)) {
147-
return;
148-
}
149-
150146
if (!$context instanceof \context_system && !$context instanceof \context_coursecat) {
151147
return;
152148
}

enrol/classes/privacy/provider.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,6 @@ public static function export_user_data(approved_contextlist $contextlist) {
164164
public static function delete_data_for_all_users_in_context(\context $context) {
165165
global $DB;
166166

167-
if (empty($context)) {
168-
return;
169-
}
170167
// Sanity check that context is at the User context level.
171168
if ($context->contextlevel == CONTEXT_COURSE) {
172169
$sql = "SELECT ue.id

mod/assignment/classes/privacy/provider.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,6 @@ public static function export_user_preferences($userid) {
215215
public static function delete_data_for_all_users_in_context(\context $context) {
216216
global $DB;
217217

218-
if (empty($context)) {
219-
return;
220-
}
221-
222218
if ($context->contextlevel == CONTEXT_MODULE) {
223219
// Delete all assignment submissions for the assignment associated with the context module.
224220
$assignment = self::get_assignment_by_context($context);

mod/glossary/classes/privacy/provider.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,6 @@ protected static function export_glossary_data_for_user(array $glossarydata, \co
240240
*/
241241
public static function delete_data_for_all_users_in_context(\context $context) {
242242
global $DB;
243-
if (empty($context)) {
244-
return;
245-
}
246243

247244
if ($context->contextlevel != CONTEXT_MODULE) {
248245
return;

0 commit comments

Comments
 (0)