27 $this->db = (is_null(
$db))
43 "SELECT obj_id, appr_id FROM svy_360_rater " .
44 " WHERE user_id = %s ",
49 while ($rec =
$db->fetchAssoc($set)) {
51 "survey_id" => $rec[
"obj_id"],
52 "appr_id" => $rec[
"appr_id"]
70 "SELECT obj_id, user_id FROM svy_360_appr " .
71 " WHERE " .
$db->in(
"obj_id", $survey_ids,
false,
"integer") .
72 "AND has_closed = %s",
76 $closed_appraisees = [];
77 while ($rec =
$db->fetchAssoc($set)) {
78 $closed_appraisees[] = [
79 "survey_id" => $rec[
"obj_id"],
80 "appr_id" => $rec[
"user_id"]
83 return $closed_appraisees;
97 "SELECT DISTINCT obj_id FROM svy_360_appr " .
98 "WHERE user_id = %s " .
99 "AND has_closed = %s",
100 [
"integer",
"integer"],
103 $unclosed_surveys = [];
104 while ($rec =
$db->fetchAssoc($set)) {
105 $unclosed_surveys[] = $rec[
"obj_id"];
107 return $unclosed_surveys;
__construct(\ilDBInterface $db=null)
Constructor.
Apraisee / Rater DB repository Tables: svy_360_rater, svy_360_appr.
getAppraiseesForRater(int $rater_id)
Get surveys for Rater.
getUnclosedSurveysForAppraisee(int $appr_user_id)
Get all unclosed surveys of an appraisee.
getClosedAppraiseesForSurveys(array $survey_ids)
Get closed appraisees for a number of surveys.