Using the Survey Portlet in Liferay
Overview
A "survey" refers to a multiple page survey questionnaire, which is
usually shown in a maximized portlet view, while the normal portlet
view shows only a link inviting people to take the survey. A "poll"
refers to a one page questionnaire, which is displayed in the normal
portlet view and is replaced by poll results after voting.
Surveys and polls are created using the Cogix ViewsFlash application
and organized into "Places". A survey is scheduled to open and close at
given times. A Survey Portlet instance is configured to display the
survey, and then the portlet is included in the appropriate portal
pages.
After installation, two sample Places are pre-configured: Examples
and Polls. Use them to become familiar with the process of survey
creation, and then create
your surveys in your own Places, copying one of the sample Places.
To show a survey in the portal, a portlet instance is created.
Resource Permissions are applied to make the portlet available to the
intended audience and to allow its configuration by appropriate
personnel. Configuration determines what surveys are shown in the
portlet.
After a survey portlet instance is created and installed on a page,
it can be configured in one of three modes:
- To show one questionnaire to everyone. The same questionnaire is
shown until the portlet is re-configured.
- To show each user those questionnaires he has been invited to
fill out. The portlet is configured once, and then it displays links to
the open questionnaires to which the user is invited.
Each questionnaire specifies whether participation should be open to
everyone, or whether it should be restricted to specific users using
Invite Lists, as described
here.
- To show a rotating poll to everyone. Polls are created and
scheduled in advance, and portlet is configured once. At the appointed
times, the new poll is automatically shown in the portlet.
Deploying a survey portlet instance
- Logged in as the Liferay administrator, go to a page where the
Survey portlet should be deployed, pull down the menu, and click "Add
Application".
Expand the Undefined category, and click the Add button next to Survey:
- The Survey portlet will now appear, with a Configure link.
Configuring the portlet to show everyone a survey
- Click the Configure link on the survey portlet and select the
place where the survey was created, such as Examples. The page will
refresh with updated settings for that place. From the list of surveys,
select which one to show in this portlet. In the radio buttons, select
"as a link that opens in maximized mode ". Check the box labeled
"Display a link to view results" and choose the radio button for what
to show after the questionniare is completed. By default, visitors can
complete a questionnaire only once. Press Save.
- When done, click on "Return to portal".
- The Survey portlet is now ready for use. Log out and log in as a
typical user, and click on "take survey". The portlet will be
maximized, and successive survey pages will be presented. At the end, a
thank you message with an optional tabulation of results will be shown.
Click on the restore button and return to the portal, where the survey
invitation link will be replaced by a "survey already completed"
message.
Configuring the portlet to show an automatically rotating poll
- In the Survey portlet's Configure page, select Polls from the
drop-down menu. Click on Survey Setup. In the ViewsFlash application,
click on the Scheduled column link for the Health_Benefits poll, and in
its Publish page enter opening and closing dates in the near future.
The portal will automatically switch between polls at the designated
times. Return to the polls list by clicking on Polls at the top of the
page and repeat the procedure with the other poll. When finished, close
the ViewsFlash window, and fill out the page with the settings shown
below and press Save:
- Click on Return to portal. The new portlet will now show the
current poll. After a visitor votes in it, poll results will be shown
instead of the voting forms.
Configuring the portlet to show
each user all the surveys he or she has been invited to
- To conduct multiple surveys at the same time, the ViewsFlash
application must be installed using a database.
Go to the survey portlet Configure page. If it is, you will see "Show
all eligible" as an option in the top pull-down menu. Choose that
option and press Change:
- Click on Return to portal. The portlet will now show a link to
every survey that the logged in user has been invited to.
Creating your own surveys.
Go to the ViewsFlash application by clicking on the Configure link
when logged in with the appropriate rights and clicking on Survey
Setup. You can bookmark this page to access the ViewsFlash application
outside the portal. In Places, either use the pre-installed Examples
and Polls places, or copy one of them to create your own. Examples is
set up to manually schedule the survey that is served in the portlet,
and Polls is set up to rotate polls or surveys through the portlet
automatically. For complete details, see ViewsFlash options.
For information on creating portlets and surveys in multiple
languages, see Internationalization.