Skip to content

Commit

Permalink
animation and percentage+ranking fix
Browse files Browse the repository at this point in the history
git-svn-id: http://plugins.svn.wordpress.org/slickquiz/trunk@1013939 b8457f37-d9ea-0310-8a92-e5e31aec5664
  • Loading branch information
jewlofthelotus committed Oct 25, 2014
1 parent c5a3ddb commit 7f56906
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
10 changes: 9 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: http://www.gofundme.com/slickquiz
Tags: quiz, test, jquery, javascript, education, elearning, generator, manager, question, answer, score, rank
Requires at least: 3.0
Tested up to: 4.0
Stable tag: 1.3.6
Stable tag: 1.3.6.1
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl.html

Expand Down Expand Up @@ -171,6 +171,10 @@ Also, see the [SlickQuiz Issues](https://github.com/jewlofthelotus/SlickQuiz-Wor

== Changelog ==

= 1.3.6.1 =
* BUG FIX: Answer toggling should not animate
* BUG FIX: When "Display score as percentage", ranking should still work

= 1.3.6 =
* NEW: applies WordPress filters to quiz fields - allowing for shortcodes in quiz content!! Thanks [@nfreear](https://github.com/nfreear)!
* BUG FIX: no more flash of correct answers when validating!
Expand Down Expand Up @@ -349,6 +353,10 @@ This is the initial setup of the plugin.

== Upgrade Notice ==

= 1.3.6.1 =
* BUG FIX: Answer toggling should not animate
* BUG FIX: When "Display score as percentage", ranking should still work

= 1.3.6 =
* NEW: applies WordPress filters to quiz fields - allowing for shortcodes in quiz content!! Thanks [@nfreear](https://github.com/nfreear)!
* BUG FIX: no more flash of correct answers when validating!
Expand Down
2 changes: 1 addition & 1 deletion slickquiz.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin Name: SlickQuiz
Plugin URI: http://github.com/jewlofthelotus/SlickQuiz-WordPress
Description: Plugin for displaying and managing pretty, dynamic quizzes.
Version: 1.3.6
Version: 1.3.6.1
Author: Julie Cameron
Author URI: http://juliecameron.com
License: GPLv3 or later
Expand Down
10 changes: 6 additions & 4 deletions slickquiz/js/slickQuiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* http://github.com/jewlofthelotus/SlickQuiz
*
* @updated October 25, 2014
* @version 1.5.19
* @version 1.5.20
*
* @author Julie Cameron - http://www.juliecameron.com
* @copyright (c) 2013 Quicken Loans - http://www.quickenloans.com
Expand Down Expand Up @@ -478,6 +478,7 @@
if (!plugin.config.perQuestionResponseAnswers) {
// Make sure answers don't highlight for a split second before they hide
questionLI.find(_answers).hide({
duration: 0,
complete: function() {
questionLI.addClass(completeClass);
}
Expand Down Expand Up @@ -592,16 +593,17 @@
keyNotch = internal.method.getKeyNotch; // a function that returns a jQ animation callback function
kN = keyNotch; // you specify the notch, you get a callback function for your animation

var score = $(_element + ' ' + _correct).length;
var score = $(_element + ' ' + _correct).length,
displayScore = score;
if (plugin.config.scoreAsPercentage) {
score = (score / questionCount).toFixed(2)*100 + "%";
displayScore = (score / questionCount).toFixed(2)*100 + "%";
}

if (plugin.config.disableScore) {
$(_quizScore).remove()
} else {
$(_quizScore + ' span').html(plugin.config.scoreTemplateText
.replace('%score', score).replace('%total', questionCount));
.replace('%score', displayScore).replace('%total', questionCount));
}

if (plugin.config.disableRanking) {
Expand Down

0 comments on commit 7f56906

Please sign in to comment.