3 declare(strict_types=1);
41 $assignment = $this->assignment_repository->read($id);
42 if ($assignment === null) {
43 throw new ilException(
"ilStudyProgrammeUserAssignment::__construct: " 44 .
"Unknown assignmemt id '$id'.");
48 $this->sp_user_progress_db,
49 $this->assignment_repository,
58 $this->sp_user_progress_db,
59 $this->assignment_repository,
66 $assignments = $this->assignment_repository->readByUsrId($user_id);
71 foreach ($assignments as $ass) {
73 if ($this->tree->isInTree($value)) {
76 $this->sp_user_progress_db,
77 $this->assignment_repository,
89 $assignments = $this->assignment_repository->readByPrgId($program_id);
90 return array_map(
function ($ass) {
93 $this->sp_user_progress_db,
94 $this->assignment_repository,
97 }, array_values($assignments));
109 $this->sp_user_progress_db,
110 $this->assignment_repository,
114 $this->assignment_repository->readDueToRestart()
127 $this->sp_user_progress_db,
128 $this->assignment_repository,
132 $this->assignment_repository->readDueToRestartAndMail()
138 $this->assignment_repository->reminderSendFor($assignment_id);
144 $assigments_by_prg = $this->assignment_repository->getDashboardInstancesforUser($usr_id);
145 foreach ($assigments_by_prg as $prg => $assignments) {
147 foreach ($assignments as $id => $assignment) {
150 $this->sp_user_progress_db,
151 $this->assignment_repository,
getDashboardInstancesforUser(int $usr_id)
getDueToRestartInstances()
Storage implementation for ilStudyProgrammeUserProgress.
static _getAllReferences($a_id)
get all reference ids of object
getInstancesForProgram(int $program_id)
Class ilStudyProgrammeAssignment.
getInstanceByModel(\ilStudyProgrammeAssignment $assignment)
getInstancesOfUser(int $user_id)
reminderSendFor(int $assignment_id)
__construct(ilStudyProgrammeUserProgressDB $sp_user_progress_db, ilStudyProgrammeAssignmentRepository $assignment_repository, ilTree $tree, ilStudyProgrammeEvents $sp_events)
Represents one assignment of a user to a study programme.