Definition at line 37 of file questionnaire_data_view.inc.
◆ buildOptionDataView()
QuestionnaireDataView::buildOptionDataView |
( |
| ) |
|
Definition at line 330 of file questionnaire_data_view.inc.
332 $dataView =
new GroupedDataListView($this->optionAnswers,
"OptionDataList");
333 $dataView->column(
"Option",
"{option}",
false,
"width: 90%")
334 ->column(
"Count",
"{count}",
false,
"width: 10%");
335 $dataView->groupBy($this->questions, array($this,
getGroupTitle));
336 $dataView->mode =
'tree';
337 $dataView->emptyMessage =
"There are no aggregated data results.";
338 $dataView->excelFile =
"option_surveyData.xls";
339 $this->optionDataView = $dataView;
◆ buildTextDataView()
QuestionnaireDataView::buildTextDataView |
( |
| ) |
|
Definition at line 350 of file questionnaire_data_view.inc.
352 $table =
new GroupedDataListView($this->textAnswers,
"AnswerTextList");
356 $table->emptyMessage =
"There are no text results.";
357 $table->excelFile =
"text_surveyData.xls";
359 $this->textDataView =
$table;
static formatQuestion($question)
static formatAnswer($answer)
◆ drawView()
QuestionnaireDataView::drawView |
( |
| ) |
|
Definition at line 374 of file questionnaire_data_view.inc.
377 $this->optionDataView->drawView();
378 echo
"<h4>Free Text Responses</h4>";
379 $this->textDataView->drawView();
◆ formatAnswer()
static QuestionnaireDataView::formatAnswer |
( |
|
$answer | ) |
|
|
static |
◆ formatQuestion()
static QuestionnaireDataView::formatQuestion |
( |
|
$question | ) |
|
|
static |
◆ getAggregateData()
QuestionnaireDataView::getAggregateData |
( |
|
$question, |
|
|
|
$answers |
|
) |
| |
Definition at line 79 of file questionnaire_data_view.inc.
81 $qPk = $this->mgr->getQuestionKey();
122 trace(
"getAggregateData: Unknown question type {$questionType->class_name}", 2);
123 die(
"QuestionniareDataView getAggregateData: Unknown question type {$questionType->class_name}");
getCheckListQuestionResultData($question, $answers)
getRatingsQuestionResultData($question, $answers)
getSingleSelectQuestionResultData($question, $answers)
◆ getCheckListAnswerCounts()
static QuestionnaireDataView::getCheckListAnswerCounts |
( |
|
$answers | ) |
|
|
static |
Definition at line 295 of file questionnaire_data_view.inc.
307 if(strlen($values)==1 AND is_numeric($values))
308 $values = array($values);
309 elseif(strlen($values)==0)
312 $values = explode(",", $values);
314 foreach($values as $value => $idx)
foreach( $events as $event)
◆ getCheckListQuestionResultData()
QuestionnaireDataView::getCheckListQuestionResultData |
( |
|
$question, |
|
|
|
$answers |
|
) |
| |
◆ getGroupTitle()
QuestionnaireDataView::getGroupTitle |
( |
|
$question | ) |
|
◆ getHeading()
QuestionnaireDataView::getHeading |
( |
| ) |
|
Definition at line 390 of file questionnaire_data_view.inc.
392 $fn = array($this->mgr, formatResultsHeading);
393 if (is_callable($fn))
395 return call_user_func($fn);
398 $recipientCount = $this->mgr->getRecipientCount();
401 $text =
"<h3>Aggregated Survey Answers based on $countText ";
402 $text .= ($recipientCount) ?
"out of $recipientCount " :
"";
403 $text .=
"Respondents</h3>\n";
◆ getMean()
QuestionnaireDataView::getMean |
( |
|
$counts | ) |
|
◆ getMedian()
QuestionnaireDataView::getMedian |
( |
|
$optionAnswers | ) |
|
Definition at line 229 of file questionnaire_data_view.inc.
238 $odd = $no_elements % 2;
244 $the_index_1 = $no_elements / 2;
247 settype($the_index_1,
"integer");
255 $the_index_1 = $no_elements / 2;
256 $the_index_2 = $the_index_1 - 1;
◆ getOptionText()
QuestionnaireDataView::getOptionText |
( |
|
$options | ) |
|
Definition at line 191 of file questionnaire_data_view.inc.
193 $optionText = array();
197 if (!
$to)
$to =
"Highest";
198 if (!$steps) $steps = 5;
200 for($idx = 1; $idx <= $steps; ++$idx)
202 if($idx > 1 AND $idx < $steps)
203 $optionText[$idx] = $idx;
205 $optionText[$idx] = ($idx == 1) ?
$from :
$to;
◆ getRatingsQuestionResultData()
QuestionnaireDataView::getRatingsQuestionResultData |
( |
|
$question, |
|
|
|
$answers |
|
) |
| |
Definition at line 163 of file questionnaire_data_view.inc.
165 $qPk = $this->mgr->getQuestionKey();
167 $answerValues = regroupList(
$answers,
"value");
172 $steps = count($optionText);
174 for($idx = 1; $idx <= $steps; ++$idx)
178 $counts[$idx] = count($answerValues[$idx]);
◆ getSingleSelectQuestionResultData()
QuestionnaireDataView::getSingleSelectQuestionResultData |
( |
|
$question, |
|
|
|
$answers |
|
) |
| |
Definition at line 132 of file questionnaire_data_view.inc.
134 $qPk = $this->mgr->getQuestionKey();
141 $answerValues = regroupList(
$answers,
"value");
143 $answerValues = array();
148 $count = count($answerValues[$idx]);
◆ QuestionnaireDataView()
QuestionnaireDataView::QuestionnaireDataView |
( |
|
$mgr | ) |
|
Definition at line 50 of file questionnaire_data_view.inc.
53 $this->survey = $this->mgr->item;
54 $qPk = $this->mgr->getQuestionKey();
58 $this->questions = $this->mgr->getQuestions();
60 if(count($this->questions) > 0)
65 $this->responseCount = $this->mgr->getResponseCount();
66 $this->answers = regroupList(
$answers, $qPk);
getAggregateData($question, $answers)
◆ writeScript()
QuestionnaireDataView::writeScript |
( |
| ) |
|
◆ $answers
QuestionnaireDataView::$answers |
◆ $emptyMessage
QuestionnaireDataView::$emptyMessage = "There are no results." |
◆ $obj
QuestionnaireDataView::$obj |
◆ $optionAnswers
QuestionnaireDataView::$optionAnswers |
◆ $optionDataView
QuestionnaireDataView::$optionDataView |
◆ $questions
QuestionnaireDataView::$questions |
◆ $responseCount
QuestionnaireDataView::$responseCount |
◆ $survey
QuestionnaireDataView::$survey |
◆ $textAnswers
QuestionnaireDataView::$textAnswers |
◆ $textDataView
QuestionnaireDataView::$textDataView |
The documentation for this class was generated from the following file: