| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Multidimensional Ethics Scale 2011

Page history last edited by Jeriel Jan del Prado 12 years, 11 months ago Saved with comment

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

  1. Create a database for your app
  2. Create a SQL user for your app that can use aforementioned database
  3. 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:

  • <sql host> -  the domain where the database is configured. think: connection string. In most cases, this is localhost or your website domain.

  • <sql user> - any user that can access the database. (I suggest making one.. don't use root!)
  • <sql password> - sql user's password
  • <sql database> - the name of the database where the table is located.

 

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.