Wp-Pro-Quiz - Version 0.24

Version Description

  • Support for Achievements V3 added
  • Support for Achievements V2 removed
  • Improvement of statistics function
  • TinyMCE editor added to E-Mail settings
  • Assessment choice added
  • Time logger for each question added
  • Option "Show category score" added in Quiz-result-site
  • User e-mail support added (send an email with quiz-result to the user)
  • "Question overview" in "View questions" will now be displayed
  • Rename button "next exercise" to "next"
  • Rename last button "next exercise" to "Finish quiz" or "Quiz-summary"
  • Bugfix for IIS
  • Adminmenu: "Media add" button in "answers" (edit/new question) added
  • Adminmenu: show question-category in question overview
  • Adminmenu: option "Hide correct questions - display" added
  • Adminmenu: option "Hide quiz time - display" added
  • Adminmenu: option "Hide score - display" added
  • Updated russian translation
  • Updated dutch translation
  • Updated greek translation
  • Translation for danish have been added (Thanks Kenneth D.)
  • Translation for french have been added (Thanks Aurlien C.)
Download this release

Release Info

Developer xeno010
Plugin Icon 128x128 Wp-Pro-Quiz
Version 0.24
Comparing to
See all releases

Code changes from version 0.23 to 0.24

Files changed (41) hide show
  1. css/wpProQuiz_front.css +32 -4
  2. css/wpProQuiz_front.min.css +1 -1
  3. img/assessmentDemo1.png +0 -0
  4. img/assessmentDemo2.png +0 -0
  5. img/catOverview.png +0 -0
  6. img/hideCorrectQuestion.png +0 -0
  7. img/hideQuizPoints.png +0 -0
  8. img/hideQuizTime.png +0 -0
  9. img/wp_pro_quiz.jpg +0 -0
  10. img/wp_pro_quiz_small.jpg +0 -0
  11. js/wpProQuiz_admin.js +255 -29
  12. js/wpProQuiz_admin.min.js +50 -44
  13. js/wpProQuiz_front.js +233 -37
  14. js/wpProQuiz_front.min.js +35 -32
  15. languages/wp-pro-quiz-ar.mo +0 -0
  16. languages/wp-pro-quiz-ar.po +821 -600
  17. languages/wp-pro-quiz-da_DK.mo +0 -0
  18. languages/wp-pro-quiz-da_DK.po +2157 -0
  19. languages/wp-pro-quiz-de_DE.mo +0 -0
  20. languages/wp-pro-quiz-de_DE.po +875 -635
  21. languages/wp-pro-quiz-el.mo +0 -0
  22. languages/wp-pro-quiz-el.po +965 -701
  23. languages/wp-pro-quiz-es_ES.mo +0 -0
  24. languages/wp-pro-quiz-es_ES.po +856 -640
  25. languages/wp-pro-quiz-fr_FR.mo +0 -0
  26. languages/wp-pro-quiz-fr_FR.po +2175 -0
  27. languages/wp-pro-quiz-nb_NO.mo +0 -0
  28. languages/wp-pro-quiz-nb_NO.po +840 -620
  29. languages/wp-pro-quiz-nl_NL.mo +0 -0
  30. languages/wp-pro-quiz-nl_NL.po +898 -648
  31. languages/wp-pro-quiz-ru_RU.mo +0 -0
  32. languages/wp-pro-quiz-ru_RU.po +887 -636
  33. languages/wp-pro-quiz-sv_SE.mo +0 -0
  34. languages/wp-pro-quiz-sv_SE.po +832 -611
  35. languages/wp-pro-quiz.pot +798 -574
  36. lib/controller/WpProQuiz_Controller_Admin.php +3 -1
  37. lib/controller/WpProQuiz_Controller_Front.php +6 -1
  38. lib/controller/WpProQuiz_Controller_GlobalSettings.php +10 -0
  39. lib/controller/WpProQuiz_Controller_Question.php +30 -4
  40. lib/controller/WpProQuiz_Controller_Quiz.php +52 -18
  41. lib/controller/WpProQuiz_Controller_Statistics.php +0 -0
css/wpProQuiz_front.css CHANGED
@@ -63,7 +63,7 @@
63
  width: 100%;
64
  }
65
 
66
- .wpProQuiz_list, .wpProQuiz_listItem, .wpProQuiz_questionList, .wpProQuiz_sortStringList, .wpProQuiz_sortStringList, .wpProQuiz_maxtrixSortCriterion, .wpProQuiz_resultsList {
67
  list-style: none !important;
68
  padding: 0 !important;
69
  margin: 0 !important;
@@ -281,17 +281,19 @@
281
  width: 100% !important;
282
  border-collapse: collapse !important;
283
  margin: 0 !important;
284
- }
285
- .wpProQuiz_resultTable td {
286
- border: none;
287
  }
288
  .wpProQuiz_resultName {
289
  width: 100px !important;
290
  border-right: 1px solid rgb(134, 134, 134) !important;
291
  padding: 10px 0px !important;
 
 
 
292
  }
293
  .wpProQuiz_resultValue {
294
  padding: 0 !important;
 
295
  }
296
  .wpProQuiz_resultValue div {
297
  color: black !important;
@@ -407,4 +409,30 @@
407
  }
408
  .wpProQuiz_header {
409
  margin: 0px !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
410
  }
63
  width: 100%;
64
  }
65
 
66
+ .wpProQuiz_list, .wpProQuiz_listItem, .wpProQuiz_questionList, .wpProQuiz_sortStringList, .wpProQuiz_sortStringList, .wpProQuiz_maxtrixSortCriterion, .wpProQuiz_resultsList, .wpProQuiz_catOverview ol {
67
  list-style: none !important;
68
  padding: 0 !important;
69
  margin: 0 !important;
281
  width: 100% !important;
282
  border-collapse: collapse !important;
283
  margin: 0 !important;
284
+ border: 0 !important;
 
 
285
  }
286
  .wpProQuiz_resultName {
287
  width: 100px !important;
288
  border-right: 1px solid rgb(134, 134, 134) !important;
289
  padding: 10px 0px !important;
290
+ border-bottom: 0 !important;
291
+ border-top: 0 !important;
292
+ border-left: 0 !important;
293
  }
294
  .wpProQuiz_resultValue {
295
  padding: 0 !important;
296
+ border: 0 !important;
297
  }
298
  .wpProQuiz_resultValue div {
299
  color: black !important;
409
  }
410
  .wpProQuiz_header {
411
  margin: 0px !important;
412
+ }
413
+ .wpProQuiz_catOverview {
414
+ margin-top: 10px;
415
+ margin-bottom: 20px;
416
+ }
417
+ .wpProQuiz_catOverview li {
418
+ list-style: none !important;
419
+ padding: 0 !important;
420
+ clear: left !important;
421
+ border-bottom: 1px dashed #aaa;
422
+ height: 1.05em !important;
423
+ margin: 10px 0 0 0 !important;
424
+ position: relative !important;
425
+ }
426
+ .wpProQuiz_catOverview span {
427
+ background:#fff !important;
428
+ padding:0 3px 0 0 !important;
429
+ float:left !important;
430
+ position:absolute !important;
431
+ text-decoration:none !important;
432
+ }
433
+ span.wpProQuiz_catPercent {
434
+ font-weight: bold !important;
435
+ padding-left: 5px !important;
436
+ color: #000 !important;
437
+ right: 0 !important;
438
  }
css/wpProQuiz_front.min.css CHANGED
@@ -1 +1 @@
1
- .wpProQuiz_answerCorrect{background:#6db46d!important;font-weight:bold!important}.wpProQuiz_answerCorrect label{font-weight:bold!important}.wpProQuiz_answerIncorrect{background:#ff9191!important;font-weight:bold!important}.wpProQuiz_content{margin-top:10px!important;margin-bottom:10px!important}.wpProQuiz_content h2{margin-bottom:10px!important}*+html .wpProQuiz_button,*+html .wpProQuiz_button:hover{padding:3px 0!important}.wpProQuiz_button,.wpProQuiz_button:hover{margin:0!important;padding:5px 10px!important;background:#13455b!important;border-radius:11px!important;color:white!important;font-weight:bold!important;border:1px solid #13455b!important;box-shadow:1px 1px 1px #333!important;text-shadow:none!important;filter:none!important;float:none}.wpProQuiz_question_page{margin-bottom:10px!important}.wpProQuiz_question_page span{font-weight:bold!important}.wpProQuiz_questionListItem:last-child,.wpProQuiz_questionListItemLastChildIE{padding:3px!important;margin-bottom:0!important}.wpProQuiz_questionListItem{padding:3px!important;margin-bottom:5px!important;background-image:none!important;margin-left:0!important;list-style:none!important}.wpProQuiz_questionListItem>table{border-collapse:collapse!important;margin:0!important;padding:0!important;width:100%}.wpProQuiz_list,.wpProQuiz_listItem,.wpProQuiz_questionList,.wpProQuiz_sortStringList,.wpProQuiz_sortStringList,.wpProQuiz_maxtrixSortCriterion,.wpProQuiz_resultsList{list-style:none!important;padding:0!important;margin:0!important}.wpProQuiz_questionList{margin-bottom:10px!important;background:#f8faf5!important;border:1px solid #c3d1a3!important;padding:5px!important;list-style:none!important}.wpProQuiz_listItem{position:relative!important}.wpProQuiz_response{background:#f8faf5!important;border:1px solid #c4c4c4!important;padding:5px!important;margin-bottom:15px!important;box-shadow:1px 1px 2px #AAA!important}.wpProQuiz_response span{font-weight:bold!important}.wpProQuiz_sort{width:25px!important}.wpProQuiz_results h3{margin-bottom:10px!important}.wpProQuiz_sort_correct_answer{font-weight:bold!important;margin-right:5px!important;display:none!important}.wpProQuiz_sortable,.wpProQuiz_sortStringItem{padding:5px!important;border:1px solid lightGrey!important;box-shadow:2px 2px 1px #EEE;background-color:#f8faf5!important;cursor:move}.wpProQuiz_time_limit .time{font-weight:bold!important;margin-top:5px!important;margin-bottom:5px!important}.wpProQuiz_time_limit .wpProQuiz_progress{height:10px!important;background-color:blue!important;margin-bottom:5px!important}.wpProQuiz_time_limit_expired{font-weight:bold!important;font-size:15px!important;text-align:center!important}.wpProQuiz_question_text{margin-bottom:10px!important}.wpProQuiz_tipp>div{padding:10px!important;background-color:#ddecff!important;border:1px dotted #363636!important;border-radius:10px!important;position:absolute!important;bottom:5px!important;left:5px!important;right:5px!important;box-shadow:2px 2px 5px 0 #313131!important;z-index:99999!important}.wpProQuiz_matrixSortString,.wpProQuiz_matrixSortString>h3{margin-bottom:10px!important;margin-top:0!important}.wpProQuiz_matrixSortString{background:#f8faf5!important;border:1px solid #c3d1a3!important;padding:5px!important}.wpProQuiz_sortStringList{padding:10px!important}.wpProQuiz_sortStringList>li{float:left!important;margin-left:5px!important;margin-right:5px!important;margin-bottom:5px!important}.wpProQuiz_sortStringItem{margin:0!important;background-image:none!important;list-style:none!important}.wpProQuiz_maxtrixSortCriterion{padding:5px!important}.wpProQuiz_placehold{background-color:#ffffc2!important;list-style:none!important;background-image:none!important;padding:5px!important;height:30px!important;min-width:50px!important;margin:0!important}.wpProQuiz_maxtrixSortText{padding:5px!important}.wpProQuiz_mextrixTr>td{border:1px solid #d1d1d1!important;padding:5px!important;vertical-align:middle!important}.wpProQuiz_points{font-weight:bold!important;text-align:center!important;margin-bottom:20px!important}.wpProQuiz_cloze input[type="text"]{background:transparent;border:0!important;border-bottom:1px solid!important;height:18px!important;margin:0!important;padding:0 4px 0 4px!important;color:black!important;border-radius:0!important;box-shadow:0 0!important}.wpProQuiz_cloze input:focus{outline:none!important}.wpProQuiz_questionListItem input,.wpProQuiz_questionListItem label{margin:0!important;font-weight:normal;display:inline}.wpProQuiz_questionListItem input{float:none!important;display:inline!important}.wpProQuiz_resultsList>li{background-image:none!important;padding:0!important;margin:0!important;list-style-type:none!important}.wpProQuiz_lock,.wpProQuiz_prerequisite{border:1px dotted #ffc3c3!important;background-color:#fff7f7!important}.wpProQuiz_lock p,.wpProQuiz_prerequisite p{margin:20px!important;font-weight:bold!important}.wpProQuiz_toplistTable{width:100%!important;border:1px solid #c3d1a3!important;border-collapse:collapse!important;margin:0!important}.wpProQuiz_toplistTable caption{caption-side:top!important;text-align:right!important;padding-bottom:2px!important;color:gray!important;margin:0!important;font-size:11px!important}.wpProQuiz_toplistTable thead tr{background:#9bbb59!important;padding:5px!important;color:white!important;font-weight:bold!important}.wpProQuiz_toplistTable tbody td:FIRST-CHILD{font-weight:bold!important}.wpProQuiz_toplistTable td,.wpProQuiz_toplistTable th{padding:5px!important;text-align:center!important;border:0!important}.wpProQuiz_toplistTable th{background:#9bbb59!important}.wpProQuiz_toplistTrOdd{background-color:#ebf1de!important}.wpProQuiz_addToplist{margin-top:10px!important;background-color:#f5faea!important;padding:10px!important;border:1px solid #c3d1a3!important}.wpProQuiz_addToplistMessage{border:1px solid #a0a0a0!important;background-color:#fcffb3!important;margin-bottom:5px!important;border-radius:5px!important;padding:5px!important;font-weight:bold!important;color:dimGray!important}.wpProQuiz_resultTable{margin:15px auto!important;width:400px!important;border:1px solid #c4c4c4!important;padding:15px!important;font-weight:bold!important}.wpProQuiz_resultTable table{width:100%!important;border-collapse:collapse!important;margin:0!important}.wpProQuiz_resultTable td{border:0}.wpProQuiz_resultName{width:100px!important;border-right:1px solid #868686!important;padding:10px 0!important}.wpProQuiz_resultValue{padding:0!important}.wpProQuiz_resultValue div{color:black!important;text-align:right!important;box-shadow:1px 1px 3px 1px #c4c4c4!important;display:inline-block!important;height:18px!important;zoom:1!important;*display:inline!important;margin-right:3px!important;vertical-align:middle!important}.wpProQuiz_addBox label{display:inline!important}.wpProQuiz_addBox input[type="text"]{margin:0!important}.wpProQuiz_reviewQuestion{max-height:100px;overflow:hidden;border:1px solid #c3d1a3;background-color:#f8faf5;position:relative}.wpProQuiz_checkPage>div{border:1px solid #c3d1a3;background-color:#f8faf5}.wpProQuiz_checkPage h3{margin:10px 0 10px 0}.wpProQuiz_reviewQuestion ol,.wpProQuiz_checkPage ol{list-style-type:none!important;margin:0!important;padding:5px 12px 0 5px!important;zoom:1!important;position:relative!important}.wpProQuiz_reviewQuestion ol:after{content:".";display:block;height:0;clear:both;visibility:hidden}.wpProQuiz_reviewQuestionTarget{font-weight:bold;border-color:#7db1d3!important;box-shadow:0 0 2px 1px #c4c4c4}.wpProQuiz_reviewQuestion li,.wpProQuiz_checkPage li{float:left!important;margin:0 5px 5px 0!important;border:1px solid #cfcfcf;padding:5px 0 5px 0!important;width:30px!important;text-align:center!important;background-color:white;cursor:pointer!important;list-style-type:none!important}.wpProQuiz_reviewQuestion div{position:absolute;right:0;background-color:#b8b8b8;top:0;height:20px;width:10px;border:0;border-radius:10px;cursor:move}.wpProQuiz_reviewLegend{padding:5px!important;margin-bottom:8px!important}.wpProQuiz_reviewLegend ol{list-style-type:none!important;padding:0!important;margin:0!important}.wpProQuiz_reviewLegend li{float:left!important;padding-right:5px!important;list-style-type:none!important;margin:0!important}.wpProQuiz_reviewColor{height:10px!important;width:10px!important;display:inline-block!important;margin-right:2px!important}.wpProQuiz_button2{border:1px solid #dadada!important;background:whiteSmoke!important;color:#303030!important;border-radius:4px!important;padding:3px 5px!important;box-shadow:1px 1px 1px #a7a7a7!important;text-shadow:none!important;filter:none!important;margin:0!important;font-weight:normal!important}.wpProQuiz_button2:hover{background:#ebebeb!important}.wpProQuiz_reviewDiv{margin:20px 0 20px 0!important}.wpProQuiz_header{margin:0!important}
1
+ .wpProQuiz_answerCorrect{background:#6db46d!important;font-weight:bold!important}.wpProQuiz_answerCorrect label{font-weight:bold!important}.wpProQuiz_answerIncorrect{background:#ff9191!important;font-weight:bold!important}.wpProQuiz_content{margin-top:10px!important;margin-bottom:10px!important}.wpProQuiz_content h2{margin-bottom:10px!important}*+html .wpProQuiz_button,*+html .wpProQuiz_button:hover{padding:3px 0!important}.wpProQuiz_button,.wpProQuiz_button:hover{margin:0!important;padding:5px 10px!important;background:#13455b!important;border-radius:11px!important;color:white!important;font-weight:bold!important;border:1px solid #13455b!important;box-shadow:1px 1px 1px #333!important;text-shadow:none!important;filter:none!important;float:none}.wpProQuiz_question_page{margin-bottom:10px!important}.wpProQuiz_question_page span{font-weight:bold!important}.wpProQuiz_questionListItem:last-child,.wpProQuiz_questionListItemLastChildIE{padding:3px!important;margin-bottom:0!important}.wpProQuiz_questionListItem{padding:3px!important;margin-bottom:5px!important;background-image:none!important;margin-left:0!important;list-style:none!important}.wpProQuiz_questionListItem>table{border-collapse:collapse!important;margin:0!important;padding:0!important;width:100%}.wpProQuiz_list,.wpProQuiz_listItem,.wpProQuiz_questionList,.wpProQuiz_sortStringList,.wpProQuiz_sortStringList,.wpProQuiz_maxtrixSortCriterion,.wpProQuiz_resultsList,.wpProQuiz_catOverview ol{list-style:none!important;padding:0!important;margin:0!important}.wpProQuiz_questionList{margin-bottom:10px!important;background:#f8faf5!important;border:1px solid #c3d1a3!important;padding:5px!important;list-style:none!important}.wpProQuiz_listItem{position:relative!important}.wpProQuiz_response{background:#f8faf5!important;border:1px solid #c4c4c4!important;padding:5px!important;margin-bottom:15px!important;box-shadow:1px 1px 2px #AAA!important}.wpProQuiz_response span{font-weight:bold!important}.wpProQuiz_sort{width:25px!important}.wpProQuiz_results h3{margin-bottom:10px!important}.wpProQuiz_sort_correct_answer{font-weight:bold!important;margin-right:5px!important;display:none!important}.wpProQuiz_sortable,.wpProQuiz_sortStringItem{padding:5px!important;border:1px solid lightGrey!important;box-shadow:2px 2px 1px #EEE;background-color:#f8faf5!important;cursor:move}.wpProQuiz_time_limit .time{font-weight:bold!important;margin-top:5px!important;margin-bottom:5px!important}.wpProQuiz_time_limit .wpProQuiz_progress{height:10px!important;background-color:blue!important;margin-bottom:5px!important}.wpProQuiz_time_limit_expired{font-weight:bold!important;font-size:15px!important;text-align:center!important}.wpProQuiz_question_text{margin-bottom:10px!important}.wpProQuiz_tipp>div{padding:10px!important;background-color:#ddecff!important;border:1px dotted #363636!important;border-radius:10px!important;position:absolute!important;bottom:5px!important;left:5px!important;right:5px!important;box-shadow:2px 2px 5px 0 #313131!important;z-index:99999!important}.wpProQuiz_matrixSortString,.wpProQuiz_matrixSortString>h3{margin-bottom:10px!important;margin-top:0!important}.wpProQuiz_matrixSortString{background:#f8faf5!important;border:1px solid #c3d1a3!important;padding:5px!important}.wpProQuiz_sortStringList{padding:10px!important}.wpProQuiz_sortStringList>li{float:left!important;margin-left:5px!important;margin-right:5px!important;margin-bottom:5px!important}.wpProQuiz_sortStringItem{margin:0!important;background-image:none!important;list-style:none!important}.wpProQuiz_maxtrixSortCriterion{padding:5px!important}.wpProQuiz_placehold{background-color:#ffffc2!important;list-style:none!important;background-image:none!important;padding:5px!important;height:30px!important;min-width:50px!important;margin:0!important}.wpProQuiz_maxtrixSortText{padding:5px!important}.wpProQuiz_mextrixTr>td{border:1px solid #d1d1d1!important;padding:5px!important;vertical-align:middle!important}.wpProQuiz_points{font-weight:bold!important;text-align:center!important;margin-bottom:20px!important}.wpProQuiz_cloze input[type="text"]{background:transparent;border:0!important;border-bottom:1px solid!important;height:18px!important;margin:0!important;padding:0 4px 0 4px!important;color:black!important;border-radius:0!important;box-shadow:0 0!important}.wpProQuiz_cloze input:focus{outline:none!important}.wpProQuiz_questionListItem input,.wpProQuiz_questionListItem label{margin:0!important;font-weight:normal;display:inline}.wpProQuiz_questionListItem input{float:none!important;display:inline!important}.wpProQuiz_resultsList>li{background-image:none!important;padding:0!important;margin:0!important;list-style-type:none!important}.wpProQuiz_lock,.wpProQuiz_prerequisite{border:1px dotted #ffc3c3!important;background-color:#fff7f7!important}.wpProQuiz_lock p,.wpProQuiz_prerequisite p{margin:20px!important;font-weight:bold!important}.wpProQuiz_toplistTable{width:100%!important;border:1px solid #c3d1a3!important;border-collapse:collapse!important;margin:0!important}.wpProQuiz_toplistTable caption{caption-side:top!important;text-align:right!important;padding-bottom:2px!important;color:gray!important;margin:0!important;font-size:11px!important}.wpProQuiz_toplistTable thead tr{background:#9bbb59!important;padding:5px!important;color:white!important;font-weight:bold!important}.wpProQuiz_toplistTable tbody td:FIRST-CHILD{font-weight:bold!important}.wpProQuiz_toplistTable td,.wpProQuiz_toplistTable th{padding:5px!important;text-align:center!important;border:0!important}.wpProQuiz_toplistTable th{background:#9bbb59!important}.wpProQuiz_toplistTrOdd{background-color:#ebf1de!important}.wpProQuiz_addToplist{margin-top:10px!important;background-color:#f5faea!important;padding:10px!important;border:1px solid #c3d1a3!important}.wpProQuiz_addToplistMessage{border:1px solid #a0a0a0!important;background-color:#fcffb3!important;margin-bottom:5px!important;border-radius:5px!important;padding:5px!important;font-weight:bold!important;color:dimGray!important}.wpProQuiz_resultTable{margin:15px auto!important;width:400px!important;border:1px solid #c4c4c4!important;padding:15px!important;font-weight:bold!important}.wpProQuiz_resultTable table{width:100%!important;border-collapse:collapse!important;margin:0!important;border:0!important}.wpProQuiz_resultName{width:100px!important;border-right:1px solid #868686!important;padding:10px 0!important;border-bottom:0!important;border-top:0!important;border-left:0!important}.wpProQuiz_resultValue{padding:0!important;border:0!important}.wpProQuiz_resultValue div{color:black!important;text-align:right!important;box-shadow:1px 1px 3px 1px #c4c4c4!important;display:inline-block!important;height:18px!important;zoom:1!important;*display:inline!important;margin-right:3px!important;vertical-align:middle!important}.wpProQuiz_addBox label{display:inline!important}.wpProQuiz_addBox input[type="text"]{margin:0!important}.wpProQuiz_reviewQuestion{max-height:100px;overflow:hidden;border:1px solid #c3d1a3;background-color:#f8faf5;position:relative}.wpProQuiz_checkPage>div{border:1px solid #c3d1a3;background-color:#f8faf5}.wpProQuiz_checkPage h3{margin:10px 0 10px 0}.wpProQuiz_reviewQuestion ol,.wpProQuiz_checkPage ol{list-style-type:none!important;margin:0!important;padding:5px 12px 0 5px!important;zoom:1!important;position:relative!important}.wpProQuiz_reviewQuestion ol:after{content:".";display:block;height:0;clear:both;visibility:hidden}.wpProQuiz_reviewQuestionTarget{font-weight:bold;border-color:#7db1d3!important;box-shadow:0 0 2px 1px #c4c4c4}.wpProQuiz_reviewQuestion li,.wpProQuiz_checkPage li{float:left!important;margin:0 5px 5px 0!important;border:1px solid #cfcfcf;padding:5px 0 5px 0!important;width:30px!important;text-align:center!important;background-color:white;cursor:pointer!important;list-style-type:none!important}.wpProQuiz_reviewQuestion div{position:absolute;right:0;background-color:#b8b8b8;top:0;height:20px;width:10px;border:0;border-radius:10px;cursor:move}.wpProQuiz_reviewLegend{padding:5px!important;margin-bottom:8px!important}.wpProQuiz_reviewLegend ol{list-style-type:none!important;padding:0!important;margin:0!important}.wpProQuiz_reviewLegend li{float:left!important;padding-right:5px!important;list-style-type:none!important;margin:0!important}.wpProQuiz_reviewColor{height:10px!important;width:10px!important;display:inline-block!important;margin-right:2px!important}.wpProQuiz_button2{border:1px solid #dadada!important;background:whiteSmoke!important;color:#303030!important;border-radius:4px!important;padding:3px 5px!important;box-shadow:1px 1px 1px #a7a7a7!important;text-shadow:none!important;filter:none!important;margin:0!important;font-weight:normal!important}.wpProQuiz_button2:hover{background:#ebebeb!important}.wpProQuiz_reviewDiv{margin:20px 0 20px 0!important}.wpProQuiz_header{margin:0!important}.wpProQuiz_catOverview{margin-top:10px;margin-bottom:20px}.wpProQuiz_catOverview li{list-style:none!important;padding:0!important;clear:left!important;border-bottom:1px dashed #aaa;height:1.05em!important;margin:10px 0 0 0!important;position:relative!important}.wpProQuiz_catOverview span{background:#fff!important;padding:0 3px 0 0!important;float:left!important;position:absolute!important;text-decoration:none!important}span.wpProQuiz_catPercent{font-weight:bold!important;padding-left:5px!important;color:#000!important;right:0!important}
img/assessmentDemo1.png ADDED
Binary file
img/assessmentDemo2.png ADDED
Binary file
img/catOverview.png ADDED
Binary file
img/hideCorrectQuestion.png ADDED
Binary file
img/hideQuizPoints.png ADDED
Binary file
img/hideQuizTime.png ADDED
Binary file
img/wp_pro_quiz.jpg ADDED
Binary file
img/wp_pro_quiz_small.jpg ADDED
Binary file
js/wpProQuiz_admin.js CHANGED
@@ -1,4 +1,7 @@
1
  jQuery(document).ready(function($) {
 
 
 
2
  $.fn.wpProQuiz_preview = function() {
3
  var methods = {
4
  openPreview: function(obj) {
@@ -1123,7 +1126,6 @@ jQuery(document).ready(function($) {
1123
  };
1124
 
1125
  $.fn.wpProQuiz_toplist = function() {
1126
- var methods = this;
1127
  var elements = {
1128
  sort: $('#wpProQuiz_sorting'),
1129
  pageLimit: $('#wpProQuiz_pageLimit'),
@@ -1136,10 +1138,11 @@ jQuery(document).ready(function($) {
1136
  content: $('#wpProQuiz_content')
1137
  };
1138
 
1139
- methods = {
1140
  loadData: function(action) {
1141
  var location = window.location.pathname + window.location.search;
1142
  var url = location.replace('admin.php', 'admin-ajax.php') + '&action=load_toplist';
 
1143
  var data = {
1144
  action: 'wp_pro_quiz_load_toplist',
1145
  sort: elements.sort.val(),
@@ -1155,10 +1158,12 @@ jQuery(document).ready(function($) {
1155
  elements.content.hide();
1156
 
1157
  $.post(url, data, function(json) {
1158
- methods.handleDataRequest(json.data);
 
1159
 
1160
  if(json.nav != undefined) {
1161
- methods.handleNav(json.nav);
 
1162
  }
1163
 
1164
  elements.loadDataBox.hide();
@@ -1175,10 +1180,11 @@ jQuery(document).ready(function($) {
1175
  .appendTo(elements.currentPage);
1176
  }
1177
 
1178
- methods.checkNav();
1179
  },
1180
 
1181
  handleDataRequest: function(json) {
 
1182
 
1183
  elements.dataBody.empty();
1184
 
@@ -1186,8 +1192,10 @@ jQuery(document).ready(function($) {
1186
  var data = elements.rowClone.clone().children();
1187
 
1188
  data.eq(0).children().val(v.id);
1189
- data.eq(1).text(v.name);
1190
- data.eq(2).text(v.email);
 
 
1191
  data.eq(3).text(v.type);
1192
  data.eq(4).text(v.date);
1193
  data.eq(5).text(v.points);
@@ -1205,6 +1213,63 @@ jQuery(document).ready(function($) {
1205
  .appendTo(elements.dataBody);
1206
  }
1207
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1208
  },
1209
 
1210
  checkNav: function() {
@@ -1221,6 +1286,12 @@ jQuery(document).ready(function($) {
1221
  } else {
1222
  elements.pageRight.show();
1223
  }
 
 
 
 
 
 
1224
  }
1225
  };
1226
 
@@ -1306,6 +1377,9 @@ jQuery(document).ready(function($) {
1306
  /**
1307
  * NEW
1308
  */
 
 
 
1309
  function WpProQuiz_Admin() {
1310
  var global = this;
1311
 
@@ -1351,8 +1425,28 @@ jQuery(document).ready(function($) {
1351
  }
1352
  };
1353
 
1354
- var module = {
 
 
 
 
1355
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1356
  gobalSettings: function() {
1357
  var methode = {
1358
  categoryDelete: function(id) {
@@ -1391,24 +1485,29 @@ jQuery(document).ready(function($) {
1391
  $('select[name="category"] option[value="'+id+'"]').text(data.categoryName);
1392
  $('select[name="category"]').change();
1393
  });
 
 
 
 
 
1394
  }
1395
  };
1396
 
1397
  var init = function() {
1398
- $('.wpProQuiz_tab').click(function() {
1399
- var $this = $(this);
1400
-
1401
- $('.wpProQuiz_tab').removeClass('button-primary').addClass('button-secondary');
1402
- $this.removeClass('button-secondary').addClass('button-primary');
1403
-
1404
- $('#problemInfo, #problemContent, #globalContent').hide('fast');
1405
-
1406
- if($this.attr('id') == 'globalTab') {
1407
- $('#globalContent').show('fast');
1408
- } else {
1409
- $('#problemInfo, #problemContent').show('fast');
1410
- }
1411
- });
1412
 
1413
  $('select[name="category"]').change(function() {
1414
  $('input[name="categoryEditText"]').val($(this).find(':selected').text());
@@ -1426,6 +1525,46 @@ jQuery(document).ready(function($) {
1426
 
1427
  methode.categoryEdit(id, text);
1428
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1429
  };
1430
 
1431
  init();
@@ -1528,6 +1667,38 @@ jQuery(document).ready(function($) {
1528
  $('select[name="category"]').append($option).change();
1529
 
1530
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1531
  }
1532
  };
1533
 
@@ -1669,6 +1840,15 @@ jQuery(document).ready(function($) {
1669
  return false;
1670
  }
1671
 
 
 
 
 
 
 
 
 
 
1672
  return true;
1673
  }
1674
  };
@@ -1715,6 +1895,7 @@ jQuery(document).ready(function($) {
1715
  clone.find('.wpProQuiz_text').val('');
1716
  clone.find('.wpProQuiz_points').val(1);
1717
  clone.find('.deleteAnswer').click(methode.answerRemove);
 
1718
 
1719
  clone.appendTo(ul);
1720
 
@@ -1756,6 +1937,7 @@ jQuery(document).ready(function($) {
1756
  methode.addCategory();
1757
  });
1758
 
 
1759
  };
1760
 
1761
  var init = function() {
@@ -1768,6 +1950,7 @@ jQuery(document).ready(function($) {
1768
  },
1769
 
1770
  statistic: function() {
 
1771
  var methode = this;
1772
 
1773
  var quizId = $('#quizId').val();
@@ -1777,7 +1960,8 @@ jQuery(document).ready(function($) {
1777
  var elements = {
1778
  currentPage: $('#wpProQuiz_currentPage'),
1779
  pageLeft: $('#wpProQuiz_pageLeft'),
1780
- pageRight: $('#wpProQuiz_pageRight')
 
1781
 
1782
  };
1783
 
@@ -1797,7 +1981,8 @@ jQuery(document).ready(function($) {
1797
 
1798
  var data = {
1799
  userId: userId,
1800
- quizId: quizId
 
1801
  };
1802
 
1803
  methode.toggleLoadBox(false);
@@ -1815,6 +2000,21 @@ jQuery(document).ready(function($) {
1815
  methode.setStatisticData($tr, v);
1816
  });
1817
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1818
  methode.toggleLoadBox(true);
1819
  });
1820
  },
@@ -1825,6 +2025,7 @@ jQuery(document).ready(function($) {
1825
  $o.find('.wpProQuiz_cTip').text(v.hint);
1826
  $o.find('.wpProQuiz_cPoints').text(v.points);
1827
  $o.find('.wpProQuiz_cResult').text(v.result);
 
1828
  },
1829
 
1830
  toggleLoadBox: function(show) {
@@ -1840,7 +2041,7 @@ jQuery(document).ready(function($) {
1840
  }
1841
  },
1842
 
1843
- reset: function(full) {
1844
  var userId = $('#userSelect').val();
1845
 
1846
  if(!confirm(wpProQuizLocalize.reset_statistics_msg)) {
@@ -1850,7 +2051,8 @@ jQuery(document).ready(function($) {
1850
  var data = {
1851
  quizId: quizId,
1852
  userId: userId,
1853
- full: full ? 1 : 0
 
1854
  };
1855
 
1856
  methode.toggleLoadBox(false);
@@ -1945,7 +2147,7 @@ jQuery(document).ready(function($) {
1945
 
1946
  var init = function() {
1947
 
1948
- $('#userSelect').change(function() {
1949
  methode.loadUsersStatistic();
1950
  });
1951
 
@@ -1954,11 +2156,15 @@ jQuery(document).ready(function($) {
1954
  });
1955
 
1956
  $('#wpProQuiz_reset').click(function() {
1957
- methode.reset(false);
 
 
 
 
1958
  });
1959
 
1960
  $('.wpProQuiz_resetComplete').click(function() {
1961
- methode.reset(true);
1962
  });
1963
 
1964
  $('.wpProQuiz_tab').click(function() {
@@ -2016,6 +2222,8 @@ jQuery(document).ready(function($) {
2016
  };
2017
 
2018
  var init = function() {
 
 
2019
  var m = $.noop;
2020
 
2021
  if($('.wpProQuiz_questionEdit').length) {
@@ -2027,6 +2235,24 @@ jQuery(document).ready(function($) {
2027
  }
2028
 
2029
  m();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2030
  };
2031
 
2032
  init();
1
  jQuery(document).ready(function($) {
2
+ /**
3
+ * @memberOf $.fn
4
+ */
5
  $.fn.wpProQuiz_preview = function() {
6
  var methods = {
7
  openPreview: function(obj) {
1126
  };
1127
 
1128
  $.fn.wpProQuiz_toplist = function() {
 
1129
  var elements = {
1130
  sort: $('#wpProQuiz_sorting'),
1131
  pageLimit: $('#wpProQuiz_pageLimit'),
1138
  content: $('#wpProQuiz_content')
1139
  };
1140
 
1141
+ var methods = {
1142
  loadData: function(action) {
1143
  var location = window.location.pathname + window.location.search;
1144
  var url = location.replace('admin.php', 'admin-ajax.php') + '&action=load_toplist';
1145
+ var th = this;
1146
  var data = {
1147
  action: 'wp_pro_quiz_load_toplist',
1148
  sort: elements.sort.val(),
1158
  elements.content.hide();
1159
 
1160
  $.post(url, data, function(json) {
1161
+ //methods.handleDataRequest(json.data);
1162
+ th.handleDataRequest(json.data);
1163
 
1164
  if(json.nav != undefined) {
1165
+ //methods.handleNav(json.nav);
1166
+ th.handleNav(json.nav);
1167
  }
1168
 
1169
  elements.loadDataBox.hide();
1180
  .appendTo(elements.currentPage);
1181
  }
1182
 
1183
+ this.checkNav();
1184
  },
1185
 
1186
  handleDataRequest: function(json) {
1187
+ var methods = this;
1188
 
1189
  elements.dataBody.empty();
1190
 
1192
  var data = elements.rowClone.clone().children();
1193
 
1194
  data.eq(0).children().val(v.id);
1195
+ data.eq(1).find('strong').text(v.name);
1196
+ data.eq(1).find('.inline_editUsername').val(v.name);
1197
+ data.eq(2).find('.wpProQuiz_email').text(v.email);
1198
+ data.eq(2).find('input').val(v.email);
1199
  data.eq(3).text(v.type);
1200
  data.eq(4).text(v.date);
1201
  data.eq(5).text(v.points);
1213
  .appendTo(elements.dataBody);
1214
  }
1215
 
1216
+ $('.wpProQuiz_delete').click(function() {
1217
+ if(confirm(wpProQuizLocalize.confirm_delete_entry)) {
1218
+ var id = new Array($(this).closest('tr').find('input[name="checkedData[]"]').val());
1219
+
1220
+ methods.loadData({a: 'delete', toplistIds: id});
1221
+ }
1222
+
1223
+ return false;
1224
+ });
1225
+
1226
+ $('.wpProQuiz_edit').click(function() {
1227
+ var $contain = $(this).closest('tr');
1228
+
1229
+ $contain.find('.row-actions').hide();
1230
+ $contain.find('.inline-edit').show();
1231
+
1232
+ $contain.find('.wpProQuiz_username, .wpProQuiz_email').hide();
1233
+ $contain.find('.inline_editUsername, .inline_editEmail').show();
1234
+
1235
+ return false;
1236
+ });
1237
+
1238
+ $('.inline_editSave').click(function() {
1239
+ var $contain = $(this).closest('tr');
1240
+ var username = $contain.find('.inline_editUsername').val();
1241
+ var email = $contain.find('.inline_editEmail').val();
1242
+
1243
+ if(methods.isEmpty(username) || methods.isEmpty(email)) {
1244
+ alert(wpProQuizLocalize.not_all_fields_completed);
1245
+
1246
+ return false;
1247
+ }
1248
+
1249
+ methods.loadData({
1250
+ a: 'edit',
1251
+ toplistId: $contain.find('input[name="checkedData[]"]').val(),
1252
+ name: username,
1253
+ email: email
1254
+ });
1255
+
1256
+ return false;
1257
+ });
1258
+
1259
+ $('.inline_editCancel').click(function() {
1260
+ var $contain = $(this).closest('tr');
1261
+
1262
+ $contain.find('.row-actions').show();
1263
+ $contain.find('.inline-edit').hide();
1264
+
1265
+ $contain.find('.wpProQuiz_username, .wpProQuiz_email').show();
1266
+ $contain.find('.inline_editUsername, .inline_editEmail').hide();
1267
+
1268
+ $contain.find('.inline_editUsername').val($contain.find('.wpProQuiz_username').text());
1269
+ $contain.find('.inline_editEmail').val($contain.find('.wpProQuiz_email').text());
1270
+
1271
+ return false;
1272
+ });
1273
  },
1274
 
1275
  checkNav: function() {
1286
  } else {
1287
  elements.pageRight.show();
1288
  }
1289
+ },
1290
+
1291
+ isEmpty: function(text) {
1292
+ text = $.trim(text);
1293
+
1294
+ return (!text || 0 === text.length);
1295
  }
1296
  };
1297
 
1377
  /**
1378
  * NEW
1379
  */
1380
+ /**
1381
+ * @memberOf WpProQuiz_Admin
1382
+ */
1383
  function WpProQuiz_Admin() {
1384
  var global = this;
1385
 
1425
  }
1426
  };
1427
 
1428
+ var tabWrapper = function() {
1429
+ $('.wpProQuiz_tab_wrapper a').click(function() {
1430
+ var $this = $(this);
1431
+ var tabId = $this.data('tab');
1432
+ var currentTab = $this.siblings('.button-primary').removeClass('button-primary').addClass('button-secondary');
1433
 
1434
+ $this.removeClass('button-secondary').addClass('button-primary');
1435
+
1436
+ $(currentTab.data('tab')).hide('fast');
1437
+ $(tabId).show('fast');
1438
+
1439
+ $(document).trigger({type: 'changeTab', tabId: tabId});
1440
+
1441
+ return false;
1442
+ });
1443
+ };
1444
+
1445
+ var module = {
1446
+ /**
1447
+ * @memberOf WpProQuiz_admin.module
1448
+ */
1449
+
1450
  gobalSettings: function() {
1451
  var methode = {
1452
  categoryDelete: function(id) {
1485
  $('select[name="category"] option[value="'+id+'"]').text(data.categoryName);
1486
  $('select[name="category"]').change();
1487
  });
1488
+ },
1489
+
1490
+ changeTimeFormat: function(inputName, $select) {
1491
+ if($select.val() != "0")
1492
+ $('input[name="' + inputName + '"]').val($select.val());
1493
  }
1494
  };
1495
 
1496
  var init = function() {
1497
+ // $('.wpProQuiz_tab').click(function() {
1498
+ // var $this = $(this);
1499
+ //
1500
+ // $('.wpProQuiz_tab').removeClass('button-primary').addClass('button-secondary');
1501
+ // $this.removeClass('button-secondary').addClass('button-primary');
1502
+ //
1503
+ // $('#problemInfo, #problemContent, #globalContent').hide('fast');
1504
+ //
1505
+ // if($this.attr('id') == 'globalTab') {
1506
+ // $('#globalContent').show('fast');
1507
+ // } else {
1508
+ // $('#problemInfo, #problemContent').show('fast');
1509
+ // }
1510
+ // });
1511
 
1512
  $('select[name="category"]').change(function() {
1513
  $('input[name="categoryEditText"]').val($(this).find(':selected').text());
1525
 
1526
  methode.categoryEdit(id, text);
1527
  });
1528
+
1529
+ $('#statistic_time_format_select').change(function() {
1530
+ methode.changeTimeFormat('statisticTimeFormat', $(this));
1531
+ });
1532
+
1533
+ $(document).bind('changeTab', function(data) {
1534
+ $('#problemInfo').hide('fast');
1535
+
1536
+ switch (data.tabId) {
1537
+ case '#problemContent':
1538
+ $('#problemInfo').show('fast');
1539
+ break;
1540
+ case '#emailSettingsTab':
1541
+ break;
1542
+ }
1543
+ });
1544
+
1545
+ $('input[name="email[html]"]').change(function() {
1546
+ if(switchEditors == undefined)
1547
+ return false;
1548
+
1549
+ if(this.checked) {
1550
+ switchEditors.go('adminEmailEditor', 'tmce');
1551
+ } else {
1552
+ switchEditors.go('adminEmailEditor', 'html');
1553
+ }
1554
+
1555
+ }).change();
1556
+
1557
+ $('input[name="userEmail[html]"]').change(function() {
1558
+ if(switchEditors == undefined)
1559
+ return false;
1560
+
1561
+ if(this.checked) {
1562
+ switchEditors.go('userEmailEditor', 'tmce');
1563
+ } else {
1564
+ switchEditors.go('userEmailEditor', 'html');
1565
+ }
1566
+
1567
+ }).change();
1568
  };
1569
 
1570
  init();
1667
  $('select[name="category"]').append($option).change();
1668
 
1669
  });
1670
+ },
1671
+
1672
+ addMediaClick: function() {
1673
+ if(typeof tb_show != "function")
1674
+ return false;
1675
+
1676
+ var closest = $(this).closest('li');
1677
+ var htmlCheck = closest.find('input[name="answerData[][html]"]:eq(0)');
1678
+ var field = closest.find('.wpProQuiz_text:eq(0)');
1679
+
1680
+ window.org_send_to_editor = window.send_to_editor;
1681
+ var org_tb_remove = tb_remove;
1682
+
1683
+ window.send_to_editor = function(html) {
1684
+ var img = $('img', html)[0].outerHTML;
1685
+
1686
+ field.val(field.val() + img);
1687
+ htmlCheck.attr('checked', true);
1688
+
1689
+ tb_remove();
1690
+
1691
+ window.send_to_editor = window.org_send_to_editor;
1692
+ };
1693
+
1694
+ window.tb_remove = function() {
1695
+ window.send_to_editor = window.org_send_to_editor;
1696
+ tb_remove = org_tb_remove;
1697
+
1698
+ tb_remove();
1699
+ };
1700
+
1701
+ tb_show('', 'media-upload.php?type=image&TB_iframe=true');
1702
  }
1703
  };
1704
 
1840
  return false;
1841
  }
1842
 
1843
+ return true;
1844
+ },
1845
+
1846
+ assessment_answer: function() {
1847
+ if(global.isEmpty(global.getMceContent('assessment'))) {
1848
+ alert(wpProQuizLocalize.no_answer_msg);
1849
+ return false;
1850
+ }
1851
+
1852
  return true;
1853
  }
1854
  };
1895
  clone.find('.wpProQuiz_text').val('');
1896
  clone.find('.wpProQuiz_points').val(1);
1897
  clone.find('.deleteAnswer').click(methode.answerRemove);
1898
+ clone.find('.addMedia').click(methode.addMediaClick);
1899
 
1900
  clone.appendTo(ul);
1901
 
1937
  methode.addCategory();
1938
  });
1939
 
1940
+ $('.addMedia').click(methode.addMediaClick);
1941
  };
1942
 
1943
  var init = function() {
1950
  },
1951
 
1952
  statistic: function() {
1953
+
1954
  var methode = this;
1955
 
1956
  var quizId = $('#quizId').val();
1960
  var elements = {
1961
  currentPage: $('#wpProQuiz_currentPage'),
1962
  pageLeft: $('#wpProQuiz_pageLeft'),
1963
+ pageRight: $('#wpProQuiz_pageRight'),
1964
+ testSelect: $('#testSelect')
1965
 
1966
  };
1967
 
1981
 
1982
  var data = {
1983
  userId: userId,
1984
+ quizId: quizId,
1985
+ testId: $('#testSelect').val()
1986
  };
1987
 
1988
  methode.toggleLoadBox(false);
2000
  methode.setStatisticData($tr, v);
2001
  });
2002
 
2003
+ $('#testSelect option:gt(0)').remove();
2004
+ var $testSelect = $('#testSelect');
2005
+
2006
+ $.each(json.tests, function() {
2007
+ var $option = $(document.createElement('option'));
2008
+
2009
+ $option.val(this.id);
2010
+ $option.text(this.date);
2011
+
2012
+ if(json.testId == this.id)
2013
+ $option.attr('selected', true);
2014
+
2015
+ $testSelect.append($option);
2016
+ });
2017
+
2018
  methode.toggleLoadBox(true);
2019
  });
2020
  },
2025
  $o.find('.wpProQuiz_cTip').text(v.hint);
2026
  $o.find('.wpProQuiz_cPoints').text(v.points);
2027
  $o.find('.wpProQuiz_cResult').text(v.result);
2028
+ $o.find('.wpProQuiz_cTime').text(v.questionTime);
2029
  },
2030
 
2031
  toggleLoadBox: function(show) {
2041
  }
2042
  },
2043
 
2044
+ reset: function(type) {
2045
  var userId = $('#userSelect').val();
2046
 
2047
  if(!confirm(wpProQuizLocalize.reset_statistics_msg)) {
2051
  var data = {
2052
  quizId: quizId,
2053
  userId: userId,
2054
+ testId: elements.testSelect.val(),
2055
+ type: type
2056
  };
2057
 
2058
  methode.toggleLoadBox(false);
2147
 
2148
  var init = function() {
2149
 
2150
+ $('#userSelect, #testSelect').change(function() {
2151
  methode.loadUsersStatistic();
2152
  });
2153
 
2156
  });
2157
 
2158
  $('#wpProQuiz_reset').click(function() {
2159
+ methode.reset(0);
2160
+ });
2161
+
2162
+ $('#wpProQuiz_resetUser').click(function() {
2163
+ methode.reset(1);
2164
  });
2165
 
2166
  $('.wpProQuiz_resetComplete').click(function() {
2167
+ methode.reset(2);
2168
  });
2169
 
2170
  $('.wpProQuiz_tab').click(function() {
2222
  };
2223
 
2224
  var init = function() {
2225
+ tabWrapper();
2226
+
2227
  var m = $.noop;
2228
 
2229
  if($('.wpProQuiz_questionEdit').length) {
2235
  }
2236
 
2237
  m();
2238
+
2239
+ $('.wpProQuiz_demoImgBox a').mouseover(function(e) {
2240
+ var $this = $(this);
2241
+ var d = $(document).width();
2242
+ var img = $this.siblings().outerWidth(true);
2243
+
2244
+ if(e.pageX + img > d) {
2245
+ var v = d - (e.pageX + img + 30);
2246
+ $(this).next().css('left', v + "px");
2247
+ }
2248
+
2249
+ $(this).next().show();
2250
+
2251
+ }).mouseout(function() {
2252
+ $(this).next().hide();
2253
+ }).click(function() {
2254
+ return false;
2255
+ });
2256
  };
2257
 
2258
  init();
js/wpProQuiz_admin.min.js CHANGED
@@ -1,51 +1,57 @@
1
- jQuery(document).ready(function(a){a.fn.wpProQuiz_preview=function(){var b={openPreview:function(b){window.open(a(b).attr("href"),"wpProQuizPreview","width=900,height=900")}};a(".wpProQuiz_prview").click(function(a){b.openPreview(this);a.preventDefault()})};a.fn.wpProQuiz_quizOverall=function(){var b={changeExport:function(b){$input=a(b);$export=a(".wpProQuiz_exportList");$ul=$export.find("ul").first();$export.find("li").remove();a('input[name="exportItems"]').each(function(){$this=a(this);if(this.checked){var b=
2
- $this.parent().parent().find(".wpProQuiz_quizName a:eq(0)").text();a("<li>"+b+"</li>").appendTo($ul)}})},startExport:function(){$ele=a('input[name="exportItems"]:checked');if(1>$ele.length)return alert(wpProQuizLocalize.no_selected_quiz),!1;$hidden=a("#exportHidden");$hidden.html("");a('input[name="exportItems"]').each(function(){$this=a(this);this.checked&&a('<input type="hidden" value="'+this.value+'" name="exportIds[]">').appendTo($hidden)});return!0}};a(".wpProQuiz_delete").click(function(a){return!confirm(wpProQuizLocalize.delete_msg)?
3
  (a.preventDefault(),!1):!0});a(".wpProQuiz_import").click(function(b){b.preventDefault();a(".wpProQuiz_importList").toggle("fast");a(".wpProQuiz_exportList").hide();a(".wpProQuiz_exportCheck").hide()});a(".wpProQuiz_export").click(function(b){b.preventDefault();a(".wpProQuiz_exportList").toggle("fast");a(".wpProQuiz_exportCheck").toggle("fast");a(".wpProQuiz_importList").hide()});a('input[name="exportItems"]').change(function(){b.changeExport(this)});a('input[name="exportItemsAll"]').change(function(){var b=
4
- a('input[name="exportItems"]');this.checked?b.attr("checked",!0):b.attr("checked",!1);b.change()});a("#exportStart").click(function(a){b.startExport()||a.preventDefault()})};a.fn.wpProQuiz_questionOverall=function(){var b={saveSort:function(){var g={action:"wp_pro_quiz_update_sort",sort:b.parseSortArray()},d=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=save_sort";a.post(d,g,function(){a("#sortMsg").show(400).delay(1E3).hide(400)})},parseSortArray:function(){var b=
5
  [];a("tbody tr").each(function(){b.push(this.id.replace("wpProQuiz_questionId_",""))});return b},sortUpdate:function(){a(".wpProQuiz_questionOverall tbody").children().each(function(){$t=a(this).children().first().text(a(this).index()+1)})},loadQuestionCopy:function(){var b=a("#questionCopySelect"),d=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=load_question";b.hide();b.empty();a("#loadDataImg").show();a.post(d,{action:"wp_pro_quiz_load_question",
6
- excludeId:1},function(d){a.each(d,function(d,c){var e=a(document.createElement("optgroup"));e.attr("label",c.name);a.each(c.question,function(b,c){a(document.createElement("option")).val(c.id).text(c.name).appendTo(e)});b.append(e)});a("#loadDataImg").hide();b.show()},"json")}};a(".wp-list-table tbody").sortable({handle:".wpProQuiz_move",update:b.sortUpdate});a(".wpProQuiz_delete").click(function(a){return!confirm(wpProQuizLocalize.delete_msg)?(a.preventDefault(),!1):!0});a("#wpProQuiz_saveSort").click(function(a){a.preventDefault();
7
- b.saveSort()});a("#wpProQuiz_questionCopy").click(function(g){var d=a(".wpProQuiz_questionCopy");d.is(":visible")?d.hide():(d.show(),b.loadQuestionCopy());g.preventDefault()})};a.fn.wpProQuiz_quizEdit=function(){var b={addResult:function(){a("#resultList").children().each(function(){if("none"==a(this).css("display")){var b=a(this),e=b.find('textarea[name="resultTextGrade[text][]"]'),f=e.attr("id"),c=!0;b.find('input[name="resultTextGrade[prozent][]"]').val("0");b.find('input[name="resultTextGrade[activ][]"]').val("1").keyup();
8
- void 0!=tinymce.editors[f]&&!tinymce.editors[f].isHidden()&&(c=!1);void 0!=switchEditors&&!c&&(switchEditors.go(f,"toggle"),switchEditors.go(f,"toggle"));void 0!=tinymce.editors[f]?tinymce.editors[f].setContent(""):e.val("");void 0!=tinymce.editors[f]&&!c&&tinyMCE.execCommand("mceRemoveControl",!1,f);b.parent().children(":visible").last().after(b);void 0!=tinymce.editors[f]&&!c&&tinyMCE.execCommand("mceAddControl",!1,f);a(this).show();void 0!=switchEditors&&!c&&switchEditors.go(f,"toggle");return!1}})},
9
- deleteResult:function(b){a(b).parent().parent().hide();a(b).siblings('input[name="resultTextGrade[activ][]"]').val("0")},changeResult:function(d){d=a(d);if(b.validResultInput(d.val()))return d.siblings(".resultProzent").text(d.val()),d.removeAttr("style"),!0;d.css("background-color","#FF9696");return!1},validResultInput:function(a){if(g(a))return!1;a=a.replace(/\,/,".");return!isNaN(a)&&100>=Number(a)&&0<=Number(a)?null!=a.match(/\./)?3>a.split(".")[1].length:!0:!1},validInput:function(){if(g(a("#wpProQuiz_title").val()))return alert(wpProQuizLocalize.no_title_msg),
10
- !1;var d="",d=void 0!=tinymce.editors.text&&!tinymce.editors.text.isHidden()?tinymce.editors.text.getContent():a('textarea[name="text"]').val();if(g(d))return alert(wpProQuizLocalize.no_quiz_start_msg),!1;if(a("#wpProQuiz_resultGradeEnabled:checked").length){var e=!0;a("#resultList").children().each(function(){if(a(this).is(":visible")&&!b.validResultInput(a(this).find('input[name="resultTextGrade[prozent][]"]').val()))return e=!1});if(!e)return alert(wpProQuizLocalize.fail_grade_result),!1}return!0},
11
- resetLock:function(){var b=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php"),b=b.replace("action=edit","action=reset_lock");a.post(b,{action:"wp_pro_quiz_reset_lock"},function(){a("#resetLockMsg").show("fast").delay(2E3).hide("fast")})}},g=function(b){b=a.trim(b);return!b||0===b.length};a("#statistics_on").change(function(){this.checked?a("#statistics_ip_lock_tr").show():a("#statistics_ip_lock_tr").hide()});a(".addResult").click(function(){b.addResult()});a(".deleteResult").click(function(){b.deleteResult(this)});
12
  a('input[name="resultTextGrade[prozent][]"]').keyup(function(){b.changeResult(this)}).keydown(function(a){13==a.which&&a.preventDefault()});a("#wpProQuiz_resultGradeEnabled").change(function(){this.checked?(a("#resultGrade").show(),a("#resultNormal").hide()):(a("#resultGrade").hide(),a("#resultNormal").show())});a("#wpProQuiz_save").click(function(d){b.validInput()||d.preventDefault();a('select[name="prerequisiteList[]"] option').attr("selected","selected")});a('input[name="quizRunOnce"]').change(function(){this.checked?
13
- (a("#wpProQuiz_quiz_run_once_type").show(),a('input[name="quizRunOnceType"]:checked').change()):a("#wpProQuiz_quiz_run_once_type").hide()});a('input[name="quizRunOnceType"]').change(function(){this.checked&&("1"==this.value||"3"==this.value)?a("#wpProQuiz_quiz_run_once_cookie").show():a("#wpProQuiz_quiz_run_once_cookie").hide()});a('input[name="resetQuizLock"]').click(function(){b.resetLock();return!1});a(".wpProQuiz_demoBox a").mouseover(function(b){var e=a(this),f=a(document).width(),e=e.siblings().outerWidth(!0);
14
- b.pageX+e>f&&(b=f-(b.pageX+e+30),a(this).next().css("left",b+"px"));a(this).next().show()}).mouseout(function(){a(this).next().hide()}).click(function(){return!1});a('input[name="showMaxQuestion"]').change(function(){this.checked?(a('input[name="statisticsOn"]').removeAttr("checked").attr("disabled","disabled").change(),a("#wpProQuiz_showMaxBox").show()):(a('input[name="statisticsOn"]').removeAttr("disabled"),a("#wpProQuiz_showMaxBox").hide())});a("#btnPrerequisiteAdd").click(function(){a('select[name="quizList"] option:selected').removeAttr("selected").appendTo('select[name="prerequisiteList[]"]')});
15
  a("#btnPrerequisiteDelete").click(function(){a('select[name="prerequisiteList[]"] option:selected').removeAttr("selected").appendTo('select[name="quizList"]')});a('input[name="prerequisite"]').change(function(){this.checked?a("#prerequisiteBox").show():a("#prerequisiteBox").hide()}).change();a('input[name="toplistDataAddMultiple"]').change(function(){this.checked?a("#toplistDataAddBlockBox").show():a("#toplistDataAddBlockBox").hide()}).change();a('input[name="toplistActivated"]').change(function(){this.checked?
16
  a("#toplistBox > tr:gt(0)").show():a("#toplistBox > tr:gt(0)").hide()}).change();a('input[name="showReviewQuestion"]').change(function(){this.checked?a(".wpProQuiz_reviewQuestionOptions").show():a(".wpProQuiz_reviewQuestionOptions").hide()}).change();a("#statistics_on").change();a("#wpProQuiz_resultGradeEnabled").change();a('input[name="quizRunOnce"]').change();a('input[name="quizRunOnceType"]:checked').change();a('input[name="showMaxQuestion"]').change()};a.fn.wpProQuiz_statistics=function(){var b=
17
- "wpProQuiz_typeAnonymeUser",g=!0,d={loadStatistics:function(b){var f=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=load_statistics",b={action:"wp_pro_quiz_load_statistics",userId:b};a("#wpProQuiz_loadData").show();a("#wpProQuiz_statistics_content, #wpProQuiz_statistics_overview").hide();a.post(f,b,d.setStatistics,"json")},setStatistics:function(e){var d=a(".wpProQuiz_statistics_table"),c=d.find("tbody");if("wpProQuiz_typeOverview"!=b){var i=function(a,
18
- b,c){a.find(".wpProQuiz_cCorrect").text(b.cCorrect+" ("+b.pCorrect+"%)");a.find(".wpProQuiz_cIncorrect").text(b.cIncorrect+" ("+b.pIncorrect+"%)");a.find(".wpProQuiz_cTip").text(b.cTip);a.find(".wpProQuiz_cPoints").text(b.cPoints);!0==c&&d.find(".wpProQuiz_cResult").text(b.result+"%")};i(d,e.clear,!1);a.each(e.items,function(a,b){i(c.find("#wpProQuiz_tr_"+b.id),b,!1)});i(d.find("tfoot"),e.global,!0);a("#wpProQuiz_loadData").hide();a("#wpProQuiz_statistics_content, .wpProQuiz_statistics_table").show()}},
19
- loadOverview:function(){a(".wpProQuiz_statistics_table, #wpProQuiz_statistics_content, #wpProQuiz_statistics_overview").hide();a("#wpProQuiz_loadData").show();var e=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=load_statistics",f={action:"wp_pro_quiz_load_statistics",overview:!0,pageLimit:a("#wpProQuiz_pageLimit").val(),onlyCompleted:Number(a("#wpProQuiz_onlyCompleted").is(":checked")),page:a("#wpProQuiz_currentPage").val(),generatePageNav:Number(g)};
20
- a.post(e,f,function(c){a("#wpProQuiz_statistics_overview_data").empty();if("wpProQuiz_typeOverview"==b){var e=a('<tr><th><a href="#">---</a></th><th class="wpProQuiz_points">---</th><th class="wpProQuiz_cCorrect" style="color: green;">---</th><th class="wpProQuiz_cIncorrect" style="color: red;">---</th><th class="wpProQuiz_cTip">---</th><th class="wpProQuiz_cResult" style="font-weight: bold;">---</th></tr>');a.each(c.items,function(b,c){var d=e.clone();d.find("a").text(c.userName).data("userId",c.userId).click(function(){a("#userSelect").val(a(this).data("userId"));
21
- a("#wpProQuiz_typeRegisteredUser").click();return!1});c.completed?(d.find(".wpProQuiz_points").text(c.cPoints),d.find(".wpProQuiz_cCorrect").text(c.cCorrect+" ("+c.pCorrect+"%)"),d.find(".wpProQuiz_cIncorrect").text(c.cIncorrect+" ("+c.pIncorrect+"%)"),d.find(".wpProQuiz_cTip").text(c.cTip),d.find(".wpProQuiz_cResult").text(c.result+"%")):d.find("th").removeAttr("style");a("#wpProQuiz_statistics_overview_data").append(d)});void 0!=c.page&&(d.setPageNav(c.page),g=!1);a("#wpProQuiz_loadData").hide();
22
- a("#wpProQuiz_statistics_overview").show()}},"json")},changeTab:function(e){b=e;"wpProQuiz_typeRegisteredUser"==e?d.loadStatistics(a("#userSelect").val()):"wpProQuiz_typeAnonymeUser"==e?d.loadStatistics(0):d.loadOverview()},resetStatistic:function(e){var f="wpProQuiz_typeRegisteredUser"==b?a("#userSelect").val():0,c=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=reset";a.post(c,{action:"wp_pro_quiz_statistics",userId:f,complete:e},function(){d.changeTab(b)})},
23
  setPageNav:function(b){b=Math.ceil(b/a("#wpProQuiz_pageLimit").val());a("#wpProQuiz_currentPage").empty();for(var d=1;d<=b;d++)a(document.createElement("option")).val(d).text(d).appendTo(a("#wpProQuiz_currentPage"));a("#wpProQuiz_pageLeft, #wpProQuiz_pageRight").hide();1<a("#wpProQuiz_currentPage option").length&&a("#wpProQuiz_pageRight").show()}};a(".wpProQuiz_tab").click(function(){var b=a(this);if(b.hasClass("button-primary"))return!1;"wpProQuiz_typeRegisteredUser"==b.attr("id")?a("#wpProQuiz_userBox").show():
24
  a("#wpProQuiz_userBox").hide();a(".wpProQuiz_tab").removeClass("button-primary").addClass("button-secondary");b.removeClass("button-secondary").addClass("button-primary");d.changeTab(b.attr("id"));return!1});a("#userSelect").change(function(){d.changeTab("wpProQuiz_typeRegisteredUser")});a(".wpProQuiz_update").click(function(){d.changeTab(b);return!1});a("#wpProQuiz_reset").click(function(){confirm(wpProQuizLocalize.reset_statistics_msg)&&d.resetStatistic(!1);return!1});a(".wpProQuiz_resetComplete").click(function(){confirm(wpProQuizLocalize.reset_statistics_msg)&&
25
- d.resetStatistic(!0);return!1});a("#wpProQuiz_pageLimit, #wpProQuiz_onlyCompleted").change(function(){a("#wpProQuiz_currentPage").val(0);g=!0;d.changeTab(b);return!1});a("#wpProQuiz_currentPage").change(function(){a("#wpProQuiz_pageLeft, #wpProQuiz_pageRight").hide();1!=a("#wpProQuiz_currentPage option").length&&(a("#wpProQuiz_currentPage option:first-child:selected").length?a("#wpProQuiz_pageRight").show():a("#wpProQuiz_currentPage option:last-child:selected").length?a("#wpProQuiz_pageLeft").show():
26
- a("#wpProQuiz_pageLeft, #wpProQuiz_pageRight").show());d.changeTab(b)});a("#wpProQuiz_pageRight").click(function(){a("#wpProQuiz_currentPage option:selected").next().attr("selected","selected");a("#wpProQuiz_currentPage").change();return!1});a("#wpProQuiz_pageLeft").click(function(){a("#wpProQuiz_currentPage option:selected").prev().attr("selected","selected");a("#wpProQuiz_currentPage").change();return!1});d.changeTab("wpProQuiz_typeAnonymeUser")};a.fn.wpProQuiz_toplist=function(){var b=this,g=a("#wpProQuiz_sorting"),
27
- d=a("#wpProQuiz_pageLimit"),e=a("#wpProQuiz_currentPage"),f=a("#wpProQuiz_loadData"),c=a("#wpProQuiz_pageLeft"),i=a("#wpProQuiz_pageRight"),l=a("#wpProQuiz_toplistTable tbody"),j=a("#wpProQuiz_toplistTable tbody tr:eq(0)").clone(),m=a("#wpProQuiz_content"),b={loadData:function(c){var h=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=load_toplist",n={action:"wp_pro_quiz_load_toplist",sort:g.val(),limit:d.val(),page:e.val()};void 0!=c&&a.extend(n,c);
28
- f.show();m.hide();a.post(h,n,function(a){b.handleDataRequest(a.data);void 0!=a.nav&&b.handleNav(a.nav);f.hide();m.show()},"json")},handleNav:function(c){e.empty();for(var h=1;h<=c.pages;h++)a(document.createElement("option")).val(h).text(h).appendTo(e);b.checkNav()},handleDataRequest:function(b){l.empty();a.each(b,function(a,b){var c=j.clone().children();c.eq(0).children().val(b.id);c.eq(1).text(b.name);c.eq(2).text(b.email);c.eq(3).text(b.type);c.eq(4).text(b.date);c.eq(5).text(b.points);c.eq(6).text(b.result);
29
- c.parent().show().appendTo(l)});b.length||a(document.createElement("td")).attr("colspan","7").text(wpProQuizLocalize.no_data_available).css({"font-weight":"bold","text-align":"center",padding:"5px"}).appendTo(document.createElement("tr")).appendTo(l)},checkNav:function(){var a=e.val();1==a?c.hide():c.show();a==e.children().length?i.hide():i.show()}};g.change(function(){b.loadData()});d.change(function(){b.loadData({nav:1})});e.change(function(){b.checkNav();b.loadData()});c.click(function(){e.val(Number(e.val())-
30
- 1);b.checkNav();b.loadData()});i.click(function(){e.val(Number(e.val())+1);b.checkNav();b.loadData()});a("#wpProQuiz_deleteAll").click(function(){b.loadData({a:"deleteAll"})});a("#wpProQuiz_action").click(function(){var c=a("#wpProQuiz_actionName").val();if("0"!=c){var h=a('input[name="checkedData[]"]:checked').map(function(){return a(this).val()}).get();b.loadData({a:c,toplistIds:h})}});a("#wpProQuiz_checkedAll").change(function(){this.checked?a('input[name="checkedData[]"]').attr("checked","checked"):
31
- a('input[name="checkedData[]"]').removeAttr("checked","checked")});b.loadData({nav:1})};a(".wpProQuiz_quizOverall").length&&a(".wpProQuiz_quizOverall").wpProQuiz_preview();a(".wpProQuiz_quizOverall").length&&a(".wpProQuiz_quizOverall").wpProQuiz_quizOverall();a(".wpProQuiz_quizEdit").length&&a(".wpProQuiz_quizEdit").wpProQuiz_quizEdit();a(".wpProQuiz_questionOverall").length&&a(".wpProQuiz_questionOverall").wpProQuiz_questionOverall();a(".wpProQuiz_toplist").length&&a(".wpProQuiz_toplist").wpProQuiz_toplist();
32
- (function(){var b=this,b={displayChecked:function(a,b,d,e){a=d?!a.checked:a.checked;e?a?b.attr("disabled","disabled"):b.removeAttr("disabled"):a?b.show():b.hide()},isEmpty:function(b){b=a.trim(b);return!b||0===b.length},isNumber:function(c){c=a.trim(c);return!b.isEmpty(c)&&!isNaN(c)},getMceContent:function(b){var d=tinymce.editors[b];return void 0!=d&&!d.isHidden()?d.getContent():a("#"+b).val()},ajaxPost:function(b,d,e){a.post(ajaxurl,{action:"wp_pro_quiz_admin_ajax",func:b,data:d},e,"json")}},g=
33
- function(){var c={categoryDelete:function(c){b.ajaxPost("categoryDelete",{categoryId:c},function(b){b.err||(a('select[name="category"] option[value="'+c+'"]').remove(),a('select[name="category"]').change())})},categoryEdit:function(c,d){var e={categoryId:c,categoryName:a.trim(d)};b.isEmpty(d)?alert(wpProQuizLocalize.category_no_name):b.ajaxPost("categoryEdit",e,function(b){b.err||(a('select[name="category"] option[value="'+c+'"]').text(e.categoryName),a('select[name="category"]').change())})}};a(".wpProQuiz_tab").click(function(){var b=
34
- a(this);a(".wpProQuiz_tab").removeClass("button-primary").addClass("button-secondary");b.removeClass("button-secondary").addClass("button-primary");a("#problemInfo, #problemContent, #globalContent").hide("fast");"globalTab"==b.attr("id")?a("#globalContent").show("fast"):a("#problemInfo, #problemContent").show("fast")});a('select[name="category"]').change(function(){a('input[name="categoryEditText"]').val(a(this).find(":selected").text())}).change();a('input[name="categoryDelete"]').click(function(){var b=
35
- a('select[name="category"] option:selected').val();c.categoryDelete(b)});a('input[name="categoryEdit"]').click(function(){var b=a('select[name="category"] option:selected').val(),d=a('input[name="categoryEditText"]').val();c.categoryEdit(b,d)})},d=function(){var c=this,d=a.noop(),e=a(".answer_felder > div"),f=a('input[name="answerPointsActivated"]'),g=a('input[name="points"]'),c={generateArrayIndex:function(){var b=a('input[name="answerType"]:checked').val(),b="single"==b||"multiple"==b?"classic_answer":
36
- b;a(".answerList").each(function(){var c=a(this).parent().attr("class");a(this).children().each(function(d){a(this).find('[name^="answerData"]').each(function(){var a=this.name,e=a.search(/\](\[\w+\])+$/),f=b==c?d:"none";0<e&&(this.name="answerData["+f+a.substring(e,a.length))})})})},globalValidate:function(){if(b.isEmpty(b.getMceContent("question")))return alert(wpProQuizLocalize.no_question_msg),!1;if(f.is(":checked")){if("free_answer"==a('input[name="answerType"]:checked').val())return alert(wpProQuizLocalize.dif_points),
37
- !1}else{var c=g.val();if(!b.isNumber(c)||1>c)return alert(wpProQuizLocalize.no_nummber_points),!1}return!1===d()?!1:!0},answerRemove:function(){var b=a(this).parent();if(2>b.parent().children().length)return!1;b.remove();return!1},addCategory:function(){var c=a.trim(a('input[name="categoryAdd"]').val());b.isEmpty(c)||b.ajaxPost("categoryAdd",{categoryName:c},function(b){b.err?a("#categoryMsgBox").text(b.err).show("fast").delay(2E3).hide("fast"):(b=a(document.createElement("option")).val(b.categoryId).text(b.categoryName).attr("selected",
38
- "selected"),a('select[name="category"]').append(b).change())})}},k={classic_answer:function(){var c=0,d=0,e=0;a(".classic_answer .answerList").children().each(function(){var f=a(this);b.isEmpty(f.find('textarea[name="answerData[][answer]"]').val())||(c++,f.find('input[name="answerData[][correct]"]:checked').length&&d++,f=f.find('input[name="answerData[][points]"]').val(),b.isNumber(f)&&0<=f&&e++)});return!c?(alert(wpProQuizLocalize.no_answer_msg),!1):!d?(alert(wpProQuizLocalize.no_correct_msg),!1):
39
- e!=c&&f.is(":checked")?(alert(wpProQuizLocalize.no_nummber_points_new),!1):!0},free_answer:function(){return b.isEmpty(a('.free_answer textarea[name="answerData[][answer]"]').val())?(alert(wpProQuizLocalize.no_answer_msg),!1):!0},cloze_answer:function(){return b.isEmpty(b.getMceContent("cloze"))?(alert(wpProQuizLocalize.no_answer_msg),!1):!0},sort_answer:function(){var c=0,d=0;a(".sort_answer .answerList").children().each(function(){var e=a(this);b.isEmpty(e.find('textarea[name="answerData[][answer]"]').val())||
40
- (c++,e=e.find('input[name="answerData[][points]"]').val(),b.isNumber(e)&&0<=e&&d++)});return!c?(alert(wpProQuizLocalize.no_answer_msg),!1):d!=c&&f.is(":checked")?(alert(wpProQuizLocalize.no_nummber_points_new),!1):!0},matrix_sort_answer:function(){var c=0,d=0,e=!0,g=0;a(".matrix_sort_answer .answerList").children().each(function(){var f=a(this),j=f.find('input[name="answerData[][points]"]').val();b.isEmpty(f.find('textarea[name="answerData[][answer]"]').val())?b.isEmpty(f.find('textarea[name="answerData[][sort_string]"]').val())||
41
- (g++,b.isNumber(j)&&0<=j&&d++):(c++,g++,b.isEmpty(f.find('textarea[name="answerData[][sort_string]"]').val())&&(e=!1),b.isNumber(j)&&0<=j&&d++)});return!c?(alert(wpProQuizLocalize.no_answer_msg),!1):!e?(alert(wpProQuizLocalize.no_sort_element_criterion),!1):d!=g&&f.is(":checked")?(alert(wpProQuizLocalize.no_nummber_points_new),!1):!0}};e.hide();a("#wpProQuiz_tip").change(function(){b.displayChecked(this,a("#wpProQuiz_tipBox"))}).change();a("#wpProQuiz_correctSameText").change(function(){b.displayChecked(this,
42
- a("#wpProQuiz_incorrectMassageBox"),!0)}).change();a('input[name="answerType"]').click(function(){e.hide();var b=this.value;if("single"==b||"multiple"==b){var c="single"==b?"radio":"checkbox",b="classic_answer";a(".wpProQuiz_classCorrect").each(function(){a("<input type="+c+" />").attr({name:this.name,value:this.value,checked:this.checked}).addClass("wpProQuiz_classCorrect wpProQuiz_checkbox").insertBefore(this)}).remove()}d=void 0!=k[b]?k[b]:a.noop();a("."+b).show()});a('input[name="answerType"]:checked').click();
43
- a(".deleteAnswer").click(c.answerRemove);a(".addAnswer").click(function(){var b=a(this).siblings("ul"),d=b.find("li:eq(0)").clone();d.find(".wpProQuiz_checkbox").removeAttr("checked");d.find(".wpProQuiz_text").val("");d.find(".wpProQuiz_points").val(1);d.find(".deleteAnswer").click(c.answerRemove);d.appendTo(b);return!1});a(".sort_answer ul, .classic_answer ul, .matrix_sort_answer ul").sortable({handle:".wpProQuiz_move"});a("#saveQuestion").click(function(){if(!c.globalValidate())return!1;c.generateArrayIndex();
44
- return!0});a(f).change(function(){b.displayChecked(this,a(".wpProQuiz_answerPoints"));b.displayChecked(this,a("#wpProQuiz_showPointsBox"));b.displayChecked(this,g,!1,!0)}).change();a('select[name="category"]').change(function(){var b=a(this),c=a("#categoryAddBox").hide();"-1"==b.val()&&c.show()}).change();a("#categoryAddBtn").click(function(){c.addCategory()})},e=function(){var c=this,d=a("#quizId").val(),e="users",f=a("#wpProQuiz_currentPage"),g=a("#wpProQuiz_pageLeft"),k=a("#wpProQuiz_pageRight"),
45
- c={loadStatistic:function(a){b.ajaxPost("statisticLoad",{userId:a},function(){})},loadUsersStatistic:function(){var e={userId:a("#userSelect").val(),quizId:d};c.toggleLoadBox(!1);b.ajaxPost("statisticLoad",e,function(b){a.each(b.question,function(){var b=a("#wpProQuiz_tr_"+this.questionId);c.setStatisticData(b,this)});a.each(b.category,function(b,d){var e=a("#wpProQuiz_ctr_"+b);c.setStatisticData(e,d)});c.toggleLoadBox(!0)})},setStatisticData:function(a,b){a.find(".wpProQuiz_cCorrect").text(b.correct);
46
- a.find(".wpProQuiz_cIncorrect").text(b.incorrect);a.find(".wpProQuiz_cTip").text(b.hint);a.find(".wpProQuiz_cPoints").text(b.points);a.find(".wpProQuiz_cResult").text(b.result)},toggleLoadBox:function(b){var c=a("#wpProQuiz_loadData"),d=a("#wpProQuiz_content");b?(c.hide(),d.show()):(d.hide(),c.show())},reset:function(e){var f=a("#userSelect").val();confirm(wpProQuizLocalize.reset_statistics_msg)&&(e={quizId:d,userId:f,full:e?1:0},c.toggleLoadBox(!1),b.ajaxPost("statisticReset",e,function(){c.loadUsersStatistic()}))},
47
- loadStatisticOverview:function(e){e={quizId:d,pageLimit:a("#wpProQuiz_pageLimit").val(),onlyCompleted:Number(a("#wpProQuiz_onlyCompleted").is(":checked")),page:f.val(),nav:Number(e)};c.toggleLoadBox(!1);b.ajaxPost("statisticLoadOverview",e,function(b){var d=a("#wpProQuiz_statistics_overview_data"),e=d.children(),f=e.first().clone();e.slice(1).remove();a.each(b.items,function(){var b=f.clone();c.setStatisticData(b,this);b.find("a").text(this.userName).data("userId",this.userId).click(function(){a("#userSelect").val(a(this).data("userId"));
48
- a("#wpProQuiz_typeUser").click();return!1});b.show().appendTo(d)});f.remove();c.toggleLoadBox(!0);void 0!=b.page&&c.handleNav(b.page)})},handleNav:function(b){for(var d=a("#wpProQuiz_currentPage").empty(),e=1;e<=b;e++)a(document.createElement("option")).val(e).text(e).appendTo(d);c.checkNavBar()},checkNavBar:function(){var a=f.val();1==a?g.hide():g.show();a==f.children().length?k.hide():k.show()},refresh:function(){"users"==e?c.loadUsersStatistic():c.loadStatisticOverview(!0)}};a("#userSelect").change(function(){c.loadUsersStatistic()});
49
- a(".wpProQuiz_update").click(function(){c.refresh()});a("#wpProQuiz_reset").click(function(){c.reset(!1)});a(".wpProQuiz_resetComplete").click(function(){c.reset(!0)});a(".wpProQuiz_tab").click(function(){var b=a(this);a(".wpProQuiz_tab").removeClass("button-primary").addClass("button-secondary");b.removeClass("button-secondary").addClass("button-primary");a(".wpProQuiz_tabContent").hide();"wpProQuiz_typeUser"==b.attr("id")?(e="users",a("#wpProQuiz_tabUsers").show(),c.loadUsersStatistic()):(e="overview",
50
- a("#wpProQuiz_tabOverview").show(),c.loadStatisticOverview(!0));return!1});a("#wpProQuiz_onlyCompleted").change(function(){f.val(1);c.loadStatisticOverview(!0)});a("#wpProQuiz_pageLimit").change(function(){f.val(1);c.loadStatisticOverview(!0)});g.click(function(){f.val(Number(f.val())-1);c.loadStatisticOverview(!1);c.checkNavBar()});k.click(function(){f.val(Number(f.val())+1);c.loadStatisticOverview(!1);c.checkNavBar()});f.change(function(){c.loadStatisticOverview(!1);c.checkNavBar()});c.loadUsersStatistic()},
51
- f=a.noop;a(".wpProQuiz_questionEdit").length?f=d:a(".wpProQuiz_globalSettings").length?f=g:a(".wpProQuiz_statistics").length&&(f=e);f()})()});
 
 
 
 
 
 
1
+ jQuery(document).ready(function(a){a.fn.wpProQuiz_preview=function(){var b={openPreview:function(b){window.open(a(b).attr("href"),"wpProQuizPreview","width=900,height=900")}};a(".wpProQuiz_prview").click(function(a){b.openPreview(this);a.preventDefault()})};a.fn.wpProQuiz_quizOverall=function(){var b={changeExport:function(b){$input=a(b);$export=a(".wpProQuiz_exportList");$ul=$export.find("ul").first();$export.find("li").remove();a('input[name="exportItems"]').each(function(){$this=a(this);if(this.checked){var d=
2
+ $this.parent().parent().find(".wpProQuiz_quizName a:eq(0)").text();a("<li>"+d+"</li>").appendTo($ul)}})},startExport:function(){$ele=a('input[name="exportItems"]:checked');if(1>$ele.length)return alert(wpProQuizLocalize.no_selected_quiz),!1;$hidden=a("#exportHidden");$hidden.html("");a('input[name="exportItems"]').each(function(){$this=a(this);this.checked&&a('<input type="hidden" value="'+this.value+'" name="exportIds[]">').appendTo($hidden)});return!0}};a(".wpProQuiz_delete").click(function(a){return!confirm(wpProQuizLocalize.delete_msg)?
3
  (a.preventDefault(),!1):!0});a(".wpProQuiz_import").click(function(b){b.preventDefault();a(".wpProQuiz_importList").toggle("fast");a(".wpProQuiz_exportList").hide();a(".wpProQuiz_exportCheck").hide()});a(".wpProQuiz_export").click(function(b){b.preventDefault();a(".wpProQuiz_exportList").toggle("fast");a(".wpProQuiz_exportCheck").toggle("fast");a(".wpProQuiz_importList").hide()});a('input[name="exportItems"]').change(function(){b.changeExport(this)});a('input[name="exportItemsAll"]').change(function(){var b=
4
+ a('input[name="exportItems"]');this.checked?b.attr("checked",!0):b.attr("checked",!1);b.change()});a("#exportStart").click(function(a){b.startExport()||a.preventDefault()})};a.fn.wpProQuiz_questionOverall=function(){var b={saveSort:function(){var h={action:"wp_pro_quiz_update_sort",sort:b.parseSortArray()},d=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=save_sort";a.post(d,h,function(){a("#sortMsg").show(400).delay(1E3).hide(400)})},parseSortArray:function(){var b=
5
  [];a("tbody tr").each(function(){b.push(this.id.replace("wpProQuiz_questionId_",""))});return b},sortUpdate:function(){a(".wpProQuiz_questionOverall tbody").children().each(function(){$t=a(this).children().first().text(a(this).index()+1)})},loadQuestionCopy:function(){var b=a("#questionCopySelect"),d=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=load_question";b.hide();b.empty();a("#loadDataImg").show();a.post(d,{action:"wp_pro_quiz_load_question",
6
+ excludeId:1},function(d){a.each(d,function(d,c){var g=a(document.createElement("optgroup"));g.attr("label",c.name);a.each(c.question,function(c,d){a(document.createElement("option")).val(d.id).text(d.name).appendTo(g)});b.append(g)});a("#loadDataImg").hide();b.show()},"json")}};a(".wp-list-table tbody").sortable({handle:".wpProQuiz_move",update:b.sortUpdate});a(".wpProQuiz_delete").click(function(a){return!confirm(wpProQuizLocalize.delete_msg)?(a.preventDefault(),!1):!0});a("#wpProQuiz_saveSort").click(function(a){a.preventDefault();
7
+ b.saveSort()});a("#wpProQuiz_questionCopy").click(function(h){var d=a(".wpProQuiz_questionCopy");d.is(":visible")?d.hide():(d.show(),b.loadQuestionCopy());h.preventDefault()})};a.fn.wpProQuiz_quizEdit=function(){var b={addResult:function(){a("#resultList").children().each(function(){if("none"==a(this).css("display")){var d=a(this),b=d.find('textarea[name="resultTextGrade[text][]"]'),e=b.attr("id"),c=!0;d.find('input[name="resultTextGrade[prozent][]"]').val("0");d.find('input[name="resultTextGrade[activ][]"]').val("1").keyup();
8
+ void 0!=tinymce.editors[e]&&!tinymce.editors[e].isHidden()&&(c=!1);void 0!=switchEditors&&!c&&(switchEditors.go(e,"toggle"),switchEditors.go(e,"toggle"));void 0!=tinymce.editors[e]?tinymce.editors[e].setContent(""):b.val("");void 0!=tinymce.editors[e]&&!c&&tinyMCE.execCommand("mceRemoveControl",!1,e);d.parent().children(":visible").last().after(d);void 0!=tinymce.editors[e]&&!c&&tinyMCE.execCommand("mceAddControl",!1,e);a(this).show();void 0!=switchEditors&&!c&&switchEditors.go(e,"toggle");return!1}})},
9
+ deleteResult:function(d){a(d).parent().parent().hide();a(d).siblings('input[name="resultTextGrade[activ][]"]').val("0")},changeResult:function(d){d=a(d);if(b.validResultInput(d.val()))return d.siblings(".resultProzent").text(d.val()),d.removeAttr("style"),!0;d.css("background-color","#FF9696");return!1},validResultInput:function(a){if(h(a))return!1;a=a.replace(/\,/,".");return!isNaN(a)&&100>=Number(a)&&0<=Number(a)?null!=a.match(/\./)?3>a.split(".")[1].length:!0:!1},validInput:function(){if(h(a("#wpProQuiz_title").val()))return alert(wpProQuizLocalize.no_title_msg),
10
+ !1;var d="",d=void 0!=tinymce.editors.text&&!tinymce.editors.text.isHidden()?tinymce.editors.text.getContent():a('textarea[name="text"]').val();if(h(d))return alert(wpProQuizLocalize.no_quiz_start_msg),!1;if(a("#wpProQuiz_resultGradeEnabled:checked").length){var f=!0;a("#resultList").children().each(function(){if(a(this).is(":visible")&&!b.validResultInput(a(this).find('input[name="resultTextGrade[prozent][]"]').val()))return f=!1});if(!f)return alert(wpProQuizLocalize.fail_grade_result),!1}return!0},
11
+ resetLock:function(){var b=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php"),b=b.replace("action=edit","action=reset_lock");a.post(b,{action:"wp_pro_quiz_reset_lock"},function(){a("#resetLockMsg").show("fast").delay(2E3).hide("fast")})}},h=function(b){b=a.trim(b);return!b||0===b.length};a("#statistics_on").change(function(){this.checked?a("#statistics_ip_lock_tr").show():a("#statistics_ip_lock_tr").hide()});a(".addResult").click(function(){b.addResult()});a(".deleteResult").click(function(){b.deleteResult(this)});
12
  a('input[name="resultTextGrade[prozent][]"]').keyup(function(){b.changeResult(this)}).keydown(function(a){13==a.which&&a.preventDefault()});a("#wpProQuiz_resultGradeEnabled").change(function(){this.checked?(a("#resultGrade").show(),a("#resultNormal").hide()):(a("#resultGrade").hide(),a("#resultNormal").show())});a("#wpProQuiz_save").click(function(d){b.validInput()||d.preventDefault();a('select[name="prerequisiteList[]"] option').attr("selected","selected")});a('input[name="quizRunOnce"]').change(function(){this.checked?
13
+ (a("#wpProQuiz_quiz_run_once_type").show(),a('input[name="quizRunOnceType"]:checked').change()):a("#wpProQuiz_quiz_run_once_type").hide()});a('input[name="quizRunOnceType"]').change(function(){this.checked&&("1"==this.value||"3"==this.value)?a("#wpProQuiz_quiz_run_once_cookie").show():a("#wpProQuiz_quiz_run_once_cookie").hide()});a('input[name="resetQuizLock"]').click(function(){b.resetLock();return!1});a(".wpProQuiz_demoBox a").mouseover(function(b){var f=a(this),e=a(document).width(),f=f.siblings().outerWidth(!0);
14
+ b.pageX+f>e&&(b=e-(b.pageX+f+30),a(this).next().css("left",b+"px"));a(this).next().show()}).mouseout(function(){a(this).next().hide()}).click(function(){return!1});a('input[name="showMaxQuestion"]').change(function(){this.checked?(a('input[name="statisticsOn"]').removeAttr("checked").attr("disabled","disabled").change(),a("#wpProQuiz_showMaxBox").show()):(a('input[name="statisticsOn"]').removeAttr("disabled"),a("#wpProQuiz_showMaxBox").hide())});a("#btnPrerequisiteAdd").click(function(){a('select[name="quizList"] option:selected').removeAttr("selected").appendTo('select[name="prerequisiteList[]"]')});
15
  a("#btnPrerequisiteDelete").click(function(){a('select[name="prerequisiteList[]"] option:selected').removeAttr("selected").appendTo('select[name="quizList"]')});a('input[name="prerequisite"]').change(function(){this.checked?a("#prerequisiteBox").show():a("#prerequisiteBox").hide()}).change();a('input[name="toplistDataAddMultiple"]').change(function(){this.checked?a("#toplistDataAddBlockBox").show():a("#toplistDataAddBlockBox").hide()}).change();a('input[name="toplistActivated"]').change(function(){this.checked?
16
  a("#toplistBox > tr:gt(0)").show():a("#toplistBox > tr:gt(0)").hide()}).change();a('input[name="showReviewQuestion"]').change(function(){this.checked?a(".wpProQuiz_reviewQuestionOptions").show():a(".wpProQuiz_reviewQuestionOptions").hide()}).change();a("#statistics_on").change();a("#wpProQuiz_resultGradeEnabled").change();a('input[name="quizRunOnce"]').change();a('input[name="quizRunOnceType"]:checked').change();a('input[name="showMaxQuestion"]').change()};a.fn.wpProQuiz_statistics=function(){var b=
17
+ "wpProQuiz_typeAnonymeUser",h=!0,d={loadStatistics:function(b){var e=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=load_statistics",b={action:"wp_pro_quiz_load_statistics",userId:b};a("#wpProQuiz_loadData").show();a("#wpProQuiz_statistics_content, #wpProQuiz_statistics_overview").hide();a.post(e,b,d.setStatistics,"json")},setStatistics:function(d){var e=a(".wpProQuiz_statistics_table"),c=e.find("tbody");if("wpProQuiz_typeOverview"!=b){var g=function(a,
18
+ b,c){a.find(".wpProQuiz_cCorrect").text(b.cCorrect+" ("+b.pCorrect+"%)");a.find(".wpProQuiz_cIncorrect").text(b.cIncorrect+" ("+b.pIncorrect+"%)");a.find(".wpProQuiz_cTip").text(b.cTip);a.find(".wpProQuiz_cPoints").text(b.cPoints);!0==c&&e.find(".wpProQuiz_cResult").text(b.result+"%")};g(e,d.clear,!1);a.each(d.items,function(a,b){g(c.find("#wpProQuiz_tr_"+b.id),b,!1)});g(e.find("tfoot"),d.global,!0);a("#wpProQuiz_loadData").hide();a("#wpProQuiz_statistics_content, .wpProQuiz_statistics_table").show()}},
19
+ loadOverview:function(){a(".wpProQuiz_statistics_table, #wpProQuiz_statistics_content, #wpProQuiz_statistics_overview").hide();a("#wpProQuiz_loadData").show();var f=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=load_statistics",e={action:"wp_pro_quiz_load_statistics",overview:!0,pageLimit:a("#wpProQuiz_pageLimit").val(),onlyCompleted:Number(a("#wpProQuiz_onlyCompleted").is(":checked")),page:a("#wpProQuiz_currentPage").val(),generatePageNav:Number(h)};
20
+ a.post(f,e,function(c){a("#wpProQuiz_statistics_overview_data").empty();if("wpProQuiz_typeOverview"==b){var g=a('<tr><th><a href="#">---</a></th><th class="wpProQuiz_points">---</th><th class="wpProQuiz_cCorrect" style="color: green;">---</th><th class="wpProQuiz_cIncorrect" style="color: red;">---</th><th class="wpProQuiz_cTip">---</th><th class="wpProQuiz_cResult" style="font-weight: bold;">---</th></tr>');a.each(c.items,function(b,c){var d=g.clone();d.find("a").text(c.userName).data("userId",c.userId).click(function(){a("#userSelect").val(a(this).data("userId"));
21
+ a("#wpProQuiz_typeRegisteredUser").click();return!1});c.completed?(d.find(".wpProQuiz_points").text(c.cPoints),d.find(".wpProQuiz_cCorrect").text(c.cCorrect+" ("+c.pCorrect+"%)"),d.find(".wpProQuiz_cIncorrect").text(c.cIncorrect+" ("+c.pIncorrect+"%)"),d.find(".wpProQuiz_cTip").text(c.cTip),d.find(".wpProQuiz_cResult").text(c.result+"%")):d.find("th").removeAttr("style");a("#wpProQuiz_statistics_overview_data").append(d)});void 0!=c.page&&(d.setPageNav(c.page),h=!1);a("#wpProQuiz_loadData").hide();
22
+ a("#wpProQuiz_statistics_overview").show()}},"json")},changeTab:function(f){b=f;"wpProQuiz_typeRegisteredUser"==f?d.loadStatistics(a("#userSelect").val()):"wpProQuiz_typeAnonymeUser"==f?d.loadStatistics(0):d.loadOverview()},resetStatistic:function(f){var e="wpProQuiz_typeRegisteredUser"==b?a("#userSelect").val():0,c=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=reset";a.post(c,{action:"wp_pro_quiz_statistics",userId:e,complete:f},function(){d.changeTab(b)})},
23
  setPageNav:function(b){b=Math.ceil(b/a("#wpProQuiz_pageLimit").val());a("#wpProQuiz_currentPage").empty();for(var d=1;d<=b;d++)a(document.createElement("option")).val(d).text(d).appendTo(a("#wpProQuiz_currentPage"));a("#wpProQuiz_pageLeft, #wpProQuiz_pageRight").hide();1<a("#wpProQuiz_currentPage option").length&&a("#wpProQuiz_pageRight").show()}};a(".wpProQuiz_tab").click(function(){var b=a(this);if(b.hasClass("button-primary"))return!1;"wpProQuiz_typeRegisteredUser"==b.attr("id")?a("#wpProQuiz_userBox").show():
24
  a("#wpProQuiz_userBox").hide();a(".wpProQuiz_tab").removeClass("button-primary").addClass("button-secondary");b.removeClass("button-secondary").addClass("button-primary");d.changeTab(b.attr("id"));return!1});a("#userSelect").change(function(){d.changeTab("wpProQuiz_typeRegisteredUser")});a(".wpProQuiz_update").click(function(){d.changeTab(b);return!1});a("#wpProQuiz_reset").click(function(){confirm(wpProQuizLocalize.reset_statistics_msg)&&d.resetStatistic(!1);return!1});a(".wpProQuiz_resetComplete").click(function(){confirm(wpProQuizLocalize.reset_statistics_msg)&&
25
+ d.resetStatistic(!0);return!1});a("#wpProQuiz_pageLimit, #wpProQuiz_onlyCompleted").change(function(){a("#wpProQuiz_currentPage").val(0);h=!0;d.changeTab(b);return!1});a("#wpProQuiz_currentPage").change(function(){a("#wpProQuiz_pageLeft, #wpProQuiz_pageRight").hide();1!=a("#wpProQuiz_currentPage option").length&&(a("#wpProQuiz_currentPage option:first-child:selected").length?a("#wpProQuiz_pageRight").show():a("#wpProQuiz_currentPage option:last-child:selected").length?a("#wpProQuiz_pageLeft").show():
26
+ a("#wpProQuiz_pageLeft, #wpProQuiz_pageRight").show());d.changeTab(b)});a("#wpProQuiz_pageRight").click(function(){a("#wpProQuiz_currentPage option:selected").next().attr("selected","selected");a("#wpProQuiz_currentPage").change();return!1});a("#wpProQuiz_pageLeft").click(function(){a("#wpProQuiz_currentPage option:selected").prev().attr("selected","selected");a("#wpProQuiz_currentPage").change();return!1});d.changeTab("wpProQuiz_typeAnonymeUser")};a.fn.wpProQuiz_toplist=function(){var b=a("#wpProQuiz_sorting"),
27
+ h=a("#wpProQuiz_pageLimit"),d=a("#wpProQuiz_currentPage"),f=a("#wpProQuiz_loadData"),e=a("#wpProQuiz_pageLeft"),c=a("#wpProQuiz_pageRight"),g=a("#wpProQuiz_toplistTable tbody"),p=a("#wpProQuiz_toplistTable tbody tr:eq(0)").clone(),l=a("#wpProQuiz_content"),i={loadData:function(c){var k=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=load_toplist",m=this,n={action:"wp_pro_quiz_load_toplist",sort:b.val(),limit:h.val(),page:d.val()};void 0!=c&&a.extend(n,
28
+ c);f.show();l.hide();a.post(k,n,function(a){m.handleDataRequest(a.data);void 0!=a.nav&&m.handleNav(a.nav);f.hide();l.show()},"json")},handleNav:function(b){d.empty();for(var c=1;c<=b.pages;c++)a(document.createElement("option")).val(c).text(c).appendTo(d);this.checkNav()},handleDataRequest:function(b){var c=this;g.empty();a.each(b,function(a,b){var c=p.clone().children();c.eq(0).children().val(b.id);c.eq(1).find("strong").text(b.name);c.eq(1).find(".inline_editUsername").val(b.name);c.eq(2).find(".wpProQuiz_email").text(b.email);
29
+ c.eq(2).find("input").val(b.email);c.eq(3).text(b.type);c.eq(4).text(b.date);c.eq(5).text(b.points);c.eq(6).text(b.result);c.parent().show().appendTo(g)});b.length||a(document.createElement("td")).attr("colspan","7").text(wpProQuizLocalize.no_data_available).css({"font-weight":"bold","text-align":"center",padding:"5px"}).appendTo(document.createElement("tr")).appendTo(g);a(".wpProQuiz_delete").click(function(){if(confirm(wpProQuizLocalize.confirm_delete_entry)){var b=Array(a(this).closest("tr").find('input[name="checkedData[]"]').val());
30
+ c.loadData({a:"delete",toplistIds:b})}return!1});a(".wpProQuiz_edit").click(function(){var b=a(this).closest("tr");b.find(".row-actions").hide();b.find(".inline-edit").show();b.find(".wpProQuiz_username, .wpProQuiz_email").hide();b.find(".inline_editUsername, .inline_editEmail").show();return!1});a(".inline_editSave").click(function(){var b=a(this).closest("tr"),d=b.find(".inline_editUsername").val(),g=b.find(".inline_editEmail").val();if(c.isEmpty(d)||c.isEmpty(g))return alert(wpProQuizLocalize.not_all_fields_completed),
31
+ !1;c.loadData({a:"edit",toplistId:b.find('input[name="checkedData[]"]').val(),name:d,email:g});return!1});a(".inline_editCancel").click(function(){var b=a(this).closest("tr");b.find(".row-actions").show();b.find(".inline-edit").hide();b.find(".wpProQuiz_username, .wpProQuiz_email").show();b.find(".inline_editUsername, .inline_editEmail").hide();b.find(".inline_editUsername").val(b.find(".wpProQuiz_username").text());b.find(".inline_editEmail").val(b.find(".wpProQuiz_email").text());return!1})},checkNav:function(){var a=
32
+ d.val();1==a?e.hide():e.show();a==d.children().length?c.hide():c.show()},isEmpty:function(b){b=a.trim(b);return!b||0===b.length}};b.change(function(){i.loadData()});h.change(function(){i.loadData({nav:1})});d.change(function(){i.checkNav();i.loadData()});e.click(function(){d.val(Number(d.val())-1);i.checkNav();i.loadData()});c.click(function(){d.val(Number(d.val())+1);i.checkNav();i.loadData()});a("#wpProQuiz_deleteAll").click(function(){i.loadData({a:"deleteAll"})});a("#wpProQuiz_action").click(function(){var b=
33
+ a("#wpProQuiz_actionName").val();if("0"!=b){var c=a('input[name="checkedData[]"]:checked').map(function(){return a(this).val()}).get();i.loadData({a:b,toplistIds:c})}});a("#wpProQuiz_checkedAll").change(function(){this.checked?a('input[name="checkedData[]"]').attr("checked","checked"):a('input[name="checkedData[]"]').removeAttr("checked","checked")});i.loadData({nav:1})};a(".wpProQuiz_quizOverall").length&&a(".wpProQuiz_quizOverall").wpProQuiz_preview();a(".wpProQuiz_quizOverall").length&&a(".wpProQuiz_quizOverall").wpProQuiz_quizOverall();
34
+ a(".wpProQuiz_quizEdit").length&&a(".wpProQuiz_quizEdit").wpProQuiz_quizEdit();a(".wpProQuiz_questionOverall").length&&a(".wpProQuiz_questionOverall").wpProQuiz_questionOverall();a(".wpProQuiz_toplist").length&&a(".wpProQuiz_toplist").wpProQuiz_toplist();(function(){var b=this,b={displayChecked:function(a,b,d,e){a=d?!a.checked:a.checked;e?a?b.attr("disabled","disabled"):b.removeAttr("disabled"):a?b.show():b.hide()},isEmpty:function(b){b=a.trim(b);return!b||0===b.length},isNumber:function(c){c=a.trim(c);
35
+ return!b.isEmpty(c)&&!isNaN(c)},getMceContent:function(b){var d=tinymce.editors[b];return void 0!=d&&!d.isHidden()?d.getContent():a("#"+b).val()},ajaxPost:function(b,d,e){a.post(ajaxurl,{action:"wp_pro_quiz_admin_ajax",func:b,data:d},e,"json")}},h=function(){var c={categoryDelete:function(c){b.ajaxPost("categoryDelete",{categoryId:c},function(b){b.err||(a('select[name="category"] option[value="'+c+'"]').remove(),a('select[name="category"]').change())})},categoryEdit:function(c,d){var e={categoryId:c,
36
+ categoryName:a.trim(d)};b.isEmpty(d)?alert(wpProQuizLocalize.category_no_name):b.ajaxPost("categoryEdit",e,function(b){b.err||(a('select[name="category"] option[value="'+c+'"]').text(e.categoryName),a('select[name="category"]').change())})},changeTimeFormat:function(b,c){"0"!=c.val()&&a('input[name="'+b+'"]').val(c.val())}};a('select[name="category"]').change(function(){a('input[name="categoryEditText"]').val(a(this).find(":selected").text())}).change();a('input[name="categoryDelete"]').click(function(){var b=
37
+ a('select[name="category"] option:selected').val();c.categoryDelete(b)});a('input[name="categoryEdit"]').click(function(){var b=a('select[name="category"] option:selected').val(),d=a('input[name="categoryEditText"]').val();c.categoryEdit(b,d)});a("#statistic_time_format_select").change(function(){c.changeTimeFormat("statisticTimeFormat",a(this))});a(document).bind("changeTab",function(b){a("#problemInfo").hide("fast");switch(b.tabId){case "#problemContent":a("#problemInfo").show("fast")}});a('input[name="email[html]"]').change(function(){if(void 0==
38
+ switchEditors)return!1;this.checked?switchEditors.go("adminEmailEditor","tmce"):switchEditors.go("adminEmailEditor","html")}).change();a('input[name="userEmail[html]"]').change(function(){if(void 0==switchEditors)return!1;this.checked?switchEditors.go("userEmailEditor","tmce"):switchEditors.go("userEmailEditor","html")}).change()},d=function(){var c=this,d=a.noop(),e=a(".answer_felder > div"),f=a('input[name="answerPointsActivated"]'),i=a('input[name="points"]'),c={generateArrayIndex:function(){var b=
39
+ a('input[name="answerType"]:checked').val(),b="single"==b||"multiple"==b?"classic_answer":b;a(".answerList").each(function(){var c=a(this).parent().attr("class");a(this).children().each(function(d){a(this).find('[name^="answerData"]').each(function(){var a=this.name,e=a.search(/\](\[\w+\])+$/),g=b==c?d:"none";0<e&&(this.name="answerData["+g+a.substring(e,a.length))})})})},globalValidate:function(){if(b.isEmpty(b.getMceContent("question")))return alert(wpProQuizLocalize.no_question_msg),!1;if(f.is(":checked")){if("free_answer"==
40
+ a('input[name="answerType"]:checked').val())return alert(wpProQuizLocalize.dif_points),!1}else{var c=i.val();if(!b.isNumber(c)||1>c)return alert(wpProQuizLocalize.no_nummber_points),!1}return!1===d()?!1:!0},answerRemove:function(){var b=a(this).parent();if(2>b.parent().children().length)return!1;b.remove();return!1},addCategory:function(){var c=a.trim(a('input[name="categoryAdd"]').val());b.isEmpty(c)||b.ajaxPost("categoryAdd",{categoryName:c},function(b){b.err?a("#categoryMsgBox").text(b.err).show("fast").delay(2E3).hide("fast"):
41
+ (b=a(document.createElement("option")).val(b.categoryId).text(b.categoryName).attr("selected","selected"),a('select[name="category"]').append(b).change())})},addMediaClick:function(){if("function"!=typeof tb_show)return!1;var b=a(this).closest("li"),c=b.find('input[name="answerData[][html]"]:eq(0)'),d=b.find(".wpProQuiz_text:eq(0)");window.org_send_to_editor=window.send_to_editor;var e=tb_remove;window.send_to_editor=function(b){b=a("img",b)[0].outerHTML;d.val(d.val()+b);c.attr("checked",!0);tb_remove();
42
+ window.send_to_editor=window.org_send_to_editor};window.tb_remove=function(){window.send_to_editor=window.org_send_to_editor;tb_remove=e;tb_remove()};tb_show("","media-upload.php?type=image&TB_iframe=true")}},h={classic_answer:function(){var c=0,d=0,e=0;a(".classic_answer .answerList").children().each(function(){var g=a(this);b.isEmpty(g.find('textarea[name="answerData[][answer]"]').val())||(c++,g.find('input[name="answerData[][correct]"]:checked').length&&d++,g=g.find('input[name="answerData[][points]"]').val(),
43
+ b.isNumber(g)&&0<=g&&e++)});return!c?(alert(wpProQuizLocalize.no_answer_msg),!1):!d?(alert(wpProQuizLocalize.no_correct_msg),!1):e!=c&&f.is(":checked")?(alert(wpProQuizLocalize.no_nummber_points_new),!1):!0},free_answer:function(){return b.isEmpty(a('.free_answer textarea[name="answerData[][answer]"]').val())?(alert(wpProQuizLocalize.no_answer_msg),!1):!0},cloze_answer:function(){return b.isEmpty(b.getMceContent("cloze"))?(alert(wpProQuizLocalize.no_answer_msg),!1):!0},sort_answer:function(){var c=
44
+ 0,d=0;a(".sort_answer .answerList").children().each(function(){var e=a(this);b.isEmpty(e.find('textarea[name="answerData[][answer]"]').val())||(c++,e=e.find('input[name="answerData[][points]"]').val(),b.isNumber(e)&&0<=e&&d++)});return!c?(alert(wpProQuizLocalize.no_answer_msg),!1):d!=c&&f.is(":checked")?(alert(wpProQuizLocalize.no_nummber_points_new),!1):!0},matrix_sort_answer:function(){var c=0,d=0,e=!0,g=0;a(".matrix_sort_answer .answerList").children().each(function(){var f=a(this),h=f.find('input[name="answerData[][points]"]').val();
45
+ b.isEmpty(f.find('textarea[name="answerData[][answer]"]').val())?b.isEmpty(f.find('textarea[name="answerData[][sort_string]"]').val())||(g++,b.isNumber(h)&&0<=h&&d++):(c++,g++,b.isEmpty(f.find('textarea[name="answerData[][sort_string]"]').val())&&(e=!1),b.isNumber(h)&&0<=h&&d++)});return!c?(alert(wpProQuizLocalize.no_answer_msg),!1):!e?(alert(wpProQuizLocalize.no_sort_element_criterion),!1):d!=g&&f.is(":checked")?(alert(wpProQuizLocalize.no_nummber_points_new),!1):!0},assessment_answer:function(){return b.isEmpty(b.getMceContent("assessment"))?
46
+ (alert(wpProQuizLocalize.no_answer_msg),!1):!0}};e.hide();a("#wpProQuiz_tip").change(function(){b.displayChecked(this,a("#wpProQuiz_tipBox"))}).change();a("#wpProQuiz_correctSameText").change(function(){b.displayChecked(this,a("#wpProQuiz_incorrectMassageBox"),!0)}).change();a('input[name="answerType"]').click(function(){e.hide();var b=this.value;if("single"==b||"multiple"==b){var c="single"==b?"radio":"checkbox",b="classic_answer";a(".wpProQuiz_classCorrect").each(function(){a("<input type="+c+" />").attr({name:this.name,
47
+ value:this.value,checked:this.checked}).addClass("wpProQuiz_classCorrect wpProQuiz_checkbox").insertBefore(this)}).remove()}d=void 0!=h[b]?h[b]:a.noop();a("."+b).show()});a('input[name="answerType"]:checked').click();a(".deleteAnswer").click(c.answerRemove);a(".addAnswer").click(function(){var b=a(this).siblings("ul"),d=b.find("li:eq(0)").clone();d.find(".wpProQuiz_checkbox").removeAttr("checked");d.find(".wpProQuiz_text").val("");d.find(".wpProQuiz_points").val(1);d.find(".deleteAnswer").click(c.answerRemove);
48
+ d.find(".addMedia").click(c.addMediaClick);d.appendTo(b);return!1});a(".sort_answer ul, .classic_answer ul, .matrix_sort_answer ul").sortable({handle:".wpProQuiz_move"});a("#saveQuestion").click(function(){if(!c.globalValidate())return!1;c.generateArrayIndex();return!0});a(f).change(function(){b.displayChecked(this,a(".wpProQuiz_answerPoints"));b.displayChecked(this,a("#wpProQuiz_showPointsBox"));b.displayChecked(this,i,!1,!0)}).change();a('select[name="category"]').change(function(){var b=a(this),
49
+ c=a("#categoryAddBox").hide();"-1"==b.val()&&c.show()}).change();a("#categoryAddBtn").click(function(){c.addCategory()});a(".addMedia").click(c.addMediaClick)},f=function(){var c=this,d=a("#quizId").val(),e="users",f=a("#wpProQuiz_currentPage"),h=a("#wpProQuiz_pageLeft"),j=a("#wpProQuiz_pageRight"),k=a("#testSelect"),c={loadStatistic:function(a){b.ajaxPost("statisticLoad",{userId:a},function(){})},loadUsersStatistic:function(){var e={userId:a("#userSelect").val(),quizId:d,testId:a("#testSelect").val()};
50
+ c.toggleLoadBox(!1);b.ajaxPost("statisticLoad",e,function(b){a.each(b.question,function(){var b=a("#wpProQuiz_tr_"+this.questionId);c.setStatisticData(b,this)});a.each(b.category,function(b,d){var e=a("#wpProQuiz_ctr_"+b);c.setStatisticData(e,d)});a("#testSelect option:gt(0)").remove();var d=a("#testSelect");a.each(b.tests,function(){var c=a(document.createElement("option"));c.val(this.id);c.text(this.date);b.testId==this.id&&c.attr("selected",!0);d.append(c)});c.toggleLoadBox(!0)})},setStatisticData:function(a,
51
+ b){a.find(".wpProQuiz_cCorrect").text(b.correct);a.find(".wpProQuiz_cIncorrect").text(b.incorrect);a.find(".wpProQuiz_cTip").text(b.hint);a.find(".wpProQuiz_cPoints").text(b.points);a.find(".wpProQuiz_cResult").text(b.result);a.find(".wpProQuiz_cTime").text(b.questionTime)},toggleLoadBox:function(b){var c=a("#wpProQuiz_loadData"),d=a("#wpProQuiz_content");b?(c.hide(),d.show()):(d.hide(),c.show())},reset:function(e){var f=a("#userSelect").val();confirm(wpProQuizLocalize.reset_statistics_msg)&&(e={quizId:d,
52
+ userId:f,testId:k.val(),type:e},c.toggleLoadBox(!1),b.ajaxPost("statisticReset",e,function(){c.loadUsersStatistic()}))},loadStatisticOverview:function(e){e={quizId:d,pageLimit:a("#wpProQuiz_pageLimit").val(),onlyCompleted:Number(a("#wpProQuiz_onlyCompleted").is(":checked")),page:f.val(),nav:Number(e)};c.toggleLoadBox(!1);b.ajaxPost("statisticLoadOverview",e,function(b){var d=a("#wpProQuiz_statistics_overview_data"),e=d.children(),f=e.first().clone();e.slice(1).remove();a.each(b.items,function(){var b=
53
+ f.clone();c.setStatisticData(b,this);b.find("a").text(this.userName).data("userId",this.userId).click(function(){a("#userSelect").val(a(this).data("userId"));a("#wpProQuiz_typeUser").click();return!1});b.show().appendTo(d)});f.remove();c.toggleLoadBox(!0);void 0!=b.page&&c.handleNav(b.page)})},handleNav:function(b){for(var d=a("#wpProQuiz_currentPage").empty(),e=1;e<=b;e++)a(document.createElement("option")).val(e).text(e).appendTo(d);c.checkNavBar()},checkNavBar:function(){var a=f.val();1==a?h.hide():
54
+ h.show();a==f.children().length?j.hide():j.show()},refresh:function(){"users"==e?c.loadUsersStatistic():c.loadStatisticOverview(!0)}};a("#userSelect, #testSelect").change(function(){c.loadUsersStatistic()});a(".wpProQuiz_update").click(function(){c.refresh()});a("#wpProQuiz_reset").click(function(){c.reset(0)});a("#wpProQuiz_resetUser").click(function(){c.reset(1)});a(".wpProQuiz_resetComplete").click(function(){c.reset(2)});a(".wpProQuiz_tab").click(function(){var b=a(this);a(".wpProQuiz_tab").removeClass("button-primary").addClass("button-secondary");
55
+ b.removeClass("button-secondary").addClass("button-primary");a(".wpProQuiz_tabContent").hide();"wpProQuiz_typeUser"==b.attr("id")?(e="users",a("#wpProQuiz_tabUsers").show(),c.loadUsersStatistic()):(e="overview",a("#wpProQuiz_tabOverview").show(),c.loadStatisticOverview(!0));return!1});a("#wpProQuiz_onlyCompleted").change(function(){f.val(1);c.loadStatisticOverview(!0)});a("#wpProQuiz_pageLimit").change(function(){f.val(1);c.loadStatisticOverview(!0)});h.click(function(){f.val(Number(f.val())-1);c.loadStatisticOverview(!1);
56
+ c.checkNavBar()});j.click(function(){f.val(Number(f.val())+1);c.loadStatisticOverview(!1);c.checkNavBar()});f.change(function(){c.loadStatisticOverview(!1);c.checkNavBar()});c.loadUsersStatistic()};a(".wpProQuiz_tab_wrapper a").click(function(){var b=a(this),d=b.data("tab"),e=b.siblings(".button-primary").removeClass("button-primary").addClass("button-secondary");b.removeClass("button-secondary").addClass("button-primary");a(e.data("tab")).hide("fast");a(d).show("fast");a(document).trigger({type:"changeTab",
57
+ tabId:d});return!1});var e=a.noop;a(".wpProQuiz_questionEdit").length?e=d:a(".wpProQuiz_globalSettings").length?e=h:a(".wpProQuiz_statistics").length&&(e=f);e();a(".wpProQuiz_demoImgBox a").mouseover(function(b){var d=a(this),e=a(document).width(),d=d.siblings().outerWidth(!0);b.pageX+d>e&&(b=e-(b.pageX+d+30),a(this).next().css("left",b+"px"));a(this).next().show()}).mouseout(function(){a(this).next().hide()}).click(function(){return!1})})()});
js/wpProQuiz_front.js CHANGED
@@ -1,12 +1,19 @@
1
  (function($) {
 
 
 
2
  $.wpProQuizFront = function(element, options) {
 
3
  var $e = $(element);
4
  var config = options;
5
  var plugin = this;
6
  var results = new Object();
 
7
  var startTime = 0;
8
  var currentQuestion = null;
9
  var quizSolved = [];
 
 
10
 
11
  var bitOptions = {
12
  randomAnswer: 0,
@@ -43,7 +50,8 @@
43
  results: $e.find('.wpProQuiz_results'),
44
  quizStartPage: $e.find('.wpProQuiz_text'),
45
  timelimit: $e.find('.wpProQuiz_time_limit'),
46
- toplistShowInButton: $e.find('.wpProQuiz_toplistShowInButton')
 
47
  };
48
 
49
  var toplistData = {
@@ -51,7 +59,9 @@
51
  isUser: 0
52
  };
53
 
54
-
 
 
55
  var timelimit = (function() {
56
  var _counter = config.timelimit;
57
  var _intervalId = 0;
@@ -100,7 +110,12 @@
100
 
101
  })();
102
 
 
 
 
 
103
  var reviewBox = new function() {
 
104
  var $contain = [], $cursor = [], $list = [], $items = [];
105
  var x = 0, offset = 0, diff = 0, top = 0, max = 0;
106
  var itemsStatus = [];
@@ -172,9 +187,14 @@
172
  if(bitOptions.reviewQustion)
173
  $contain.parent().show();
174
 
 
 
175
  if(save)
176
  return;
177
 
 
 
 
178
  var h = $list.outerHeight();
179
  var c = $contain.height();
180
  x = c - $cursor.height();
@@ -195,6 +215,30 @@
195
  $contain.parent().hide();
196
  };
197
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
  this.reset = function() {
199
  for(var i = 0, c = $items.length; i < c; i++) {
200
  itemsStatus[i] = {};
@@ -261,6 +305,58 @@
261
  }
262
  };
263
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
264
  var checker = function(name, data, $question, $questionList) {
265
  var correct = true;
266
  var points = 0;
@@ -402,6 +498,18 @@
402
 
403
  input.attr('disabled', 'disabled');
404
  });
 
 
 
 
 
 
 
 
 
 
 
 
405
  }
406
  };
407
 
@@ -415,6 +523,10 @@
415
  };
416
 
417
  plugin.methode = {
 
 
 
 
418
  parseBitOptions: function() {
419
  if(config.bo) {
420
  bitOptions.randomAnswer = config.bo & (1 << 0);
@@ -499,6 +611,7 @@
499
  e.addClass('wpProQuiz_answerIncorrect');
500
  }
501
  }
 
502
  },
503
 
504
  startQuiz: function() {
@@ -545,6 +658,8 @@
545
  });
546
  });
547
 
 
 
548
  switch (config.mode) {
549
  case 3:
550
  $e.find('input[name="checkSingle"]').show();
@@ -564,15 +679,26 @@
564
  break;
565
  }
566
 
 
 
 
 
 
567
  var $listItem = globalElements.questionList.children();
568
 
 
 
569
  if(config.mode == 3) {
570
  $listItem.show();
571
  } else {
572
  currentQuestion = $listItem.eq(0).show();
573
- $e.trigger({type: 'changeQuestion', values: {item: currentQuestion, index: currentQuestion.index()}});
 
 
574
  }
575
 
 
 
576
  $e.find('.wpProQuiz_sortable').parents('ul').sortable({
577
  update: function( event, ui ) {
578
  var $p = $(this).parents('.wpProQuiz_listItem');
@@ -597,49 +723,92 @@
597
 
598
  startTime = +new Date();
599
 
600
- results = {comp: {points: 0, correctQuestions: 0}};
 
 
 
 
 
 
 
 
 
 
 
 
601
 
602
  globalElements.quizStartPage.hide();
603
  globalElements.quiz.show();
604
  reviewBox.show();
 
 
 
 
605
  },
606
 
607
  nextQuestion: function() {
608
- currentQuestion = currentQuestion.hide().next().show();
609
-
610
- plugin.methode.scrollTo(globalElements.quiz);
611
-
612
- $e.trigger({type: 'changeQuestion', values: {item: currentQuestion, index: currentQuestion.index()}});
613
-
614
- if(!currentQuestion.length) {
615
- plugin.methode.showQuizSummary();
616
- }
 
 
617
  },
618
 
619
  prevQuestion: function() {
620
- currentQuestion = currentQuestion.hide().prev().show();
621
-
622
- plugin.methode.scrollTo(globalElements.quiz);
623
-
624
- $e.trigger({type: 'changeQuestion', values: {item: currentQuestion, index: currentQuestion.index()}});
 
 
625
  },
626
 
627
  showQuestion: function(index) {
628
- if(config.mode == 3) {
629
- plugin.methode.scrollTo($e.find('.wpProQuiz_list > li').eq(index), 1);
 
 
 
 
630
  return;
631
  }
632
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
633
  currentQuestion.hide();
634
-
635
- currentQuestion = $e.find('.wpProQuiz_list > li').eq(index).show();
636
 
637
  plugin.methode.scrollTo(globalElements.quiz);
638
 
639
  $e.trigger({type: 'changeQuestion', values: {item: currentQuestion, index: currentQuestion.index()}});
640
 
641
- if(!currentQuestion.length)
642
  plugin.methode.showQuizSummary();
 
 
 
 
643
  },
644
 
645
  skipQuestion: function() {
@@ -653,6 +822,9 @@
653
  },
654
 
655
  showQuizSummary: function() {
 
 
 
656
  if(bitOptions.quizSummeryHide || !bitOptions.reviewQustion) {
657
  plugin.methode.finishQuiz();
658
  return;
@@ -689,7 +861,8 @@
689
  },
690
 
691
  finishQuiz: function(timeover) {
692
-
 
693
  timelimit.stop();
694
 
695
  var time = (+new Date() - startTime) / 1000;
@@ -701,7 +874,7 @@
701
  globalElements.results.find('.wpProQuiz_time_limit_expired').show();
702
  }
703
 
704
- plugin.methode.checkQuestion(globalElements.questionList.children());
705
 
706
  $e.find('.wpProQuiz_correct_answer').text(results.comp.correctQuestions);
707
 
@@ -717,6 +890,8 @@
717
 
718
  plugin.methode.setAverageResult(results.comp.result, false);
719
 
 
 
720
  plugin.methode.sendCompletedQuiz();
721
 
722
  if(bitOptions.isAddAutomatic && toplistData.isUser) {
@@ -732,6 +907,16 @@
732
  plugin.methode.scrollTo(globalElements.results);
733
  },
734
 
 
 
 
 
 
 
 
 
 
 
735
  questionSolved: function(e) {
736
  quizSolved[e.values.index] = e.values.solved;
737
  },
@@ -765,10 +950,12 @@
765
  },
766
 
767
  showQustionList: function() {
 
768
  globalElements.toplistShowInButton.hide();
769
  globalElements.quiz.toggle();
770
  $e.find('.wpProQuiz_QuestionButton').hide();
771
  globalElements.questionList.children().show();
 
772
 
773
  $e.find('.wpProQuiz_question_page').hide();
774
  },
@@ -788,9 +975,12 @@
788
  globalElements.quizStartPage.show();
789
  globalElements.questionList.children().hide();
790
  globalElements.toplistShowInButton.hide();
 
791
 
792
  $e.find('.wpProQuiz_questionInput, .wpProQuiz_cloze input').removeAttr('disabled').removeAttr('checked')
793
- .val('').css('background-color', '');
 
 
794
 
795
  $e.find('.wpProQuiz_answerCorrect, .wpProQuiz_answerIncorrect').removeClass('wpProQuiz_answerCorrect wpProQuiz_answerIncorrect');
796
 
@@ -805,9 +995,15 @@
805
  $e.find('.wpProQuiz_clozeCorrect, .wpProQuiz_QuestionButton, .wpProQuiz_resultsList > li').hide();
806
 
807
  $e.find('.wpProQuiz_question_page, input[name="tip"]').show();
 
 
 
 
 
 
808
  },
809
 
810
- checkQuestion: function(list) {
811
  list = (list == undefined) ? currentQuestion : list;
812
 
813
  list.each(function() {
@@ -816,6 +1012,8 @@
816
  var data = config.json[$questionList.data('question_id')];
817
  var name = data.type;
818
 
 
 
819
  if($this.data('check')) {
820
  return true;
821
  }
@@ -831,14 +1029,12 @@
831
  $this.find(globalNames.skip).hide();
832
  $this.find(globalNames.next).show();
833
 
834
- if(results[data.id] == undefined) {
835
- results[data.id] = new Object();
836
- }
837
-
838
  results[data.id].points = result.p;
839
  results[data.id].correct = Number(result.c);
840
  results['comp'].points += result.p;
841
 
 
 
842
  if(result.c) {
843
  $this.find('.wpProQuiz_correct').show();
844
  results['comp'].correctQuestions += 1;
@@ -850,7 +1046,8 @@
850
 
851
  $this.data('check', true);
852
 
853
- $e.trigger({type: 'questionSolved', values: {item: $this, index: $this.index(), solved: true}});
 
854
  });
855
  },
856
 
@@ -860,10 +1057,6 @@
860
 
861
  $this.siblings('.wpProQuiz_tipp').toggle('fast');
862
 
863
- if(results[id] == undefined) {
864
- results[id] = new Object();
865
- }
866
-
867
  results[id].tip = 1;
868
 
869
  $(document).bind('mouseup.tipEvent', function(e) {
@@ -1046,7 +1239,7 @@
1046
  $e.trigger({type: 'questionSolved', values: {item: $p, index: $p.index(), solved: s}});
1047
  });
1048
 
1049
- $e.find('.wpProQuiz_questionList[data-type="single"] .wpProQuiz_questionInput').change(function(e) {
1050
  var $this = $(this);
1051
  var $p = $this.parents('.wpProQuiz_listItem');
1052
  var s = this.checked;
@@ -1085,6 +1278,9 @@
1085
  }
1086
  };
1087
 
 
 
 
1088
  plugin.init = function() {
1089
  plugin.methode.parseBitOptions();
1090
  plugin.methode.setClozeStyle();
1
  (function($) {
2
+ /**
3
+ * @memberOf $
4
+ */
5
  $.wpProQuizFront = function(element, options) {
6
+
7
  var $e = $(element);
8
  var config = options;
9
  var plugin = this;
10
  var results = new Object();
11
+ var catResults = new Object();
12
  var startTime = 0;
13
  var currentQuestion = null;
14
  var quizSolved = [];
15
+ var lastButtonValue = "";
16
+ var inViewQuestions = false;
17
 
18
  var bitOptions = {
19
  randomAnswer: 0,
50
  results: $e.find('.wpProQuiz_results'),
51
  quizStartPage: $e.find('.wpProQuiz_text'),
52
  timelimit: $e.find('.wpProQuiz_time_limit'),
53
+ toplistShowInButton: $e.find('.wpProQuiz_toplistShowInButton'),
54
+ listItems: $()
55
  };
56
 
57
  var toplistData = {
59
  isUser: 0
60
  };
61
 
62
+ /**
63
+ * @memberOf timelimit
64
+ */
65
  var timelimit = (function() {
66
  var _counter = config.timelimit;
67
  var _intervalId = 0;
110
 
111
  })();
112
 
113
+
114
+ /**
115
+ * @memberOf reviewBox
116
+ */
117
  var reviewBox = new function() {
118
+
119
  var $contain = [], $cursor = [], $list = [], $items = [];
120
  var x = 0, offset = 0, diff = 0, top = 0, max = 0;
121
  var itemsStatus = [];
187
  if(bitOptions.reviewQustion)
188
  $contain.parent().show();
189
 
190
+ $e.find('.wpProQuiz_reviewDiv .wpProQuiz_button2').show();
191
+
192
  if(save)
193
  return;
194
 
195
+ $list.attr('style', 'margin-top: 0px !important');
196
+ $cursor.css({top: 0});
197
+
198
  var h = $list.outerHeight();
199
  var c = $contain.height();
200
  x = c - $cursor.height();
215
  $contain.parent().hide();
216
  };
217
 
218
+ this.toggle = function() {
219
+ if(bitOptions.reviewQustion) {
220
+ $contain.parent().toggle();
221
+ $items.removeClass('wpProQuiz_reviewQuestionTarget');
222
+ $e.find('.wpProQuiz_reviewDiv .wpProQuiz_button2').hide();
223
+
224
+ $list.attr('style', 'margin-top: 0px !important');
225
+ $cursor.css({top: 0});
226
+
227
+ var h = $list.outerHeight();
228
+ var c = $contain.height();
229
+ x = c - $cursor.height();
230
+ offset = 0;
231
+ max = h-c;
232
+ diff = max / x;
233
+
234
+ if(h > 100) {
235
+ $cursor.show();
236
+ }
237
+
238
+ top = $cursor.offset().top;
239
+ }
240
+ };
241
+
242
  this.reset = function() {
243
  for(var i = 0, c = $items.length; i < c; i++) {
244
  itemsStatus[i] = {};
305
  }
306
  };
307
 
308
+
309
+ function QuestionTimer() {
310
+ var questionStartTime = 0;
311
+ var currentQuestionId = -1;
312
+
313
+ var quizStartTimer = 0;
314
+ var isQuizStart = false;
315
+
316
+ this.questionStart = function(questionId) {
317
+ if(currentQuestionId != -1)
318
+ this.questionStop();
319
+
320
+ currentQuestionId = questionId;
321
+ questionStartTime = +new Date();
322
+ };
323
+
324
+ this.questionStop = function() {
325
+ if(currentQuestionId == -1)
326
+ return;
327
+
328
+ results[currentQuestionId].time += Math.round((new Date() - questionStartTime) / 1000);
329
+
330
+ currentQuestionId = -1;
331
+ };
332
+
333
+ this.startQuiz = function() {
334
+ if(isQuizStart)
335
+ this.stopQuiz();
336
+
337
+ quizStartTimer = +new Date();
338
+ isQuizStart = true;
339
+ };
340
+
341
+ this.stopQuiz = function() {
342
+ if(!isQuizStart)
343
+ return;
344
+
345
+ results['comp'].quizTime += Math.round((new Date() - quizStartTimer) / 1000);
346
+ isQuizStart = false;
347
+ };
348
+
349
+ this.init = function() {
350
+
351
+ };
352
+
353
+ };
354
+
355
+ var questionTimer = new QuestionTimer();
356
+
357
+ /**
358
+ * @memberOf checker
359
+ */
360
  var checker = function(name, data, $question, $questionList) {
361
  var correct = true;
362
  var points = 0;
498
 
499
  input.attr('disabled', 'disabled');
500
  });
501
+ },
502
+
503
+ assessment_answer: function() {
504
+ correct = true;
505
+ var $input = $questionList.find('.wpProQuiz_questionInput').attr('disabled', 'disabled');
506
+ var val = 0;
507
+
508
+ $input.filter(':checked').each(function() {
509
+ val += parseInt($(this).val());
510
+ });
511
+
512
+ points = val;
513
  }
514
  };
515
 
523
  };
524
 
525
  plugin.methode = {
526
+ /**
527
+ * @memberOf plugin.methode
528
+ */
529
+
530
  parseBitOptions: function() {
531
  if(config.bo) {
532
  bitOptions.randomAnswer = config.bo & (1 << 0);
611
  e.addClass('wpProQuiz_answerIncorrect');
612
  }
613
  }
614
+
615
  },
616
 
617
  startQuiz: function() {
658
  });
659
  });
660
 
661
+ globalElements.next = $e.find(globalNames.next);
662
+
663
  switch (config.mode) {
664
  case 3:
665
  $e.find('input[name="checkSingle"]').show();
679
  break;
680
  }
681
 
682
+ //Change last name
683
+ var $lastButton = globalElements.next.last();
684
+ lastButtonValue = $lastButton.val();
685
+ $lastButton.val(config.lbn);
686
+
687
  var $listItem = globalElements.questionList.children();
688
 
689
+ globalElements.listItems = $e.find('.wpProQuiz_list > li');
690
+
691
  if(config.mode == 3) {
692
  $listItem.show();
693
  } else {
694
  currentQuestion = $listItem.eq(0).show();
695
+
696
+ var questionId = currentQuestion.find(globalNames.questionList).data('question_id');
697
+ questionTimer.questionStart(questionId);
698
  }
699
 
700
+ questionTimer.startQuiz();
701
+
702
  $e.find('.wpProQuiz_sortable').parents('ul').sortable({
703
  update: function( event, ui ) {
704
  var $p = $(this).parents('.wpProQuiz_listItem');
723
 
724
  startTime = +new Date();
725
 
726
+ results = {comp: {points: 0, correctQuestions: 0, quizTime: 0}};
727
+
728
+ $e.find('.wpProQuiz_questionList').each(function() {
729
+ var questionId = $(this).data('question_id');
730
+
731
+ results[questionId] = {time: 0};
732
+ });
733
+
734
+ catResults = {};
735
+
736
+ $.each(options.catPoints, function(i, v) {
737
+ catResults[i] = 0;
738
+ });
739
 
740
  globalElements.quizStartPage.hide();
741
  globalElements.quiz.show();
742
  reviewBox.show();
743
+
744
+ if(config.mode != 3) {
745
+ $e.trigger({type: 'changeQuestion', values: {item: currentQuestion, index: currentQuestion.index()}});
746
+ }
747
  },
748
 
749
  nextQuestion: function() {
750
+ // currentQuestion = currentQuestion.hide().next().show();
751
+ //
752
+ // plugin.methode.scrollTo(globalElements.quiz);
753
+ //
754
+ // $e.trigger({type: 'changeQuestion', values: {item: currentQuestion, index: currentQuestion.index()}});
755
+ //
756
+ // if(!currentQuestion.length) {
757
+ // plugin.methode.showQuizSummary();
758
+ // }
759
+
760
+ this.showQuestionObject(currentQuestion.next());
761
  },
762
 
763
  prevQuestion: function() {
764
+ // currentQuestion = currentQuestion.hide().prev().show();
765
+ //
766
+ // plugin.methode.scrollTo(globalElements.quiz);
767
+ //
768
+ // $e.trigger({type: 'changeQuestion', values: {item: currentQuestion, index: currentQuestion.index()}});
769
+ //
770
+ this.showQuestionObject(currentQuestion.prev());
771
  },
772
 
773
  showQuestion: function(index) {
774
+ var $element = globalElements.listItems.eq(index);
775
+
776
+ if(config.mode == 3 || inViewQuestions) {
777
+ // plugin.methode.scrollTo($e.find('.wpProQuiz_list > li').eq(index), 1);
778
+ plugin.methode.scrollTo($element, 1);
779
+ questionTimer.startQuiz();
780
  return;
781
  }
782
 
783
+ // currentQuestion.hide();
784
+ //
785
+ // currentQuestion = $element.show();
786
+ //
787
+ // plugin.methode.scrollTo(globalElements.quiz);
788
+ //
789
+ // $e.trigger({type: 'changeQuestion', values: {item: currentQuestion, index: currentQuestion.index()}});
790
+ //
791
+ // if(!currentQuestion.length)
792
+ // plugin.methode.showQuizSummary();
793
+
794
+ this.showQuestionObject($element);
795
+ },
796
+
797
+ showQuestionObject: function(obj) {
798
  currentQuestion.hide();
799
+
800
+ currentQuestion = obj.show();
801
 
802
  plugin.methode.scrollTo(globalElements.quiz);
803
 
804
  $e.trigger({type: 'changeQuestion', values: {item: currentQuestion, index: currentQuestion.index()}});
805
 
806
+ if(!currentQuestion.length) {
807
  plugin.methode.showQuizSummary();
808
+ } else {
809
+ var questionId = currentQuestion.find(globalNames.questionList).data('question_id');
810
+ questionTimer.questionStart(questionId);
811
+ }
812
  },
813
 
814
  skipQuestion: function() {
822
  },
823
 
824
  showQuizSummary: function() {
825
+ questionTimer.questionStop();
826
+ questionTimer.stopQuiz();
827
+
828
  if(bitOptions.quizSummeryHide || !bitOptions.reviewQustion) {
829
  plugin.methode.finishQuiz();
830
  return;
861
  },
862
 
863
  finishQuiz: function(timeover) {
864
+ questionTimer.questionStop();
865
+ questionTimer.stopQuiz();
866
  timelimit.stop();
867
 
868
  var time = (+new Date() - startTime) / 1000;
874
  globalElements.results.find('.wpProQuiz_time_limit_expired').show();
875
  }
876
 
877
+ plugin.methode.checkQuestion(globalElements.questionList.children(), true);
878
 
879
  $e.find('.wpProQuiz_correct_answer').text(results.comp.correctQuestions);
880
 
890
 
891
  plugin.methode.setAverageResult(results.comp.result, false);
892
 
893
+ this.setCategoryOverview();
894
+
895
  plugin.methode.sendCompletedQuiz();
896
 
897
  if(bitOptions.isAddAutomatic && toplistData.isUser) {
907
  plugin.methode.scrollTo(globalElements.results);
908
  },
909
 
910
+ setCategoryOverview: function() {
911
+ $e.find('.wpProQuiz_catOverview li').each(function() {
912
+ var $this = $(this);
913
+ var catId = $this.data('category_id');
914
+ var r = Math.round(catResults[catId] / config.catPoints[catId] * 100 * 100) / 100;
915
+
916
+ $this.find('.wpProQuiz_catPercent').text(r + '%');
917
+ });
918
+ },
919
+
920
  questionSolved: function(e) {
921
  quizSolved[e.values.index] = e.values.solved;
922
  },
950
  },
951
 
952
  showQustionList: function() {
953
+ inViewQuestions = !inViewQuestions;
954
  globalElements.toplistShowInButton.hide();
955
  globalElements.quiz.toggle();
956
  $e.find('.wpProQuiz_QuestionButton').hide();
957
  globalElements.questionList.children().show();
958
+ reviewBox.toggle();
959
 
960
  $e.find('.wpProQuiz_question_page').hide();
961
  },
975
  globalElements.quizStartPage.show();
976
  globalElements.questionList.children().hide();
977
  globalElements.toplistShowInButton.hide();
978
+ reviewBox.hide();
979
 
980
  $e.find('.wpProQuiz_questionInput, .wpProQuiz_cloze input').removeAttr('disabled').removeAttr('checked')
981
+ .css('background-color', '');
982
+
983
+ $e.find('.wpProQuiz_cloze input').val('');
984
 
985
  $e.find('.wpProQuiz_answerCorrect, .wpProQuiz_answerIncorrect').removeClass('wpProQuiz_answerCorrect wpProQuiz_answerIncorrect');
986
 
995
  $e.find('.wpProQuiz_clozeCorrect, .wpProQuiz_QuestionButton, .wpProQuiz_resultsList > li').hide();
996
 
997
  $e.find('.wpProQuiz_question_page, input[name="tip"]').show();
998
+
999
+ globalElements.results.find('.wpProQuiz_time_limit_expired').hide();
1000
+
1001
+ globalElements.next.last().val(lastButtonValue);
1002
+
1003
+ inViewQuestions = false;
1004
  },
1005
 
1006
+ checkQuestion: function(list, endCheck) {
1007
  list = (list == undefined) ? currentQuestion : list;
1008
 
1009
  list.each(function() {
1012
  var data = config.json[$questionList.data('question_id')];
1013
  var name = data.type;
1014
 
1015
+ questionTimer.questionStop();
1016
+
1017
  if($this.data('check')) {
1018
  return true;
1019
  }
1029
  $this.find(globalNames.skip).hide();
1030
  $this.find(globalNames.next).show();
1031
 
 
 
 
 
1032
  results[data.id].points = result.p;
1033
  results[data.id].correct = Number(result.c);
1034
  results['comp'].points += result.p;
1035
 
1036
+ catResults[data.catId] += result.p;
1037
+
1038
  if(result.c) {
1039
  $this.find('.wpProQuiz_correct').show();
1040
  results['comp'].correctQuestions += 1;
1046
 
1047
  $this.data('check', true);
1048
 
1049
+ if(!endCheck)
1050
+ $e.trigger({type: 'questionSolved', values: {item: $this, index: $this.index(), solved: true}});
1051
  });
1052
  },
1053
 
1057
 
1058
  $this.siblings('.wpProQuiz_tipp').toggle('fast');
1059
 
 
 
 
 
1060
  results[id].tip = 1;
1061
 
1062
  $(document).bind('mouseup.tipEvent', function(e) {
1239
  $e.trigger({type: 'questionSolved', values: {item: $p, index: $p.index(), solved: s}});
1240
  });
1241
 
1242
+ $e.find('.wpProQuiz_questionList[data-type="single"] .wpProQuiz_questionInput, .wpProQuiz_questionList[data-type="assessment_answer"] .wpProQuiz_questionInput').change(function(e) {
1243
  var $this = $(this);
1244
  var $p = $this.parents('.wpProQuiz_listItem');
1245
  var s = this.checked;
1278
  }
1279
  };
1280
 
1281
+ /**
1282
+ * @memberOf plugin
1283
+ */
1284
  plugin.init = function() {
1285
  plugin.methode.parseBitOptions();
1286
  plugin.methode.setClozeStyle();
js/wpProQuiz_front.min.js CHANGED
@@ -1,32 +1,35 @@
1
- (function(e){e.wpProQuizFront=function(C,f){var b=e(C),d=this,j={},K=0,g=null,t=[],L=0,M=0,u=0,N=0,v=0,D=0,E=0,O=0,P=0,w=0,Q=0,R=0,F=0,S=0,W=b.find('input[name="back"]'),T=b.find('input[name="next"]'),l=b.find(".wpProQuiz_quiz"),q=b.find(".wpProQuiz_list"),x=b.find(".wpProQuiz_results"),y=b.find(".wpProQuiz_text"),z=b.find(".wpProQuiz_time_limit"),G=b.find(".wpProQuiz_toplistShowInButton"),U="",H=0,A=f.timelimit,V=0,I={stop:function(){A&&(window.clearInterval(V),z.hide())},start:function(){if(A){var a=
2
- 1E3*A,c=z.find("span").text(d.methode.parseTime(A)),b=z.find(".wpProQuiz_progress");z.show();var e=+new Date;V=window.setInterval(function(){var i=+new Date-e,h=a-i;500<=i&&c.text(d.methode.parseTime(Math.ceil(h/1E3)));b.css("width",100*(h/a)+"%");0>=h&&(I.stop(),d.methode.finishQuiz(!0))},16)}}},s=new function(){function a(a){var c="",b=r[a];b.review?c="#FFB800":b.solved&&(c="#6CA54C");f.eq(a).css("background-color",c)}function c(a){a.preventDefault();a=a.pageY-j;0>a&&(a=0);a>g&&(a=g);h.attr("style",
3
- "margin-top: "+-(B*a)+"px !important");i.css({top:a})}function n(a){a.preventDefault();e(document).unbind(".scrollEvent")}var k=[],i=[],h=[],f=[],g=0,j=0,B=0,J=0,p=0,r=[];this.init=function(){k=b.find(".wpProQuiz_reviewQuestion");i=k.find("div");h=k.find("ol");f=h.children();i.mousedown(function(a){a.preventDefault();a.stopPropagation();j=a.pageY-i.offset().top+J;e(document).bind("mouseup.scrollEvent",n);e(document).bind("mousemove.scrollEvent",c)});f.click(function(){d.methode.showQuestion(e(this).index())});
4
- b.bind("questionSolved",function(c){r[c.values.index].solved=c.values.solved;a(c.values.index)});b.bind("changeQuestion",function(a){f.removeClass("wpProQuiz_reviewQuestionTarget");f.eq(a.values.index).addClass("wpProQuiz_reviewQuestionTarget");var a=f.eq(a.values.index),c=a.offset().top,b=k.offset().top,c=c-b;if(0>c-4||100<c+32)a=b-f.eq(0).offset().top-(b-h.offset().top)+a.position().top,a>p&&(a=p),b=a/B,h.attr("style","margin-top: "+-a+"px !important"),i.css({top:b})});b.bind("reviewQuestion",function(c){r[c.values.index].review=
5
- !r[c.values.index].review;a(c.values.index)});k.bind("mousewheel DOMMouseScroll",function(a){a.preventDefault();a=a.originalEvent;a=20*(a.wheelDelta?-a.wheelDelta/120:a.detail/3);a=J-h.offset().top+a;a>p&&(a=p);0>a&&(a=0);var c=a/B;h.attr("style","margin-top: "+-a+"px !important");i.css({top:c});return!1})};this.show=function(a){w&&k.parent().show();if(!a){var a=h.outerHeight(),c=k.height();g=c-i.height();j=0;p=a-c;B=p/g;this.reset();100<a&&i.show();J=i.offset().top}};this.hide=function(){k.parent().hide()};
6
- this.reset=function(){for(var a=0,c=f.length;a<c;a++)r[a]={};f.removeClass("wpProQuiz_reviewQuestionTarget").css("background-color","")}};d.methode={parseBitOptions:function(){if(f.bo){L=f.bo&1;M=f.bo&2;u=f.bo&4;N=f.bo&8;v=f.bo&16;E=f.bo&64;w=f.bo&128;O=f.bo&256;P=f.bo&512;var a=f.bo&32;a&&(void 0!=jQuery.support&&void 0!=jQuery.support.cors&&!1==jQuery.support.cors)&&(D=a)}},setClozeStyle:function(){b.find(".wpProQuiz_cloze input").each(function(){for(var a=e(this),c="",b=a.data("wordlen"),d=0;d<
7
- b;d++)c+="w";c=e(document.createElement("span")).css("visibility","hidden").text(c).appendTo(e("body"));b=c.width();c.remove();a.width(b+5)})},parseTime:function(a){var c=parseInt(a%60),b=parseInt(a/60%60),a=parseInt(a/3600%24);return(9<a?"":"0")+a+":"+((9<b?"":"0")+b)+":"+((9<c?"":"0")+c)},cleanupCurlyQuotes:function(a){a=a.replace(/\u2018/,"'");a=a.replace(/\u2019/,"'");a=a.replace(/\u201C/,'"');a=a.replace(/\u201D/,'"');return e.trim(a).toLowerCase()},resetMatrix:function(a){a.each(function(){var a=
8
- e(this),b=a.find(".wpProQuiz_sortStringList");a.find(".wpProQuiz_sortStringItem").each(function(){b.append(e(this))})})},marker:function(a,c){u||(c?a.addClass("wpProQuiz_answerCorrect"):a.addClass("wpProQuiz_answerIncorrect"))},startQuiz:function(){if(F)Q=1;else if(R)y.hide(),b.find(".wpProQuiz_lock").show();else if(S)y.hide(),b.find(".wpProQuiz_prerequisite").show();else{d.methode.loadQuizData();M&&d.methode.random(q);L&&d.methode.random(b.find(".wpProQuiz_questionList"));d.methode.random(b.find(".wpProQuiz_sortStringList"));
9
- d.methode.random(b.find('[data-type="sort_answer"]'));b.find(".wpProQuiz_listItem").each(function(a){var b=e(this);b.find(".wpProQuiz_question_page span:eq(0)").text(a+1);b.find("> h5 span").text(a+1);b.find(".wpProQuiz_questionListItem").each(function(a){e(this).find("> span:not(.wpProQuiz_cloze)").text(a+1+". ")})});switch(f.mode){case 3:b.find('input[name="checkSingle"]').show();b.find(".wpProQuiz_question_page").hide();break;case 2:b.find('input[name="check"]').show();!P&&w&&b.find('input[name="skip"]').show();
10
- break;case 1:b.find('input[name="back"]').slice(1).show();case 0:T.show()}var a=q.children();3==f.mode?a.show():(g=a.eq(0).show(),b.trigger({type:"changeQuestion",values:{item:g,index:g.index()}}));b.find(".wpProQuiz_sortable").parents("ul").sortable({update:function(){var a=e(this).parents(".wpProQuiz_listItem");b.trigger({type:"questionSolved",values:{item:a,index:a.index(),solved:!0}})}}).disableSelection();b.find(".wpProQuiz_sortStringList, .wpProQuiz_maxtrixSortCriterion").sortable({connectWith:".wpProQuiz_maxtrixSortCriterion:not(:has(li)), .wpProQuiz_sortStringList",
11
- placeholder:"wpProQuiz_placehold",update:function(){var a=e(this).parents(".wpProQuiz_listItem");b.trigger({type:"questionSolved",values:{item:a,index:a.index(),solved:!0}})}}).disableSelection();t=[];I.start();K=+new Date;j={comp:{points:0,correctQuestions:0}};y.hide();l.show();s.show()}},nextQuestion:function(){g=g.hide().next().show();d.methode.scrollTo(l);b.trigger({type:"changeQuestion",values:{item:g,index:g.index()}});g.length||d.methode.showQuizSummary()},prevQuestion:function(){g=g.hide().prev().show();
12
- d.methode.scrollTo(l);b.trigger({type:"changeQuestion",values:{item:g,index:g.index()}})},showQuestion:function(a){3==f.mode?d.methode.scrollTo(b.find(".wpProQuiz_list > li").eq(a),1):(g.hide(),g=b.find(".wpProQuiz_list > li").eq(a).show(),d.methode.scrollTo(l),b.trigger({type:"changeQuestion",values:{item:g,index:g.index()}}),g.length||d.methode.showQuizSummary())},skipQuestion:function(){b.trigger({type:"skipQuestion",values:{item:g,index:g.index()}});d.methode.nextQuestion()},reviewQuestion:function(){b.trigger({type:"reviewQuestion",
13
- values:{item:g,index:g.index()}})},showQuizSummary:function(){if(O||!w)d.methode.finishQuiz();else{var a=b.find(".wpProQuiz_checkPage");a.find("ol:eq(0)").empty().append(b.find(".wpProQuiz_reviewQuestion ol li").clone().removeClass("wpProQuiz_reviewQuestionTarget")).children().click(function(){a.hide();l.show();s.show(!0);d.methode.showQuestion(e(this).index())});for(var c=0,n=0,f=t.length;n<f;n++)t[n]&&c++;a.find("span:eq(0)").text(c);s.hide();l.hide();a.show();d.methode.scrollTo(a)}},finishQuiz:function(a){I.stop();
14
- var c=(+new Date-K)/1E3,c=f.timelimit&&c>f.timelimit?f.timelimit:c;b.find(".wpProQuiz_quiz_time span").text(d.methode.parseTime(c));a&&x.find(".wpProQuiz_time_limit_expired").show();d.methode.checkQuestion(q.children());b.find(".wpProQuiz_correct_answer").text(j.comp.correctQuestions);j.comp.result=Math.round(1E4*(j.comp.points/f.globalPoints))/100;$pointFields=b.find(".wpProQuiz_points span");$pointFields.eq(0).text(j.comp.points);$pointFields.eq(1).text(f.globalPoints);$pointFields.eq(2).text(j.comp.result+
15
- "%");b.find(".wpProQuiz_resultsList > li").eq(d.methode.findResultIndex(j.comp.result)).show();d.methode.setAverageResult(j.comp.result,!1);d.methode.sendCompletedQuiz();E&&H&&d.methode.addToplist();s.hide();b.find(".wpProQuiz_checkPage").hide();l.hide();x.show();d.methode.scrollTo(x)},questionSolved:function(a){t[a.values.index]=a.values.solved},sendCompletedQuiz:function(){v||d.methode.ajax({action:"wp_pro_quiz_completed_quiz",quizId:f.quizId,results:j})},findResultIndex:function(a){for(var b=f.resultsGrade,
16
- d=-1,e=999999,i=0;i<b.length;i++){var h=b[i];a>=h&&a-h<e&&(e=a-h,d=i)}return d},showQustionList:function(){G.hide();l.toggle();b.find(".wpProQuiz_QuestionButton").hide();q.children().show();b.find(".wpProQuiz_question_page").hide()},random:function(a){a.each(function(){var a=e(this).children().get().sort(function(){return Math.round(Math.random())-0.5});e(a).appendTo(a[0].parentNode)})},restartQuiz:function(){x.hide();y.show();q.children().hide();G.hide();b.find(".wpProQuiz_questionInput, .wpProQuiz_cloze input").removeAttr("disabled").removeAttr("checked").val("").css("background-color",
17
- "");b.find(".wpProQuiz_answerCorrect, .wpProQuiz_answerIncorrect").removeClass("wpProQuiz_answerCorrect wpProQuiz_answerIncorrect");b.find(".wpProQuiz_listItem").data("check",!1);b.find(".wpProQuiz_response").hide().children().hide();d.methode.resetMatrix(b.find(".wpProQuiz_listItem"));b.find(".wpProQuiz_sortStringItem, .wpProQuiz_sortable").removeAttr("style");b.find(".wpProQuiz_clozeCorrect, .wpProQuiz_QuestionButton, .wpProQuiz_resultsList > li").hide();b.find('.wpProQuiz_question_page, input[name="tip"]').show()},
18
- checkQuestion:function(a){a=void 0==a?g:a;a.each(function(){var a,n,k=e(this),i=k.find(".wpProQuiz_questionList"),h=f.json[i.data("question_id")];a=h.type;if(k.data("check"))return!0;if("single"==h.type||"multiple"==h.type)a="singleMulti";var g=!0,m=0,l=e.isArray(h.points);({singleMulti:function(){var a=i.find(".wpProQuiz_questionInput").attr("disabled","disabled");i.children().each(function(b){var c=e(this),f=c.data("pos"),b=a.eq(b).is(":checked");h.correct[f]?(d.methode.marker(c,!0),b?l&&(m+=h.points[f]):
19
- g=!1):b?(d.methode.marker(c,!1),g=!1):l&&(m+=h.points[f])})},sort_answer:function(){var a=i.children();a.each(function(a){var b=e(this);a==b.data("pos")?(d.methode.marker(b,!0),l&&(m+=h.points[a])):(d.methode.marker(b,!1),g=!1)});a.children().css({"box-shadow":"0 0",cursor:"auto"});i.sortable("destroy");a.sort(function(a,b){return e(a).data("pos")>e(b).data("pos")?1:-1});i.append(a)},matrix_sort_answer:function(){var a=[];i.children().each(function(){var b=e(this),c=b.data("pos"),b=b.find(".wpProQuiz_maxtrixSortCriterion"),
20
- f=b.children();c==f.data("pos")?(d.methode.marker(b,!0),l&&(m+=h.points[c])):(g=!1,d.methode.marker(b,!1));a[c]=b});d.methode.resetMatrix(k);k.find(".wpProQuiz_sortStringItem").each(function(){var b=a[e(this).data("pos")];void 0!=b&&b.append(this)}).css({"box-shadow":"0 0",cursor:"auto"});k.find(".wpProQuiz_sortStringList, .wpProQuiz_maxtrixSortCriterion").sortable("destroy")},free_answer:function(){var a=i.children(),b=a.find(".wpProQuiz_questionInput").attr("disabled","disabled").val();0<=e.inArray(e.trim(b).toLowerCase(),
21
- h.correct)?d.methode.marker(a,!0):(d.methode.marker(a,!1),g=!1)},cloze_answer:function(){i.find(".wpProQuiz_cloze").each(function(a){var b=e(this).children(),c=b.eq(0),b=b.eq(1),f=d.methode.cleanupCurlyQuotes(c.val());0<=e.inArray(f,h.correct[a])?(l&&(m+=h.points[a]),u||c.css("background-color","#B0DAB0")):(u||c.css("background-color","#FFBABA"),g=!1,b.show());c.attr("disabled","disabled")})}})[a]();!l&&g&&(m=h.points);a=g;n=m;k.find(".wpProQuiz_response").show();k.find('input[name="check"]').hide();
22
- k.find('input[name="skip"]').hide();k.find('input[name="next"]').show();void 0==j[h.id]&&(j[h.id]={});j[h.id].points=n;j[h.id].correct=Number(a);j.comp.points+=n;a?(k.find(".wpProQuiz_correct").show(),j.comp.correctQuestions+=1):k.find(".wpProQuiz_incorrect").show();k.find(".wpProQuiz_responsePoints").text(n);k.data("check",!0);b.trigger({type:"questionSolved",values:{item:k,index:k.index(),solved:!0}})})},showTip:function(){var a=e(this),c=a.siblings(".wpProQuiz_question").find(".wpProQuiz_questionList").data("question_id");
23
- a.siblings(".wpProQuiz_tipp").toggle("fast");void 0==j[c]&&(j[c]={});j[c].tip=1;e(document).bind("mouseup.tipEvent",function(a){var c=b.find(".wpProQuiz_tipp"),d=b.find('input[name="tip"]');!c.is(a.target)&&(0==c.has(a.target).length&&!d.is(a.target))&&(c.hide("fast"),e(document).unbind(".tipEvent"))})},ajax:function(a,b,d){D&&(jQuery.support.cors=!0);e.post(WpProQuizGlobal.ajaxurl,a,b,d||"json");D&&(jQuery.support.cors=!1)},checkQuizLock:function(){F=1;d.methode.ajax({action:"wp_pro_quiz_check_lock",
24
- quizId:f.quizId},function(a){void 0!=a.lock&&(R=a.lock.is,a.lock.pre&&b.find('input[name="restartQuiz"]').hide());void 0!=a.prerequisite&&(S=1,b.find(".wpProQuiz_prerequisite span").text(a.prerequisite));F=0;Q&&d.methode.startQuiz()})},loadQuizData:function(){d.methode.ajax({action:"wp_pro_quiz_load_quiz_data",quizId:f.quizId},function(a){a.toplist&&d.methode.handleToplistData(a.toplist);void 0!=a.averageResult&&d.methode.setAverageResult(a.averageResult,!0)})},setAverageResult:function(a,c){var d=
25
- b.find(".wpProQuiz_resultValue:eq("+(c?0:1)+") > * ");d.eq(1).text(a+"%");d.eq(0).css("width",240*a/100+"px")},handleToplistData:function(a){var c=b.find(".wpProQuiz_addToplist"),d=c.find(".wpProQuiz_addBox").show().children("div");a.canAdd?(c.show(),c.find(".wpProQuiz_addToplistMessage").hide(),c.find(".wpProQuiz_toplistButton").show(),U=a.token,H=0,a.userId?(d.hide(),H=1,E&&c.hide()):(d.show(),c=d.children().eq(1),a.captcha?(c.find('input[name="wpProQuiz_captchaPrefix"]').val(a.captcha.code),c.find(".wpProQuiz_captchaImg").attr("src",
26
- a.captcha.img),c.find('input[name="wpProQuiz_captcha"]').val(""),c.show()):c.hide())):c.hide()},scrollTo:function(a,b){var d=a.offset().top-100;(b||(window.pageYOffset||document.body.scrollTop)>d)&&e("html,body").animate({scrollTop:d},300)},addToplist:function(){if(!v){var a=b.find(".wpProQuiz_addToplistMessage").text(WpProQuizGlobal.loadData).show(),c=b.find(".wpProQuiz_addBox").hide();d.methode.ajax({action:"wp_pro_quiz_add_toplist",quizId:f.quizId,token:U,name:c.find('input[name="wpProQuiz_toplistName"]').val(),
27
- email:c.find('input[name="wpProQuiz_toplistEmail"]').val(),captcha:c.find('input[name="wpProQuiz_captcha"]').val(),prefix:c.find('input[name="wpProQuiz_captchaPrefix"]').val(),points:j.comp.points,totalPoints:f.globalPoints},function(b){a.text(b.text);b.clear?(c.hide(),d.methode.updateToplist()):c.show();b.captcha&&(c.find(".wpProQuiz_captchaImg").attr("src",b.captcha.img),c.find('input[name="wpProQuiz_captchaPrefix"]').val(b.captcha.code),c.find('input[name="wpProQuiz_captcha"]').val(""))})}},updateToplist:function(){"function"==
28
- typeof wpProQuiz_fetchToplist&&wpProQuiz_fetchToplist()},registerSolved:function(){b.find('.wpProQuiz_questionInput[type="text"]').change(function(){var a=e(this),c=a.parents(".wpProQuiz_listItem"),d=!1;""!=a.val()&&(d=!0);b.trigger({type:"questionSolved",values:{item:c,index:c.index(),solved:d}})});b.find('.wpProQuiz_questionList[data-type="single"] .wpProQuiz_questionInput').change(function(){var a=e(this).parents(".wpProQuiz_listItem"),c=this.checked;b.trigger({type:"questionSolved",values:{item:a,
29
- index:a.index(),solved:c}})});b.find(".wpProQuiz_cloze input").change(function(){var a=e(this).parents(".wpProQuiz_listItem"),c=!0;a.find(".wpProQuiz_cloze input").each(function(){if(""==e(this).val())return c=!1});b.trigger({type:"questionSolved",values:{item:a,index:a.index(),solved:c}})});b.find('.wpProQuiz_questionList[data-type="multiple"] .wpProQuiz_questionInput').change(function(){var a=e(this).parents(".wpProQuiz_listItem"),c=0;a.find('.wpProQuiz_questionList[data-type="multiple"] .wpProQuiz_questionInput').each(function(){this.checked&&
30
- c++});b.trigger({type:"questionSolved",values:{item:a,index:a.index(),solved:c?!0:!1}})})}};d.init=function(){d.methode.parseBitOptions();d.methode.setClozeStyle();d.methode.registerSolved();s.init();N&&!v&&d.methode.checkQuizLock();b.find('input[name="startQuiz"]').click(function(){d.methode.startQuiz();return!1});T.click(function(){d.methode.nextQuestion()});W.click(function(){d.methode.prevQuestion()});b.find('input[name="reShowQuestion"]').click(function(){d.methode.showQustionList()});b.find('input[name="restartQuiz"]').click(function(){d.methode.restartQuiz()});
31
- b.find('input[name="check"]').click(function(){d.methode.checkQuestion()});b.find('input[name="checkSingle"]').click(function(){d.methode.showQuizSummary()});b.find('input[name="tip"]').click(d.methode.showTip);b.find('input[name="skip"]').click(d.methode.skipQuestion);b.find('input[name="review"]').click(d.methode.reviewQuestion);b.find('input[name="wpProQuiz_toplistAdd"]').click(d.methode.addToplist);b.find('input[name="quizSummary"]').click(d.methode.showQuizSummary);b.find('input[name="endQuizSummary"]').click(function(){d.methode.finishQuiz()});
32
- b.find('input[name="showToplist"]').click(function(){l.hide();G.toggle()});b.bind("questionSolved",d.methode.questionSolved)};d.init()};e.fn.wpProQuizFront=function(C){return this.each(function(){void 0==e(this).data("wpProQuizFront")&&e(this).data("wpProQuizFront",new e.wpProQuizFront(this,C))})}})(jQuery);
 
 
 
1
+ (function(f){f.wpProQuizFront=function(G,e){var b=f(G),d=this,h={},s={},N=0,i=null,y=[],O="",z=!1,P=0,Q=0,A=0,R=0,B=0,H=0,I=0,S=0,T=0,t=0,U=0,V=0,J=0,W=0,$=b.find('input[name="back"]'),u=b.find('input[name="next"]'),m=b.find(".wpProQuiz_quiz"),v=b.find(".wpProQuiz_list"),w=b.find(".wpProQuiz_results"),C=b.find(".wpProQuiz_text"),D=b.find(".wpProQuiz_time_limit"),K=b.find(".wpProQuiz_toplistShowInButton"),X=f(),Y="",L=0,E=e.timelimit,Z=0,M={stop:function(){E&&(window.clearInterval(Z),D.hide())},start:function(){if(E){var a=
2
+ 1E3*E,c=D.find("span").text(d.methode.parseTime(E)),b=D.find(".wpProQuiz_progress");D.show();var f=+new Date;Z=window.setInterval(function(){var g=+new Date-f,e=a-g;500<=g&&c.text(d.methode.parseTime(Math.ceil(e/1E3)));b.css("width",100*(e/a)+"%");0>=e&&(M.stop(),d.methode.finishQuiz(!0))},16)}}},r=new function(){function a(a){var c="",b=x[a];b.review?c="#FFB800":b.solved&&(c="#6CA54C");j.eq(a).css("background-color",c)}function c(a){a.preventDefault();a=a.pageY-l;0>a&&(a=0);a>h&&(a=h);k.attr("style",
3
+ "margin-top: "+-(i*a)+"px !important");g.css({top:a})}function aa(a){a.preventDefault();f(document).unbind(".scrollEvent")}var e=[],g=[],k=[],j=[],h=0,l=0,i=0,F=0,q=0,x=[];this.init=function(){e=b.find(".wpProQuiz_reviewQuestion");g=e.find("div");k=e.find("ol");j=k.children();g.mousedown(function(a){a.preventDefault();a.stopPropagation();l=a.pageY-g.offset().top+F;f(document).bind("mouseup.scrollEvent",aa);f(document).bind("mousemove.scrollEvent",c)});j.click(function(){d.methode.showQuestion(f(this).index())});
4
+ b.bind("questionSolved",function(c){x[c.values.index].solved=c.values.solved;a(c.values.index)});b.bind("changeQuestion",function(a){j.removeClass("wpProQuiz_reviewQuestionTarget");j.eq(a.values.index).addClass("wpProQuiz_reviewQuestionTarget");var a=j.eq(a.values.index),c=a.offset().top,b=e.offset().top,c=c-b;if(0>c-4||100<c+32)a=b-j.eq(0).offset().top-(b-k.offset().top)+a.position().top,a>q&&(a=q),b=a/i,k.attr("style","margin-top: "+-a+"px !important"),g.css({top:b})});b.bind("reviewQuestion",function(c){x[c.values.index].review=
5
+ !x[c.values.index].review;a(c.values.index)});e.bind("mousewheel DOMMouseScroll",function(a){a.preventDefault();a=a.originalEvent;a=20*(a.wheelDelta?-a.wheelDelta/120:a.detail/3);a=F-k.offset().top+a;a>q&&(a=q);0>a&&(a=0);var c=a/i;k.attr("style","margin-top: "+-a+"px !important");g.css({top:c});return!1})};this.show=function(a){t&&e.parent().show();b.find(".wpProQuiz_reviewDiv .wpProQuiz_button2").show();if(!a){k.attr("style","margin-top: 0px !important");g.css({top:0});var a=k.outerHeight(),c=e.height();
6
+ h=c-g.height();l=0;q=a-c;i=q/h;this.reset();100<a&&g.show();F=g.offset().top}};this.hide=function(){e.parent().hide()};this.toggle=function(){if(t){e.parent().toggle();j.removeClass("wpProQuiz_reviewQuestionTarget");b.find(".wpProQuiz_reviewDiv .wpProQuiz_button2").hide();k.attr("style","margin-top: 0px !important");g.css({top:0});var a=k.outerHeight(),c=e.height();h=c-g.height();l=0;q=a-c;i=q/h;100<a&&g.show();F=g.offset().top}};this.reset=function(){for(var a=0,c=j.length;a<c;a++)x[a]={};j.removeClass("wpProQuiz_reviewQuestionTarget").css("background-color",
7
+ "")}},p=new function(){var a=0,c=-1,b=0,d=!1;this.questionStart=function(b){-1!=c&&this.questionStop();c=b;a=+new Date};this.questionStop=function(){-1!=c&&(h[c].time+=Math.round((new Date-a)/1E3),c=-1)};this.startQuiz=function(){d&&this.stopQuiz();b=+new Date;d=!0};this.stopQuiz=function(){d&&(h.comp.quizTime+=Math.round((new Date-b)/1E3),d=!1)};this.init=function(){}};d.methode={parseBitOptions:function(){if(e.bo){P=e.bo&1;Q=e.bo&2;A=e.bo&4;R=e.bo&8;B=e.bo&16;I=e.bo&64;t=e.bo&128;S=e.bo&256;T=e.bo&
8
+ 512;var a=e.bo&32;a&&(void 0!=jQuery.support&&void 0!=jQuery.support.cors&&!1==jQuery.support.cors)&&(H=a)}},setClozeStyle:function(){b.find(".wpProQuiz_cloze input").each(function(){for(var a=f(this),c="",b=a.data("wordlen"),d=0;d<b;d++)c+="w";c=f(document.createElement("span")).css("visibility","hidden").text(c).appendTo(f("body"));b=c.width();c.remove();a.width(b+5)})},parseTime:function(a){var c=parseInt(a%60),b=parseInt(a/60%60),a=parseInt(a/3600%24);return(9<a?"":"0")+a+":"+((9<b?"":"0")+b)+
9
+ ":"+((9<c?"":"0")+c)},cleanupCurlyQuotes:function(a){a=a.replace(/\u2018/,"'");a=a.replace(/\u2019/,"'");a=a.replace(/\u201C/,'"');a=a.replace(/\u201D/,'"');return f.trim(a).toLowerCase()},resetMatrix:function(a){a.each(function(){var a=f(this),b=a.find(".wpProQuiz_sortStringList");a.find(".wpProQuiz_sortStringItem").each(function(){b.append(f(this))})})},marker:function(a,c){A||(c?a.addClass("wpProQuiz_answerCorrect"):a.addClass("wpProQuiz_answerIncorrect"))},startQuiz:function(){if(J)U=1;else if(V)C.hide(),
10
+ b.find(".wpProQuiz_lock").show();else if(W)C.hide(),b.find(".wpProQuiz_prerequisite").show();else{d.methode.loadQuizData();Q&&d.methode.random(v);P&&d.methode.random(b.find(".wpProQuiz_questionList"));d.methode.random(b.find(".wpProQuiz_sortStringList"));d.methode.random(b.find('[data-type="sort_answer"]'));b.find(".wpProQuiz_listItem").each(function(a){var b=f(this);b.find(".wpProQuiz_question_page span:eq(0)").text(a+1);b.find("> h5 span").text(a+1);b.find(".wpProQuiz_questionListItem").each(function(a){f(this).find("> span:not(.wpProQuiz_cloze)").text(a+
11
+ 1+". ")})});u=b.find('input[name="next"]');switch(e.mode){case 3:b.find('input[name="checkSingle"]').show();b.find(".wpProQuiz_question_page").hide();break;case 2:b.find('input[name="check"]').show();!T&&t&&b.find('input[name="skip"]').show();break;case 1:b.find('input[name="back"]').slice(1).show();case 0:u.show()}var a=u.last();O=a.val();a.val(e.lbn);a=v.children();X=b.find(".wpProQuiz_list > li");3==e.mode?a.show():(i=a.eq(0).show(),a=i.find(".wpProQuiz_questionList").data("question_id"),p.questionStart(a));
12
+ p.startQuiz();b.find(".wpProQuiz_sortable").parents("ul").sortable({update:function(){var a=f(this).parents(".wpProQuiz_listItem");b.trigger({type:"questionSolved",values:{item:a,index:a.index(),solved:!0}})}}).disableSelection();b.find(".wpProQuiz_sortStringList, .wpProQuiz_maxtrixSortCriterion").sortable({connectWith:".wpProQuiz_maxtrixSortCriterion:not(:has(li)), .wpProQuiz_sortStringList",placeholder:"wpProQuiz_placehold",update:function(){var a=f(this).parents(".wpProQuiz_listItem");b.trigger({type:"questionSolved",
13
+ values:{item:a,index:a.index(),solved:!0}})}}).disableSelection();y=[];M.start();N=+new Date;h={comp:{points:0,correctQuestions:0,quizTime:0}};b.find(".wpProQuiz_questionList").each(function(){var a=f(this).data("question_id");h[a]={time:0}});s={};f.each(e.catPoints,function(a){s[a]=0});C.hide();m.show();r.show();3!=e.mode&&b.trigger({type:"changeQuestion",values:{item:i,index:i.index()}})}},nextQuestion:function(){this.showQuestionObject(i.next())},prevQuestion:function(){this.showQuestionObject(i.prev())},
14
+ showQuestion:function(a){a=X.eq(a);3==e.mode||z?(d.methode.scrollTo(a,1),p.startQuiz()):this.showQuestionObject(a)},showQuestionObject:function(a){i.hide();i=a.show();d.methode.scrollTo(m);b.trigger({type:"changeQuestion",values:{item:i,index:i.index()}});i.length?(a=i.find(".wpProQuiz_questionList").data("question_id"),p.questionStart(a)):d.methode.showQuizSummary()},skipQuestion:function(){b.trigger({type:"skipQuestion",values:{item:i,index:i.index()}});d.methode.nextQuestion()},reviewQuestion:function(){b.trigger({type:"reviewQuestion",
15
+ values:{item:i,index:i.index()}})},showQuizSummary:function(){p.questionStop();p.stopQuiz();if(S||!t)d.methode.finishQuiz();else{var a=b.find(".wpProQuiz_checkPage");a.find("ol:eq(0)").empty().append(b.find(".wpProQuiz_reviewQuestion ol li").clone().removeClass("wpProQuiz_reviewQuestionTarget")).children().click(function(){a.hide();m.show();r.show(!0);d.methode.showQuestion(f(this).index())});for(var c=0,e=0,h=y.length;e<h;e++)y[e]&&c++;a.find("span:eq(0)").text(c);r.hide();m.hide();a.show();d.methode.scrollTo(a)}},
16
+ finishQuiz:function(a){p.questionStop();p.stopQuiz();M.stop();var c=(+new Date-N)/1E3,c=e.timelimit&&c>e.timelimit?e.timelimit:c;b.find(".wpProQuiz_quiz_time span").text(d.methode.parseTime(c));a&&w.find(".wpProQuiz_time_limit_expired").show();d.methode.checkQuestion(v.children(),!0);b.find(".wpProQuiz_correct_answer").text(h.comp.correctQuestions);h.comp.result=Math.round(1E4*(h.comp.points/e.globalPoints))/100;$pointFields=b.find(".wpProQuiz_points span");$pointFields.eq(0).text(h.comp.points);
17
+ $pointFields.eq(1).text(e.globalPoints);$pointFields.eq(2).text(h.comp.result+"%");b.find(".wpProQuiz_resultsList > li").eq(d.methode.findResultIndex(h.comp.result)).show();d.methode.setAverageResult(h.comp.result,!1);this.setCategoryOverview();d.methode.sendCompletedQuiz();I&&L&&d.methode.addToplist();r.hide();b.find(".wpProQuiz_checkPage").hide();m.hide();w.show();d.methode.scrollTo(w)},setCategoryOverview:function(){b.find(".wpProQuiz_catOverview li").each(function(){var a=f(this),b=a.data("category_id"),
18
+ b=Math.round(1E4*(s[b]/e.catPoints[b]))/100;a.find(".wpProQuiz_catPercent").text(b+"%")})},questionSolved:function(a){y[a.values.index]=a.values.solved},sendCompletedQuiz:function(){B||d.methode.ajax({action:"wp_pro_quiz_completed_quiz",quizId:e.quizId,results:h})},findResultIndex:function(a){for(var b=e.resultsGrade,d=-1,f=999999,g=0;g<b.length;g++){var h=b[g];a>=h&&a-h<f&&(f=a-h,d=g)}return d},showQustionList:function(){z=!z;K.hide();m.toggle();b.find(".wpProQuiz_QuestionButton").hide();v.children().show();
19
+ r.toggle();b.find(".wpProQuiz_question_page").hide()},random:function(a){a.each(function(){var a=f(this).children().get().sort(function(){return Math.round(Math.random())-0.5});f(a).appendTo(a[0].parentNode)})},restartQuiz:function(){w.hide();C.show();v.children().hide();K.hide();r.hide();b.find(".wpProQuiz_questionInput, .wpProQuiz_cloze input").removeAttr("disabled").removeAttr("checked").css("background-color","");b.find(".wpProQuiz_cloze input").val("");b.find(".wpProQuiz_answerCorrect, .wpProQuiz_answerIncorrect").removeClass("wpProQuiz_answerCorrect wpProQuiz_answerIncorrect");
20
+ b.find(".wpProQuiz_listItem").data("check",!1);b.find(".wpProQuiz_response").hide().children().hide();d.methode.resetMatrix(b.find(".wpProQuiz_listItem"));b.find(".wpProQuiz_sortStringItem, .wpProQuiz_sortable").removeAttr("style");b.find(".wpProQuiz_clozeCorrect, .wpProQuiz_QuestionButton, .wpProQuiz_resultsList > li").hide();b.find('.wpProQuiz_question_page, input[name="tip"]').show();w.find(".wpProQuiz_time_limit_expired").hide();u.last().val(O);z=!1},checkQuestion:function(a,c){a=void 0==a?i:
21
+ a;a.each(function(){var a,i,g=f(this),k=g.find(".wpProQuiz_questionList"),j=e.json[k.data("question_id")];a=j.type;p.questionStop();if(g.data("check"))return!0;if("single"==j.type||"multiple"==j.type)a="singleMulti";var n=!0,l=0,m=f.isArray(j.points);({singleMulti:function(){var a=k.find(".wpProQuiz_questionInput").attr("disabled","disabled");k.children().each(function(b){var c=f(this),e=c.data("pos"),b=a.eq(b).is(":checked");j.correct[e]?(d.methode.marker(c,!0),b?m&&(l+=j.points[e]):n=!1):b?(d.methode.marker(c,
22
+ !1),n=!1):m&&(l+=j.points[e])})},sort_answer:function(){var a=k.children();a.each(function(a){var b=f(this);a==b.data("pos")?(d.methode.marker(b,!0),m&&(l+=j.points[a])):(d.methode.marker(b,!1),n=!1)});a.children().css({"box-shadow":"0 0",cursor:"auto"});k.sortable("destroy");a.sort(function(a,b){return f(a).data("pos")>f(b).data("pos")?1:-1});k.append(a)},matrix_sort_answer:function(){var a=[];k.children().each(function(){var b=f(this),c=b.data("pos"),b=b.find(".wpProQuiz_maxtrixSortCriterion"),
23
+ e=b.children();c==e.data("pos")?(d.methode.marker(b,!0),m&&(l+=j.points[c])):(n=!1,d.methode.marker(b,!1));a[c]=b});d.methode.resetMatrix(g);g.find(".wpProQuiz_sortStringItem").each(function(){var b=a[f(this).data("pos")];void 0!=b&&b.append(this)}).css({"box-shadow":"0 0",cursor:"auto"});g.find(".wpProQuiz_sortStringList, .wpProQuiz_maxtrixSortCriterion").sortable("destroy")},free_answer:function(){var a=k.children(),b=a.find(".wpProQuiz_questionInput").attr("disabled","disabled").val();0<=f.inArray(f.trim(b).toLowerCase(),
24
+ j.correct)?d.methode.marker(a,!0):(d.methode.marker(a,!1),n=!1)},cloze_answer:function(){k.find(".wpProQuiz_cloze").each(function(a){var b=f(this).children(),c=b.eq(0),b=b.eq(1),e=d.methode.cleanupCurlyQuotes(c.val());0<=f.inArray(e,j.correct[a])?(m&&(l+=j.points[a]),A||c.css("background-color","#B0DAB0")):(A||c.css("background-color","#FFBABA"),n=!1,b.show());c.attr("disabled","disabled")})},assessment_answer:function(){n=!0;var a=0;k.find(".wpProQuiz_questionInput").attr("disabled","disabled").filter(":checked").each(function(){a+=
25
+ parseInt(f(this).val())});l=a}})[a]();!m&&n&&(l=j.points);a=n;i=l;g.find(".wpProQuiz_response").show();g.find('input[name="check"]').hide();g.find('input[name="skip"]').hide();g.find('input[name="next"]').show();h[j.id].points=i;h[j.id].correct=Number(a);h.comp.points+=i;s[j.catId]+=i;a?(g.find(".wpProQuiz_correct").show(),h.comp.correctQuestions+=1):g.find(".wpProQuiz_incorrect").show();g.find(".wpProQuiz_responsePoints").text(i);g.data("check",!0);c||b.trigger({type:"questionSolved",values:{item:g,
26
+ index:g.index(),solved:!0}})})},showTip:function(){var a=f(this),c=a.siblings(".wpProQuiz_question").find(".wpProQuiz_questionList").data("question_id");a.siblings(".wpProQuiz_tipp").toggle("fast");h[c].tip=1;f(document).bind("mouseup.tipEvent",function(a){var c=b.find(".wpProQuiz_tipp"),d=b.find('input[name="tip"]');!c.is(a.target)&&(0==c.has(a.target).length&&!d.is(a.target))&&(c.hide("fast"),f(document).unbind(".tipEvent"))})},ajax:function(a,b,d){H&&(jQuery.support.cors=!0);f.post(WpProQuizGlobal.ajaxurl,
27
+ a,b,d||"json");H&&(jQuery.support.cors=!1)},checkQuizLock:function(){J=1;d.methode.ajax({action:"wp_pro_quiz_check_lock",quizId:e.quizId},function(a){void 0!=a.lock&&(V=a.lock.is,a.lock.pre&&b.find('input[name="restartQuiz"]').hide());void 0!=a.prerequisite&&(W=1,b.find(".wpProQuiz_prerequisite span").text(a.prerequisite));J=0;U&&d.methode.startQuiz()})},loadQuizData:function(){d.methode.ajax({action:"wp_pro_quiz_load_quiz_data",quizId:e.quizId},function(a){a.toplist&&d.methode.handleToplistData(a.toplist);
28
+ void 0!=a.averageResult&&d.methode.setAverageResult(a.averageResult,!0)})},setAverageResult:function(a,c){var d=b.find(".wpProQuiz_resultValue:eq("+(c?0:1)+") > * ");d.eq(1).text(a+"%");d.eq(0).css("width",240*a/100+"px")},handleToplistData:function(a){var c=b.find(".wpProQuiz_addToplist"),d=c.find(".wpProQuiz_addBox").show().children("div");a.canAdd?(c.show(),c.find(".wpProQuiz_addToplistMessage").hide(),c.find(".wpProQuiz_toplistButton").show(),Y=a.token,L=0,a.userId?(d.hide(),L=1,I&&c.hide()):
29
+ (d.show(),c=d.children().eq(1),a.captcha?(c.find('input[name="wpProQuiz_captchaPrefix"]').val(a.captcha.code),c.find(".wpProQuiz_captchaImg").attr("src",a.captcha.img),c.find('input[name="wpProQuiz_captcha"]').val(""),c.show()):c.hide())):c.hide()},scrollTo:function(a,b){var d=a.offset().top-100;(b||(window.pageYOffset||document.body.scrollTop)>d)&&f("html,body").animate({scrollTop:d},300)},addToplist:function(){if(!B){var a=b.find(".wpProQuiz_addToplistMessage").text(WpProQuizGlobal.loadData).show(),
30
+ c=b.find(".wpProQuiz_addBox").hide();d.methode.ajax({action:"wp_pro_quiz_add_toplist",quizId:e.quizId,token:Y,name:c.find('input[name="wpProQuiz_toplistName"]').val(),email:c.find('input[name="wpProQuiz_toplistEmail"]').val(),captcha:c.find('input[name="wpProQuiz_captcha"]').val(),prefix:c.find('input[name="wpProQuiz_captchaPrefix"]').val(),points:h.comp.points,totalPoints:e.globalPoints},function(b){a.text(b.text);b.clear?(c.hide(),d.methode.updateToplist()):c.show();b.captcha&&(c.find(".wpProQuiz_captchaImg").attr("src",
31
+ b.captcha.img),c.find('input[name="wpProQuiz_captchaPrefix"]').val(b.captcha.code),c.find('input[name="wpProQuiz_captcha"]').val(""))})}},updateToplist:function(){"function"==typeof wpProQuiz_fetchToplist&&wpProQuiz_fetchToplist()},registerSolved:function(){b.find('.wpProQuiz_questionInput[type="text"]').change(function(){var a=f(this),c=a.parents(".wpProQuiz_listItem"),d=!1;""!=a.val()&&(d=!0);b.trigger({type:"questionSolved",values:{item:c,index:c.index(),solved:d}})});b.find('.wpProQuiz_questionList[data-type="single"] .wpProQuiz_questionInput, .wpProQuiz_questionList[data-type="assessment_answer"] .wpProQuiz_questionInput').change(function(){var a=
32
+ f(this).parents(".wpProQuiz_listItem"),c=this.checked;b.trigger({type:"questionSolved",values:{item:a,index:a.index(),solved:c}})});b.find(".wpProQuiz_cloze input").change(function(){var a=f(this).parents(".wpProQuiz_listItem"),c=!0;a.find(".wpProQuiz_cloze input").each(function(){if(""==f(this).val())return c=!1});b.trigger({type:"questionSolved",values:{item:a,index:a.index(),solved:c}})});b.find('.wpProQuiz_questionList[data-type="multiple"] .wpProQuiz_questionInput').change(function(){var a=f(this).parents(".wpProQuiz_listItem"),
33
+ c=0;a.find('.wpProQuiz_questionList[data-type="multiple"] .wpProQuiz_questionInput').each(function(){this.checked&&c++});b.trigger({type:"questionSolved",values:{item:a,index:a.index(),solved:c?!0:!1}})})}};d.init=function(){d.methode.parseBitOptions();d.methode.setClozeStyle();d.methode.registerSolved();r.init();R&&!B&&d.methode.checkQuizLock();b.find('input[name="startQuiz"]').click(function(){d.methode.startQuiz();return!1});u.click(function(){d.methode.nextQuestion()});$.click(function(){d.methode.prevQuestion()});
34
+ b.find('input[name="reShowQuestion"]').click(function(){d.methode.showQustionList()});b.find('input[name="restartQuiz"]').click(function(){d.methode.restartQuiz()});b.find('input[name="check"]').click(function(){d.methode.checkQuestion()});b.find('input[name="checkSingle"]').click(function(){d.methode.showQuizSummary()});b.find('input[name="tip"]').click(d.methode.showTip);b.find('input[name="skip"]').click(d.methode.skipQuestion);b.find('input[name="review"]').click(d.methode.reviewQuestion);b.find('input[name="wpProQuiz_toplistAdd"]').click(d.methode.addToplist);
35
+ b.find('input[name="quizSummary"]').click(d.methode.showQuizSummary);b.find('input[name="endQuizSummary"]').click(function(){d.methode.finishQuiz()});b.find('input[name="showToplist"]').click(function(){m.hide();K.toggle()});b.bind("questionSolved",d.methode.questionSolved)};d.init()};f.fn.wpProQuizFront=function(G){return this.each(function(){void 0==f(this).data("wpProQuizFront")&&f(this).data("wpProQuizFront",new f.wpProQuizFront(this,G))})}})(jQuery);
languages/wp-pro-quiz-ar.mo CHANGED
Binary file
languages/wp-pro-quiz-ar.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Wp-Pro-Quiz\n"
4
- "POT-Creation-Date: 2013-03-19 13:53+0100\n"
5
- "PO-Revision-Date: 2013-03-19 13:53+0100\n"
6
  "Last-Translator: Julius Fischer <julius.f@gmx.net>\n"
7
  "Language-Team: abuhassan <sajja2002@hotmail.com>\n"
8
  "Language: Arabic\n"
@@ -60,7 +60,7 @@ msgstr ""
60
 
61
  #: lib/controller/WpProQuiz_Controller_Admin.php:107
62
  #: lib/view/WpProQuiz_View_FrontToplist.php:26
63
- #: lib/view/WpProQuiz_View_QuestionOverall.php:67
64
  #: lib/view/WpProQuiz_View_QuizOverall.php:110
65
  msgid "No data available"
66
  msgstr ""
@@ -78,11 +78,20 @@ msgstr ""
78
  msgid "You must specify a name."
79
  msgstr ""
80
 
 
 
 
 
 
 
 
 
81
  #: lib/controller/WpProQuiz_Controller_Front.php:44
 
82
  #: lib/controller/WpProQuiz_Controller_Preview.php:15
83
  #: lib/view/WpProQuiz_View_AdminToplist.php:47
84
- #: lib/view/WpProQuiz_View_FrontQuiz.php:437
85
- #: lib/view/WpProQuiz_View_QuestionOverall.php:93
86
  #: lib/view/WpProQuiz_View_Statistics.php:40
87
  msgid "Loading"
88
  msgstr ""
@@ -93,14 +102,14 @@ msgstr ""
93
  #: lib/controller/WpProQuiz_Controller_Question.php:51
94
  #: lib/controller/WpProQuiz_Controller_Question.php:128
95
  #: lib/controller/WpProQuiz_Controller_Question.php:143
96
- #: lib/controller/WpProQuiz_Controller_Question.php:200
97
- #: lib/controller/WpProQuiz_Controller_Question.php:348
98
  #: lib/controller/WpProQuiz_Controller_Quiz.php:175
99
  #: lib/controller/WpProQuiz_Controller_Quiz.php:189
100
  #: lib/controller/WpProQuiz_Controller_Quiz.php:249
101
  #: lib/controller/WpProQuiz_Controller_Quiz.php:297
102
  #: lib/controller/WpProQuiz_Controller_Statistics.php:32
103
- #: lib/controller/WpProQuiz_Controller_Toplist.php:76
104
  msgid "You do not have sufficient permissions to access this page."
105
  msgstr ""
106
 
@@ -134,20 +143,20 @@ msgid "Question not found"
134
  msgstr "لم يتم العثور على السؤال"
135
 
136
  #: lib/controller/WpProQuiz_Controller_Question.php:173
137
- #: lib/controller/WpProQuiz_Controller_Question.php:227
138
  #, php-format
139
  msgid "Question: %d"
140
  msgstr "السؤال: %d"
141
 
142
- #: lib/controller/WpProQuiz_Controller_Question.php:183
143
  msgid "Question edited"
144
  msgstr "تم تحرير السؤال"
145
 
146
- #: lib/controller/WpProQuiz_Controller_Question.php:204
147
  msgid "New question"
148
  msgstr "سؤال جديد"
149
 
150
- #: lib/controller/WpProQuiz_Controller_Question.php:238
151
  msgid "Question added"
152
  msgstr "تم اضافة سؤال"
153
 
@@ -174,32 +183,38 @@ msgstr "انشاء اختبار"
174
  msgid "Quiz deleted"
175
  msgstr "تم حذف الاختبار"
176
 
177
- #: lib/controller/WpProQuiz_Controller_Toplist.php:136
178
- msgid "You signing up successfully."
 
 
 
 
 
 
179
  msgstr ""
180
 
181
- #: lib/controller/WpProQuiz_Controller_Toplist.php:144
182
  #: lib/controller/WpProQuiz_Controller_Toplist.php:148
183
- #: lib/controller/WpProQuiz_Controller_Toplist.php:165
184
- #: lib/controller/WpProQuiz_Controller_Toplist.php:169
185
- #: lib/controller/WpProQuiz_Controller_Toplist.php:175
186
- msgid "An error has occurred."
187
  msgstr ""
188
 
189
- #: lib/controller/WpProQuiz_Controller_Toplist.php:186
190
- #: lib/controller/WpProQuiz_Controller_Toplist.php:195
191
- msgid "You can not enter again."
 
 
 
192
  msgstr ""
193
 
194
- #: lib/controller/WpProQuiz_Controller_Toplist.php:199
195
- msgid "No name or e-mail entered."
 
196
  msgstr ""
197
 
198
- #: lib/controller/WpProQuiz_Controller_Toplist.php:203
199
  msgid "Your name can not exceed 15 characters."
200
  msgstr ""
201
 
202
- #: lib/controller/WpProQuiz_Controller_Toplist.php:211
203
  msgid "You entered wrong captcha code."
204
  msgstr ""
205
 
@@ -216,10 +231,11 @@ msgid "File is not compatible with the current version"
216
  msgstr ""
217
 
218
  #: lib/model/WpProQuiz_Model_GlobalSettingsMapper.php:47
 
219
  msgid "Wp-Pro-Quiz: One user completed a quiz"
220
  msgstr ""
221
 
222
- #: lib/model/WpProQuiz_Model_GlobalSettingsMapper.php:48
223
  msgid ""
224
  "Wp-Pro-Quiz\n"
225
  "\n"
@@ -230,22 +246,46 @@ msgid ""
230
  "\n"
231
  msgstr ""
232
 
 
 
 
 
 
 
 
 
 
 
 
233
  #: lib/plugin/WpProQuiz_Plugin_BpAchievementsV2.php:33
 
234
  msgid "The user completed a quiz."
235
  msgstr ""
236
 
 
 
 
 
 
 
 
 
 
 
 
 
237
  #: lib/view/WpProQuiz_View_AdminToplist.php:7
238
  #: lib/view/WpProQuiz_View_FrontToplist.php:8
239
- #: lib/view/WpProQuiz_View_QuizEdit.php:626
240
- #: lib/view/WpProQuiz_View_QuizEdit.php:638
241
  #: lib/view/WpProQuiz_View_QuizOverall.php:95
242
  msgid "Leaderboard"
243
  msgstr ""
244
 
245
  #: lib/view/WpProQuiz_View_AdminToplist.php:8
246
- #: lib/view/WpProQuiz_View_GobalSettings.php:21
247
  #: lib/view/WpProQuiz_View_Import.php:22
248
- #: lib/view/WpProQuiz_View_QuestionEdit.php:18
249
  #: lib/view/WpProQuiz_View_QuestionOverall.php:19
250
  #: lib/view/WpProQuiz_View_QuizEdit.php:14
251
  #: lib/view/WpProQuiz_View_Statistics.php:24
@@ -254,7 +294,7 @@ msgid "back to overview"
254
  msgstr "العودة للرئيسية"
255
 
256
  #: lib/view/WpProQuiz_View_AdminToplist.php:11
257
- #: lib/view/WpProQuiz_View_Statistics.php:158
258
  msgid "Filter"
259
  msgstr ""
260
 
@@ -263,22 +303,22 @@ msgid "Sort by:"
263
  msgstr ""
264
 
265
  #: lib/view/WpProQuiz_View_AdminToplist.php:18
266
- #: lib/view/WpProQuiz_View_QuizEdit.php:718
267
  msgid "best user"
268
  msgstr ""
269
 
270
  #: lib/view/WpProQuiz_View_AdminToplist.php:19
271
- #: lib/view/WpProQuiz_View_QuizEdit.php:722
272
  msgid "newest entry"
273
  msgstr ""
274
 
275
  #: lib/view/WpProQuiz_View_AdminToplist.php:20
276
- #: lib/view/WpProQuiz_View_QuizEdit.php:726
277
  msgid "oldest entry"
278
  msgstr ""
279
 
280
  #: lib/view/WpProQuiz_View_AdminToplist.php:26
281
- #: lib/view/WpProQuiz_View_Statistics.php:169
282
  msgid "How many entries should be shown on one page:"
283
  msgstr ""
284
 
@@ -292,12 +332,12 @@ msgid "UR = unregistered user, R = registered user"
292
  msgstr ""
293
 
294
  #: lib/view/WpProQuiz_View_AdminToplist.php:55
295
- #: lib/view/WpProQuiz_View_Statistics.php:188
296
  msgid "User"
297
  msgstr ""
298
 
299
  #: lib/view/WpProQuiz_View_AdminToplist.php:56
300