ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
UserEvent.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24{
25 public function __construct(
26 protected \ILIAS\Exercise\InternalRepoService $repo,
27 protected \ILIAS\Exercise\InternalDomainService $domain
28 ) {
29 }
30
31 public function handleDeletion(int $user_id): void
32 {
33 global $DIC;
34
35 // get all exercises the user has submitted to
36 // todo move to repo layer
37 $db = $DIC->database();
38 $set = $db->queryF(
39 "SELECT DISTINCT obj_id FROM exc_returned " .
40 " WHERE user_id = %s ",
41 ["integer"],
42 [$user_id]
43 );
44 // remove all user submissions from these exercises
45 while ($rec = $db->fetchAssoc($set)) {
46 $exc_id = (int) $rec['obj_id'];
48 }
49 }
50}
handleDeletion(int $user_id)
Definition: UserEvent.php:31
__construct(protected \ILIAS\Exercise\InternalRepoService $repo, protected \ILIAS\Exercise\InternalDomainService $domain)
Definition: UserEvent.php:25
static deleteUser(int $a_exc_id, int $a_user_id)
Deletes already delivered files.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
global $DIC
Definition: shib_login.php:26