The Multidimensional Ethics Scale v0.4 BETA
written by: Jeriel Jan del Prado, licensed under the CPAL license.
Grab the code here: https://github.com/jerieljan/Ethics-Poll
Demonstration: http://www.jerieljan.com/Ethics-Survey
Screenshots: http://imgur.com/a/8oGzD
If there are any concerns, or you thought you stumbled onto something that isn't right, please comment below and I'll try my best to fix it. Thanks!
(or better yet, you're free to improve on the code, then send up a pull request at GitHub so I can incorporate your contributions to the master branch.)
What it does:
Allows you to make a simple survey based on the multidimensional ethics scale, using your own questions (shown later how) and actions.
You'll need these:
- A webserver / hosting solution that has:
- PHP4/5/6
- mySQL (preferably, through phpMyAdmin)
- Your hosting solution's connection string for your domain.
Setup:
If you've used the SQL-Addin for ECMI, then this should be a bit familiar:
Grab the code in my Github repo: https://github.com/jerieljan/Ethics-Poll
First, configure mySQL + PHPMyAdmin
- Create a database for your app
- Create a SQL user for your app that can use aforementioned database
- Insert the following SQL Queries below:
CREATE TABLE User
(
Username varchar(50) PRIMARY KEY,
Gender varchar(1),
Age int(11),
Email varchar(50)
)
Then...
CREATE TABLE Answer
(
AnswerID int PRIMARY KEY AUTO_INCREMENT,
Username varchar(50) REFERENCES User(Username),
QuestionNumber int NOT NULL,
QuestionType varchar(50) NOT NULL,
Score int NOT NULL
)
Second, edit results.php and edit these with your own:
Third, add your own scenarios and actions:
Edit the data.xml file. This will include all the scenarios that you want to be answered.
<scenario>
<title>Enter the title of the scenario here</title>
<text>Enter the text behind the scenario here</text>
<action>Enter the resulting action performed</action>
</scenario>
You can also edit the other XML entries there to customize the intro and exit text of the survey for you to use.
Finally, upload the files to your server. Then access default.php.
Done! To make sure everything is working properly, check your SQL databases and see if the tables have updated. If done correctly, it should look like the 1st and 2nd screenshots in the link below.
Screenshots are here
Comments (1)
Allan Castro said
at 6:19 pm on Apr 26, 2011
thx :D
You don't have permission to comment on this page.