This application uses a MySQL database (separate from the database used for Liferay), the Spring Framework, Hibernate and JSP as the view technology.
You can use the same database used for Liferay but no effort has been made to avoid collision in table names at this time.
The Survey portlets are currently distributed as a WAR file which can be copied in the deploy/ directory of Liferay to be installed.
The configuration files are in the WAR bundle and you need to extract them, edit
the configuration parameters and put them back in.
Configure the database connection in hibernate.cfg.xml and hibernate.properties. See below in the WAR Configuration section.
At this time the IGI Survey portlets use a separate database. Create a new database (e.g. surveyportlet):
> create database surveyportlet character set = utf8;
You can use the same user you used for the Liferay installation. Otherwise, create a new user (e.g. liferay):
> create user liferay;
Grant permissions to the user on the newly created database (e.g. set password to password):
> grant all on surveyportlet.* to 'liferay'@'localhost' identified by 'password';
> grant all on surveyportlet.* to 'liferay'@'%' identified by 'password';
Create the DB tables with the relative script provided in the distribution package:
> mysql -u liferay -p surveyportlet < surveyportlet_db_schema-x.y.z.sql
NOTE After you download the WAR, change its name removing the version, i.e. from igiSurveyPortlet-x.y.z.war to igiSurveyPortlet.war. This is needed because otherwise when you upgrade, if you do not remember to manually remove the previous version, you risk having multiple installations of the same portlet and problems waiting to happen.
You need to change some configuration values in files inside the WAR.
To do so you need to extract the file, modify it and put it back into the WAR.
On Linux, this is easily done with the File Roller application. If you click on an archive, it will open it. If you click on a file and modify it, it will then ask you if you want to update the package.
What you need to change are:
You can also add a new language adding language files in /WEB-INF/classes.
If you do so, please send me the files so I can add them to the distribution.
NOTE Internationalization has not been tested but should work.
(Linux/UNIX) Set the owner/group on the WAR file to match your Tomcat user.
Copy the file into the deploy/ directory of Liferay (as in a standard Liferay portlet installation).
You will find the 2 portlets (IGI Survey Portlet Admin and IGI Take a Survey Portlet) in the Content Management category of the control bar on the top of the page once logged in as Liferay administrator (Add --> More --> Content Management).
Install the Survey Portlet (IGI Survey Portlet Admin) on a protected page while the IGI Take a Survey Portlet can go in any public page.
You're set!
Remove the whole directory igiSurveyPortlet from <CATALINA_HOME>/webapps.
For improved safety, clear the content of the <CATALINA_HOME>/work/Catalina/localhost/ and <CATALINA_HOME>/temp/.