19 declare(strict_types=1);
38 protected \ILIAS\Survey\Access\AccessManager
$access;
48 int $requested_appr_id,
49 string $requested_rater_id
54 $this->feature_config = $this->domain_service->modeFeatureConfig($survey->
getMode());
59 $this->eval_repo = $this->repo_service->evaluation();
73 switch ($survey->getMode()) {
74 case \ilObjSurvey::MODE_360:
75 return ($access->canEditSettings() ||
78 case \ilObjSurvey::MODE_IND_FEEDB:
79 return ($access->canEditSettings());
80 case \ilObjSurvey::MODE_SELF_EVAL:
81 return ($access->canEditSettings() ||
106 if ($feature_config->usesAppraisees()) {
107 foreach ($survey->getAppraiseesData() as $item) {
108 if (!$survey->get360Mode() || $item[
"closed"]) {
109 $appraisee_ids[] = (
int) $item[
"user_id"];
113 foreach ($survey->getSurveyParticipants() as $item) {
117 } elseif ($feature_config->usesAppraisees() ||
121 return $appraisee_ids;
139 if ($req_appr_id === 0) {
146 if (in_array($req_appr_id,
$valid)) {
171 foreach ($survey->getRatersData($appr_id) as $rater) {
172 if ($rater[
"finished"]) {
186 return (
int) $i[
"user_id"];
188 if (in_array($req_rater_id,
$valid,
true)) {
189 return $req_rater_id;
196 $this->eval_repo->setAnonEvaluationAccess($ref_id);
201 return $this->eval_repo->getAnonEvaluationAccess();
206 $this->eval_repo->clearAnonEvaluationAccess();
216 $finished_ids =
null;
228 $this->
access->canEditSettings()) {
234 $finished_ids = $this->survey->getFinishedIdsForAppraiseeId($appr_id);
235 if (!count($finished_ids)) {
250 return $finished_ids;
258 $participants = $this->
access->canReadResultOfParticipants($finished_ids);
259 foreach ($this->survey->getSurveyQuestions() as $qdata) {
261 $q_res = $q_eval->getResults();
264 if (is_array($q_res) && !is_object($q_res[0][1])) {
268 $question = is_array($q_res)
269 ? $q_res[0][1]->getQuestion()
270 : $q_res->getQuestion();
272 foreach ($participants as $user) {
273 $user_id = (
int) $user[
"active_id"];
275 $parsed_results = $q_eval->parseUserSpecificResults($q_res, $user_id);
277 if (!array_key_exists($user_id,
$data)) {
278 $wt = $this->survey->getWorkingtimeForParticipant($user_id);
280 $finished = $user[
"finished"]
281 ? $user[
"finished_tstamp"]
285 "username" => $user[
"sortname"],
286 "question" => $question->getTitle(),
287 "results" => $parsed_results,
288 "workingtime" => $wt,
289 "finished" => $finished,
290 "subitems" => array()
295 "question" => $question->getTitle(),
296 "results" => $parsed_results,
297 "workingtime" =>
null,
ILIAS Survey Access AccessManager $access
__construct(InternalDomainService $domain_service, InternalRepoService $repo_service, \ilObjSurvey $survey, int $user_id, int $requested_appr_id, string $requested_rater_id)
Stores access codes of anonymous session.
getAnonEvaluationAccess()
getCurrentAppraisee()
1) We have a set of selectable appraisees.
getSelectableAppraisees()
Get all participants the current user may see results from, including itself.
static _lookupId($a_user_str)
InternalDomainService $domain_service
getSelectableRaters()
Only the individual feedback mode allows to select raters and only, if the user cannot select apprais...
string $requested_rater_id
EvaluationSessionRepo $eval_repo
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static _instanciateQuestionEvaluation(int $question_id, ?array $a_finished_ids=null)
Survey internal data service.
clearAnonEvaluationAccess()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS Survey Mode FeatureConfig $feature_config
isMultiParticipantsView()
Can the current user switch between participants and see their results?
setAnonEvaluationAccess(int $ref_id)
InternalRepoService $repo_service
const RESULTS_SELF_EVAL_ALL