CMS
Version 3.9
survey_question_graphs.inc
Go to the documentation of this file.
1
<?php
2
/**************************************************************
3
4
Copyright (c) 2007,2008 Sonjara, Inc
5
6
Permission is hereby granted, free of charge, to any person
7
obtaining a copy of this software and associated documentation
8
files (the "Software"), to deal in the Software without
9
restriction, including without limitation the rights to use,
10
copy, modify, merge, publish, distribute, sublicense, and/or sell
11
copies of the Software, and to permit persons to whom the
12
Software is furnished to do so, subject to the following
13
conditions:
14
15
The above copyright notice and this permission notice shall be
16
included in all copies or substantial portions of the Software.
17
18
Except as contained in this notice, the name(s) of the above
19
copyright holders shall not be used in advertising or otherwise
20
to promote the sale, use or other dealings in this Software
21
without prior written authorization.
22
23
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
25
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
27
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
28
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
30
OTHER DEALINGS IN THE SOFTWARE.
31
32
*****************************************************************/
33
39
Fakoli::using
(
"questionnaire"
,
"survey"
);
40
41
$questions
= Query::create(
SurveyQuestion
,
"WHERE question_type_id != 7 AND survey_question_id IN (SELECT survey_question_id FROM survey_question_xref WHERE survey_id IN (SELECT survey_id FROM survey where deleted=false))"
)->execute();
42
43
$table
=
new
DataListView(
$xrefs
,
"SurveyQuestions"
);
44
$table
->column(
"Question"
,
"{Question.question}"
)
45
->column(
"Question Type"
,
"{QuestionType.name}"
,
false
,
"width: 15%"
)
46
->column(
"Options"
, array(
QuestionTableHelper
, formatOptions))
47
->column(
"Answers"
,
""
)
48
->column(
"Graph"
,
""
)
49
;
50
51
$table
->emptyMessage =
"There are no questions defined."
;
52
$table
->sortable =
true
;
53
$table
->cssStyle =
"width: 100%"
;
54
55
$script
.=
$table
->writeScript();
56
57
$table
->drawView();
58
59
?>
Fakoli\using
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition:
core.inc:116
QuestionTableHelper
Definition:
question_helper.inc:42
SurveyQuestion
Definition:
survey_question.inc:43
$questions
$questions
Definition:
survey_question_graphs.inc:41
$table
$table
Definition:
survey_question_graphs.inc:43
$script
$script
Definition:
survey_question_graphs.inc:55
$xrefs
$xrefs
Definition:
survey_questions.inc:59
code
cms.sonjara.com
cms
components
survey
pages
survey_question_graphs.inc
Generated on Tue Mar 23 2021 15:36:14 for CMS by
1.9.1