Version Description
- Bugfix: Cloze choice and assessment
- Bugfix: Email sending
Download this release
Release Info
Developer | xeno010 |
Plugin | Wp-Pro-Quiz |
Version | 0.26 |
Comparing to | |
See all releases |
Code changes from version 0.25 to 0.26
- lib/controller/WpProQuiz_Controller_Question.php +2 -2
- lib/controller/WpProQuiz_Controller_Quiz.php +2 -2
- lib/helper/WpProQuiz_Helper_DbUpgrade.php +49 -1
- lib/helper/WpProQuiz_Helper_Upgrade.php +1 -0
- lib/view/WpProQuiz_View_QuizOverall.php +1 -1
- lib/view/WpProQuiz_View_WpqSupport.php +1 -1
- readme.txt +6 -2
- wp-pro-quiz.php +2 -2
lib/controller/WpProQuiz_Controller_Question.php
CHANGED
@@ -307,7 +307,7 @@ class WpProQuiz_Controller_Question extends WpProQuiz_Controller_Controller {
|
|
307 |
$match = 1;
|
308 |
|
309 |
$points += $match;
|
310 |
-
$maxPoints = max($maxPoints, $
|
311 |
}
|
312 |
|
313 |
return array('points' => $points, 'maxPoints' => $maxPoints, 'answerData' => array(new WpProQuiz_Model_AnswerTypes($post['answerData']['cloze'])));
|
@@ -323,7 +323,7 @@ class WpProQuiz_Controller_Question extends WpProQuiz_Controller_Controller {
|
|
323 |
preg_match_all('#\[([^\|\]]+)(?:\|(\d+))?\]#im', $match, $ms);
|
324 |
|
325 |
$points += count($ms[1]);
|
326 |
-
$maxPoints = max($maxPoints, $
|
327 |
}
|
328 |
|
329 |
return array('points' => $points, 'maxPoints' => $maxPoints, 'answerData' => array(new WpProQuiz_Model_AnswerTypes($post['answerData']['assessment'])));
|
307 |
$match = 1;
|
308 |
|
309 |
$points += $match;
|
310 |
+
$maxPoints = max($maxPoints, $match);
|
311 |
}
|
312 |
|
313 |
return array('points' => $points, 'maxPoints' => $maxPoints, 'answerData' => array(new WpProQuiz_Model_AnswerTypes($post['answerData']['cloze'])));
|
323 |
preg_match_all('#\[([^\|\]]+)(?:\|(\d+))?\]#im', $match, $ms);
|
324 |
|
325 |
$points += count($ms[1]);
|
326 |
+
$maxPoints = max($maxPoints, count($ms[1]));
|
327 |
}
|
328 |
|
329 |
return array('points' => $points, 'maxPoints' => $maxPoints, 'answerData' => array(new WpProQuiz_Model_AnswerTypes($post['answerData']['assessment'])));
|
lib/controller/WpProQuiz_Controller_Quiz.php
CHANGED
@@ -505,8 +505,8 @@ class WpProQuiz_Controller_Quiz extends WpProQuiz_Controller_Controller {
|
|
505 |
remove_filter('wp_mail_content_type', array($this, 'htmlEmailContent'));
|
506 |
}
|
507 |
|
508 |
-
if($quiz->getEmailNotification()
|
509 |
-
&& $quiz->getEmailNotification()
|
510 |
|
511 |
$msg = str_replace(array_keys($r), $r, $adminEmail['message']);
|
512 |
|
505 |
remove_filter('wp_mail_content_type', array($this, 'htmlEmailContent'));
|
506 |
}
|
507 |
|
508 |
+
if($quiz->getEmailNotification() == WpProQuiz_Model_Quiz::QUIZ_EMAIL_NOTE_ALL
|
509 |
+
|| (get_current_user_id() > 0 && $quiz->getEmailNotification() == WpProQuiz_Model_Quiz::QUIZ_EMAIL_NOTE_REG_USER)) {
|
510 |
|
511 |
$msg = str_replace(array_keys($r), $r, $adminEmail['message']);
|
512 |
|
lib/helper/WpProQuiz_Helper_DbUpgrade.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
class WpProQuiz_Helper_DbUpgrade {
|
3 |
|
4 |
-
const WPPROQUIZ_DB_VERSION =
|
5 |
|
6 |
private $_wpdb;
|
7 |
private $_prefix;
|
@@ -92,6 +92,10 @@ class WpProQuiz_Helper_DbUpgrade {
|
|
92 |
`hide_result_correct_question` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
93 |
`hide_result_quiz_time` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
94 |
`hide_result_points` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
|
|
|
|
|
|
|
|
95 |
PRIMARY KEY (`id`)
|
96 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
97 |
");
|
@@ -114,6 +118,8 @@ class WpProQuiz_Helper_DbUpgrade {
|
|
114 |
`answer_points_activated` tinyint(1) NOT NULL,
|
115 |
`answer_data` longtext NOT NULL,
|
116 |
`category_id` int(10) unsigned NOT NULL,
|
|
|
|
|
117 |
PRIMARY KEY (`id`),
|
118 |
KEY `quiz_id` (`quiz_id`),
|
119 |
KEY `category_id` (`category_id`)
|
@@ -870,4 +876,46 @@ class WpProQuiz_Helper_DbUpgrade {
|
|
870 |
|
871 |
return 20;
|
872 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
873 |
}
|
1 |
<?php
|
2 |
class WpProQuiz_Helper_DbUpgrade {
|
3 |
|
4 |
+
const WPPROQUIZ_DB_VERSION = 21;
|
5 |
|
6 |
private $_wpdb;
|
7 |
private $_prefix;
|
92 |
`hide_result_correct_question` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
93 |
`hide_result_quiz_time` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
94 |
`hide_result_points` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
95 |
+
`autostart` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
96 |
+
`forcing_question_solve` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
97 |
+
`hide_question_position_overview` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
98 |
+
`hide_question_numbering` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
99 |
PRIMARY KEY (`id`)
|
100 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
101 |
");
|
118 |
`answer_points_activated` tinyint(1) NOT NULL,
|
119 |
`answer_data` longtext NOT NULL,
|
120 |
`category_id` int(10) unsigned NOT NULL,
|
121 |
+
`answer_points_diff_modus_activated` tinyint(1) unsigned NOT NULL,
|
122 |
+
`disable_correct` tinyint(1) unsigned NOT NULL,
|
123 |
PRIMARY KEY (`id`),
|
124 |
KEY `quiz_id` (`quiz_id`),
|
125 |
KEY `category_id` (`category_id`)
|
876 |
|
877 |
return 20;
|
878 |
}
|
879 |
+
|
880 |
+
private function upgradeDbV20() {
|
881 |
+
$this->_wpdb->query('SELECT * FROM '.$this->_wpdb->prefix.'wp_pro_quiz_master LIMIT 0,1');
|
882 |
+
|
883 |
+
$names = $this->_wpdb->get_col_info('name');
|
884 |
+
|
885 |
+
if(!in_array('autostart', $names)) {
|
886 |
+
$this->_wpdb->query('ALTER TABLE `'.$this->_wpdb->prefix.'wp_pro_quiz_master`
|
887 |
+
ADD `autostart` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT \'0\' ');
|
888 |
+
}
|
889 |
+
|
890 |
+
if(!in_array('forcing_question_solve', $names)) {
|
891 |
+
$this->_wpdb->query('ALTER TABLE `'.$this->_wpdb->prefix.'wp_pro_quiz_master`
|
892 |
+
ADD `forcing_question_solve` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT \'0\' ');
|
893 |
+
}
|
894 |
+
|
895 |
+
if(!in_array('hide_question_position_overview', $names)) {
|
896 |
+
$this->_wpdb->query('ALTER TABLE `'.$this->_wpdb->prefix.'wp_pro_quiz_master`
|
897 |
+
ADD `hide_question_position_overview` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT \'0\' ');
|
898 |
+
}
|
899 |
+
|
900 |
+
if(!in_array('hide_question_numbering', $names)) {
|
901 |
+
$this->_wpdb->query('ALTER TABLE `'.$this->_wpdb->prefix.'wp_pro_quiz_master`
|
902 |
+
ADD `hide_question_numbering` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT \'0\' ');
|
903 |
+
}
|
904 |
+
|
905 |
+
$this->_wpdb->query('SELECT * FROM '.$this->_wpdb->prefix.'wp_pro_quiz_question LIMIT 0,1');
|
906 |
+
|
907 |
+
$names = $this->_wpdb->get_col_info('name');
|
908 |
+
|
909 |
+
if(!in_array('answer_points_diff_modus_activated', $names)) {
|
910 |
+
$this->_wpdb->query('ALTER TABLE `'.$this->_wpdb->prefix.'wp_pro_quiz_question`
|
911 |
+
ADD `answer_points_diff_modus_activated` TINYINT( 1 ) UNSIGNED NOT NULL ');
|
912 |
+
}
|
913 |
+
|
914 |
+
if(!in_array('disable_correct', $names)) {
|
915 |
+
$this->_wpdb->query('ALTER TABLE `'.$this->_wpdb->prefix.'wp_pro_quiz_question`
|
916 |
+
ADD `disable_correct` TINYINT( 1 ) UNSIGNED NOT NULL ');
|
917 |
+
}
|
918 |
+
|
919 |
+
return 21;
|
920 |
+
}
|
921 |
}
|
lib/helper/WpProQuiz_Helper_Upgrade.php
CHANGED
@@ -22,6 +22,7 @@ class WpProQuiz_Helper_Upgrade {
|
|
22 |
case '0.22':
|
23 |
case '0.23':
|
24 |
case '0.24':
|
|
|
25 |
break;
|
26 |
default:
|
27 |
WpProQuiz_Helper_Upgrade::install();
|
22 |
case '0.22':
|
23 |
case '0.23':
|
24 |
case '0.24':
|
25 |
+
case '0.25':
|
26 |
break;
|
27 |
default:
|
28 |
WpProQuiz_Helper_Upgrade::install();
|
lib/view/WpProQuiz_View_QuizOverall.php
CHANGED
@@ -55,7 +55,7 @@ class WpProQuiz_View_QuizOverall extends WpProQuiz_View_View {
|
|
55 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
56 |
<input type="hidden" name="cmd" value="_s-xclick">
|
57 |
<input type="hidden" name="hosted_button_id" value="N9B7S4FT8CE2N">
|
58 |
-
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif"
|
59 |
<img alt="" border="0" src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif" width="1" height="1">
|
60 |
</form>
|
61 |
</div>
|
55 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
56 |
<input type="hidden" name="cmd" value="_s-xclick">
|
57 |
<input type="hidden" name="hosted_button_id" value="N9B7S4FT8CE2N">
|
58 |
+
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
59 |
<img alt="" border="0" src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif" width="1" height="1">
|
60 |
</form>
|
61 |
</div>
|
lib/view/WpProQuiz_View_WpqSupport.php
CHANGED
@@ -12,7 +12,7 @@ class WpProQuiz_View_WpqSupport extends WpProQuiz_View_View {
|
|
12 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
13 |
<input type="hidden" name="cmd" value="_s-xclick">
|
14 |
<input type="hidden" name="hosted_button_id" value="N9B7S4FT8CE2N">
|
15 |
-
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif"
|
16 |
<img alt="" border="0" src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif" width="1" height="1">
|
17 |
</form>
|
18 |
|
12 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
13 |
<input type="hidden" name="cmd" value="_s-xclick">
|
14 |
<input type="hidden" name="hosted_button_id" value="N9B7S4FT8CE2N">
|
15 |
+
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
16 |
<img alt="" border="0" src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif" width="1" height="1">
|
17 |
</form>
|
18 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: quiz, test, answer, question, learning, assessment
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 3.5.2
|
7 |
-
Stable tag: 0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -266,4 +266,8 @@ http://www.it-gecko.de/wp-pro-quiz-quiz-plugin-fuer-wordpress.html (scroll to "D
|
|
266 |
* Option "hide question numbering" added
|
267 |
* Updated greek translation
|
268 |
* Updated dutch translation
|
269 |
-
* Translation for czech have been added (Thanks Petr Š.)
|
|
|
|
|
|
|
|
4 |
Tags: quiz, test, answer, question, learning, assessment
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 3.5.2
|
7 |
+
Stable tag: 0.26
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
266 |
* Option "hide question numbering" added
|
267 |
* Updated greek translation
|
268 |
* Updated dutch translation
|
269 |
+
* Translation for czech have been added (Thanks Petr Š.)
|
270 |
+
|
271 |
+
= 0.26 =
|
272 |
+
* Bugfix: Cloze choice and assessment
|
273 |
+
* Bugfix: Email sending
|
wp-pro-quiz.php
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
Plugin Name: WP-Pro-Quiz
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/wp-pro-quiz
|
5 |
Description: A powerful and beautiful quiz plugin for WordPress.
|
6 |
-
Version: 0.
|
7 |
Author: Julius Fischer
|
8 |
Author URI: http://www.it-gecko.de
|
9 |
Text Domain: wp-pro-quiz
|
10 |
Domain Path: /languages
|
11 |
*/
|
12 |
|
13 |
-
define('WPPROQUIZ_VERSION', '0.
|
14 |
|
15 |
define('WPPROQUIZ_DEV', false);
|
16 |
|
3 |
Plugin Name: WP-Pro-Quiz
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/wp-pro-quiz
|
5 |
Description: A powerful and beautiful quiz plugin for WordPress.
|
6 |
+
Version: 0.26
|
7 |
Author: Julius Fischer
|
8 |
Author URI: http://www.it-gecko.de
|
9 |
Text Domain: wp-pro-quiz
|
10 |
Domain Path: /languages
|
11 |
*/
|
12 |
|
13 |
+
define('WPPROQUIZ_VERSION', '0.26');
|
14 |
|
15 |
define('WPPROQUIZ_DEV', false);
|
16 |
|