File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -248,8 +248,13 @@ public static function _delete_data_for_user(approved_contextlist $contextlist)
248
248
$ records ->close ();
249
249
}
250
250
}
251
+
252
+ /**
253
+ * Get the list of users within a specific context.
254
+ * @param userlist $userlist The userlist containing the list of users who have data in this context/plugin combination.
255
+ * @return void
256
+ */
251
257
public static function get_users_in_context (userlist $ userlist ) {
252
- // TODO: Implement get_users_in_context() method.
253
258
$ context = $ userlist ->get_context ();
254
259
if (!$ context instanceof \context_user) {
255
260
return ;
@@ -274,7 +279,16 @@ public static function get_users_in_context(userlist $userlist) {
274
279
275
280
}
276
281
282
+ /**
283
+ * Delete multiple users within a single context.
284
+ * @param approved_userlist $userlist The approved context and user information to delete information for.
285
+ * @return void
286
+ */
277
287
public static function delete_data_for_users (approved_userlist $ userlist ) {
278
- // TODO: Implement delete_data_for_users() method.
288
+ $ context = $ userlist ->get_context ();
289
+
290
+ if ($ context instanceof \context_user) {
291
+ static ::_delete_data_for_user ($ context ->instanceid );
292
+ }
279
293
}
280
294
}
You can’t perform that action at this time.
0 commit comments