-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
55 changed files
with
3,632 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/db/log/*.log | ||
/db/sql/*.bak | ||
/vendor/ | ||
/ruckusing.conf.local.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## Changelog ## | ||
|
||
|
||
### 0.0 ### | ||
* Init repo and files | ||
|
||
|
||
### 0.1 ### | ||
Initial release | ||
|
||
* Add shortcode for tests lists: wptlist | ||
* Edit tests, answers (global), scales, results and categories through admin | ||
* Edit tests questions and scores (question -> answer -> scale -> score value) | ||
* Show test page, allowing to redefine it's template if needed | ||
* Allow to send test form only when all questions selected | ||
* Show test results by scales totals | ||
* Add eysenck personality inventory example | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Wp-testing for developer | ||
|
||
## To regenerate README.md | ||
|
||
Changes should be in readme.txt, which then generates README.md by this: | ||
|
||
vendor/bin/wp2md convert < readme.txt > README.md | ||
|
||
* Validator is at http://wordpress.org/plugins/about/validator/ | ||
* Template is at https://wordpress.org/plugins/about/readme.txt | ||
* Good howto is at http://www.smashingmagazine.com/2011/11/23/improve-wordpress-plugins-readme-txt/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Wp-testing # | ||
|
||
**Contributors:** ustimenko | ||
**Donate link:** http://ustimen.co/ | ||
**Tags:** psychological, testing, test, quiz | ||
**Requires at least:** 3.2 | ||
**Tested up to:** 3.9 | ||
**Stable tag:** 0.1 | ||
**License:** GPLv3 | ||
**License URI:** http://www.gnu.org/licenses/gpl-3.0.html | ||
|
||
Helps to create psychological tests. | ||
|
||
## Installation ## | ||
|
||
1. Download plugin archive. | ||
1. Unzip it. | ||
1. Upload it to your plugins directory. It will create a 'wp-content/plugins/wp-testing/' directory. | ||
1. Activate the plugin through the 'Plugins' menu in WordPress. | ||
|
||
## Requirements ## | ||
|
||
* WordPress version **3.2** or higher. | ||
* PHP version **5.2.4** or higher. | ||
* MySQL version **5.0** or higher. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "garex/wp-testing", | ||
"description": "Helps to create psychological tests", | ||
"type": "wordpress-plugin", | ||
"license": "GPLv3", | ||
"authors": [{ | ||
"name": "Ustimenko Alexander", | ||
"email": "a@ustimen.co" | ||
} | ||
], | ||
"require": { | ||
"composer/installers": "~1.0.0" | ||
, "xrstf/composer-php52": "1.*" | ||
, "ruckusing/ruckusing-migrations": "~1.0" | ||
, "flourish/flourish": "0.9.*@dev" | ||
}, | ||
"require-dev": { | ||
}, | ||
"scripts": { | ||
"post-install-cmd": [ | ||
"xrstf\\Composer52\\Generator::onPostInstallCmd" | ||
], | ||
"post-update-cmd": [ | ||
"xrstf\\Composer52\\Generator::onPostInstallCmd" | ||
], | ||
"post-autoload-dump": [ | ||
"xrstf\\Composer52\\Generator::onPostInstallCmd" | ||
] | ||
}, | ||
"autoload": { | ||
"classmap": [ | ||
"src/" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
table.wpt_questions { | ||
width: 100%; | ||
} | ||
|
||
.wpt_questions .wpt_title input { | ||
width: 100%; | ||
} | ||
|
||
.wpt_questions .wpt_number { | ||
width: 1em; | ||
text-align: right; | ||
} | ||
|
||
.wpt_questions .wpt_scale { | ||
text-align: center; | ||
} | ||
|
||
.wpt_questions .wpt_scale input { | ||
text-align: center; | ||
width: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
.wpt_test .question { | ||
margin-bottom: 1.25em; | ||
} | ||
|
||
.wpt_test .question .title { | ||
font-weight: bold; | ||
} | ||
|
||
.wpt_test .question .title .number { | ||
font-weight: normal; | ||
display: inline-block; | ||
width: 3em; | ||
margin-left: -3.5em; | ||
padding-right: 0.5em; | ||
text-align: right; | ||
} | ||
|
||
.wpt_test .answer { | ||
padding-top: 0.25em; | ||
padding-left: 0.5em; | ||
} | ||
|
||
.wpt_test .answer label { | ||
margin-left: 0.25em; | ||
} | ||
|
||
.wpt_test .answer input { | ||
margin-top: -2px; | ||
vertical-align: middle; | ||
} | ||
|
||
.wpt_test .button { | ||
margin-top: 0.75em; | ||
} | ||
|
||
.wpt_test .button.disabled { | ||
opacity: 0.5; | ||
} | ||
|
||
.wpt_test .get_results .meter, | ||
.wpt_test .get_results .meter > span { | ||
-moz-border-radius: 6px; | ||
-webkit-border-radius: 6px; | ||
border-radius: 6px; | ||
position: relative; | ||
} | ||
.wpt_test .get_results .meter { | ||
height: 1.5em; | ||
margin-bottom: 1em; | ||
padding: 2px 1px; | ||
border: 1px solid highlight; | ||
} | ||
.wpt_test .get_results .meter > span { | ||
display: block; | ||
height: 100%; | ||
background: highlight; | ||
overflow: hidden; | ||
} | ||
.wpt_test .get_results .scale.scores { | ||
padding-left: 7px; | ||
padding-top: 2px; | ||
font-weight: bold; | ||
position: absolute; | ||
z-index: 1; | ||
} | ||
|
||
.wpt_test .get_results .content { | ||
color: gray; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
Aug 31 09:20:56 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:20:56 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:20:56 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:20:56 [info] CREATE TABLE `wp_t_tests` ( | ||
`id` int(11) UNSIGNED auto_increment NOT NULL, | ||
`title` varchar(255), | ||
PRIMARY KEY (`id`)) DEFAULT CHARSET=utf8; | ||
Aug 31 09:20:56 [info] INSERT INTO wp_t_schema_migrations (version) VALUES ('20140831002425') | ||
Aug 31 09:21:27 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:21:27 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:21:27 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:21:27 [info] DROP TABLE IF EXISTS `wp_t_tests` | ||
Aug 31 09:21:27 [info] DELETE FROM wp_t_schema_migrations WHERE version = '20140831002425' | ||
Aug 31 09:21:28 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:21:28 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:21:28 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:21:28 [info] CREATE TABLE `wp_t_tests` ( | ||
`id` int(11) UNSIGNED auto_increment NOT NULL, | ||
`title` varchar(255), | ||
PRIMARY KEY (`id`)) DEFAULT CHARSET=utf8; | ||
Aug 31 09:21:28 [info] INSERT INTO wp_t_schema_migrations (version) VALUES ('20140831002425') | ||
Aug 31 09:21:30 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:21:30 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:21:30 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:21:30 [info] DROP TABLE IF EXISTS `wp_t_tests` | ||
Aug 31 09:21:30 [info] DELETE FROM wp_t_schema_migrations WHERE version = '20140831002425' | ||
Aug 31 09:24:43 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:24:43 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:24:43 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:24:43 [info] CREATE TABLE `wp_t_tests` ( | ||
`id` int(11) UNSIGNED auto_increment NOT NULL, | ||
`title` varchar(255), | ||
PRIMARY KEY (`id`)) DEFAULT CHARSET=utf8; | ||
Aug 31 09:24:43 [info] INSERT INTO wp_t_schema_migrations (version) VALUES ('20140831002425') | ||
Aug 31 09:24:45 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:24:45 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:24:45 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:24:45 [info] DROP TABLE IF EXISTS `wp_t_tests` | ||
Aug 31 09:24:45 [info] DELETE FROM wp_t_schema_migrations WHERE version = '20140831002425' | ||
Aug 31 09:28:12 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:28:12 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:28:12 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:28:12 [info] CREATE TABLE `wp_t_tests` ( | ||
`id` int(11) UNSIGNED auto_increment NOT NULL, | ||
`title` varchar(255), | ||
PRIMARY KEY (`id`)) DEFAULT CHARSET=utf8; | ||
Aug 31 09:28:12 [info] INSERT INTO wp_t_schema_migrations (version) VALUES ('20140831002425') | ||
Aug 31 09:29:50 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:29:50 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:29:50 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:29:50 [info] DROP TABLE IF EXISTS `wp_t_tests` | ||
Aug 31 09:29:50 [info] DELETE FROM wp_t_schema_migrations WHERE version = '20140831002425' | ||
Aug 31 09:30:01 [info] CREATE TABLE `wp_t_schema_migrations` ( | ||
`version` varchar(255)) DEFAULT CHARSET=utf8; | ||
Aug 31 09:30:01 [info] CREATE UNIQUE INDEX idx_wp_t_schema_migrations_version ON `wp_t_schema_migrations`(`version`) | ||
Aug 31 09:30:01 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:30:01 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:30:01 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:30:01 [info] CREATE TABLE `wp_t_tests` ( | ||
`id` int(11) UNSIGNED auto_increment NOT NULL, | ||
`title` varchar(255), | ||
PRIMARY KEY (`id`)) DEFAULT CHARSET=utf8; | ||
Aug 31 09:30:01 [info] INSERT INTO wp_t_schema_migrations (version) VALUES ('20140831002425') | ||
Aug 31 09:32:59 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:32:59 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:32:59 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:32:59 [info] DROP TABLE IF EXISTS `wp_t_tests` | ||
Aug 31 09:32:59 [info] DELETE FROM wp_t_schema_migrations WHERE version = '20140831002425' | ||
Aug 31 09:32:59 [info] DROP TABLE IF EXISTS `wp_t_schema_migrations` | ||
Aug 31 09:33:08 [info] CREATE TABLE `wp_t_schema_migrations` ( | ||
`version` varchar(255)) DEFAULT CHARSET=utf8; | ||
Aug 31 09:33:08 [info] CREATE UNIQUE INDEX idx_wp_t_schema_migrations_version ON `wp_t_schema_migrations`(`version`) | ||
Aug 31 09:33:08 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:33:08 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:33:08 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:33:08 [info] CREATE TABLE `wp_t_tests` ( | ||
`id` int(11) UNSIGNED auto_increment NOT NULL, | ||
`title` varchar(255), | ||
PRIMARY KEY (`id`)) DEFAULT CHARSET=utf8; | ||
Aug 31 09:33:08 [info] INSERT INTO wp_t_schema_migrations (version) VALUES ('20140831002425') | ||
Aug 31 09:35:46 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:35:46 [info] SELECT version FROM wp_t_schema_migrations | ||
Aug 31 09:35:46 [info] SELECT version FROM wp_t_schema_migrations |
16 changes: 16 additions & 0 deletions
16
db/migrations/wp_testing/20140831002425_CreateTestsTable.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
class CreateTestsTable extends Ruckusing_Migration_Base | ||
{ | ||
public function up() | ||
{ | ||
$t = $this->create_table(WPT_DB_PREFIX . 'tests'); | ||
$t->column('title', 'string'); | ||
$t->finish(); | ||
} | ||
|
||
public function down() | ||
{ | ||
$this->drop_table(WPT_DB_PREFIX . 'tests'); | ||
} | ||
} |
Oops, something went wrong.