19 declare(strict_types=1);
36 $this->current_user = (
int) ($DIC->isDependencyAvailable(
'user')
37 ? $DIC->user()->getId()
44 return 'exc_tutor_feedback';
57 $is_recipient = $this->
isRecipient($identification);
59 if ($object_id === null) {
65 if ($DIC->access()->checkAccessOfUser($this->current_user,
'write',
'', $ref_id)) {
69 $DIC->access()->checkAccessOfUser($this->current_user,
'read',
'', $ref_id)) {
88 if ($object_id !== null) {
90 $ref_id = array_shift($references);
93 return ilLink::_getLink(
$ref_id,
'exc');
101 $r = $this->database->queryF(
102 "SELECT exc_mem_ass_status.usr_id FROM il_resource_rca JOIN exc_mem_ass_status ON exc_mem_ass_status.feedback_rcid = il_resource_rca.rcid WHERE il_resource_rca.rid = %s;",
106 $d = $this->database->fetchAssoc(
$r);
107 $user_id = (
int) (
$d[
"usr_id"] ?? 0);
109 return ($user_id === $this->current_user);
115 $r = $this->database->queryF(
116 "SELECT exc_id, rcid FROM il_resource_rca JOIN exc_mem_ass_status ON exc_mem_ass_status.feedback_rcid = il_resource_rca.rcid JOIN exc_assignment ON (exc_assignment.id = exc_mem_ass_status.ass_id) WHERE il_resource_rca.rid = %s;",
120 $d = $this->database->fetchObject(
$r);
122 return (isset(
$d->exc_id) ? (
int)
$d->exc_id : null);
128 if ($this->database === null) {
129 $this->database = $DIC->database();
resourceHasBeenDeleted(ResourceIdentification $identification)
getLocationURIForResourceUsage(ResourceIdentification $identification)
__construct(int $owner=6)
static _getAllReferences(int $id)
get all reference ids for object ID
canBeAccessedByCurrentUser(ResourceIdentification $identification)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
isRecipient(ResourceIdentification $identification)
Class ResourceIdentification.
resolveObjectId(ResourceIdentification $identification)