55 "char_limit" =>
"Character Limit for Answer",
56 "num_rows" =>
"Number of Rows for Answer",
57 "options" =>
"Options for Answer",
58 "required" =>
"Answer Required",
78 $qTypes = Query::create(
QuestionType,
"ORDER BY sort_order")
81 if(count($qTypes) > 0)
83 $this->question_type_id = $qTypes[0]->question_type_id;
89 return ($this->question_type_id == 4) ?
true :
false;
94 return ($this->question_type_id == 3) ?
true :
false;
99 return ($this->question_type_id == 5) ?
true :
false;
104 return ($this->question_type_id == 2) ?
true :
false;
109 return ($this->question_type_id == 1) ?
true :
false;
114 return ($this->question_type_id == 6) ?
true :
false;
119 return ($this->question_type_id == 7) ?
true :
false;
126 return "<p><b><i>Note: </i>This question has been answered. You may edit the question but be careful not to change its meaning.</b></p>\n";
138 var
$fields = array (
"question_id" => Number,
139 "questionnaire_id" => Number,
140 "question_number" => Number,
141 "question_type_id" => Number,
143 "question_name" => String,
145 "required" => Number,
146 "char_limit" => Number,
147 "num_rows" => Number,
148 "context_help" => Text
175 if(!$this->question_id)
181 ->bind(
":question_id", $this->question_id)
182 ->executeValue(
"COUNT(1)");
192 if(!$this->question_id)
203 $this->table =
"question";
204 $this->primary_key =
"question_id";
206 $this->DataItem(func_get_args());
Defines the relations and functions required of a Question class that uses Questionnaire form and res...
setDefaultValues()
Sets the default values for a question object:
isEditable()
Returns true if the question can be edited and false if it cannot.
isEditable()
Returns true if the question can be edited and false if it cannot.
allowDelete()
Do not allow delete if there are answers linked to the question.
$table column("Redirect From", "<a href='redirect_form?redirect_id={redirect_id}'>{redirect_from}</a>", true, "width: 30%") -> column("Redirect To", "<a href='{redirect_to}' target='_blank'>{redirect_to}</a>", true, "width: 30%") ->column("Last Modified", "{last_modified}", true, "width: 20%; text-align: center") ->column("Override", "{ override true