31 $this->lng = $DIC->language();
32 $this->question = $a_question;
42 $this->users_answered = (int) $a_value;
52 $this->users_skipped = (int) $a_value;
60 public function setMode($a_value, $a_nr_of_selections)
62 $this->mode_value = is_array($a_value)
65 $this->mode_nr_of_selections = (int) $a_nr_of_selections;
75 if ($this->mode_value === null) {
82 if (!is_array($mvalues)) {
83 $mvalues =
array($mvalues);
85 sort($mvalues, SORT_NUMERIC);
86 foreach ($mvalues as $value) {
90 return implode(
", ",
$res);
100 $this->arithmetic_mean = (float) $a_mean;
110 $this->median = is_array($a_value)
124 if ($this->median === null) {
128 if (!is_array($this->median)) {
131 return $lng->txt(
"median_between") .
" " .
133 $lng->txt(
"and") .
" " .
140 $this->variables[] = $a_variable;
145 if (
sizeof($this->variables)) {
152 $this->answers[] = $a_answer;
157 if (
sizeof($this->answers)) {
164 if (!
sizeof($this->variables)) {
167 foreach ($this->variables as $var) {
168 if ($var->cat->scale == $a_value) {
169 return $var->cat->title .
" [" . $a_value .
"]";
177 if (!
sizeof($this->variables)) {
180 foreach ($this->variables as $var) {
181 if ($var->cat->scale == $a_value) {
182 return $var->cat->title;
192 foreach ($this->answers as $answer) {
208 if ($answer->active_id == $a_active_id) {
213 $this->getCatTitle($answer->value)
232 $this->abs = (int) $a_abs;
233 $this->perc = (float) $a_perc;
245 $this->active_id = (int) $a_active_id;
246 $this->value = $a_value;
247 $this->text = trim($a_text);
__construct(ilSurveyCategory $a_cat, $a_abs, $a_perc)
Survey evaluation answers.
foreach($_POST as $key=> $value) $res
Basic class for all survey question types.
addVariable(ilSurveyEvaluationResultsVariable $a_variable)
setMode($a_value, $a_nr_of_selections)
setUsersAnswered($a_value)
getUserResults($a_active_id)
Create styles array
The data for the language used.
__construct($a_active_id, $a_value, $a_text)
__construct(SurveyQuestion $a_question)
addAnswer(ilSurveyEvaluationResultsAnswer $a_answer)
setUsersSkipped($a_value)