CMS  Version 3.9
survey_data.inc
Go to the documentation of this file.
1 <?php
2 
3 /**************************************************************
4 
5 Copyright (c) 2007,2008 Sonjara, Inc
6 
7 Permission is hereby granted, free of charge, to any person
8 obtaining a copy of this software and associated documentation
9 files (the "Software"), to deal in the Software without
10 restriction, including without limitation the rights to use,
11 copy, modify, merge, publish, distribute, sublicense, and/or sell
12 copies of the Software, and to permit persons to whom the
13 Software is furnished to do so, subject to the following
14 conditions:
15 
16 The above copyright notice and this permission notice shall be
17 included in all copies or substantial portions of the Software.
18 
19 Except as contained in this notice, the name(s) of the above
20 copyright holders shall not be used in advertising or otherwise
21 to promote the sale, use or other dealings in this Software
22 without prior written authorization.
23 
24 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
26 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
28 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
29 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
30 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
31 OTHER DEALINGS IN THE SOFTWARE.
32 
33 *****************************************************************/
34 
35 /* survey_data.inc
36  *
37  * Description: Displays aggregate results of a survey.
38  *
39  * author: Janice Gallant for Sonjara, Inc.
40  *
41  * date: 5/13/10
42  */
43 
44 
45 Fakoli::using("questionnaire", "survey");
46 Fakoli::usingFeature("data_view");
47 
48 $survey_id = checkNumeric($_GET["survey_id"]);
49 
50 if(!$survey_id)
51  redirect("index");
52 
56 
58 
59 $page->page_title = "Graphical Data for {$survey->title}";
60 
61 $script .= $view->writeScript();
62 
63 $tabs->writeHTML();
64 ?>
65 <div id="survey_tab_border">
66 <h3>Aggregated Survey Results for <?echo $survey->title?></h3>
67 <?
68 echo "<h4>Responses Received</h4>";
69 echo $mgr->getProgressBar();
70 
71 $view->drawView();
72 ?></div>
73 <?
74 ?>
$page
Definition: help.inc:39
static usingFeature()
Uses the specified framework feature(s).
Definition: core.inc:388
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition: core.inc:116
Draws a graphical view of questionnaire/survey responses.
static surveyTabs($key="")
$mgr
Definition: survey_data.inc:54
$survey
Definition: survey_data.inc:53
$survey_id
Definition: survey_data.inc:48
$tabs
Definition: survey_data.inc:57
$view
Definition: survey_data.inc:55
$script
Definition: survey_data.inc:61