Quiz And Survey Master (Formerly Quiz Master Next) - Version 5.3.0

Version Description

(May 16, 2018) = * Closed Enhancement: Ability to disable IP address collection - (Issue #670) * Closed User Request: Ability to customize name of QSM archive name - (Issue #666) * Closed User Request: Progress Bar - (Issue #412) * Closed User Request: Disable Results Being Stored In Database - (Issue #215) * Closed Bug: Question ordering doesn't work when using older pagination option - (Issue #657)

(Read Full Changelog)

=

Download this release

Release Info

Developer fpcorso
Plugin Icon 128x128 Quiz And Survey Master (Formerly Quiz Master Next)
Version 5.3.0
Comparing to
See all releases

Code changes from version 5.2.4 to 5.3.0

CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  = 5.1.7 (January 2, 2018) =
2
  * Closed Bug: Quizzes/Surveys table not working on certain installs - ([Issue #598](https://github.com/fpcorso/quiz_master_next/issues/598))
3
 
1
+ = 5.2.4 (May 7, 2018) =
2
+ * Closed Bug: %QUESTIONS_ANSWERS% variable is displaying questions in order of creation - ([Issue #660](https://github.com/fpcorso/quiz_master_next/issues/660))
3
+ * Closed Bug: Extra spacing is being added to questions when multiple lines are in question - ([Issue #659](https://github.com/fpcorso/quiz_master_next/issues/659))
4
+ * Closed Bug: Tabs pages stop working when translated - ([Issue #582](https://github.com/fpcorso/quiz_master_next/issues/582))
5
+
6
+ = 5.2.3 (April 3, 2018) =
7
+ * Closed Bug: Cannot save question on certain servers - ([Issue #651](https://github.com/fpcorso/quiz_master_next/issues/651))
8
+ * Closed Bug: Questions/Answers Template Not Loaded In Admin Results Page - ([Issue #636](https://github.com/fpcorso/quiz_master_next/issues/636))
9
+
10
+ = 5.2.2 (April 1, 2018) =
11
+ * Makes minor style adjustments
12
+ * Adds additional hook to admin results details page
13
+ * Modifies a few error messages
14
+
15
+ = 5.2.1 (March 5, 2018) =
16
+ * Fixes broken "Custom" styles
17
+ * Fixes minor bugs in new question editor
18
+ * Makes minor style adjustments
19
+
20
+ = 5.2.0 (March 3, 2018) =
21
+ * Closed Enhancement: Make Quiz Results Extendable/Filterable - ([Issue #622](https://github.com/fpcorso/quiz_master_next/issues/622))
22
+ * Closed Enhancement: New Question Editor - ([Issue #568](https://github.com/fpcorso/quiz_master_next/issues/568))
23
+ * Closed Bug: Pagination Bug - ([Issue #477](https://github.com/fpcorso/quiz_master_next/issues/477))
24
+ * Closed Bug: Questions shift - ([Issue #467](https://github.com/fpcorso/quiz_master_next/issues/467))
25
+ * Closed User Request: Remove duplicate question popup confirmation - ([Issue #396](https://github.com/fpcorso/quiz_master_next/issues/396))
26
+ * Closed User Request: Question Grouping - ([Issue #356](https://github.com/fpcorso/quiz_master_next/issues/356))
27
+ * Closed User Request: Ability To Move Submit Button To Last Question Page - ([Issue #321](https://github.com/fpcorso/quiz_master_next/issues/321))
28
+
29
  = 5.1.7 (January 2, 2018) =
30
  * Closed Bug: Quizzes/Surveys table not working on certain installs - ([Issue #598](https://github.com/fpcorso/quiz_master_next/issues/598))
31
 
js/progressbar.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ !function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.ProgressBar=a()}}(function(){var a;return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(b,c,d){(function(){var b=this||Function("return this")(),e=function(){"use strict";function e(){}function f(a,b){var c;for(c in a)Object.hasOwnProperty.call(a,c)&&b(c)}function g(a,b){return f(b,function(c){a[c]=b[c]}),a}function h(a,b){f(b,function(c){"undefined"==typeof a[c]&&(a[c]=b[c])})}function i(a,b,c,d,e,f,g){var h,i,k,l=a<f?0:(a-f)/e;for(h in b)b.hasOwnProperty(h)&&(i=g[h],k="function"==typeof i?i:o[i],b[h]=j(c[h],d[h],k,l));return b}function j(a,b,c,d){return a+(b-a)*c(d)}function k(a,b){var c=n.prototype.filter,d=a._filterArgs;f(c,function(e){"undefined"!=typeof c[e][b]&&c[e][b].apply(a,d)})}function l(a,b,c,d,e,f,g,h,j,l,m){v=b+c+d,w=Math.min(m||u(),v),x=w>=v,y=d-(v-w),a.isPlaying()&&(x?(j(g,a._attachment,y),a.stop(!0)):(a._scheduleId=l(a._timeoutHandler,s),k(a,"beforeTween"),w<b+c?i(1,e,f,g,1,1,h):i(w,e,f,g,d,b+c,h),k(a,"afterTween"),j(e,a._attachment,y)))}function m(a,b){var c={},d=typeof b;return"string"===d||"function"===d?f(a,function(a){c[a]=b}):f(a,function(a){c[a]||(c[a]=b[a]||q)}),c}function n(a,b){this._currentState=a||{},this._configured=!1,this._scheduleFunction=p,"undefined"!=typeof b&&this.setConfig(b)}var o,p,q="linear",r=500,s=1e3/60,t=Date.now?Date.now:function(){return+new Date},u="undefined"!=typeof SHIFTY_DEBUG_NOW?SHIFTY_DEBUG_NOW:t;p="undefined"!=typeof window?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.mozCancelRequestAnimationFrame&&window.mozRequestAnimationFrame||setTimeout:setTimeout;var v,w,x,y;return n.prototype.tween=function(a){return this._isTweening?this:(void 0===a&&this._configured||this.setConfig(a),this._timestamp=u(),this._start(this.get(),this._attachment),this.resume())},n.prototype.setConfig=function(a){a=a||{},this._configured=!0,this._attachment=a.attachment,this._pausedAtTime=null,this._scheduleId=null,this._delay=a.delay||0,this._start=a.start||e,this._step=a.step||e,this._finish=a.finish||e,this._duration=a.duration||r,this._currentState=g({},a.from||this.get()),this._originalState=this.get(),this._targetState=g({},a.to||this.get());var b=this;this._timeoutHandler=function(){l(b,b._timestamp,b._delay,b._duration,b._currentState,b._originalState,b._targetState,b._easing,b._step,b._scheduleFunction)};var c=this._currentState,d=this._targetState;return h(d,c),this._easing=m(c,a.easing||q),this._filterArgs=[c,this._originalState,d,this._easing],k(this,"tweenCreated"),this},n.prototype.get=function(){return g({},this._currentState)},n.prototype.set=function(a){this._currentState=a},n.prototype.pause=function(){return this._pausedAtTime=u(),this._isPaused=!0,this},n.prototype.resume=function(){return this._isPaused&&(this._timestamp+=u()-this._pausedAtTime),this._isPaused=!1,this._isTweening=!0,this._timeoutHandler(),this},n.prototype.seek=function(a){a=Math.max(a,0);var b=u();return this._timestamp+a===0?this:(this._timestamp=b-a,this.isPlaying()||(this._isTweening=!0,this._isPaused=!1,l(this,this._timestamp,this._delay,this._duration,this._currentState,this._originalState,this._targetState,this._easing,this._step,this._scheduleFunction,b),this.pause()),this)},n.prototype.stop=function(a){return this._isTweening=!1,this._isPaused=!1,this._timeoutHandler=e,(b.cancelAnimationFrame||b.webkitCancelAnimationFrame||b.oCancelAnimationFrame||b.msCancelAnimationFrame||b.mozCancelRequestAnimationFrame||b.clearTimeout)(this._scheduleId),a&&(k(this,"beforeTween"),i(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),k(this,"afterTween"),k(this,"afterTweenEnd"),this._finish.call(this,this._currentState,this._attachment)),this},n.prototype.isPlaying=function(){return this._isTweening&&!this._isPaused},n.prototype.setScheduleFunction=function(a){this._scheduleFunction=a},n.prototype.dispose=function(){var a;for(a in this)this.hasOwnProperty(a)&&delete this[a]},n.prototype.filter={},n.prototype.formula={linear:function(a){return a}},o=n.prototype.formula,g(n,{now:u,each:f,tweenProps:i,tweenProp:j,applyFilter:k,shallowCopy:g,defaults:h,composeEasingObject:m}),"function"==typeof SHIFTY_DEBUG_NOW&&(b.timeoutHandler=l),"object"==typeof d?c.exports=n:"function"==typeof a&&a.amd?a(function(){return n}):"undefined"==typeof b.Tweenable&&(b.Tweenable=n),n}();!function(){e.shallowCopy(e.prototype.formula,{easeInQuad:function(a){return Math.pow(a,2)},easeOutQuad:function(a){return-(Math.pow(a-1,2)-1)},easeInOutQuad:function(a){return(a/=.5)<1?.5*Math.pow(a,2):-.5*((a-=2)*a-2)},easeInCubic:function(a){return Math.pow(a,3)},easeOutCubic:function(a){return Math.pow(a-1,3)+1},easeInOutCubic:function(a){return(a/=.5)<1?.5*Math.pow(a,3):.5*(Math.pow(a-2,3)+2)},easeInQuart:function(a){return Math.pow(a,4)},easeOutQuart:function(a){return-(Math.pow(a-1,4)-1)},easeInOutQuart:function(a){return(a/=.5)<1?.5*Math.pow(a,4):-.5*((a-=2)*Math.pow(a,3)-2)},easeInQuint:function(a){return Math.pow(a,5)},easeOutQuint:function(a){return Math.pow(a-1,5)+1},easeInOutQuint:function(a){return(a/=.5)<1?.5*Math.pow(a,5):.5*(Math.pow(a-2,5)+2)},easeInSine:function(a){return-Math.cos(a*(Math.PI/2))+1},easeOutSine:function(a){return Math.sin(a*(Math.PI/2))},easeInOutSine:function(a){return-.5*(Math.cos(Math.PI*a)-1)},easeInExpo:function(a){return 0===a?0:Math.pow(2,10*(a-1))},easeOutExpo:function(a){return 1===a?1:-Math.pow(2,-10*a)+1},easeInOutExpo:function(a){return 0===a?0:1===a?1:(a/=.5)<1?.5*Math.pow(2,10*(a-1)):.5*(-Math.pow(2,-10*--a)+2)},easeInCirc:function(a){return-(Math.sqrt(1-a*a)-1)},easeOutCirc:function(a){return Math.sqrt(1-Math.pow(a-1,2))},easeInOutCirc:function(a){return(a/=.5)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},easeOutBounce:function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},easeInBack:function(a){var b=1.70158;return a*a*((b+1)*a-b)},easeOutBack:function(a){var b=1.70158;return(a-=1)*a*((b+1)*a+b)+1},easeInOutBack:function(a){var b=1.70158;return(a/=.5)<1?.5*(a*a*(((b*=1.525)+1)*a-b)):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},elastic:function(a){return-1*Math.pow(4,-8*a)*Math.sin((6*a-1)*(2*Math.PI)/2)+1},swingFromTo:function(a){var b=1.70158;return(a/=.5)<1?.5*(a*a*(((b*=1.525)+1)*a-b)):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},swingFrom:function(a){var b=1.70158;return a*a*((b+1)*a-b)},swingTo:function(a){var b=1.70158;return(a-=1)*a*((b+1)*a+b)+1},bounce:function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},bouncePast:function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?2-(7.5625*(a-=1.5/2.75)*a+.75):a<2.5/2.75?2-(7.5625*(a-=2.25/2.75)*a+.9375):2-(7.5625*(a-=2.625/2.75)*a+.984375)},easeFromTo:function(a){return(a/=.5)<1?.5*Math.pow(a,4):-.5*((a-=2)*Math.pow(a,3)-2)},easeFrom:function(a){return Math.pow(a,4)},easeTo:function(a){return Math.pow(a,.25)}})}(),function(){function a(a,b,c,d,e,f){function g(a){return((n*a+o)*a+p)*a}function h(a){return((q*a+r)*a+s)*a}function i(a){return(3*n*a+2*o)*a+p}function j(a){return 1/(200*a)}function k(a,b){return h(m(a,b))}function l(a){return a>=0?a:0-a}function m(a,b){var c,d,e,f,h,j;for(e=a,j=0;j<8;j++){if(f=g(e)-a,l(f)<b)return e;if(h=i(e),l(h)<1e-6)break;e-=f/h}if(c=0,d=1,e=a,e<c)return c;if(e>d)return d;for(;c<d;){if(f=g(e),l(f-a)<b)return e;a>f?c=e:d=e,e=.5*(d-c)+c}return e}var n=0,o=0,p=0,q=0,r=0,s=0;return p=3*b,o=3*(d-b)-p,n=1-p-o,s=3*c,r=3*(e-c)-s,q=1-s-r,k(a,j(f))}function b(b,c,d,e){return function(f){return a(f,b,c,d,e,1)}}e.setBezierFunction=function(a,c,d,f,g){var h=b(c,d,f,g);return h.displayName=a,h.x1=c,h.y1=d,h.x2=f,h.y2=g,e.prototype.formula[a]=h},e.unsetBezierFunction=function(a){delete e.prototype.formula[a]}}(),function(){function a(a,b,c,d,f,g){return e.tweenProps(d,b,a,c,1,g,f)}var b=new e;b._filterArgs=[],e.interpolate=function(c,d,f,g,h){var i=e.shallowCopy({},c),j=h||0,k=e.composeEasingObject(c,g||"linear");b.set({});var l=b._filterArgs;l.length=0,l[0]=i,l[1]=c,l[2]=d,l[3]=k,e.applyFilter(b,"tweenCreated"),e.applyFilter(b,"beforeTween");var m=a(c,i,d,f,k,j);return e.applyFilter(b,"afterTween"),m}}(),function(a){function b(a,b){var c,d=[],e=a.length;for(c=0;c<e;c++)d.push("_"+b+"_"+c);return d}function c(a){var b=a.match(v);return b?(1===b.length||a.charAt(0).match(u))&&b.unshift(""):b=["",""],b.join(A)}function d(b){a.each(b,function(a){var c=b[a];"string"==typeof c&&c.match(z)&&(b[a]=e(c))})}function e(a){return i(z,a,f)}function f(a){var b=g(a);return"rgb("+b[0]+","+b[1]+","+b[2]+")"}function g(a){return a=a.replace(/#/,""),3===a.length&&(a=a.split(""),a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),B[0]=h(a.substr(0,2)),B[1]=h(a.substr(2,2)),B[2]=h(a.substr(4,2)),B}function h(a){return parseInt(a,16)}function i(a,b,c){var d=b.match(a),e=b.replace(a,A);if(d)for(var f,g=d.length,h=0;h<g;h++)f=d.shift(),e=e.replace(A,c(f));return e}function j(a){return i(x,a,k)}function k(a){for(var b=a.match(w),c=b.length,d=a.match(y)[0],e=0;e<c;e++)d+=parseInt(b[e],10)+",";return d=d.slice(0,-1)+")"}function l(d){var e={};return a.each(d,function(a){var f=d[a];if("string"==typeof f){var g=r(f);e[a]={formatString:c(f),chunkNames:b(g,a)}}}),e}function m(b,c){a.each(c,function(a){for(var d=b[a],e=r(d),f=e.length,g=0;g<f;g++)b[c[a].chunkNames[g]]=+e[g];delete b[a]})}function n(b,c){a.each(c,function(a){var d=b[a],e=o(b,c[a].chunkNames),f=p(e,c[a].chunkNames);d=q(c[a].formatString,f),b[a]=j(d)})}function o(a,b){for(var c,d={},e=b.length,f=0;f<e;f++)c=b[f],d[c]=a[c],delete a[c];return d}function p(a,b){C.length=0;for(var c=b.length,d=0;d<c;d++)C.push(a[b[d]]);return C}function q(a,b){for(var c=a,d=b.length,e=0;e<d;e++)c=c.replace(A,+b[e].toFixed(4));return c}function r(a){return a.match(w)}function s(b,c){a.each(c,function(a){var d,e=c[a],f=e.chunkNames,g=f.length,h=b[a];if("string"==typeof h){var i=h.split(" "),j=i[i.length-1];for(d=0;d<g;d++)b[f[d]]=i[d]||j}else for(d=0;d<g;d++)b[f[d]]=h;delete b[a]})}function t(b,c){a.each(c,function(a){var d=c[a],e=d.chunkNames,f=e.length,g=b[e[0]],h=typeof g;if("string"===h){for(var i="",j=0;j<f;j++)i+=" "+b[e[j]],delete b[e[j]];b[a]=i.substr(1)}else b[a]=g})}var u=/(\d|\-|\.)/,v=/([^\-0-9\.]+)/g,w=/[0-9.\-]+/g,x=new RegExp("rgb\\("+w.source+/,\s*/.source+w.source+/,\s*/.source+w.source+"\\)","g"),y=/^.*\(/,z=/#([0-9]|[a-f]){3,6}/gi,A="VAL",B=[],C=[];a.prototype.filter.token={tweenCreated:function(a,b,c,e){d(a),d(b),d(c),this._tokenData=l(a)},beforeTween:function(a,b,c,d){s(d,this._tokenData),m(a,this._tokenData),m(b,this._tokenData),m(c,this._tokenData)},afterTween:function(a,b,c,d){n(a,this._tokenData),n(b,this._tokenData),n(c,this._tokenData),t(d,this._tokenData)}}}(e)}).call(null)},{}],2:[function(a,b,c){var d=a("./shape"),e=a("./utils"),f=function(a,b){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,d.apply(this,arguments)};f.prototype=new d,f.prototype.constructor=f,f.prototype._pathString=function(a){var b=a.strokeWidth;a.trailWidth&&a.trailWidth>a.strokeWidth&&(b=a.trailWidth);var c=50-b/2;return e.render(this._pathTemplate,{radius:c,"2radius":2*c})},f.prototype._trailString=function(a){return this._pathString(a)},b.exports=f},{"./shape":7,"./utils":9}],3:[function(a,b,c){var d=a("./shape"),e=a("./utils"),f=function(a,b){this._pathTemplate="M 0,{center} L 100,{center}",d.apply(this,arguments)};f.prototype=new d,f.prototype.constructor=f,f.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 "+b.strokeWidth),a.setAttribute("preserveAspectRatio","none")},f.prototype._pathString=function(a){return e.render(this._pathTemplate,{center:a.strokeWidth/2})},f.prototype._trailString=function(a){return this._pathString(a)},b.exports=f},{"./shape":7,"./utils":9}],4:[function(a,b,c){b.exports={Line:a("./line"),Circle:a("./circle"),SemiCircle:a("./semicircle"),Square:a("./square"),Path:a("./path"),Shape:a("./shape"),utils:a("./utils")}},{"./circle":2,"./line":3,"./path":5,"./semicircle":6,"./shape":7,"./square":8,"./utils":9}],5:[function(a,b,c){var d=a("shifty"),e=a("./utils"),f={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},g=function a(b,c){if(!(this instanceof a))throw new Error("Constructor was called without new keyword");c=e.extend({duration:800,easing:"linear",from:{},to:{},step:function(){}},c);var d;d=e.isString(b)?document.querySelector(b):b,this.path=d,this._opts=c,this._tweenable=null;var f=this.path.getTotalLength();this.path.style.strokeDasharray=f+" "+f,this.set(0)};g.prototype.value=function(){var a=this._getComputedDashOffset(),b=this.path.getTotalLength(),c=1-a/b;return parseFloat(c.toFixed(6),10)},g.prototype.set=function(a){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(a);var b=this._opts.step;if(e.isFunction(b)){var c=this._easing(this._opts.easing),d=this._calculateTo(a,c),f=this._opts.shape||this;b(d,f,this._opts.attachment)}},g.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},g.prototype.animate=function(a,b,c){b=b||{},e.isFunction(b)&&(c=b,b={});var f=e.extend({},b),g=e.extend({},this._opts);b=e.extend(g,b);var h=this._easing(b.easing),i=this._resolveFromAndTo(a,h,f);this.stop(),this.path.getBoundingClientRect();var j=this._getComputedDashOffset(),k=this._progressToOffset(a),l=this;this._tweenable=new d,this._tweenable.tween({from:e.extend({offset:j},i.from),to:e.extend({offset:k},i.to),duration:b.duration,easing:h,step:function(a){l.path.style.strokeDashoffset=a.offset;var c=b.shape||l;b.step(a,c,b.attachment)},finish:function(a){e.isFunction(c)&&c()}})},g.prototype._getComputedDashOffset=function(){var a=window.getComputedStyle(this.path,null);return parseFloat(a.getPropertyValue("stroke-dashoffset"),10)},g.prototype._progressToOffset=function(a){var b=this.path.getTotalLength();return b-a*b},g.prototype._resolveFromAndTo=function(a,b,c){return c.from&&c.to?{from:c.from,to:c.to}:{from:this._calculateFrom(b),to:this._calculateTo(a,b)}},g.prototype._calculateFrom=function(a){return d.interpolate(this._opts.from,this._opts.to,this.value(),a)},g.prototype._calculateTo=function(a,b){return d.interpolate(this._opts.from,this._opts.to,a,b)},g.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},g.prototype._easing=function(a){return f.hasOwnProperty(a)?f[a]:a},b.exports=g},{"./utils":9,shifty:1}],6:[function(a,b,c){var d=a("./shape"),e=a("./circle"),f=a("./utils"),g=function(a,b){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,d.apply(this,arguments)};g.prototype=new d,g.prototype.constructor=g,g.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 50")},g.prototype._initializeTextContainer=function(a,b,c){a.text.style&&(c.style.top="auto",c.style.bottom="0",a.text.alignToBottom?f.setStyle(c,"transform","translate(-50%, 0)"):f.setStyle(c,"transform","translate(-50%, 50%)"))},g.prototype._pathString=e.prototype._pathString,g.prototype._trailString=e.prototype._trailString,b.exports=g},{"./circle":2,"./shape":7,"./utils":9}],7:[function(a,b,c){var d=a("./path"),e=a("./utils"),f="Object is destroyed",g=function a(b,c){if(!(this instanceof a))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=e.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},c,!0),e.isObject(c)&&void 0!==c.svgStyle&&(this._opts.svgStyle=c.svgStyle),e.isObject(c)&&e.isObject(c.text)&&void 0!==c.text.style&&(this._opts.text.style=c.text.style);var f,g=this._createSvgView(this._opts);if(f=e.isString(b)?document.querySelector(b):b,!f)throw new Error("Container does not exist: "+b);this._container=f,this._container.appendChild(g.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&e.setStyles(g.svg,this._opts.svgStyle),this.svg=g.svg,this.path=g.path,this.trail=g.trail,this.text=null;var h=e.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new d(g.path,h),e.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};g.prototype.animate=function(a,b,c){if(null===this._progressPath)throw new Error(f);this._progressPath.animate(a,b,c)},g.prototype.stop=function(){if(null===this._progressPath)throw new Error(f);void 0!==this._progressPath&&this._progressPath.stop()},g.prototype.destroy=function(){if(null===this._progressPath)throw new Error(f);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},g.prototype.set=function(a){if(null===this._progressPath)throw new Error(f);this._progressPath.set(a)},g.prototype.value=function(){if(null===this._progressPath)throw new Error(f);return void 0===this._progressPath?0:this._progressPath.value()},g.prototype.setText=function(a){if(null===this._progressPath)throw new Error(f);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),e.isObject(a)?(e.removeChildren(this.text),this.text.appendChild(a)):this.text.innerHTML=a},g.prototype._createSvgView=function(a){var b=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(b,a);var c=null;(a.trailColor||a.trailWidth)&&(c=this._createTrail(a),b.appendChild(c));var d=this._createPath(a);return b.appendChild(d),{svg:b,path:d,trail:c}},g.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 100")},g.prototype._createPath=function(a){var b=this._pathString(a);return this._createPathElement(b,a)},g.prototype._createTrail=function(a){var b=this._trailString(a),c=e.extend({},a);return c.trailColor||(c.trailColor="#eee"),c.trailWidth||(c.trailWidth=c.strokeWidth),c.color=c.trailColor,c.strokeWidth=c.trailWidth,c.fill=null,this._createPathElement(b,c)},g.prototype._createPathElement=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg","path");return c.setAttribute("d",a),c.setAttribute("stroke",b.color),c.setAttribute("stroke-width",b.strokeWidth),b.fill?c.setAttribute("fill",b.fill):c.setAttribute("fill-opacity","0"),c},g.prototype._createTextContainer=function(a,b){var c=document.createElement("div");c.className=a.text.className;var d=a.text.style;return d&&(a.text.autoStyleContainer&&(b.style.position="relative"),e.setStyles(c,d),d.color||(c.style.color=a.color)),this._initializeTextContainer(a,b,c),c},g.prototype._initializeTextContainer=function(a,b,c){},g.prototype._pathString=function(a){throw new Error("Override this function for each progress bar")},g.prototype._trailString=function(a){throw new Error("Override this function for each progress bar")},g.prototype._warnContainerAspectRatio=function(a){if(this.containerAspectRatio){var b=window.getComputedStyle(a,null),c=parseFloat(b.getPropertyValue("width"),10),d=parseFloat(b.getPropertyValue("height"),10);e.floatEquals(this.containerAspectRatio,c/d)||(console.warn("Incorrect aspect ratio of container","#"+a.id,"detected:",b.getPropertyValue("width")+"(width)","/",b.getPropertyValue("height")+"(height)","=",c/d),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},b.exports=g},{"./path":5,"./utils":9}],8:[function(a,b,c){var d=a("./shape"),e=a("./utils"),f=function(a,b){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",d.apply(this,arguments)};f.prototype=new d,f.prototype.constructor=f,f.prototype._pathString=function(a){var b=100-a.strokeWidth/2;return e.render(this._pathTemplate,{width:b,strokeWidth:a.strokeWidth,halfOfStrokeWidth:a.strokeWidth/2})},f.prototype._trailString=function(a){var b=100-a.strokeWidth/2;return e.render(this._trailTemplate,{width:b,strokeWidth:a.strokeWidth,halfOfStrokeWidth:a.strokeWidth/2,startMargin:a.strokeWidth/2-a.trailWidth/2})},b.exports=f},{"./shape":7,"./utils":9}],9:[function(a,b,c){function d(a,b,c){a=a||{},b=b||{},c=c||!1;for(var e in b)if(b.hasOwnProperty(e)){var f=a[e],g=b[e];c&&l(f)&&l(g)?a[e]=d(f,g,c):a[e]=g}return a}function e(a,b){var c=a;for(var d in b)if(b.hasOwnProperty(d)){var e=b[d],f="\\{"+d+"\\}",g=new RegExp(f,"g");c=c.replace(g,e)}return c}function f(a,b,c){for(var d=a.style,e=0;e<p.length;++e){var f=p[e];d[f+h(b)]=c}d[b]=c}function g(a,b){m(b,function(b,c){null!==b&&void 0!==b&&(l(b)&&b.prefix===!0?f(a,c,b.value):a.style[c]=b)})}function h(a){return a.charAt(0).toUpperCase()+a.slice(1)}function i(a){return"string"==typeof a||a instanceof String}function j(a){return"function"==typeof a}function k(a){return"[object Array]"===Object.prototype.toString.call(a)}function l(a){if(k(a))return!1;var b=typeof a;return"object"===b&&!!a}function m(a,b){for(var c in a)if(a.hasOwnProperty(c)){var d=a[c];b(d,c)}}function n(a,b){return Math.abs(a-b)<q}function o(a){for(;a.firstChild;)a.removeChild(a.firstChild)}var p="Webkit Moz O ms".split(" "),q=.001;b.exports={extend:d,render:e,setStyle:f,setStyles:g,capitalize:h,isString:i,isFunction:j,isObject:l,forEachObject:m,floatEquals:n,removeChildren:o}},{}]},{},[4])(4)});
2
+ //# sourceMappingURL=progressbar.min.js.map
js/qmn_quiz.js CHANGED
@@ -63,6 +63,36 @@ var QSM;
63
  $quizForm.children( '.qsm-page' ).hide();
64
  template = wp.template( 'qsm-pagination' );
65
  $quizForm.append( template() );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  QSM.goToPage( quizID, 1 );
67
  $quizForm.find( '.qsm-pagination .qsm-next' ).on( 'click', function( event ) {
68
  event.preventDefault();
@@ -95,6 +125,9 @@ var QSM;
95
  if ( 1 < pageNumber ) {
96
  $quizForm.find( '.qsm-previous' ).show();
97
  }
 
 
 
98
  QSM.savePage( quizID, pageNumber );
99
  },
100
  /**
63
  $quizForm.children( '.qsm-page' ).hide();
64
  template = wp.template( 'qsm-pagination' );
65
  $quizForm.append( template() );
66
+ if ( '1' == qmn_quiz_data[ quizID ].progress_bar ) {
67
+ qmn_quiz_data[ quizID ].bar = new ProgressBar.Line('#qsm-progress-bar', {
68
+ strokeWidth: 2,
69
+ easing: 'easeInOut',
70
+ duration: 1400,
71
+ color: '#3498db',
72
+ trailColor: '#eee',
73
+ trailWidth: 1,
74
+ svgStyle: {width: '100%', height: '100%'},
75
+ text: {
76
+ style: {
77
+ // color: '#999',
78
+ position: 'absolute',
79
+ padding: 0,
80
+ margin: 0,
81
+ top: 0,
82
+ right: '10px',
83
+ 'font-size': '13px',
84
+ 'font-weight': 'bold',
85
+ transform: null
86
+ },
87
+ autoStyleContainer: false
88
+ },
89
+ from: {color: '#3498db'},
90
+ to: {color: '#ED6A5A'},
91
+ step: (state, bar) => {
92
+ bar.setText(Math.round(bar.value() * 100) + ' %');
93
+ }
94
+ });
95
+ }
96
  QSM.goToPage( quizID, 1 );
97
  $quizForm.find( '.qsm-pagination .qsm-next' ).on( 'click', function( event ) {
98
  event.preventDefault();
125
  if ( 1 < pageNumber ) {
126
  $quizForm.find( '.qsm-previous' ).show();
127
  }
128
+ if ( '1' == qmn_quiz_data[ quizID ].progress_bar ) {
129
+ qmn_quiz_data[ quizID ].bar.animate( pageNumber / $pages.length );
130
+ }
131
  QSM.savePage( quizID, pageNumber );
132
  },
133
  /**
mlw_quizmaster2.php CHANGED
@@ -2,14 +2,14 @@
2
  /**
3
  * Plugin Name: Quiz And Survey Master
4
  * Description: Easily and quickly add quizzes and surveys to your website.
5
- * Version: 5.2.4
6
  * Author: Frank Corso
7
  * Author URI: https://www.quizandsurveymaster.com/
8
  * Plugin URI: https://www.quizandsurveymaster.com/
9
  * Text Domain: quiz-master-next
10
  *
11
  * @author Frank Corso
12
- * @version 5.2.4
13
  * @package QSM
14
  */
15
 
@@ -33,7 +33,7 @@ class MLWQuizMasterNext {
33
  * @var string
34
  * @since 4.0.0
35
  */
36
- public $version = '5.2.4';
37
 
38
  /**
39
  * QSM Alert Manager Object
@@ -192,29 +192,12 @@ class MLWQuizMasterNext {
192
  */
193
  public function register_quiz_post_types() {
194
 
195
- // Prepares labels.
196
- $quiz_labels = array(
197
- 'name' => 'Quizzes & Surveys',
198
- 'singular_name' => 'Quiz',
199
- 'menu_name' => 'Quiz',
200
- 'name_admin_bar' => 'Quiz',
201
- 'add_new' => 'Add New',
202
- 'add_new_item' => 'Add New Quiz',
203
- 'new_item' => 'New Quiz',
204
- 'edit_item' => 'Edit Quiz',
205
- 'view_item' => 'View Quiz',
206
- 'all_items' => 'All Quizzes',
207
- 'search_items' => 'Search Quizzes',
208
- 'parent_item_colon' => 'Parent Quiz:',
209
- 'not_found' => 'No Quiz Found',
210
- 'not_found_in_trash' => 'No Quiz Found In Trash',
211
- );
212
-
213
  // Checks settings to see if we need to alter the defaults.
214
  $has_archive = true;
215
  $exclude_search = false;
216
  $cpt_slug = 'quiz';
217
  $settings = (array) get_option( 'qmn-settings' );
 
218
 
219
  // Checks if admin turned off archive.
220
  if ( isset( $settings['cpt_archive'] ) && '1' == $settings['cpt_archive'] ) {
@@ -231,6 +214,29 @@ class MLWQuizMasterNext {
231
  $cpt_slug = trim( strtolower( str_replace( ' ', '-', $settings['cpt_slug'] ) ) );
232
  }
233
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
234
  // Prepares post type array.
235
  $quiz_args = array(
236
  'public' => true,
@@ -240,7 +246,7 @@ class MLWQuizMasterNext {
240
  'labels' => $quiz_labels,
241
  'publicly_queryable' => true,
242
  'exclude_from_search' => $exclude_search,
243
- 'label' => __( 'Quizzes', 'quiz-master-next' ),
244
  'rewrite' => array( 'slug' => $cpt_slug ),
245
  'has_archive' => $has_archive,
246
  'supports' => array( 'title', 'author', 'comments' )
2
  /**
3
  * Plugin Name: Quiz And Survey Master
4
  * Description: Easily and quickly add quizzes and surveys to your website.
5
+ * Version: 5.3.0
6
  * Author: Frank Corso
7
  * Author URI: https://www.quizandsurveymaster.com/
8
  * Plugin URI: https://www.quizandsurveymaster.com/
9
  * Text Domain: quiz-master-next
10
  *
11
  * @author Frank Corso
12
+ * @version 5.3.0
13
  * @package QSM
14
  */
15
 
33
  * @var string
34
  * @since 4.0.0
35
  */
36
+ public $version = '5.3.0';
37
 
38
  /**
39
  * QSM Alert Manager Object
192
  */
193
  public function register_quiz_post_types() {
194
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  // Checks settings to see if we need to alter the defaults.
196
  $has_archive = true;
197
  $exclude_search = false;
198
  $cpt_slug = 'quiz';
199
  $settings = (array) get_option( 'qmn-settings' );
200
+ $plural_name = __( 'Quizzes & Surveys', 'quiz-master-next' );
201
 
202
  // Checks if admin turned off archive.
203
  if ( isset( $settings['cpt_archive'] ) && '1' == $settings['cpt_archive'] ) {
214
  $cpt_slug = trim( strtolower( str_replace( ' ', '-', $settings['cpt_slug'] ) ) );
215
  }
216
 
217
+ // Checks if admin changed plural name.
218
+ if ( isset( $settings['plural_name'] ) ) {
219
+ $plural_name = trim( $settings['plural_name'] );
220
+ }
221
+
222
+ // Prepares labels.
223
+ $quiz_labels = array(
224
+ 'name' => $plural_name,
225
+ 'singular_name' => __( 'Quiz', 'quiz-master-next' ),
226
+ 'menu_name' => __( 'Quiz', 'quiz-master-next' ),
227
+ 'name_admin_bar' => __( 'Quiz', 'quiz-master-next' ),
228
+ 'add_new' => __( 'Add New', 'quiz-master-next' ),
229
+ 'add_new_item' => __( 'Add New Quiz', 'quiz-master-next' ),
230
+ 'new_item' => __( 'New Quiz', 'quiz-master-next' ),
231
+ 'edit_item' => __( 'Edit Quiz', 'quiz-master-next' ),
232
+ 'view_item' => __( 'View Quiz', 'quiz-master-next' ),
233
+ 'all_items' => __( 'All Quizzes', 'quiz-master-next' ),
234
+ 'search_items' => __( 'Search Quizzes', 'quiz-master-next' ),
235
+ 'parent_item_colon' => __( 'Parent Quiz:', 'quiz-master-next' ),
236
+ 'not_found' => __( 'No Quiz Found', 'quiz-master-next' ),
237
+ 'not_found_in_trash' => __( 'No Quiz Found In Trash', 'quiz-master-next' ),
238
+ );
239
+
240
  // Prepares post type array.
241
  $quiz_args = array(
242
  'public' => true,
246
  'labels' => $quiz_labels,
247
  'publicly_queryable' => true,
248
  'exclude_from_search' => $exclude_search,
249
+ 'label' => $plural_name,
250
  'rewrite' => array( 'slug' => $cpt_slug ),
251
  'has_archive' => $has_archive,
252
  'supports' => array( 'title', 'author', 'comments' )
php/admin/about-page.php CHANGED
@@ -33,25 +33,25 @@ function mlw_generate_about_page() {
33
  </h2>
34
  <div class="qsm-tab-content tab-1">
35
  <div class="feature">
36
- <h2 class="feature-headline">Welcome to QSM 5.2!</h2>
37
  </div>
38
  <div class="feature">
39
- <h2 class="feature-headline">New Question Editor!</h2>
40
- <p class="feature-text">The "Questions" tab has had a major new redesign. Now, it is much easier to drag-and-drop to reorder all of your questions.</p>
41
- <p class="feature-text">Even better, with this new editor, you can create pages for your quiz or survey and drag questions between pages as well as reorder the pages!</p>
42
  </div>
43
- <hr />
44
  <div class="feature">
45
- <h2 class="feature-headline">For Developers: Results Now Extendable</h2>
46
- <p class="feature-text">There have been ways to add extra data to quizzes/surveys and questions for a while. However, there hasn't been an easy way for developers to add additional data to the results prior to them being stored in the database.</p>
47
- <p class="feature-text">Now, the results array is passed through a new "qsm_results_array" filter so developers can add data to the results. Then, using the template variable system, a developer can have this data shown in the admin details as well.</p>
 
 
 
48
  </div>
49
  </div>
50
  <div class="qsm-tab-content tab-2" style="display: none;">
51
  <h2>Changelog</h2>
52
- <?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 49 ); ?>
53
- <?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 48 ); ?>
54
- <?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 32 ); ?>
55
  </div>
56
  <div class="qsm-tab-content tab-3" style="display:none;">
57
  <h2>GitHub Contributors</h2>
33
  </h2>
34
  <div class="qsm-tab-content tab-1">
35
  <div class="feature">
36
+ <h2 class="feature-headline">Welcome to QSM 5.3!</h2>
37
  </div>
38
  <div class="feature">
39
+ <h2 class="feature-headline">New Progress Bar!</h2>
40
+ <p class="feature-text">You can now enable a progress bar on quizzes and surveys that are using the new pages and questions editor from the 5.2.0 update!</p>
41
+ <p class="feature-text">When editing your quiz or survey, go to the "Options" tab and set the "Show a progress bar?" option to "Yes".</p>
42
  </div>
 
43
  <div class="feature">
44
+ <h2 class="feature-headline">Disable IP Address Collection</h2>
45
+ <p class="feature-text">You can now disable the plugin from collecting IP addresses, if needed. To do so, go to the "Settings" page and check the "Disable collecting and storing IP addresses?" checkbox.</p>
46
+ </div>
47
+ <div class="feature">
48
+ <h2 class="feature-headline">Disable Storing Results In The Database</h2>
49
+ <p class="feature-text">For the quizzes and surveys that do not need to actually store any responses, you can now turn off the results being stored in the database. To do so, go to the "Options" tab when editing your quiz or survey and set the "Store the responses in the database?" option to "No".</p>
50
  </div>
51
  </div>
52
  <div class="qsm-tab-content tab-2" style="display: none;">
53
  <h2>Changelog</h2>
54
+ <?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 50 ); ?>
 
 
55
  </div>
56
  <div class="qsm-tab-content tab-3" style="display:none;">
57
  <h2>GitHub Contributors</h2>
php/admin/settings-page.php CHANGED
@@ -1,5 +1,6 @@
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit;
 
3
  /**
4
  * Generates The Settings Page For The Plugin
5
  *
@@ -18,8 +19,8 @@ class QMNGlobalSettingsPage {
18
  * @return void
19
  */
20
  function __construct() {
21
- $this->add_hooks();
22
- }
23
 
24
  /**
25
  * Add Hooks
@@ -29,9 +30,9 @@ class QMNGlobalSettingsPage {
29
  * @since 4.1.0
30
  * @return void
31
  */
32
- private function add_hooks() {
33
  add_action( "admin_init", array( $this, 'init' ) );
34
- }
35
 
36
  /**
37
  * Prepares Settings Fields And Sections
@@ -41,13 +42,15 @@ class QMNGlobalSettingsPage {
41
  */
42
  public function init() {
43
  register_setting( 'qmn-settings-group', 'qmn-settings' );
44
- add_settings_section( 'qmn-global-section', __( 'Main Settings', 'quiz-master-next' ), array($this, 'global_section'), 'qmn_global_settings' );
45
- add_settings_field( 'usage-tracker', __( 'Allow Usage Tracking?', 'quiz-master-next' ), array($this, 'usage_tracker_field'), 'qmn_global_settings', 'qmn-global-section' );
46
- add_settings_field( 'cpt-search', __( 'Disable Quiz Posts From Being Searched?', 'quiz-master-next' ), array($this, 'cpt_search_field'), 'qmn_global_settings', 'qmn-global-section' );
47
- add_settings_field( 'cpt-archive', __( 'Disable Quiz Archive?', 'quiz-master-next' ), array($this, 'cpt_archive_field'), 'qmn_global_settings', 'qmn-global-section' );
48
- add_settings_field( 'cpt-slug', __( 'Quiz Url Slug', 'quiz-master-next' ) , array($this, 'cpt_slug_field'), 'qmn_global_settings', 'qmn-global-section' );
49
- add_settings_field( 'facebook-app-id', __( 'Facebook App Id', 'quiz-master-next' ), array($this, 'facebook_app_id'), 'qmn_global_settings', 'qmn-global-section' );
50
- add_settings_field( 'results-details', __( 'Template For Admin Results Details', 'quiz-master-next' ), array($this, 'results_details_template'), 'qmn_global_settings', 'qmn-global-section' );
 
 
51
  }
52
 
53
  /**
@@ -88,17 +91,30 @@ class QMNGlobalSettingsPage {
88
  * @since 4.1.0
89
  * @return void
90
  */
91
- public function cpt_slug_field()
92
- {
93
  $settings = (array) get_option( 'qmn-settings' );
94
  $cpt_slug = 'quiz';
95
- if (isset($settings['cpt_slug']))
96
- {
97
  $cpt_slug = esc_attr( $settings['cpt_slug'] );
98
  }
99
  echo "<input type='text' name='qmn-settings[cpt_slug]' id='qmn-settings[cpt_slug]' value='$cpt_slug' />";
100
  }
101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  /**
103
  * Generates Setting Field For Exclude Search
104
  *
@@ -197,6 +213,25 @@ class QMNGlobalSettingsPage {
197
  echo "<label for='qmn-settings[tracking_allowed]'>" . __( "Allow Quiz And Survey Master to anonymously track this plugin's usage and help us make this plugin better.", 'quiz-master-next' ) . "</label>";
198
  }
199
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  /**
201
  * Generates Settings Page
202
  *
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit;
3
+
4
  /**
5
  * Generates The Settings Page For The Plugin
6
  *
19
  * @return void
20
  */
21
  function __construct() {
22
+ $this->add_hooks();
23
+ }
24
 
25
  /**
26
  * Add Hooks
30
  * @since 4.1.0
31
  * @return void
32
  */
33
+ private function add_hooks() {
34
  add_action( "admin_init", array( $this, 'init' ) );
35
+ }
36
 
37
  /**
38
  * Prepares Settings Fields And Sections
42
  */
43
  public function init() {
44
  register_setting( 'qmn-settings-group', 'qmn-settings' );
45
+ add_settings_section( 'qmn-global-section', __( 'Main Settings', 'quiz-master-next' ), array( $this, 'global_section' ), 'qmn_global_settings' );
46
+ add_settings_field( 'usage-tracker', __( 'Allow Usage Tracking?', 'quiz-master-next' ), array( $this, 'usage_tracker_field' ), 'qmn_global_settings', 'qmn-global-section' );
47
+ add_settings_field( 'ip-collection', __( 'Disable collecting and storing IP addresses?', 'quiz-master-next' ), array( $this, 'ip_collection_field' ), 'qmn_global_settings', 'qmn-global-section' );
48
+ add_settings_field( 'cpt-search', __( 'Disable Quiz Posts From Being Searched?', 'quiz-master-next' ), array( $this, 'cpt_search_field' ), 'qmn_global_settings', 'qmn-global-section' );
49
+ add_settings_field( 'cpt-archive', __( 'Disable Quiz Archive?', 'quiz-master-next' ), array( $this, 'cpt_archive_field' ), 'qmn_global_settings', 'qmn-global-section' );
50
+ add_settings_field( 'cpt-slug', __( 'Quiz Url Slug', 'quiz-master-next' ), array( $this, 'cpt_slug_field' ), 'qmn_global_settings', 'qmn-global-section' );
51
+ add_settings_field( 'plural-name', __( 'Post Type Plural Name (Shown in various places such as on archive pages)', 'quiz-master-next' ), array( $this, 'plural_name_field' ), 'qmn_global_settings', 'qmn-global-section' );
52
+ add_settings_field( 'facebook-app-id', __( 'Facebook App Id', 'quiz-master-next' ), array( $this, 'facebook_app_id' ), 'qmn_global_settings', 'qmn-global-section' );
53
+ add_settings_field( 'results-details', __( 'Template For Admin Results Details', 'quiz-master-next' ), array( $this, 'results_details_template' ), 'qmn_global_settings', 'qmn-global-section' );
54
  }
55
 
56
  /**
91
  * @since 4.1.0
92
  * @return void
93
  */
94
+ public function cpt_slug_field() {
 
95
  $settings = (array) get_option( 'qmn-settings' );
96
  $cpt_slug = 'quiz';
97
+ if ( isset( $settings['cpt_slug'] ) ) {
 
98
  $cpt_slug = esc_attr( $settings['cpt_slug'] );
99
  }
100
  echo "<input type='text' name='qmn-settings[cpt_slug]' id='qmn-settings[cpt_slug]' value='$cpt_slug' />";
101
  }
102
 
103
+ /**
104
+ * Generates Setting Field For Plural name
105
+ *
106
+ * @since 5.3.0
107
+ * @return void
108
+ */
109
+ public function plural_name_field() {
110
+ $settings = (array) get_option( 'qmn-settings' );
111
+ $plural_name = __( 'Quizzes & Surveys', 'quiz-master-next' );
112
+ if ( isset( $settings['plural_name'] ) ) {
113
+ $plural_name = esc_attr( $settings['plural_name'] );
114
+ }
115
+ echo "<input type='text' name='qmn-settings[plural_name]' id='qmn-settings[plural_name]' value='$plural_name' />";
116
+ }
117
+
118
  /**
119
  * Generates Setting Field For Exclude Search
120
  *
213
  echo "<label for='qmn-settings[tracking_allowed]'>" . __( "Allow Quiz And Survey Master to anonymously track this plugin's usage and help us make this plugin better.", 'quiz-master-next' ) . "</label>";
214
  }
215
 
216
+ /**
217
+ * Generates Setting Field For IP Collection
218
+ *
219
+ * @since 5.3.0
220
+ * @return void
221
+ */
222
+ public function ip_collection_field() {
223
+ $settings = (array) get_option( 'qmn-settings' );
224
+ $ip_collection = '0';
225
+ if ( isset( $settings['ip_collection'] ) ) {
226
+ $ip_collection = esc_attr( $settings['ip_collection'] );
227
+ }
228
+ $checked = '';
229
+ if ( '1' == $ip_collection ) {
230
+ $checked = " checked='checked'";
231
+ }
232
+ echo "<input type='checkbox' name='qmn-settings[ip_collection]' id='qmn-settings[ip_collection]' value='1'$checked />";
233
+ }
234
+
235
  /**
236
  * Generates Settings Page
237
  *
php/classes/class-qmn-plugin-helper.php CHANGED
@@ -364,7 +364,7 @@ class QMNPluginHelper {
364
  $qmn_total_questions += 1;
365
  if ($quiz_options->question_numbering == 1)
366
  {
367
- $display .= "<span class='mlw_qmn_question_number'>$qmn_total_questions) </span>";
368
  }
369
  }
370
  $display .= call_user_func($type['display'], intval($question_id), $question->question_name, $answers);
364
  $qmn_total_questions += 1;
365
  if ($quiz_options->question_numbering == 1)
366
  {
367
+ $display .= "<span class='mlw_qmn_question_number'>$qmn_total_questions. </span>";
368
  }
369
  }
370
  $display .= call_user_func($type['display'], intval($question_id), $question->question_name, $answers);
php/classes/class-qmn-quiz-manager.php CHANGED
@@ -111,14 +111,9 @@ class QMNQuizManager {
111
  'quiz_id' => $qmn_quiz_options->quiz_id,
112
  'quiz_name' => $qmn_quiz_options->quiz_name,
113
  'quiz_system' => $qmn_quiz_options->system,
 
114
  );
115
 
116
- if ( $_SERVER['REMOTE_ADDR'] ) {
117
- $qmn_array_for_variables['user_ip'] = $_SERVER['REMOTE_ADDR'];
118
- } else {
119
- $qmn_array_for_variables['user_ip'] = 'Unknown';
120
- }
121
-
122
  $return_display .= "<script>
123
  if (window.qmn_quiz_data === undefined) {
124
  window.qmn_quiz_data = new Object();
@@ -129,6 +124,7 @@ class QMNQuizManager {
129
  'quiz_name' => $qmn_array_for_variables['quiz_name'],
130
  'disable_answer' => $qmn_quiz_options->disable_answer_onselect,
131
  'ajax_show_correct' => $qmn_quiz_options->ajax_show_correct,
 
132
  );
133
 
134
  $return_display = apply_filters( 'qmn_begin_shortcode', $return_display, $qmn_quiz_options, $qmn_array_for_variables );
@@ -198,7 +194,22 @@ class QMNQuizManager {
198
  }
199
  }
200
  $question_sql = implode( ', ', $question_ids );
201
- $questions = $wpdb->get_results( "SELECT * FROM " . $wpdb->prefix . "mlw_questions WHERE question_id IN ($question_sql) " . $order_by_sql . $limit_sql );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  } else {
203
  $questions = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "mlw_questions WHERE quiz_id=%d AND deleted=0 " . $order_by_sql . $limit_sql, $quiz_id ) );
204
  }
@@ -287,7 +298,8 @@ class QMNQuizManager {
287
  'empty' => $options->empty_error_text,
288
  );
289
 
290
- wp_enqueue_script( 'qmn_quiz', plugins_url( '../../js/qmn_quiz.js', __FILE__ ), array( 'wp-util', 'underscore', 'jquery', 'jquery-ui-tooltip' ), $mlwQuizMasterNext->version );
 
291
  wp_localize_script( 'qmn_quiz', 'qmn_ajax_object', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) ); // setting ajaxurl
292
  wp_enqueue_script( 'math_jax', '//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML' );
293
 
@@ -504,6 +516,7 @@ class QMNQuizManager {
504
  <a class="qsm-btn qsm-previous qmn_btn mlw_qmn_quiz_link mlw_previous" href="#"><?php echo esc_html( $options->previous_button_text ); ?></a>
505
  <span class="qmn_page_message"></span>
506
  <div class="qmn_page_counter_message"></div>
 
507
  <a class="qsm-btn qsm-next qmn_btn mlw_qmn_quiz_link mlw_next" href="#"><?php echo esc_html( $options->next_button_text ); ?></a>
508
  <input type='submit' class='qsm-btn qsm-submit-btn qmn_btn' value='<?php echo esc_attr( htmlspecialchars_decode( $options->submit_button_text, ENT_QUOTES ) ); ?>' />
509
  </div>
@@ -719,11 +732,7 @@ class QMNQuizManager {
719
  global $qmn_allowed_visit;
720
  $result_display = '';
721
 
722
- if ( $_SERVER["REMOTE_ADDR"] ) {
723
- $qmn_array_for_variables['user_ip'] = $_SERVER["REMOTE_ADDR"];
724
- } else {
725
- $qmn_array_for_variables['user_ip'] = "Unknown";
726
- }
727
 
728
  $result_display = apply_filters( 'qmn_begin_results', $result_display, $qmn_quiz_options, $qmn_array_for_variables );
729
  if ( ! $qmn_allowed_visit ) {
@@ -770,60 +779,64 @@ class QMNQuizManager {
770
  $result_display .= $this->display_social($qmn_quiz_options, $qmn_array_for_variables);
771
  $result_display = apply_filters('qmn_after_social_media', $result_display, $qmn_quiz_options, $qmn_array_for_variables);
772
 
773
- // Creates our results array.
774
- $results_array = array(
775
- intval( $qmn_array_for_variables['timer'] ),
776
- $qmn_array_for_variables['question_answers_array'],
777
- htmlspecialchars( stripslashes( $qmn_array_for_variables['comments'] ), ENT_QUOTES ),
778
- 'contact' => $contact_responses,
779
- );
780
- $results_array = apply_filters( 'qsm_results_array', $results_array, $qmn_array_for_variables );
781
- $serialized_results = serialize( $results_array );
782
-
783
- global $wpdb;
784
- $table_name = $wpdb->prefix . "mlw_results";
785
- $results_insert = $wpdb->insert(
786
- $table_name,
787
- array(
788
- 'quiz_id' => $qmn_array_for_variables['quiz_id'],
789
- 'quiz_name' => $qmn_array_for_variables['quiz_name'],
790
- 'quiz_system' => $qmn_array_for_variables['quiz_system'],
791
- 'point_score' => $qmn_array_for_variables['total_points'],
792
- 'correct_score' => $qmn_array_for_variables['total_score'],
793
- 'correct' => $qmn_array_for_variables['total_correct'],
794
- 'total' => $qmn_array_for_variables['total_questions'],
795
- 'name' => $qmn_array_for_variables['user_name'],
796
- 'business' => $qmn_array_for_variables['user_business'],
797
- 'email' => $qmn_array_for_variables['user_email'],
798
- 'phone' => $qmn_array_for_variables['user_phone'],
799
- 'user' => $qmn_array_for_variables['user_id'],
800
- 'user_ip' => $qmn_array_for_variables['user_ip'],
801
- 'time_taken' => $qmn_array_for_variables['time_taken'],
802
- 'time_taken_real' => date( "Y-m-d H:i:s", strtotime( $qmn_array_for_variables['time_taken'] ) ),
803
- 'quiz_results' => $serialized_results,
804
- 'deleted' => 0
805
- ),
806
- array(
807
- '%d',
808
- '%s',
809
- '%d',
810
- '%d',
811
- '%d',
812
- '%d',
813
- '%d',
814
- '%s',
815
- '%s',
816
- '%s',
817
- '%s',
818
- '%d',
819
- '%s',
820
- '%s',
821
- '%s',
822
- '%s',
823
- '%d'
824
- )
825
- );
826
-
 
 
 
 
827
 
828
  $this->send_user_email($qmn_quiz_options, $qmn_array_for_variables);
829
  $result_display = apply_filters('qmn_after_send_user_email', $result_display, $qmn_quiz_options, $qmn_array_for_variables);
@@ -1424,6 +1437,29 @@ class QMNQuizManager {
1424
  //Remove HTML type for emails
1425
  remove_filter( 'wp_mail_content_type', 'mlw_qmn_set_html_content_type' );
1426
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1427
  }
1428
  $qmnQuizManager = new QMNQuizManager();
1429
 
111
  'quiz_id' => $qmn_quiz_options->quiz_id,
112
  'quiz_name' => $qmn_quiz_options->quiz_name,
113
  'quiz_system' => $qmn_quiz_options->system,
114
+ 'user_ip' => $this->get_user_ip(),
115
  );
116
 
 
 
 
 
 
 
117
  $return_display .= "<script>
118
  if (window.qmn_quiz_data === undefined) {
119
  window.qmn_quiz_data = new Object();
124
  'quiz_name' => $qmn_array_for_variables['quiz_name'],
125
  'disable_answer' => $qmn_quiz_options->disable_answer_onselect,
126
  'ajax_show_correct' => $qmn_quiz_options->ajax_show_correct,
127
+ 'progress_bar' => $qmn_quiz_options->progress_bar,
128
  );
129
 
130
  $return_display = apply_filters( 'qmn_begin_shortcode', $return_display, $qmn_quiz_options, $qmn_array_for_variables );
194
  }
195
  }
196
  $question_sql = implode( ', ', $question_ids );
197
+ $questions = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}mlw_questions WHERE question_id IN ($question_sql) " . $order_by_sql . $limit_sql );
198
+
199
+ // If we are not using randomization, we need to put the questions in the order of the new question editor.
200
+ // If a user has saved the pages in the question editor but still uses the older pagination options
201
+ // Then they will make it here. So, we need to order the questions based on the new editor.
202
+ if ( 1 != $quiz_options->randomness_order && 2 != $quiz_options->randomness_order ) {
203
+ $ordered_questions = array();
204
+ foreach ( $questions as $question ) {
205
+ $key = array_search( $question->question_id, $question_ids );
206
+ if ( false !== $key ) {
207
+ $ordered_questions[ $key ] = $question;
208
+ }
209
+ }
210
+ ksort( $ordered_questions );
211
+ $questions = $ordered_questions;
212
+ }
213
  } else {
214
  $questions = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "mlw_questions WHERE quiz_id=%d AND deleted=0 " . $order_by_sql . $limit_sql, $quiz_id ) );
215
  }
298
  'empty' => $options->empty_error_text,
299
  );
300
 
301
+ wp_enqueue_script( 'progress-bar', plugins_url( '../../js/progressbar.min.js', __FILE__ ) );
302
+ wp_enqueue_script( 'qmn_quiz', plugins_url( '../../js/qmn_quiz.js', __FILE__ ), array( 'wp-util', 'underscore', 'jquery', 'jquery-ui-tooltip', 'progress-bar' ), $mlwQuizMasterNext->version );
303
  wp_localize_script( 'qmn_quiz', 'qmn_ajax_object', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) ); // setting ajaxurl
304
  wp_enqueue_script( 'math_jax', '//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML' );
305
 
516
  <a class="qsm-btn qsm-previous qmn_btn mlw_qmn_quiz_link mlw_previous" href="#"><?php echo esc_html( $options->previous_button_text ); ?></a>
517
  <span class="qmn_page_message"></span>
518
  <div class="qmn_page_counter_message"></div>
519
+ <div id="qsm-progress-bar"></div>
520
  <a class="qsm-btn qsm-next qmn_btn mlw_qmn_quiz_link mlw_next" href="#"><?php echo esc_html( $options->next_button_text ); ?></a>
521
  <input type='submit' class='qsm-btn qsm-submit-btn qmn_btn' value='<?php echo esc_attr( htmlspecialchars_decode( $options->submit_button_text, ENT_QUOTES ) ); ?>' />
522
  </div>
732
  global $qmn_allowed_visit;
733
  $result_display = '';
734
 
735
+ $qmn_array_for_variables['user_ip'] = $this->get_user_ip();
 
 
 
 
736
 
737
  $result_display = apply_filters( 'qmn_begin_results', $result_display, $qmn_quiz_options, $qmn_array_for_variables );
738
  if ( ! $qmn_allowed_visit ) {
779
  $result_display .= $this->display_social($qmn_quiz_options, $qmn_array_for_variables);
780
  $result_display = apply_filters('qmn_after_social_media', $result_display, $qmn_quiz_options, $qmn_array_for_variables);
781
 
782
+ // If the store responses in database option is set to Yes.
783
+ if ( 0 != $qmn_quiz_options->store_responses ) {
784
+
785
+ // Creates our results array.
786
+ $results_array = array(
787
+ intval( $qmn_array_for_variables['timer'] ),
788
+ $qmn_array_for_variables['question_answers_array'],
789
+ htmlspecialchars( stripslashes( $qmn_array_for_variables['comments'] ), ENT_QUOTES ),
790
+ 'contact' => $contact_responses,
791
+ );
792
+ $results_array = apply_filters( 'qsm_results_array', $results_array, $qmn_array_for_variables );
793
+ $serialized_results = serialize( $results_array );
794
+
795
+ // Inserts the responses in the database
796
+ global $wpdb;
797
+ $table_name = $wpdb->prefix . "mlw_results";
798
+ $results_insert = $wpdb->insert(
799
+ $table_name,
800
+ array(
801
+ 'quiz_id' => $qmn_array_for_variables['quiz_id'],
802
+ 'quiz_name' => $qmn_array_for_variables['quiz_name'],
803
+ 'quiz_system' => $qmn_array_for_variables['quiz_system'],
804
+ 'point_score' => $qmn_array_for_variables['total_points'],
805
+ 'correct_score' => $qmn_array_for_variables['total_score'],
806
+ 'correct' => $qmn_array_for_variables['total_correct'],
807
+ 'total' => $qmn_array_for_variables['total_questions'],
808
+ 'name' => $qmn_array_for_variables['user_name'],
809
+ 'business' => $qmn_array_for_variables['user_business'],
810
+ 'email' => $qmn_array_for_variables['user_email'],
811
+ 'phone' => $qmn_array_for_variables['user_phone'],
812
+ 'user' => $qmn_array_for_variables['user_id'],
813
+ 'user_ip' => $qmn_array_for_variables['user_ip'],
814
+ 'time_taken' => $qmn_array_for_variables['time_taken'],
815
+ 'time_taken_real' => date( "Y-m-d H:i:s", strtotime( $qmn_array_for_variables['time_taken'] ) ),
816
+ 'quiz_results' => $serialized_results,
817
+ 'deleted' => 0
818
+ ),
819
+ array(
820
+ '%d',
821
+ '%s',
822
+ '%d',
823
+ '%d',
824
+ '%d',
825
+ '%d',
826
+ '%d',
827
+ '%s',
828
+ '%s',
829
+ '%s',
830
+ '%s',
831
+ '%d',
832
+ '%s',
833
+ '%s',
834
+ '%s',
835
+ '%s',
836
+ '%d'
837
+ )
838
+ );
839
+ }
840
 
841
  $this->send_user_email($qmn_quiz_options, $qmn_array_for_variables);
842
  $result_display = apply_filters('qmn_after_send_user_email', $result_display, $qmn_quiz_options, $qmn_array_for_variables);
1437
  //Remove HTML type for emails
1438
  remove_filter( 'wp_mail_content_type', 'mlw_qmn_set_html_content_type' );
1439
  }
1440
+
1441
+ /**
1442
+ * Returns the quiz taker's IP if IP collection is enabled
1443
+ *
1444
+ * @since 5.3.0
1445
+ * @return string The IP address or a phrase if not collected
1446
+ */
1447
+ private function get_user_ip() {
1448
+ $ip = __( 'Not collected', 'quiz-master-next' );
1449
+ $settings = (array) get_option( 'qmn-settings' );
1450
+ $ip_collection = '0';
1451
+ if ( isset( $settings['ip_collection'] ) ) {
1452
+ $ip_collection = $settings['ip_collection'];
1453
+ }
1454
+ if ( '1' != $ip_collection ) {
1455
+ if ( $_SERVER['REMOTE_ADDR'] ) {
1456
+ $ip = $_SERVER['REMOTE_ADDR'];
1457
+ } else {
1458
+ $ip = __( 'Unknown', 'quiz-master-next' );
1459
+ }
1460
+ }
1461
+ return $ip;
1462
+ }
1463
  }
1464
  $qmnQuizManager = new QMNQuizManager();
1465
 
php/classes/class-qsm-install.php CHANGED
@@ -61,7 +61,26 @@ class QSM_Install {
61
  ),
62
  'default' => 0
63
  );
64
- $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
 
66
  // Registers require_log_in setting
67
  $field_array = array(
@@ -267,7 +286,26 @@ class QSM_Install {
267
  ),
268
  'default' => 0
269
  );
270
- $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
271
 
272
  // Registers social_media setting
273
  $field_array = array(
61
  ),
62
  'default' => 0
63
  );
64
+ $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
65
+
66
+ // Registers progress_bar setting
67
+ $field_array = array(
68
+ 'id' => 'progress_bar',
69
+ 'label' => __( 'Show a progress bar?', 'quiz-master-next' ),
70
+ 'type' => 'radio',
71
+ 'options' => array(
72
+ array(
73
+ 'label' => __( 'Yes', 'quiz-master-next' ),
74
+ 'value' => 1
75
+ ),
76
+ array(
77
+ 'label' => __( 'No', 'quiz-master-next' ),
78
+ 'value' => 0
79
+ )
80
+ ),
81
+ 'default' => 0
82
+ );
83
+ $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
84
 
85
  // Registers require_log_in setting
86
  $field_array = array(
286
  ),
287
  'default' => 0
288
  );
289
+ $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
290
+
291
+ // Registers store_responses setting
292
+ $field_array = array(
293
+ 'id' => 'store_responses',
294
+ 'label' => __( 'Store the responses in the database?', 'quiz-master-next' ),
295
+ 'type' => 'radio',
296
+ 'options' => array(
297
+ array(
298
+ 'label' => __( 'Yes', 'quiz-master-next' ),
299
+ 'value' => 1
300
+ ),
301
+ array(
302
+ 'label' => __( 'No', 'quiz-master-next' ),
303
+ 'value' => 0
304
+ )
305
+ ),
306
+ 'default' => 1
307
+ );
308
+ $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
309
 
310
  // Registers social_media setting
311
  $field_array = array(
php/classes/class-qsm-tracking.php CHANGED
@@ -55,13 +55,13 @@ class QSM_Tracking {
55
  * @return void
56
  */
57
  public function track_check() {
58
- $settings = (array) get_option( 'qmn-settings' );
59
  $tracking_allowed = '0';
60
  if ( isset( $settings['tracking_allowed'] ) ) {
61
  $tracking_allowed = $settings['tracking_allowed'];
62
  }
63
  $last_time = get_option( 'qmn_tracker_last_time' );
64
-
65
  // We only send data if opted in. Opt-in designated by a value of 1 or 2.
66
  // We send data once a week.
67
  if ( ( $tracking_allowed == '1' || $tracking_allowed == '2' ) && ( ( $last_time && $last_time < strtotime( '-1 week' ) ) || !$last_time ) ) {
55
  * @return void
56
  */
57
  public function track_check() {
58
+ $settings = (array) get_option( 'qmn-settings' );
59
  $tracking_allowed = '0';
60
  if ( isset( $settings['tracking_allowed'] ) ) {
61
  $tracking_allowed = $settings['tracking_allowed'];
62
  }
63
  $last_time = get_option( 'qmn_tracker_last_time' );
64
+
65
  // We only send data if opted in. Opt-in designated by a value of 1 or 2.
66
  // We send data once a week.
67
  if ( ( $tracking_allowed == '1' || $tracking_allowed == '2' ) && ( ( $last_time && $last_time < strtotime( '-1 week' ) ) || !$last_time ) ) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: quiz, survey, lead, test, score, exam, questionnaire, question
4
  Requires at least: 4.8
5
  Tested up to: 4.9
6
  Requires PHP: 5.2
7
- Stable tag: 5.2.4
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -111,37 +111,16 @@ This is usually a theme conflict. You can [checkout out our common conflict solu
111
 
112
  == Changelog ==
113
 
114
- = 5.2.4 (May 7, 2018) =
115
- * Closed Bug: %QUESTIONS_ANSWERS% variable is displaying questions in order of creation - ([Issue #660](https://github.com/fpcorso/quiz_master_next/issues/660))
116
- * Closed Bug: Extra spacing is being added to questions when multiple lines are in question - ([Issue #659](https://github.com/fpcorso/quiz_master_next/issues/659))
117
- * Closed Bug: Tabs pages stop working when translated - ([Issue #582](https://github.com/fpcorso/quiz_master_next/issues/582))
118
-
119
- = 5.2.3 (April 3, 2018) =
120
- * Closed Bug: Cannot save question on certain servers - ([Issue #651](https://github.com/fpcorso/quiz_master_next/issues/651))
121
- * Closed Bug: Questions/Answers Template Not Loaded In Admin Results Page - ([Issue #636](https://github.com/fpcorso/quiz_master_next/issues/636))
122
-
123
- = 5.2.2 (April 1, 2018) =
124
- * Makes minor style adjustments
125
- * Adds additional hook to admin results details page
126
- * Modifies a few error messages
127
-
128
- = 5.2.1 (March 5, 2018) =
129
- * Fixes broken "Custom" styles
130
- * Fixes minor bugs in new question editor
131
- * Makes minor style adjustments
132
-
133
- = 5.2.0 (March 3, 2018) =
134
- * Closed Enhancement: Make Quiz Results Extendable/Filterable - ([Issue #622](https://github.com/fpcorso/quiz_master_next/issues/622))
135
- * Closed Enhancement: New Question Editor - ([Issue #568](https://github.com/fpcorso/quiz_master_next/issues/568))
136
- * Closed Bug: Pagination Bug - ([Issue #477](https://github.com/fpcorso/quiz_master_next/issues/477))
137
- * Closed Bug: Questions shift - ([Issue #467](https://github.com/fpcorso/quiz_master_next/issues/467))
138
- * Closed User Request: Remove duplicate question popup confirmation - ([Issue #396](https://github.com/fpcorso/quiz_master_next/issues/396))
139
- * Closed User Request: Question Grouping - ([Issue #356](https://github.com/fpcorso/quiz_master_next/issues/356))
140
- * Closed User Request: Ability To Move Submit Button To Last Question Page - ([Issue #321](https://github.com/fpcorso/quiz_master_next/issues/321))
141
 
142
  ([Read Full Changelog](https://github.com/fpcorso/quiz_master_next/blob/master/CHANGELOG.md))
143
 
144
  == Upgrade Notice ==
145
 
146
- = 5.2.0 =
147
- Update for a new question editor! Includes a variety of bug fixes and minor changes too.
4
  Requires at least: 4.8
5
  Tested up to: 4.9
6
  Requires PHP: 5.2
7
+ Stable tag: 5.3.0
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
111
 
112
  == Changelog ==
113
 
114
+ = 5.3.0 (May 16, 2018) =
115
+ * Closed Enhancement: Ability to disable IP address collection - ([Issue #670](https://github.com/fpcorso/quiz_master_next/issues/670))
116
+ * Closed User Request: Ability to customize name of QSM archive name - ([Issue #666](https://github.com/fpcorso/quiz_master_next/issues/666))
117
+ * Closed User Request: Progress Bar - ([Issue #412](https://github.com/fpcorso/quiz_master_next/issues/412))
118
+ * Closed User Request: Disable Results Being Stored In Database - ([Issue #215](https://github.com/fpcorso/quiz_master_next/issues/215))
119
+ * Closed Bug: Question ordering doesn't work when using older pagination option - ([Issue #657](https://github.com/fpcorso/quiz_master_next/issues/657))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
 
121
  ([Read Full Changelog](https://github.com/fpcorso/quiz_master_next/blob/master/CHANGELOG.md))
122
 
123
  == Upgrade Notice ==
124
 
125
+ = 5.3.0 =
126
+ Update for new features including progress bar, the ability to disable IP collection, and more!
templates/qmn_amethyst.css CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  .ui-tooltip {
2
  max-width: 500px !important;
3
  }
@@ -301,14 +307,14 @@ border: 1px solid #e3e3e3;
301
  }
302
  }
303
 
304
- .qmn_page_counter_message {
305
  font-size: 14px;
306
  color: #999;
307
  width: 100px;
308
  padding: 10px 20px 10px 20px;
309
  margin: 0 auto;
310
  text-align: center;
311
- }
312
 
313
  .mlw_qmn_timer {
314
  z-index: 999;
1
+ #qsm-progress-bar {
2
+ position: relative;
3
+ flex-grow: 2;
4
+ padding: 0 10px;
5
+ }
6
+
7
  .ui-tooltip {
8
  max-width: 500px !important;
9
  }
307
  }
308
  }
309
 
310
+ /* .qmn_page_counter_message {
311
  font-size: 14px;
312
  color: #999;
313
  width: 100px;
314
  padding: 10px 20px 10px 20px;
315
  margin: 0 auto;
316
  text-align: center;
317
+ } */
318
 
319
  .mlw_qmn_timer {
320
  z-index: 999;
templates/qmn_base.css CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  .ui-tooltip {
2
  max-width: 500px !important;
3
  }
@@ -300,14 +306,14 @@ border: 1px solid #e3e3e3;
300
  }
301
  }
302
 
303
- .qmn_page_counter_message {
304
  font-size: 14px;
305
  color: #999;
306
  width: 100px;
307
  padding: 10px 20px 10px 20px;
308
  margin: 0 auto;
309
  text-align: center;
310
- }
311
 
312
  .mlw_qmn_timer {
313
  z-index: 999;
1
+ #qsm-progress-bar {
2
+ position: relative;
3
+ flex-grow: 2;
4
+ padding: 0 10px;
5
+ }
6
+
7
  .ui-tooltip {
8
  max-width: 500px !important;
9
  }
306
  }
307
  }
308
 
309
+ /* .qmn_page_counter_message {
310
  font-size: 14px;
311
  color: #999;
312
  width: 100px;
313
  padding: 10px 20px 10px 20px;
314
  margin: 0 auto;
315
  text-align: center;
316
+ } */
317
 
318
  .mlw_qmn_timer {
319
  z-index: 999;
templates/qmn_emerald.css CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  .ui-tooltip {
2
  max-width: 500px !important;
3
  }
@@ -300,14 +306,14 @@ border: 1px solid #e3e3e3;
300
  }
301
  }
302
 
303
- .qmn_page_counter_message {
304
  font-size: 14px;
305
  color: #999;
306
  width: 100px;
307
  padding: 10px 20px 10px 20px;
308
  margin: 0 auto;
309
  text-align: center;
310
- }
311
 
312
  .mlw_qmn_timer {
313
  z-index: 999;
1
+ #qsm-progress-bar {
2
+ position: relative;
3
+ flex-grow: 2;
4
+ padding: 0 10px;
5
+ }
6
+
7
  .ui-tooltip {
8
  max-width: 500px !important;
9
  }
306
  }
307
  }
308
 
309
+ /* .qmn_page_counter_message {
310
  font-size: 14px;
311
  color: #999;
312
  width: 100px;
313
  padding: 10px 20px 10px 20px;
314
  margin: 0 auto;
315
  text-align: center;
316
+ } */
317
 
318
  .mlw_qmn_timer {
319
  z-index: 999;
templates/qmn_gray.css CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  .ui-tooltip {
2
  max-width: 500px !important;
3
  }
@@ -301,14 +307,14 @@ border: 1px solid #e3e3e3;
301
  }
302
  }
303
 
304
- .qmn_page_counter_message {
305
  font-size: 14px;
306
  color: #999;
307
  width: 100px;
308
  padding: 10px 20px 10px 20px;
309
  margin: 0 auto;
310
  text-align: center;
311
- }
312
 
313
  .mlw_qmn_timer {
314
  z-index: 999;
1
+ #qsm-progress-bar {
2
+ position: relative;
3
+ flex-grow: 2;
4
+ padding: 0 10px;
5
+ }
6
+
7
  .ui-tooltip {
8
  max-width: 500px !important;
9
  }
307
  }
308
  }
309
 
310
+ /* .qmn_page_counter_message {
311
  font-size: 14px;
312
  color: #999;
313
  width: 100px;
314
  padding: 10px 20px 10px 20px;
315
  margin: 0 auto;
316
  text-align: center;
317
+ } */
318
 
319
  .mlw_qmn_timer {
320
  z-index: 999;
templates/qmn_primary.css CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  .ui-tooltip {
2
  max-width: 500px !important;
3
  }
@@ -301,14 +307,14 @@ border: 1px solid #e3e3e3;
301
  }
302
  }
303
 
304
- .qmn_page_counter_message {
305
  font-size: 14px;
306
  color: #999;
307
  width: 100px;
308
  padding: 10px 20px 10px 20px;
309
  margin: 0 auto;
310
  text-align: center;
311
- }
312
 
313
  .mlw_qmn_timer {
314
  z-index: 999;
1
+ #qsm-progress-bar {
2
+ position: relative;
3
+ flex-grow: 2;
4
+ padding: 0 10px;
5
+ }
6
+
7
  .ui-tooltip {
8
  max-width: 500px !important;
9
  }
307
  }
308
  }
309
 
310
+ /* .qmn_page_counter_message {
311
  font-size: 14px;
312
  color: #999;
313
  width: 100px;
314
  padding: 10px 20px 10px 20px;
315
  margin: 0 auto;
316
  text-align: center;
317
+ } */
318
 
319
  .mlw_qmn_timer {
320
  z-index: 999;
templates/qmn_turquoise.css CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  .ui-tooltip {
2
  max-width: 500px !important;
3
  }
@@ -301,14 +307,14 @@ border: 1px solid #e3e3e3;
301
  }
302
  }
303
 
304
- .qmn_page_counter_message {
305
  font-size: 14px;
306
  color: #999;
307
  width: 100px;
308
  padding: 10px 20px 10px 20px;
309
  margin: 0 auto;
310
  text-align: center;
311
- }
312
 
313
  .mlw_qmn_timer {
314
  z-index: 999;
1
+ #qsm-progress-bar {
2
+ position: relative;
3
+ flex-grow: 2;
4
+ padding: 0 10px;
5
+ }
6
+
7
  .ui-tooltip {
8
  max-width: 500px !important;
9
  }
307
  }
308
  }
309
 
310
+ /* .qmn_page_counter_message {
311
  font-size: 14px;
312
  color: #999;
313
  width: 100px;
314
  padding: 10px 20px 10px 20px;
315
  margin: 0 auto;
316
  text-align: center;
317
+ } */
318
 
319
  .mlw_qmn_timer {
320
  z-index: 999;