Definition at line 411 of file question_renderer.inc.
◆ drawGraph()
RatingView::drawGraph |
( |
|
$mgr, |
|
|
|
$answers |
|
) |
| |
Draws an interactive graphical view of answers to one question.
- Parameters
-
obj | $mgr | - object of the Survey/Questionnaire Results manager class |
Array | $answers | - all survey or questionnaire answers to this question |
Definition at line 502 of file question_renderer.inc.
static drawRatingsGraph($question, $resultsManager, $answers)
Draws an interactive graphical view of answers to one question.
◆ drawView()
◆ getAnswer()
RatingView::getAnswer |
( |
| ) |
|
Reimplemented from QuestionField.
Definition at line 453 of file question_renderer.inc.
457 $valueAnswer = $this->parent->getAnswer($this->question);
459 $answer =
"{$valueAnswer} rating on scale of $steps $from – $to";
$answer
The answer to the question obj.
static getOptions($options, &$from, &$to, &$steps)
◆ getOptions()
static RatingView::getOptions |
( |
|
$options, |
|
|
& |
$from, |
|
|
& |
$to, |
|
|
& |
$steps |
|
) |
| |
|
static |
◆ getRequiredValidator()
RatingView::getRequiredValidator |
( |
| ) |
|
Reimplemented from QuestionField.
Definition at line 485 of file question_renderer.inc.
489 $pk = $this->question->getPrimaryKey();
490 $answer = ($this->parent->readOnlyForm) ? $this->answer :
"";
491 $question_number = $this->question->question_number ? $this->question->question_number : $this->parent->mgr->getQuestionNumber($this->question);
◆ getSpreadsheetAnswer()
RatingView::getSpreadsheetAnswer |
( |
| ) |
|
◆ RatingView()
RatingView::RatingView |
( |
|
$parent, |
|
|
|
$question |
|
) |
| |
Definition at line 413 of file question_renderer.inc.
QuestionField($parent, $question)
$question
The question renderer obj.
$parent
The parent QuestionForm obj.
◆ writeHTML()
RatingView::writeHTML |
( |
| ) |
|
Reimplemented from QuestionField.
Definition at line 418 of file question_renderer.inc.
420 list(
$from,
$to, $steps) = explode(
"\n", $this->question->options);
422 if (!
$to)
$to =
"Highest";
423 if (!$steps) $steps = 5;
426 $readonly = $this->parent->readOnlyForm ?
" disabled='disabled'" :
"";
427 $valueAnswer = $this->parent->getAnswer($this->question);
429 $qPk = $this->question->getPrimaryKey();
431 $tip = $this->question->context_help;
434 $tip =
" onmouseover=\"showTextToolTip('question_{$this->question->$qPk}', event, 'question_help', '".jsSafe($tip).
"'); return false;\" onmouseout=\"hideToolTip('question_help');return false\" ";
436 echo
"<div$tip>$from ";
438 for($i = 1; $i <= $steps; ++$i)
440 $selected = ($valueAnswer == $i) ?
" checked" :
"";
442 echo
"<input type='radio' style='border: none' name='question_{$this->question->$qPk}'
443 id='question_{$this->question->$qPk}_$i'
444 value='$i'$selected $readonly /> ";
448 echo
"<input type=\"hidden\" name=\"count_question_{$this->question->$qPk}\" value=\"$steps\">";
$readonly
Whether the questions should be drawn readonly.
The documentation for this class was generated from the following file: