2 require_once(
"./Modules/StudyProgramme/classes/model/class.ilStudyProgrammeProgress.php");
3 require_once(
"./Modules/StudyProgramme/classes/class.ilStudyProgrammeUserProgress.php");
23 public function getInstance($a_assignment_id, $a_program_id, $a_user_id)
36 $prgrs = ilStudyProgrammeProgress::find($a_prgrs_id);
37 if ($prgrs === null) {
38 throw new ilException(
"Unknown progress id $a_prgrs_id.");
53 ,
"usr_id" => $a_user_id
55 return array_values(array_map(
function ($dat) {
73 ,
"assignment_id" => $a_assignment_id
75 if (count($progresses) == 0) {
76 require_once(
"Modules/StudyProgramme/classes/exceptions/class.ilStudyProgrammeNoProgressForAssignmentException.php");
78 .
"Assignment '$a_assignment_id' does not belong to program " 98 if (count($progresses) == 0) {
99 require_once(
"Modules/StudyProgramme/classes/exceptions/class.ilStudyProgrammeNoProgressForAssignmentException.php");
101 .
"Can't find progresses for assignment '$a_assignment_id'.");
103 return array_map(
function ($dat) {
118 return array_values(array_map(
function ($dat) {
130 $lng->loadLanguageModule(
"prg");
133 return $lng->txt(
"prg_status_in_progress");
136 return $lng->txt(
"prg_status_completed");
139 return $lng->txt(
"prg_status_accredited");
142 return $lng->txt(
"prg_status_not_relevant");
145 return $lng->txt(
"prg_status_failed");
147 throw new ilException(
"Unknown status: '$a_status'");
static getInstancesForProgram($a_program_id)
Get the instances for a program node.
static getInstanceForAssignment($a_program_id, $a_assignment_id)
Get the instance for the assignment on the program.
statusToRepr($a_status)
Get a user readable representation of a status.
static getInstancesForAssignment($a_assignment_id)
Get the instance for an assignment.
Storage implementation for ilStudyProgrammeUserProgress.
Exception is thrown when a progress for some programme node and assignment is missing.
static where($where, $operator=null)
getInstanceById($a_prgrs_id)
Get an instance by progress id.
const STATUS_NOT_RELEVANT
getInstancesForUser($a_program_id, $a_user_id)
Get the instances that user has on program.
getInstance($a_assignment_id, $a_program_id, $a_user_id)
Get an instance.
Represents the progress of a user at one node of a study programme.