ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilExcRepoObjAssignment.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once("./Modules/Exercise/RepoObjectAssignment/interfaces/interface.ilExcRepoObjAssignmentInterface.php");
6
14{
15
20 protected function __construct()
21 {
22 }
23
30 public static function getInstance()
31 {
32 return new self();
33 }
34
42 public function getAssignmentInfoOfObj($a_ref_id, $a_user_id)
43 {
44 include_once("./Modules/Exercise/RepoObjectAssignment/classes/class.ilExcRepoObjAssignmentInfo.php");
45 return ilExcRepoObjAssignmentInfo::getInfo($a_ref_id, $a_user_id);
46 }
47
55 public function getAccessInfo($a_ref_id, $a_user_id)
56 {
57 include_once("./Modules/Exercise/RepoObjectAssignment/classes/class.ilExcRepoObjAssignmentAccessInfo.php");
58 return ilExcRepoObjAssignmentAccessInfo::getInfo($a_ref_id, $a_user_id);
59 }
60
68 public function isGranted($a_ref_id, $a_user_id)
69 {
70 include_once("./Modules/Exercise/RepoObjectAssignment/classes/class.ilExcRepoObjAssignmentAccessInfo.php");
71 $info = ilExcRepoObjAssignmentAccessInfo::getInfo($a_ref_id, $a_user_id);
72 return !$info->isGranted();
73 }
74}
An exception for terminatinating execution or to throw for unit testing.
static getInfo($a_ref_id, $a_user_id)
Get all info objects for a ref id of an repo object.
Handles exercise repository object assignments.
getAccessInfo($a_ref_id, $a_user_id)
Get assignment access info for a repository object.
isGranted($a_ref_id, $a_user_id)
Is access denied.
getAssignmentInfoOfObj($a_ref_id, $a_user_id)
Get assignment(s) information of repository object.
$info
Definition: index.php:5