35         parent::parseResults($a_results, $a_answers);
    39         foreach ($a_answers as $answers) {
    40             foreach ($answers as $answer) {
    42                 $sum += $answer[
"value"];
    46             $a_results->
setMean($sum / $total);
    65         if ($a_abs && $a_perc) {
    67                 $lng->
txt(
"category_nr_selected"),
    68                 $lng->
txt(
"svy_fraction_of_selections")
    72                 $lng->
txt(
"category_nr_selected")
    76                 $lng->
txt(
"svy_fraction_of_selections")
    86         $answ = $a_results->getAnswers();
    87         $total = count($answ);
    91             foreach ($a_results->getAnswers() as $answer) {
    92                 $cumulated[(string) $answer->value] = ($cumulated[(
string) $answer->value] ?? 0) + 1;
    94             foreach ($cumulated as $value => $count) {
    95                 $perc = sprintf(
"%.2f", $count / $total * 100) . 
"%";
    96                 if ($a_abs && $a_perc) {
    97                     $res[
"rows"][] = array(
   103                     $res[
"rows"][] = array(
   108                     $res[
"rows"][] = array(
   127         $chart->setYAxisToInteger(
true);
   130         $chart->setColors($colors);
   133         $chart->setSize((
string) $this->chart_width, (
string) $this->chart_height);
   137         $data->setBarOptions(0.5, 
"center");
   140         $total = count($a_results->getAnswers());
   142             $cumulated = array();
   143             foreach ($a_results->getAnswers() as $answer) {
   144                 $cumulated[(string) $answer->value] = ($cumulated[(
string) $answer->value] ?? 0) + 1;
   148             foreach ($cumulated as $value => $count) {
   149                 $data->addPoint($value, $count);
   150                 $labels[$value] = $value;
   152             $chart->addData(
$data);
   154             $chart->setTicks($labels, 
false, 
true);
   180                 $lng->
txt(
"category_nr_selected"),
   181                 $lng->
txt(
"svy_fraction_of_selections")
   187         $total = count($a_results->getAnswers());
   189             $cumulated = array();
   190             foreach ($a_results->getAnswers() as $answer) {
   191                 $cumulated[(string) $answer->value] = ($cumulated[(
string) $answer->value] ?? 0) + 1;
   193             foreach ($cumulated as $value => $count) {
   194                 $res[
"rows"][] = array(
   197                     sprintf(
"%.2f", $count / $total * 100) . 
"%"   213         $answer = $a_results->getUserResults($a_user_id);
   214         if (count($answer) === 0) {
   217             $a_row[] = $answer[0][0];
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
 
getGrid( $a_results, bool $a_abs=true, bool $a_perc=true)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
getExportGrid($a_results)
Get grid data. 
 
addUserSpecificResults(array &$a_row, int $a_user_id, $a_results)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
parseResults(ilSurveyEvaluationResults $a_results, array $a_answers, SurveyCategories $a_categories=null)
 
getSkippedValue()
Get caption for skipped value. 
 
static getInstanceByType(int $a_type, string $a_id)