Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezquestion.php
Go to the documentation of this file.
1 <?php
4 // include_once( "classes/ezdb.php" );
5 // // include_once( "classes/eznovissequence.php" );
6 // include_once( "ezsurvey/classes/ezquestionchoice.php" );
7 // include_once( "ezsurvey/classes/ezresponsequestion.php" );
8 // include_once( "ezsurvey/classes/ezresponse.php" );
9
10 class eZQuestion
11 {
12 // constructor
13 function __construct( $id = "-1" )
14 {
15 $this->SurveyID = 0;
16 $this->QuestionTypeID = 0;
17 $this->ResultID = 0;
18 $this->Length = 0;
19 $this->Position = 0;
20 $this->Content = 0;
21 $this->Initial = '';
22 $this->Required = 'N';
23 $this->Public = 'Y';
24
25 if ( $id != -1 )
26 {
27 $this->ID = $id;
28 $this->get( $this->ID );
29 }
30 }
31
32 function get( $id = "-1" )
33 {
34 $SqlQuery = "SELECT
35 ID,
36 SurveyID,
37 QuestionTypeID,
38 ResultID,
39 Length,
40 Position,
41 Content,
42 Initial,
43 Required,
44 Public
45 FROM
46 eZSurvey_Question
47 WHERE
48 ID = '$id'";
49
50 $db =& eZDB::globalDatabase();
51
52 $db->array_query( $question_array, $SqlQuery );
53 if ( count( $question_array ) > 1 )
54 {
55 die( "Error: More than one question with the same ID found." );
56 }
57 elseif ( count( $question_array ) == 1 )
58 {
59 $this->ID = $question_array[ 0 ][ "ID" ];
60 $this->SurveyID = $question_array[ 0 ][ "SurveyID" ];
61 $this->QuestionTypeID = $question_array[ 0 ][ "QuestionTypeID" ];
62 $this->ResultID = $question_array[ 0 ][ "ResultID" ];
63 $this->Length = $question_array[ 0 ][ "Length" ];
64 $this->Position = $question_array[ 0 ][ "Position" ];
65 $this->Content = $question_array[ 0 ][ "Content" ];
66 $this->Initial = $question_array[ 0 ][ "Initial" ];
67 $this->Required = $question_array[ 0 ][ "Required" ];
68 $this->Public = $question_array[ 0 ][ "Public" ];
69
70 // question type
71 $db->array_query( $questionType_array, "SELECT ResponseTable, HasChoices FROM eZSurvey_QuestionType WHERE ID = '$this->QuestionTypeID'" );
72
73 if ( count($questionType_array) > 0 )
74 {
75 $this->HasChoices = $questionType_array[ 0 ][ "HasChoices" ];
76 $this->ResponseTable = $questionType_array[ 0 ][ "ResponseTable" ];
77 }
78 else
79 {
80 $this->HasChoices = 'N';
81 }
82
83 return $this;
84 }
85
86 }
87
88 public static function getAll( $OrderBy = "ID", $SurveyID = "", $LimitStart = "None", $LimitBy = "None" )
89 {
90 $db =& eZDB::globalDatabase();
91
92 switch ( strtolower( $OrderBy ) )
93 {
94 case "name":
95 $OrderBy = "ORDER BY Name";
96 break;
97
98 case "position desc":
99 $OrderBy = "ORDER BY Position DESC";
100 break;
101
102 case "position":
103 $OrderBy = "ORDER BY Position";
104 break;
105
106 default:
107 $OrderBy = "ORDER BY ID";
108 break;
109 }
110
111 if ( is_numeric( $LimitStart ) )
112 {
113 $LimitArray = array( "Offset" => $LimitStart );
114
115 if ( is_numeric( $LimitBy ) )
116 {
117 $LimitArray =& array_merge( $LimitArray, array( "Limit" => $LimitBy ) );
118 }
119 }
120 else
121 {
122 $LimitArray = array();
123 }
124
125 $question_array = array();
126 $return_array = array();
127
128 $SQLQuery = "SELECT ID as A FROM eZSurvey_Question";
129
130 $SqlCond = "";
131
132 if ($SurveyID != "")
133 {
134 $SqlCond .= " SurveyID = '$SurveyID'";
135 }
136
137 if ($SqlCond != "")
138 {
139 $SQLQuery .= " WHERE $SqlCond";
140 }
141
142 $SQLQuery .= " $OrderBy";
143
144 $db->array_query( $question_array, $SQLQuery, $LimitArray );
145
146 foreach ( $question_array as $questionItem )
147 {
148 $return_array[] = new eZQuestion( $questionItem[ "A" ] );
149 }
150 return $return_array;
151 }
152
153 function store()
154 {
155 $ret = false;
156 $db =& eZDB::globalDatabase();
157 $db->begin();
158
159 if ( !isSet( $this->ID ) )
160 {
161 // create question
162 $db->lock( "eZSurvey_Question" );
163 $this->ID = $db->nextID( "eZSurvey_Question", "ID" );
164 $res[] = $db->query( "INSERT INTO eZSurvey_Question
165 (ID, SurveyID, QuestionTypeID, ResultID, Length, Position, Content, Initial, Required, Public )
166 VALUES
167 ('$this->ID',
168 '$this->SurveyID',
169 '$this->QuestionTypeID',
170 '$this->ResultID',
171 '$this->Length',
172 '$this->Position',
173 '$this->Content',
174 '$this->Initial',
175 '$this->Required',
176 '$this->Public'
177 )");
178
179 $db->unlock();
180 }
181 else
182 {
183 // update question
184 $db->lock( "eZSurvey_Question" );
185 $res[] = $db->query( "UPDATE eZSurvey_Question
186 SET SurveyID='$this->SurveyID',
187 QuestionTypeID='$this->QuestionTypeID',
188 ResultID='$this->ResultID',
189 Length='$this->Length',
190 Position='$this->Position',
191 Content='$this->Content',
192 Initial='$this->Initial',
193 Required='$this->Required',
194 Public='$this->Public'
195 WHERE ID='$this->ID'" );
196
197
198 $db->unlock();
199 }
200 $ret = $res;
201 eZDB::finish( $res, $db );
202 return true;
203 }
204
205 function delete()
206 {
207 $db =& eZDB::globalDatabase();
208 $db->begin();
209
210 eZResponseQuestion::deleteByQuestion( $this->ID );
211
212 $questionChoice_array = $this->questionChoices();
213 foreach ( $questionChoice_array as $questionChoiceItem )
214 {
215 $questionChoiceItem->delete();
216 }
217
218 $res[] = $db->query( "DELETE FROM eZSurvey_Question WHERE ID='$this->ID'" );
219
220 eZDB::finish( $res, $db );
221 }
222
223 function copyQuestion( $surveyID )
224 {
225 $newQuestion = new eZQuestion();
226
227 $newQuestion->setSurveyID( $surveyID );
228 $newQuestion->setQuestionTypeID( $this->QuestionTypeID );
229 $newQuestion->setResultID( $this->ResultID );
230 $newQuestion->setLength( $this->Length );
231 $newQuestion->setContent( $this->Content );
232 $newQuestion->setInitial( $this->Initial );
233 $newQuestion->setRequired( $this->Required );
234 $newQuestion->setPublic( $this->Public );
235 $newQuestion->setPosition( $this->Position );
236
237 $newQuestion->store();
238
239 return $newQuestion;
240 }
241
242 public static function questionTypes()
243 {
244 $SqlQuery = "SELECT ID, Type FROM eZSurvey_QuestionType";
245
246 $db =& eZDB::globalDatabase();
247
248 $db->array_query( $type_array, $SqlQuery );
249
250 return $type_array;
251 }
252
253 function questionChoices( $OrderBy = "ID" )
254 {
255 $SqlQuery = "SELECT ID
256 FROM
257 eZSurvey_QuestionChoice
258 WHERE
259 QuestionID = '$this->ID'
260 ORDER BY
261 $OrderBy";
262
263 $db =& eZDB::globalDatabase();
264
265 $db->array_query( $questionChoice_array, $SqlQuery );
266
267 $return_array = array();
268
269 foreach( $questionChoice_array as $questionItem )
270 {
271 $return_array[] = new eZQuestionChoice( $questionItem[ "ID" ] );
272 }
273
274 return $return_array;
275 }
276
277 function numberOfQuestionsChoices()
278 {
279 $db =& eZDB::globalDatabase();
280
281 $db->array_query( $count, "SELECT count(*) as A FROM eZSurvey_QuestionChoice WHERE QuestionID = " . $this->ID );
282
283 return $count[ 0 ][ "A" ];
284 }
285
286 function questionNumber()
287 {
288 $db =& eZDB::globalDatabase();
289
290 $SqlQuery = "SELECT count(*) as A FROM eZSurvey_Question
291 WHERE SurveyID = '" . $this->SurveyID . "'
292 AND Position <= '" . $this->Position . "'
293 AND QuestionTypeID != '" . $this->TYPE_PAGEBREAK . "'
294 AND QuestionTypeID != '" . $this->TYPE_SECTIONTEXT . "'";
295
296 $db->array_query( $count, $SqlQuery );
297
298 return $count[ 0 ][ "A" ];
299 }
300
301 function questionUp()
302 {
303 $SqlQuery = "SELECT
304 ID
305 FROM
306 eZSurvey_Question
307 WHERE
308 SurveyID = '$this->SurveyID'
309 and Position < '$this->Position'
310 ORDER BY
311 Position DESC";
312
313 $db =& eZDB::globalDatabase();
314
315 $db->array_query( $question_array, $SqlQuery, Array( "Offset" => 0, "Limit" => 1 ) );
316
317 if ( count($question_array) > 0 )
318 {
319 $ret = new eZQuestion( $question_array[0][ "ID" ] );
320 }
321 else
322 {
323 // retorna a �ltima pergunta se n�o existir nenhuma acima desta
324 $question_array = $this->getAll( "Position DESC", $this->SurveyID, "0", "1" );
325 $ret = new eZQuestion( $question_array[0]->id() );
326 }
327
328 return $ret;
329 }
330
331 function moveUp()
332 {
333 $question = $this->questionUp();
334
335 //echo "up: " . $question->content();
336
337 $temp = $this->Position;
338 $this->Position = $question->position();
339 $question->setPosition( $temp );
340
341 $question->store();
342 $this->store();
343 }
344
345 function questionDown()
346 {
347 $SqlQuery = "SELECT
348 ID
349 FROM
350 eZSurvey_Question
351 WHERE
352 SurveyID = '$this->SurveyID'
353 and Position > '$this->Position'
354 ORDER BY
355 Position";
356
357 $db =& eZDB::globalDatabase();
358
359 $db->array_query( $question_array, $SqlQuery, Array( "Offset" => 0, "Limit" => 1 ) );
360
361 if ( count($question_array) > 0 )
362 {
363 $ret = new eZQuestion( $question_array[0][ "ID" ] );
364 }
365 else
366 {
367 // retorna a primeira pergunta se n�o existir nenhuma abaixo desta
368 $question_array = $this->getAll( "Position", $this->SurveyID, "0", "1" );
369 $ret = new eZQuestion( $question_array[0]->id() );
370 }
371
372 return $ret;
373 }
374
375 function moveDown()
376 {
377 $question = $this->questionDown();
378
379 //echo "up: " . $question->content();
380
381 $temp = $this->Position;
382 $this->Position = $question->position();
383 $question->setPosition( $temp );
384
385 $question->store();
386 $this->store();
387 }
388
389 function isRequired()
390 {
391 if ( $this->Required == 'Y' )
392 return true;
393 else
394 return false;
395 }
396
397 function isQuestion()
398 {
399 switch ( $this->QuestionTypeID )
400 {
401 case $this->TYPE_SECTIONTEXT:
402 case $this->TYPE_PAGEBREAK:
403 {
404 $res = false;
405 }
406 break;
407
408 default:
409 {
410 $res = true;
411 }
412 }
413
414 return $res;
415 }
416
417 function hasChoices()
418 {
419 if ( $this->HasChoices == 'Y' )
420 return true;
421 else
422 return false;
423 }
424
425 function hasDefault()
426 {
427 if ( $this->QuestionTypeID == 0 // no type
428 || $this->QuestionTypeID == $this->TYPE_RATE
429 || $this->QuestionTypeID == $this->TYPE_DATE
430 || $this->QuestionTypeID == $this->TYPE_PAGEBREAK
431 || $this->QuestionTypeID == $this->TYPE_SECTIONTEXT )
432 return false;
433 else
434 return true;
435 }
436
437 function hasSize()
438 {
439 switch ( $this->QuestionTypeID )
440 {
441 case $this->TYPE_TEXTBOX:
442 case $this->TYPE_TEXTAREA:
443 case $this->TYPE_RADIO:
444 case $this->TYPE_CHECKBOX:
445 case $this->TYPE_DATE:
446 case $this->TYPE_NUMERIC:
447 {
448 $res = true;
449 }
450 break;
451
452 default:
453 {
454 $res = false;
455 }
456 }
457
458 return $res;
459 }
460
461 function hasName()
462 {
463 switch ( $this->QuestionTypeID )
464 {
465 case $this->TYPE_PAGEBREAK:
466 {
467 $res = false;
468 }
469 break;
470
471 default:
472 {
473 $res = true;
474 }
475 }
476
477 return $res;
478 }
479
480 function hasRequired()
481 {
482 switch ( $this->QuestionTypeID )
483 {
484 case $this->TYPE_PAGEBREAK:
485 case $this->TYPE_SECTIONTEXT:
486 {
487 $res = false;
488 }
489 break;
490
491 default:
492 {
493 $res = true;
494 }
495 }
496
497 return $res;
498 }
499
500
501 function hasStats()
502 {
503 switch ( $this->QuestionTypeID )
504 {
505 case $this->TYPE_TEXTBOX:
506 case $this->TYPE_TEXTAREA:
507 case $this->TYPE_DATE:
508 case $this->TYPE_PAGEBREAK:
509 case $this->TYPE_SECTIONTEXT:
510 {
511 $res = false;
512 }
513 break;
514
515 default:
516 {
517 $res = true;
518 }
519 }
520
521 return $res;
522 }
523
524 function stats()
525 {
526 $db =& eZDB::globalDatabase();
527
528 $questionChoices = $this->questionChoices();
529 $numberResponses = eZResponse::numberOfResponses( $this->SurveyID );
530
531 switch ( $this->QuestionTypeID )
532 {
533 case $this->TYPE_YESNO:
534 {
535 // Yes
536 $SqlQuery = "SELECT ChoiceID, count(*) as A from eZSurvey_ResponseBool WHERE QuestionID = '$this->ID' AND ChoiceID = 'Y' GROUP BY ChoiceID";
537 $db->array_query( $question_array, $SqlQuery );
538
539 $return_array[0][] = $question_array[ 0 ][ "ChoiceID" ];
540 $return_array[1][] = "Yes";
541 $return_array[2][] = $question_array[ 0 ][ "A" ];
542 if ( $numberResponses > 0 )
543 $return_array[3][] = ($question_array[ 0 ][ "A" ] / $numberResponses) * 100;
544 else
545 $return_array[3][] = 0;
546
547 // No
548 $SqlQuery = "SELECT ChoiceID, count(*) as A from eZSurvey_ResponseBool WHERE QuestionID = '$this->ID' AND ChoiceID = 'N' GROUP BY ChoiceID";
549 $db->array_query( $question_array, $SqlQuery );
550
551 $return_array[0][] = $question_array[ 0 ][ "ChoiceID" ];
552 $return_array[1][] = "No";
553 $return_array[2][] = $question_array[ 0 ][ "A" ];
554 if ( $numberResponses > 0 )
555 $return_array[3][] = ($question_array[ 0 ][ "A" ] / $numberResponses) * 100;
556 else
557 $return_array[3][] = 0;
558 }
559 break;
560
561 case $this->TYPE_RADIO:
562 case $this->TYPE_DROPDOWN:
563 {
564 foreach ( $questionChoices as $choiceItem )
565 {
566 $db->array_query( $question_array, "SELECT count(*) as A from eZSurvey_ResponseSingle WHERE QuestionID = '$this->ID' and ChoiceID = '" . $choiceItem->id() . "'" );
567
568 $return_array[0][] = $choiceItem->id();
569
570 if ( $choiceItem->isOther() )
571 $return_array[1][] = "Other";
572 else
573 $return_array[1][] = $choiceItem->content();
574
575 $return_array[2][] = $question_array[0][ "A" ];
576 if ( $numberResponses > 0 )
577 $return_array[3][] = ($question_array[ 0 ][ "A" ] / $numberResponses) * 100;
578 else
579 $return_array[3][] = 0;
580 }
581 }
582 break;
583
584 case $this->TYPE_CHECKBOX:
585 {
586 foreach ( $questionChoices as $choiceItem )
587 {
588 $db->array_query( $question_array, "SELECT count(*) as A from eZSurvey_ResponseMultiple WHERE QuestionID = '$this->ID' and ChoiceID = '" . $choiceItem->id() . "'" );
589
590 $return_array[0][] = $choiceItem->id();
591
592 if ( $choiceItem->isOther() )
593 $return_array[1][] = "Other";
594 else
595 $return_array[1][] = $choiceItem->content();
596
597 $return_array[2][] = $question_array[0][ "A" ];
598 if ( $numberResponses > 0 )
599 $return_array[3][] = ($question_array[ 0 ][ "A" ] / $numberResponses) * 100;
600 else
601 $return_array[3][] = 0;
602 }
603 }
604 break;
605
606 case $this->TYPE_RATE:
607 {
608 foreach ( $questionChoices as $choiceItem )
609 {
610 $db->array_query( $question_array, "SELECT ChoiceID, AVG(Rank)+1 as A from eZSurvey_ResponseRank WHERE QuestionID = '$this->ID' AND ChoiceID = '" . $choiceItem->id() . "' GROUP BY ChoiceID" );
611
612 $return_array[0][] = $choiceItem->id();
613 $return_array[1][] = $choiceItem->content();
614 $return_array[2][] = $question_array[0][ "A" ];
615 $return_array[3][] = ($question_array[ 0 ][ "A" ] / 5) * 100;
616 }
617 }
618 break;
619
620 case $this->TYPE_NUMERIC:
621 {
622 $SqlQuery = "SELECT ChoiceID, AVG(Response) as A from eZSurvey_ResponseText WHERE QuestionID = '$this->ID' GROUP BY ChoiceID ORDER BY ChoiceID";
623 $db->array_query( $question_array, $SqlQuery );
624
625 $return_array[0][] = $question_array[0][ "ChoiceID" ];
626 $return_array[1][] = "";
627 $return_array[2][] = $question_array[0][ "A" ];
628 }
629 break;
630 }
631
632 return $return_array;
633 }
634
635 // get functions
636 function id() { return $this->ID; }
637 function surveyId() { return $this->SurveyID; }
638 function questionTypeID() { return $this->QuestionTypeID; }
639 function resultID() { return $this->ResultID; }
640 function length() { return $this->Length; }
641 function position() { return $this->Position; }
642 function content() { return $this->Content; }
643 function initial() { return $this->Initial; }
644 function required() { return $this->Required; }
645 function public() { return $this->Public; }
646
647 function responseTable() { return $this->ResponseTable; }
648
649 // set functions
650 function setSurveyID( $value ) { $this->SurveyID = $value; }
651 function setQuestionTypeID( $value ) { $this->QuestionTypeID = $value; }
652 function setResultID( $value ) { $this->ResultID = $value; }
653 function setLength( $value ) { $this->Length = $value; }
654 //function setPosition( $value ) { $this->Position = $value; }
655 function setContent( $value ) { $this->Content = $value; }
656 function setInitial( $value ) { $this->Initial = $value; }
657 function setRequired( $value ) { $this->Required = $value; }
658 function setPublic( $value ) { $this->Public = $value; }
659
660 function setPosition( $value = "" )
661 {
662 if ( $value != "" )
663 {
664 $this->Position = $value;
665 }
666 else
667 {
668 //$this->Position = eZNovisSequence::GetNextValue( "QuestionPosition" );
669 $db =& eZDB::globalDatabase();
670 $db->lock( "eZSurvey_Question" );
671 $this->Position = $db->nextID( "eZSurvey_Question", "Position" );
672 $db->unlock();
673 }
674 }
675
676 var $ID;
677 var $SurveyId;
678 var $SurveyID;
679 var $QuestionTypeID;
680 var $ResultID;
681 var $Length;
682 var $Position;
683 var $Content;
684 var $Initial;
685 var $Required;
686 var $Public;
687
688 // question type
689 var $HasChoices;
690 var $ResponseTable;
691
692 // Types
693 var $TYPE_YESNO = "1";
694 var $TYPE_TEXTBOX = "2";
695 var $TYPE_TEXTAREA = "3";
696 var $TYPE_RADIO = "4";
697 var $TYPE_CHECKBOX = "5";
698 var $TYPE_DROPDOWN = "6";
699 var $TYPE_RATE = "8";
700 var $TYPE_DATE = "9";
701 var $TYPE_NUMERIC = "10";
702 var $TYPE_PAGEBREAK = "99";
703 var $TYPE_SECTIONTEXT = "100";
704
705 var $TABLE_BOOL = "eZResponseBool";
706 var $TABLE_TEXT = "eZResponseText";
707 var $TABLE_SINGLE = "eZResponseSingle";
708 var $TABLE_MULTIPLE = "eZResponseMultiple";
709 var $TABLE_RANK = "eZResponseRank";
710 var $TABLE_DATE = "eZResponseDate";
711 }
712
713 ?>
eZDB\finish
static finish(&$resultArray, &$db)
Definition: ezdb.php:204
eZDB\globalDatabase
static & globalDatabase()
Definition: ezdb.php:134
eZQuestion
Definition: ezquestion.php:11
eZQuestion\responseTable
function responseTable()
Definition: ezquestion.php:647
eZQuestion\hasStats
hasStats()
Definition: ezquestion.php:501
eZQuestion\setPublic
setPublic( $value)
Definition: ezquestion.php:658
eZQuestion\stats
stats()
Definition: ezquestion.php:524
eZQuestion\setInitial
setInitial( $value)
Definition: ezquestion.php:656
eZQuestion\$Position
$Position
Definition: ezquestion.php:682
eZQuestion\hasRequired
hasRequired()
Definition: ezquestion.php:480
eZQuestion\surveyId
surveyId()
Definition: ezquestion.php:637
eZQuestion\$QuestionTypeID
$QuestionTypeID
Definition: ezquestion.php:679
eZQuestion\$TABLE_MULTIPLE
$TABLE_MULTIPLE
Definition: ezquestion.php:708
eZQuestion\hasChoices
hasChoices()
Definition: ezquestion.php:417
eZQuestion\$ID
$ID
Definition: ezquestion.php:676
eZQuestion\$TYPE_RADIO
$TYPE_RADIO
Definition: ezquestion.php:696
eZQuestion\$TYPE_NUMERIC
$TYPE_NUMERIC
Definition: ezquestion.php:701
eZQuestion\content
content()
Definition: ezquestion.php:642
eZQuestion\resultID
resultID()
Definition: ezquestion.php:639
eZQuestion\setRequired
setRequired( $value)
Definition: ezquestion.php:657
eZQuestion\questionTypeID
questionTypeID()
Definition: ezquestion.php:638
eZQuestion\hasName
hasName()
Definition: ezquestion.php:461
eZQuestion\$ResultID
$ResultID
Definition: ezquestion.php:680
eZQuestion\$TYPE_TEXTAREA
$TYPE_TEXTAREA
Definition: ezquestion.php:695
eZQuestion\setSurveyID
setSurveyID( $value)
Definition: ezquestion.php:650
eZQuestion\copyQuestion
copyQuestion( $surveyID)
Definition: ezquestion.php:223
eZQuestion\$TYPE_RATE
$TYPE_RATE
Definition: ezquestion.php:699
eZQuestion\getAll
static getAll( $OrderBy="ID", $SurveyID="", $LimitStart="None", $LimitBy="None")
Definition: ezquestion.php:88
eZQuestion\__construct
__construct( $id="-1")
Definition: ezquestion.php:13
eZQuestion\$TYPE_DROPDOWN
$TYPE_DROPDOWN
Definition: ezquestion.php:698
eZQuestion\setQuestionTypeID
setQuestionTypeID( $value)
Definition: ezquestion.php:651
eZQuestion\$SurveyId
$SurveyId
Definition: ezquestion.php:677
eZQuestion\$TYPE_PAGEBREAK
$TYPE_PAGEBREAK
Definition: ezquestion.php:702
eZQuestion\$Content
$Content
Definition: ezquestion.php:683
eZQuestion\questionNumber
questionNumber()
Definition: ezquestion.php:286
eZQuestion\isRequired
isRequired()
Definition: ezquestion.php:389
eZQuestion\$Required
$Required
Definition: ezquestion.php:685
eZQuestion\$Initial
$Initial
Definition: ezquestion.php:684
eZQuestion\required
required()
Definition: ezquestion.php:644
eZQuestion\$Length
$Length
Definition: ezquestion.php:681
eZQuestion\$TABLE_SINGLE
$TABLE_SINGLE
Definition: ezquestion.php:707
eZQuestion\$SurveyID
$SurveyID
Definition: ezquestion.php:678
eZQuestion\initial
initial()
Definition: ezquestion.php:643
eZQuestion\questionTypes
static questionTypes()
Definition: ezquestion.php:242
eZQuestion\$TYPE_DATE
$TYPE_DATE
Definition: ezquestion.php:700
eZQuestion\$TYPE_SECTIONTEXT
$TYPE_SECTIONTEXT
Definition: ezquestion.php:703
eZQuestion\numberOfQuestionsChoices
numberOfQuestionsChoices()
Definition: ezquestion.php:277
eZQuestion\position
position()
Definition: ezquestion.php:641
eZQuestion\setResultID
setResultID( $value)
Definition: ezquestion.php:652
eZQuestion\questionChoices
questionChoices( $OrderBy="ID")
Definition: ezquestion.php:253
eZQuestion\$TYPE_TEXTBOX
$TYPE_TEXTBOX
Definition: ezquestion.php:694
eZQuestion\moveDown
moveDown()
Definition: ezquestion.php:375
eZQuestion\length
length()
Definition: ezquestion.php:640
eZQuestion\setPosition
setPosition( $value="")
Definition: ezquestion.php:660
eZQuestion\$Public
$Public
Definition: ezquestion.php:686
eZQuestion\$TYPE_YESNO
$TYPE_YESNO
Definition: ezquestion.php:693
eZQuestion\$TABLE_RANK
$TABLE_RANK
Definition: ezquestion.php:709
eZQuestion\$ResponseTable
$ResponseTable
Definition: ezquestion.php:690
eZQuestion\setLength
setLength( $value)
Definition: ezquestion.php:653
eZQuestion\$TABLE_TEXT
$TABLE_TEXT
Definition: ezquestion.php:706
eZQuestion\$TYPE_CHECKBOX
$TYPE_CHECKBOX
Definition: ezquestion.php:697
eZQuestion\questionDown
questionDown()
Definition: ezquestion.php:345
eZQuestion\$TABLE_DATE
$TABLE_DATE
Definition: ezquestion.php:710
eZQuestion\hasSize
hasSize()
Definition: ezquestion.php:437
eZQuestion\moveUp
moveUp()
Definition: ezquestion.php:331
eZQuestion\setContent
setContent( $value)
Definition: ezquestion.php:655
eZQuestion\id
id()
Definition: ezquestion.php:636
eZQuestion\store
store()
Definition: ezquestion.php:153
eZQuestion\questionUp
questionUp()
Definition: ezquestion.php:301
eZQuestion\$TABLE_BOOL
$TABLE_BOOL
Definition: ezquestion.php:705
eZQuestion\isQuestion
isQuestion()
Definition: ezquestion.php:397
eZQuestion\$HasChoices
$HasChoices
Definition: ezquestion.php:689
eZQuestion\hasDefault
hasDefault()
Definition: ezquestion.php:425
eZResponseQuestion\deleteByQuestion
static deleteByQuestion( $QuestionID)
Definition: ezresponsequestion.php:326
eZResponse\numberOfResponses
static numberOfResponses( $surveyId="")
Definition: ezresponse.php:101
$id
$id
Definition: companytypelist.php:193
$question
$question
Definition: default.php:43
$db
$db
Definition: ezarticle/user/authorlist.php:53
eZQuestionChoice
Class eZQuestionChoice
Definition: ezquestionchoice.php:5
$ret
$ret
Definition: ezsitemanager/admin/filelist.php:88
$res
$res
Definition: ezstats/admin/cron.php:45
$count
$count
Definition: onlinetypelist.php:108
$question_array
$question_array
Definition: preview.php:88
$OrderBy
$OrderBy
Definition: reciverpopup.php:21
$questionChoice_array
$questionChoice_array
Definition: values.php:69
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.