123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <?php
- require_once 'Resource.class.php';
- class SurveyQuestion extends Resource
- {
-
- var $survey_id;
-
- var $survey_question;
- var $survey_question_comment;
-
- var $survey_question_type;
-
- var $display;
-
- var $sort;
-
- var $shared_question_id;
-
- var $max_value;
-
- var $options;
-
- function __construct(
- $id,
- $survey_id,
- $survey_question,
- $survey_question_comment,
- $type,
- $display,
- $sort,
- $shared_question_id,
- $max_value
- ) {
- parent::__construct($id,RESOURCE_SURVEYQUESTION);
- $this->survey_id = $survey_id;
- $this->survey_question = $survey_question;
- $this->survey_question_comment = $survey_question_comment;
- $this->survey_question_type = $type;
- $this->display = $display;
- $this->sort = $sort;
- $this->shared_question_id = $shared_question_id;
- $this->max_value = $max_value;
- $this->answers = array();
- }
-
- function add_answer($option_text,$sort)
- {
- $answer = array();
- $answer['option_text'] = $option_text;
- $answer['sort'] = $sort;
- $this->answers[] = $answer;
- }
-
- function show()
- {
- parent::show();
- echo $this->survey_question;
- }
- }
|