Wp-Pro-Quiz - Version 0.29

Version Description

  • Quiz categories added
    • Support for custom fields (variables) in Email and "quiz result"
    • Translation for chinese (traditional) have been added (Thanks Dinno Lin)
    • Translation for turkish have been added (Thanks Nsaral)
    • Updated spanish translation (Thanks Carlos Ruiz)
    • Updated greek translation (Thanks )
    • Updated russian translation (Thanks )
    • Updated dutch translation (Thanks Anton Timmermans)
Download this release

Release Info

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

Code changes from version 0.28 to 0.29

css/wpProQuiz_front.css CHANGED
@@ -486,4 +486,7 @@ span.wpProQuiz_catPercent {
486
  }
487
  .wpProQuiz_forms select {
488
  width: auto !important;
 
 
 
489
  }
486
  }
487
  .wpProQuiz_forms select {
488
  width: auto !important;
489
+ }
490
+ .wpProQuiz_resultForm {
491
+ display: none;
492
  }
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;border:0 !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_list{border: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;border:0 !important;background-image:none !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;border:0 !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{border:0 !important}.wpProQuiz_resultsList>li{background-image:none !important;padding:0 !important;margin:0 !important;list-style-type:none !important;border:0 !important}.wpProQuiz_lock,.wpProQuiz_prerequisite,.wpProQuiz_startOnlyRegisteredUser,.wpProQuiz_loadQuiz{border:1px dotted #ffc3c3 !important;background-color:#fff7f7 !important}.wpProQuiz_lock p,.wpProQuiz_prerequisite p,.wpProQuiz_startOnlyRegisteredUser p,.wpProQuiz_loadQuiz 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_box{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;border:0 !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;background-image: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;border:0 !important}.wpProQuiz_reviewLegend li{float:left !important;padding-right:5px !important;list-style-type:none !important;margin:0 !important;border:0 !important;background-image:none !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}.wpProQuiz_forms{margin:20px 0 20px 0 !important}.wpProQuiz_required{color:#F00 !important;font-weight:bold !important}.wpProQuiz_invalidate{border:1px solid #ffcfcf !important;background:#ffebe8 !important;padding:4px !important;margin:4px 0 4px 0 !important;display:none}.wpProQuiz_forms table{width:auto !important;border-collapse:separate !important;border-spacing:2px !important}.wpProQuiz_forms td{vertical-align:top !important;padding:0 0 8px 0 !important;margin:0 !important;border:0 !important;background:none !important}.wpProQuiz_forms input,.wpProQuiz_forms textarea,.wpProQuiz_forms label,.wpProQuiz_forms select{margin:0 !important;float:none !important;display:inline !important}.wpProQuiz_forms select{width:auto !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;border:0 !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_list{border: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;border:0 !important;background-image:none !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;border:0 !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{border:0 !important}.wpProQuiz_resultsList>li{background-image:none !important;padding:0 !important;margin:0 !important;list-style-type:none !important;border:0 !important}.wpProQuiz_lock,.wpProQuiz_prerequisite,.wpProQuiz_startOnlyRegisteredUser,.wpProQuiz_loadQuiz{border:1px dotted #ffc3c3 !important;background-color:#fff7f7 !important}.wpProQuiz_lock p,.wpProQuiz_prerequisite p,.wpProQuiz_startOnlyRegisteredUser p,.wpProQuiz_loadQuiz 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_box{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;border:0 !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;background-image: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;border:0 !important}.wpProQuiz_reviewLegend li{float:left !important;padding-right:5px !important;list-style-type:none !important;margin:0 !important;border:0 !important;background-image:none !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}.wpProQuiz_forms{margin:20px 0 20px 0 !important}.wpProQuiz_required{color:#F00 !important;font-weight:bold !important}.wpProQuiz_invalidate{border:1px solid #ffcfcf !important;background:#ffebe8 !important;padding:4px !important;margin:4px 0 4px 0 !important;display:none}.wpProQuiz_forms table{width:auto !important;border-collapse:separate !important;border-spacing:2px !important}.wpProQuiz_forms td{vertical-align:top !important;padding:0 0 8px 0 !important;margin:0 !important;border:0 !important;background:none !important}.wpProQuiz_forms input,.wpProQuiz_forms textarea,.wpProQuiz_forms label,.wpProQuiz_forms select{margin:0 !important;float:none !important;display:inline !important}.wpProQuiz_forms select{width:auto !important}.wpProQuiz_resultForm{display:none}
js/wpProQuiz_admin.js CHANGED
@@ -21,12 +21,31 @@ jQuery(document).ready(function($) {
21
 
22
  $.fn.wpProQuiz_quizOverall = function() {
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  var methods = {
25
  changeExport: function(input) {
26
  $input = $(input);
27
  $export = $('.wpProQuiz_exportList');
 
28
  $ul = $export.find('ul').first();
 
29
  $export.find('li').remove();
 
30
 
31
  $('input[name="exportItems"]').each(function() {
32
  $this = $(this);
@@ -34,6 +53,7 @@ jQuery(document).ready(function($) {
34
  if(this.checked) {
35
  var text = $this.parent().parent().find('.wpProQuiz_quizName a:eq(0)').text();
36
  $('<li>' + text + '</li>').appendTo($ul);
 
37
  }
38
  });
39
  },
@@ -59,6 +79,68 @@ jQuery(document).ready(function($) {
59
  });
60
 
61
  return true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  }
63
  };
64
 
@@ -76,9 +158,9 @@ jQuery(document).ready(function($) {
76
 
77
  $('.wpProQuiz_import').click(function(e) {
78
  e.preventDefault();
79
- $('.wpProQuiz_importList').toggle('fast');
80
 
81
- $('.wpProQuiz_exportList').hide();
82
  $('.wpProQuiz_exportCheck').hide();
83
 
84
  });
@@ -86,9 +168,17 @@ jQuery(document).ready(function($) {
86
  $('.wpProQuiz_export').click(function(e) {
87
  e.preventDefault();
88
 
89
- $('.wpProQuiz_exportList').toggle('fast');
90
- $('.wpProQuiz_exportCheck').toggle('fast');
91
- $('.wpProQuiz_importList').hide();
 
 
 
 
 
 
 
 
92
  });
93
 
94
  $('input[name="exportItems"]').change(function() {
@@ -110,6 +200,27 @@ jQuery(document).ready(function($) {
110
  if(!methods.startExport())
111
  e.preventDefault();
112
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  };
114
 
115
  init();
@@ -564,7 +675,45 @@ jQuery(document).ready(function($) {
564
 
565
  $.fn.wpProQuiz_quizEdit = function() {
566
 
 
 
 
 
 
 
 
 
 
 
567
  var methode = {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
568
  addResult: function() {
569
  $('#resultList').children().each(function() {
570
  if($(this).css('display') == 'none') {
@@ -713,6 +862,35 @@ jQuery(document).ready(function($) {
713
 
714
  ++index;
715
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
716
  }
717
 
718
  };
@@ -890,6 +1068,7 @@ jQuery(document).ready(function($) {
890
 
891
  $('#form_add').click(function() {
892
  $('#form_table tbody > tr:eq(0)').clone(true).appendTo('#form_table tbody').show();
 
893
  });
894
 
895
  $('input[name="form_delete"]').click(function() {
@@ -901,9 +1080,11 @@ jQuery(document).ready(function($) {
901
  } else {
902
  con.remove();
903
  }
 
 
904
  });
905
 
906
- $('#form_table tbody').sortable({ handle: '.form_move', update: methode.sortUpdate });
907
  $('.form_move').click(function() {
908
  return false;
909
  });
@@ -932,6 +1113,71 @@ jQuery(document).ready(function($) {
932
  $('.dropDownEditBox input').click(function() {
933
  $(this).parent().hide();
934
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
935
  };
936
 
937
  init();
@@ -1539,7 +1785,7 @@ jQuery(document).ready(function($) {
1539
 
1540
  gobalSettings: function() {
1541
  var methode = {
1542
- categoryDelete: function(id) {
1543
  var data = {
1544
  categoryId: id
1545
  };
@@ -1550,12 +1796,12 @@ jQuery(document).ready(function($) {
1550
  return;
1551
  }
1552
 
1553
- $('select[name="category"] option[value="'+id+'"]').remove();
1554
- $('select[name="category"]').change();
1555
  });
1556
  },
1557
 
1558
- categoryEdit: function(id, name) {
1559
  var data = {
1560
  categoryId: id,
1561
  categoryName: $.trim(name)
@@ -1572,8 +1818,8 @@ jQuery(document).ready(function($) {
1572
  return;
1573
  }
1574
 
1575
- $('select[name="category"] option[value="'+id+'"]').text(data.categoryName);
1576
- $('select[name="category"]').change();
1577
  });
1578
  },
1579
 
@@ -1657,14 +1903,31 @@ jQuery(document).ready(function($) {
1657
  $('input[name="categoryDelete"]').click(function() {
1658
  var id = $('select[name="category"] option:selected').val();
1659
 
1660
- methode.categoryDelete(id);
1661
  });
1662
 
1663
  $('input[name="categoryEdit"]').click(function() {
1664
  var id = $('select[name="category"] option:selected').val();
1665
  var text = $('input[name="categoryEditText"]').val();
1666
 
1667
- methode.categoryEdit(id, text);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1668
  });
1669
 
1670
  $('#statistic_time_format_select').change(function() {
21
 
22
  $.fn.wpProQuiz_quizOverall = function() {
23
 
24
+ function isEmpty(text) {
25
+ text = $.trim(text);
26
+
27
+ return (!text || 0 === text.length);
28
+ };
29
+
30
+ function ajaxPost(func, data, success) {
31
+ var d = {
32
+ action: 'wp_pro_quiz_admin_ajax',
33
+ func: func,
34
+ data: data
35
+ };
36
+
37
+ $.post(ajaxurl, d, success, 'json');
38
+ };
39
+
40
  var methods = {
41
  changeExport: function(input) {
42
  $input = $(input);
43
  $export = $('.wpProQuiz_exportList');
44
+ $export2 = $('.wpProQuiz_setQuizCategoryList');
45
  $ul = $export.find('ul').first();
46
+ $ul2 = $export2.find('ul').first();
47
  $export.find('li').remove();
48
+ $export2.find('li').remove();
49
 
50
  $('input[name="exportItems"]').each(function() {
51
  $this = $(this);
53
  if(this.checked) {
54
  var text = $this.parent().parent().find('.wpProQuiz_quizName a:eq(0)').text();
55
  $('<li>' + text + '</li>').appendTo($ul);
56
+ $('<li>' + text + '</li>').appendTo($ul2);
57
  }
58
  });
59
  },
79
  });
80
 
81
  return true;
82
+ },
83
+
84
+ setCategoriesStart: function() {
85
+ $ele = $('input[name="exportItems"]:checked');
86
+
87
+ if($ele.length < 1) {
88
+ alert(wpProQuizLocalize.no_selected_quiz);
89
+ return false;
90
+ }
91
+
92
+ var ids = [];
93
+
94
+ $('input[name="exportItems"]').each(function() {
95
+ $this = $(this);
96
+
97
+ if(this.checked) {
98
+ ids.push(this.value);
99
+ }
100
+ });
101
+
102
+ var categoryId = $('select[name="category"]').val();
103
+
104
+ var data = {
105
+ categoryId: categoryId,
106
+ quizIds: ids
107
+ };
108
+
109
+ $('#ajaxLoad').show();
110
+
111
+ ajaxPost('setQuizMultipleCategories', data, function(json) {
112
+ location.reload();
113
+ });
114
+
115
+ return true;
116
+ },
117
+
118
+ addCategory: function() {
119
+ var name = $.trim($('input[name="categoryAdd"]').val());
120
+
121
+ if(isEmpty(name)) {
122
+ return;
123
+ }
124
+
125
+ var data = {
126
+ categoryName: name,
127
+ type: 'quiz'
128
+ };
129
+
130
+ ajaxPost('categoryAdd', data, function(json) {
131
+ if(json.err) {
132
+ $('#categoryMsgBox').text(json.err).show('fast').delay(2000).hide('fast');
133
+ return;
134
+ }
135
+
136
+ var $option = $(document.createElement('option'))
137
+ .val(json.categoryId)
138
+ .text(json.categoryName)
139
+ .attr('selected', 'selected');
140
+
141
+ $('select[name="category"]').append($option).change();
142
+
143
+ });
144
  }
145
  };
146
 
158
 
159
  $('.wpProQuiz_import').click(function(e) {
160
  e.preventDefault();
161
+ $('.wpProQuiz_importList').show('fast');
162
 
163
+ $('.wpProQuiz_exportList, .wpProQuiz_setQuizCategoryList').hide();
164
  $('.wpProQuiz_exportCheck').hide();
165
 
166
  });
168
  $('.wpProQuiz_export').click(function(e) {
169
  e.preventDefault();
170
 
171
+ $('.wpProQuiz_exportList').show('fast');
172
+ $('.wpProQuiz_exportCheck').show('fast');
173
+ $('.wpProQuiz_importList, .wpProQuiz_setQuizCategoryList').hide();
174
+ });
175
+
176
+ $('.wpProQuiz_setQuizCategory').click(function(e) {
177
+ e.preventDefault();
178
+
179
+ $('.wpProQuiz_setQuizCategoryList').show('fast');
180
+ $('.wpProQuiz_exportCheck').show('fast');
181
+ $('.wpProQuiz_importList, .wpProQuiz_exportList').hide();
182
  });
183
 
184
  $('input[name="exportItems"]').change(function() {
200
  if(!methods.startExport())
201
  e.preventDefault();
202
  });
203
+
204
+ $('#setCategoriesStart').click(function(e) {
205
+
206
+ if(!methods.setCategoriesStart())
207
+ e.preventDefault();
208
+ });
209
+
210
+ $('select[name="category"]').change(function() {
211
+ var $this = $(this);
212
+ var box = $('#categoryAddBox').hide();
213
+
214
+
215
+ if($this.val() == "-1") {
216
+ box.show();
217
+ }
218
+
219
+ }).change();
220
+
221
+ $('#categoryAddBtn').click(function() {
222
+ methods.addCategory();
223
+ });
224
  };
225
 
226
  init();
675
 
676
  $.fn.wpProQuiz_quizEdit = function() {
677
 
678
+ function ajaxPost(func, data, success) {
679
+ var d = {
680
+ action: 'wp_pro_quiz_admin_ajax',
681
+ func: func,
682
+ data: data
683
+ };
684
+
685
+ $.post(ajaxurl, d, success, 'json');
686
+ };
687
+
688
  var methode = {
689
+ addCategory: function() {
690
+ var name = $.trim($('input[name="categoryAdd"]').val());
691
+
692
+ if(isEmpty(name)) {
693
+ return;
694
+ }
695
+
696
+ var data = {
697
+ categoryName: name,
698
+ type: 'quiz'
699
+ };
700
+
701
+ ajaxPost('categoryAdd', data, function(json) {
702
+ if(json.err) {
703
+ $('#categoryMsgBox').text(json.err).show('fast').delay(2000).hide('fast');
704
+ return;
705
+ }
706
+
707
+ var $option = $(document.createElement('option'))
708
+ .val(json.categoryId)
709
+ .text(json.categoryName)
710
+ .attr('selected', 'selected');
711
+
712
+ $('select[name="category"]').append($option).change();
713
+
714
+ });
715
+ },
716
+
717
  addResult: function() {
718
  $('#resultList').children().each(function() {
719
  if($(this).css('display') == 'none') {
862
 
863
  ++index;
864
  });
865
+ },
866
+
867
+ updateFormIds: function() {
868
+ var index = -1;
869
+ var selected = $('.emailFormVariables option:selected').val();
870
+ var $formVariables = $('.formVariables').empty();
871
+ var $emailFormVariables = $('.emailFormVariables').empty().append('<option value="-1"></option>');
872
+
873
+ if($('.emailFormVariables').data('default') > -1) {
874
+ selected = $('.emailFormVariables').data('default');
875
+ $('.emailFormVariables').data('default', -1);
876
+ }
877
+
878
+ $('#form_table tbody > tr').each(function() {
879
+ $(this).children().first().text(index);
880
+ var fieldName = $(this).find('.formFieldName').val();
881
+ var type = $(this).find('[name="form[][type]"] option:selected');
882
+ var name = $(this).find('[name="form[][fieldname]"]').val();
883
+
884
+ if(index >= 0 && !isEmpty(fieldName))
885
+ $formVariables.append($('<li><span>$form{' + index + '}</span> - ' + fieldName + '</li>'));
886
+
887
+ if(type.val() == 4)
888
+ $emailFormVariables.append($('<option value="' + index + '">' + name + '</option>'))
889
+
890
+ index++;
891
+ });
892
+
893
+ $('.emailFormVariables option[value="' + selected + '"]').prop('selected', true);
894
  }
895
 
896
  };
1068
 
1069
  $('#form_add').click(function() {
1070
  $('#form_table tbody > tr:eq(0)').clone(true).appendTo('#form_table tbody').show();
1071
+ methode.updateFormIds();
1072
  });
1073
 
1074
  $('input[name="form_delete"]').click(function() {
1080
  } else {
1081
  con.remove();
1082
  }
1083
+
1084
+ methode.updateFormIds();
1085
  });
1086
 
1087
+ $('#form_table tbody').sortable({ handle: '.form_move', update: methode.updateFormIds });
1088
  $('.form_move').click(function() {
1089
  return false;
1090
  });
1113
  $('.dropDownEditBox input').click(function() {
1114
  $(this).parent().hide();
1115
  });
1116
+
1117
+ $('.formFieldName, select[name="form[][type]"]').change(function() {
1118
+ methode.updateFormIds();
1119
+ });
1120
+
1121
+ $('select[name="category"]').change(function() {
1122
+ var $this = $(this);
1123
+ var box = $('#categoryAddBox').hide();
1124
+
1125
+
1126
+ if($this.val() == "-1") {
1127
+ box.show();
1128
+ }
1129
+
1130
+ }).change();
1131
+
1132
+ $('#categoryAddBtn').click(function() {
1133
+ methode.addCategory();
1134
+ });
1135
+
1136
+ $('input[name="emailNotification"]').change(function() {
1137
+ var $tr = $('#adminEmailSettings tr:gt(0)');
1138
+
1139
+ if($('input[name="emailNotification"]:checked').val() > 0) {
1140
+ $tr.show();
1141
+ } else {
1142
+ $tr.hide();
1143
+ }
1144
+ }).change();
1145
+
1146
+ $('input[name="userEmailNotification"]').change(function() {
1147
+ var $tr = $('#userEmailSettings tr:gt(0)');
1148
+
1149
+ if($('input[name="userEmailNotification"]:checked').val() > 0) {
1150
+ $tr.show();
1151
+ } else {
1152
+ $tr.hide();
1153
+ }
1154
+ }).change();
1155
+
1156
+ methode.updateFormIds();
1157
+
1158
+ $('input[name="email[html]"]').change(function() {
1159
+ if(switchEditors == undefined)
1160
+ return false;
1161
+
1162
+ if(this.checked) {
1163
+ switchEditors.go('adminEmailEditor', 'tmce');
1164
+ } else {
1165
+ switchEditors.go('adminEmailEditor', 'html');
1166
+ }
1167
+
1168
+ }).change();
1169
+
1170
+ $('input[name="userEmail[html]"]').change(function() {
1171
+ if(switchEditors == undefined)
1172
+ return false;
1173
+
1174
+ if(this.checked) {
1175
+ switchEditors.go('userEmailEditor', 'tmce');
1176
+ } else {
1177
+ switchEditors.go('userEmailEditor', 'html');
1178
+ }
1179
+
1180
+ }).change();
1181
  };
1182
 
1183
  init();
1785
 
1786
  gobalSettings: function() {
1787
  var methode = {
1788
+ categoryDelete: function(id, type) {
1789
  var data = {
1790
  categoryId: id
1791
  };
1796
  return;
1797
  }
1798
 
1799
+ $('select[name="category' + type + '"] option[value="'+id+'"]').remove();
1800
+ $('select[name="category' + type + '"]').change();
1801
  });
1802
  },
1803
 
1804
+ categoryEdit: function(id, name, type) {
1805
  var data = {
1806
  categoryId: id,
1807
  categoryName: $.trim(name)
1818
  return;
1819
  }
1820
 
1821
+ $('select[name="category' + type + '"] option[value="'+id+'"]').text(data.categoryName);
1822
+ $('select[name="category' + type + '"]').change();
1823
  });
1824
  },
1825
 
1903
  $('input[name="categoryDelete"]').click(function() {
1904
  var id = $('select[name="category"] option:selected').val();
1905
 
1906
+ methode.categoryDelete(id, '');
1907
  });
1908
 
1909
  $('input[name="categoryEdit"]').click(function() {
1910
  var id = $('select[name="category"] option:selected').val();
1911
  var text = $('input[name="categoryEditText"]').val();
1912
 
1913
+ methode.categoryEdit(id, text, '');
1914
+ });
1915
+
1916
+ $('select[name="categoryQuiz"]').change(function() {
1917
+ $('input[name="categoryQuizEditText"]').val($(this).find(':selected').text());
1918
+ }).change();
1919
+
1920
+ $('input[name="categoryQuizDelete"]').click(function() {
1921
+ var id = $('select[name="categoryQuiz"] option:selected').val();
1922
+
1923
+ methode.categoryDelete(id, 'Quiz');
1924
+ });
1925
+
1926
+ $('input[name="categoryQuizEdit"]').click(function() {
1927
+ var id = $('select[name="categoryQuiz"] option:selected').val();
1928
+ var text = $('input[name="categoryQuizEditText"]').val();
1929
+
1930
+ methode.categoryEdit(id, text, 'Quiz');
1931
  });
1932
 
1933
  $('#statistic_time_format_select').change(function() {
js/wpProQuiz_admin.min.js CHANGED
@@ -1,83 +1,92 @@
1
- jQuery(document).ready(function(a){function r(b,h){var c={onChange:null},d={contain:null,pageLeft:null,pageRight:null,currentPage:null},e=function(){var a=d.currentPage.children().length,f=Number(d.currentPage.val());d.pageLeft.hide();d.pageRight.hide();1<f&&d.pageLeft.show();f+1<=a&&d.pageRight.show()};this.getCurrentPage=function(){return d.currentPage.val()};this.setNumPage=function(c){d.currentPage.empty();for(var f=1;f<=c;f++)a(document.createElement("option")).val(f).text(f).appendTo(d.currentPage);
2
- e()};(function(){a.extend(d,{contain:b,pageLeft:b.find(".navigationLeft"),pageRight:b.find(".navigationRight"),currentPage:b.find(".navigationCurrentPage")});a.extend(c,h);d.pageLeft.click(function(){d.currentPage.val(Number(d.currentPage.val())-1);e();if(c.onChange)c.onChange(d.currentPage.val())});d.pageRight.click(function(){d.currentPage.val(Number(d.currentPage.val())+1);e();if(c.onChange)c.onChange(d.currentPage.val())});d.currentPage.change(function(){e();if(c.onChange)c.onChange(d.currentPage.val())})})()}
3
- a.fn.wpProQuiz_preview=function(){var b={openPreview:function(b){window.open(a(b).attr("href"),"wpProQuizPreview","width=900,height=900")}};(function(){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 c=$this.parent().parent().find(".wpProQuiz_quizName a:eq(0)").text();
4
- a("<li>"+c+"</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}};(function(){a(".wpProQuiz_delete").click(function(a){return confirm(wpProQuizLocalize.delete_msg)?!0:(a.preventDefault(),
5
- !1)});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=a('input[name="exportItems"]');
6
- 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()},c=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=save_sort";a.post(c,h,function(c){a("#sortMsg").show(400).delay(1E3).hide(400)})},parseSortArray:function(){var b=[];a("tbody tr").each(function(){b.push(this.id.replace("wpProQuiz_questionId_",
7
- ""))});return b},sortUpdate:function(b,c){a(".wpProQuiz_questionOverall tbody").children().each(function(){$t=a(this).children().first().text(a(this).index()+1)})},loadQuestionCopy:function(){var b=a("#questionCopySelect"),c=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=load_question";b.hide();b.empty();a("#loadDataImg").show();a.post(c,{action:"wp_pro_quiz_load_question",excludeId:1},function(c){a.each(c,function(c,d){var f=a(document.createElement("optgroup"));
8
- f.attr("label",d.name);a.each(d.question,function(c,b){a(document.createElement("option")).val(b.id).text(b.name).appendTo(f)});b.append(f)});a("#loadDataImg").hide();b.show()},"json")}};(function(){a(".wp-list-table tbody").sortable({handle:".wpProQuiz_move",update:b.sortUpdate});a(".wpProQuiz_delete").click(function(a){return confirm(wpProQuizLocalize.delete_msg)?!0:(a.preventDefault(),!1)});a("#wpProQuiz_saveSort").click(function(a){a.preventDefault();b.saveSort()});a("#wpProQuiz_questionCopy").click(function(h){var c=
9
- a(".wpProQuiz_questionCopy");c.is(":visible")?c.hide():(c.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 c=a(this),b=c.find('textarea[name="resultTextGrade[text][]"]'),e=b.attr("id"),h=!0;c.find('input[name="resultTextGrade[prozent][]"]').val("0");c.find('input[name="resultTextGrade[activ][]"]').val("1").keyup();void 0==tinymce.editors[e]||tinymce.editors[e].isHidden()||
10
- (h=!1);void 0==switchEditors||h||(switchEditors.go(e,"toggle"),switchEditors.go(e,"toggle"));void 0!=tinymce.editors[e]?tinymce.editors[e].setContent(""):b.val("");void 0==tinymce.editors[e]||h||tinyMCE.execCommand("mceRemoveControl",!1,e);c.parent().children(":visible").last().after(c);void 0==tinymce.editors[e]||h||tinyMCE.execCommand("mceAddControl",!1,e);a(this).show();void 0==switchEditors||h||switchEditors.go(e,"toggle");return!1}})},deleteResult:function(c){a(c).parent().parent().hide();a(c).siblings('input[name="resultTextGrade[activ][]"]').val("0")},
11
- changeResult:function(c){c=a(c);if(b.validResultInput(c.val()))return c.siblings(".resultProzent").text(c.val()),c.removeAttr("style"),!0;c.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),!1;var c="",c=void 0==tinymce.editors.text||tinymce.editors.text.isHidden()?
12
- a('textarea[name="text"]').val():tinymce.editors.text.getContent();if(h(c))return alert(wpProQuizLocalize.no_quiz_start_msg),!1;if(a("#wpProQuiz_resultGradeEnabled:checked").length){var d=!0;a("#resultList").children().each(function(){if(a(this).is(":visible")&&!b.validResultInput(a(this).find('input[name="resultTextGrade[prozent][]"]').val()))return d=!1});if(!d)return alert(wpProQuizLocalize.fail_grade_result),!1}return!0},resetLock:function(){var b=(window.location.pathname+window.location.search).replace("admin.php",
13
- "admin-ajax.php"),b=b.replace("action=edit","action=reset_lock");a.post(b,{action:"wp_pro_quiz_reset_lock"},function(b){a("#resetLockMsg").show("fast").delay(2E3).hide("fast")})},generateFormIds:function(){var b=0;a("#form_table tbody > tr").each(function(){a(this).find('[name^="form[]"]').each(function(){var d=a(this).attr("name").substr(6);a(this).attr("name","form["+b+"]"+d)});++b})}},h=function(b){b=a.trim(b);return!b||0===b.length};(function(){a("#statistics_on").change(function(){this.checked?
14
- a("#statistics_ip_lock_tr").show():a("#statistics_ip_lock_tr").hide()});a(".addResult").click(function(){b.addResult()});a(".deleteResult").click(function(a){b.deleteResult(this)});a('input[name="resultTextGrade[prozent][]"]').keyup(function(a){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(c){b.validInput()?
15
- b.generateFormIds():c.preventDefault();a('select[name="prerequisiteList[]"] option').attr("selected","selected")});a('input[name="template"]').click(function(c){if("0"==a('select[name="templateSaveList"]').val()&&h(a('input[name="templateName"]').val()))return alert(wpProQuizLocalize.temploate_no_name),c.preventDefault(),!1;b.generateFormIds();a('select[name="prerequisiteList[]"] option').attr("selected","selected")});a('select[name="templateSaveList"]').change(function(){var b=a('input[name="templateName"]');
16
- "0"==a(this).val()?b.show():b.hide()}).change();a('input[name="quizRunOnce"]').change(function(b){this.checked?(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(b){!this.checked||"1"!=this.value&&"3"!=this.value?a("#wpProQuiz_quiz_run_once_cookie").hide():a("#wpProQuiz_quiz_run_once_cookie").show()});a('input[name="resetQuizLock"]').click(function(a){b.resetLock();
17
- return!1});a(".wpProQuiz_demoBox 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});a('input[name="showMaxQuestion"]').change(function(){this.checked?a("#wpProQuiz_showMaxBox").show():a("#wpProQuiz_showMaxBox").hide()});a("#btnPrerequisiteAdd").click(function(){a('select[name="quizList"] option:selected').removeAttr("selected").appendTo('select[name="prerequisiteList[]"]')});
18
- 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?
19
- 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("#form_add").click(function(){a("#form_table tbody > tr:eq(0)").clone(!0).appendTo("#form_table tbody").show()});
20
- a('input[name="form_delete"]').click(function(){var b=a(this).parents("tr");"0"!=b.find('input[name="form[][form_id]"]').val()?(b.find('input[name="form[][form_delete]"]').val(1),b.hide()):b.remove()});a("#form_table tbody").sortable({handle:".form_move",update:b.sortUpdate});a(".form_move").click(function(){return!1});a('select[name="form[][type]"]').change(function(){switch(Number(a(this).val())){case 7:case 8:a(this).siblings(".editDropDown").show();break;default:a(this).siblings(".editDropDown, .dropDownEditBox").hide()}}).change();
21
- a(".editDropDown").click(function(){a(".dropDownEditBox").not(a(this).siblings(".dropDownEditBox").toggle()).hide();return!1});a(".dropDownEditBox input").click(function(){a(this).parent().hide()})})()};a.fn.wpProQuiz_statistics=function(){var b="wpProQuiz_typeAnonymeUser",h=!0,c={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();
22
- a("#wpProQuiz_statistics_content, #wpProQuiz_statistics_overview").hide();a.post(e,b,c.setStatistics,"json")},setStatistics:function(c){var e=a(".wpProQuiz_statistics_table"),h=e.find("tbody");if("wpProQuiz_typeOverview"!=b){var f=function(a,b,f){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==f&&e.find(".wpProQuiz_cResult").text(b.result+
23
- "%")};f(e,c.clear,!1);a.each(c.items,function(a,b){f(h.find("#wpProQuiz_tr_"+b.id),b,!1)});f(e.find("tfoot"),c.global,!0);a("#wpProQuiz_loadData").hide();a("#wpProQuiz_statistics_content, .wpProQuiz_statistics_table").show()}},loadOverview:function(){a(".wpProQuiz_statistics_table, #wpProQuiz_statistics_content, #wpProQuiz_statistics_overview").hide();a("#wpProQuiz_loadData").show();var d=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=load_statistics",
24
- 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)};a.post(d,e,function(d){a("#wpProQuiz_statistics_overview_data").empty();if("wpProQuiz_typeOverview"==b){var f=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>');
25
- a.each(d.items,function(b,c){var d=f.clone();d.find("a").text(c.userName).data("userId",c.userId).click(function(){a("#userSelect").val(a(this).data("userId"));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+"%")):
26
- d.find("th").removeAttr("style");a("#wpProQuiz_statistics_overview_data").append(d)});void 0!=d.page&&(c.setPageNav(d.page),h=!1);a("#wpProQuiz_loadData").hide();a("#wpProQuiz_statistics_overview").show()}},"json")},loadFormOverview:function(){a("#wpProQuiz_tabFormOverview").show()},changeTab:function(d){b=d;"wpProQuiz_typeRegisteredUser"==d?c.loadStatistics(a("#userSelect").val()):"wpProQuiz_typeAnonymeUser"==d?c.loadStatistics(0):"wpProQuiz_typeForm"==d?c.loadFormOverview():c.loadOverview()},resetStatistic:function(d){var e=
27
- "wpProQuiz_typeRegisteredUser"==b?a("#userSelect").val():0,h=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=reset";a.post(h,{action:"wp_pro_quiz_statistics",userId:e,complete:d},function(a){c.changeTab(b)})},setPageNav:function(b){b=Math.ceil(b/a("#wpProQuiz_pageLimit").val());a("#wpProQuiz_currentPage").empty();for(var c=1;c<=b;c++)a(document.createElement("option")).val(c).text(c).appendTo(a("#wpProQuiz_currentPage"));a("#wpProQuiz_pageLeft, #wpProQuiz_pageRight").hide();
28
- 1<a("#wpProQuiz_currentPage option").length&&a("#wpProQuiz_pageRight").show()}};(function(){a(".wpProQuiz_tab").click(function(b){b=a(this);if(b.hasClass("button-primary"))return!1;"wpProQuiz_typeRegisteredUser"==b.attr("id")?a("#wpProQuiz_userBox").show():a("#wpProQuiz_userBox").hide();a(".wpProQuiz_tab").removeClass("button-primary").addClass("button-secondary");b.removeClass("button-secondary").addClass("button-primary");c.changeTab(b.attr("id"));return!1});a("#userSelect").change(function(){c.changeTab("wpProQuiz_typeRegisteredUser")});
29
- a(".wpProQuiz_update").click(function(){c.changeTab(b);return!1});a("#wpProQuiz_reset").click(function(){confirm(wpProQuizLocalize.reset_statistics_msg)&&c.resetStatistic(!1);return!1});a(".wpProQuiz_resetComplete").click(function(){confirm(wpProQuizLocalize.reset_statistics_msg)&&c.resetStatistic(!0);return!1});a("#wpProQuiz_pageLimit, #wpProQuiz_onlyCompleted").change(function(){a("#wpProQuiz_currentPage").val(0);h=!0;c.changeTab(b);return!1});a("#wpProQuiz_currentPage").change(function(){a("#wpProQuiz_pageLeft, #wpProQuiz_pageRight").hide();
30
- 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():a("#wpProQuiz_pageLeft, #wpProQuiz_pageRight").show());c.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",
31
- "selected");a("#wpProQuiz_currentPage").change();return!1});c.changeTab("wpProQuiz_typeAnonymeUser")})()};a.fn.wpProQuiz_toplist=function(){var b=a("#wpProQuiz_sorting"),h=a("#wpProQuiz_pageLimit"),c=a("#wpProQuiz_currentPage"),d=a("#wpProQuiz_loadData"),e=a("#wpProQuiz_pageLeft"),p=a("#wpProQuiz_pageRight"),f=a("#wpProQuiz_toplistTable tbody"),q=a("#wpProQuiz_toplistTable tbody tr:eq(0)").clone(),s=a("#wpProQuiz_content"),g={loadData:function(f){var q=(window.location.pathname+window.location.search).replace("admin.php",
32
- "admin-ajax.php")+"&action=load_toplist",k=this,n={action:"wp_pro_quiz_load_toplist",sort:b.val(),limit:h.val(),page:c.val()};void 0!=f&&a.extend(n,f);d.show();s.hide();a.post(q,n,function(a){k.handleDataRequest(a.data);void 0!=a.nav&&k.handleNav(a.nav);d.hide();s.show()},"json")},handleNav:function(b){c.empty();for(var f=1;f<=b.pages;f++)a(document.createElement("option")).val(f).text(f).appendTo(c);this.checkNav()},handleDataRequest:function(b){var c=this;f.empty();a.each(b,function(a,b){var c=
33
- q.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);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(f)});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(f);
 
 
 
 
 
 
 
 
34
  a(".wpProQuiz_delete").click(function(){if(confirm(wpProQuizLocalize.confirm_delete_entry)){var b=Array(a(this).closest("tr").find('input[name="checkedData[]"]').val());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=
35
- a(this).closest("tr"),f=b.find(".inline_editUsername").val(),t=b.find(".inline_editEmail").val();if(c.isEmpty(f)||c.isEmpty(t))return alert(wpProQuizLocalize.not_all_fields_completed),!1;c.loadData({a:"edit",toplistId:b.find('input[name="checkedData[]"]').val(),name:f,email:t});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();
36
- 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=c.val();1==a?e.hide():e.show();a==c.children().length?p.hide():p.show()},isEmpty:function(b){b=a.trim(b);return!b||0===b.length}};(function(){b.change(function(){g.loadData()});h.change(function(){g.loadData({nav:1})});c.change(function(){g.checkNav();g.loadData()});e.click(function(){c.val(Number(c.val())-1);g.checkNav();
37
- g.loadData()});p.click(function(){c.val(Number(c.val())+1);g.checkNav();g.loadData()});a("#wpProQuiz_deleteAll").click(function(){g.loadData({a:"deleteAll"})});a("#wpProQuiz_action").click(function(){var b=a("#wpProQuiz_actionName").val();if("0"!=b){var f=a('input[name="checkedData[]"]:checked').map(function(){return a(this).val()}).get();g.loadData({a:b,toplistIds:f})}});a("#wpProQuiz_checkedAll").change(function(){this.checked?a('input[name="checkedData[]"]').attr("checked","checked"):a('input[name="checkedData[]"]').removeAttr("checked",
38
- "checked")});g.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();(function(){var b=this,b={displayChecked:function(a,
39
- b,c,d){a=c?!a.checked:a.checked;d?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(f){f=a.trim(f);return!b.isEmpty(f)&&!isNaN(f)},getMceContent:function(b){var c=tinymce.editors[b];return void 0==c||c.isHidden()?a("#"+b).val():c.getContent()},ajaxPost:function(b,c,d){a.post(ajaxurl,{action:"wp_pro_quiz_admin_ajax",func:b,data:c},d,"json")}},h=function(){a(".wpProQuiz_tab_wrapper a").click(function(){var b=
40
- a(this),c=b.data("tab"),d=b.siblings(".button-primary").removeClass("button-primary").addClass("button-secondary");b.removeClass("button-secondary").addClass("button-primary");a(d.data("tab")).hide("fast");a(c).show("fast");a(document).trigger({type:"changeTab",tabId:c});return!1})},c=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,
41
- f){var d={categoryId:c,categoryName:a.trim(f)};b.isEmpty(f)?alert(wpProQuizLocalize.category_no_name):b.ajaxPost("categoryEdit",d,function(b){b.err||(a('select[name="category"] option[value="'+c+'"]').text(d.categoryName),a('select[name="category"]').change())})},changeTimeFormat:function(b,c){"0"!=c.val()&&a('input[name="'+b+'"]').val(c.val())},templateDelete:function(c,f){b.ajaxPost("templateDelete",{templateId:c,type:f},function(b){b.err||(f?(a('select[name="templateQuestion"] option[value="'+
42
- c+'"]').remove(),a('select[name="templateQuestion"]').change()):(a('select[name="templateQuiz"] option[value="'+c+'"]').remove(),a('select[name="templateQuiz"]').change()))})},templateEdit:function(c,f,d){if(b.isEmpty(f))alert(wpProQuizLocalize.category_no_name);else{var e={templateId:c,name:a.trim(f),type:d};b.ajaxPost("templateEdit",e,function(b){b.err||(d?(a('select[name="templateQuestion"] option[value="'+c+'"]').text(e.name),a('select[name="templateQuestion"]').change()):(a('select[name="templateQuiz"] option[value="'+
43
- c+'"]').text(e.name),a('select[name="templateQuiz"]').change()))})}}};(function(){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=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,
44
- 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==switchEditors)return!1;this.checked?switchEditors.go("adminEmailEditor","tmce"):switchEditors.go("adminEmailEditor","html")}).change();a('input[name="userEmail[html]"]').change(function(){if(void 0==
45
- switchEditors)return!1;this.checked?switchEditors.go("userEmailEditor","tmce"):switchEditors.go("userEmailEditor","html")}).change();a('select[name="templateQuiz"]').change(function(){a('input[name="templateQuizEditText"]').val(a(this).find(":selected").text())}).change();a('select[name="templateQuestion"]').change(function(){a('input[name="templateQuestionEditText"]').val(a(this).find(":selected").text())}).change();a('input[name="templateQuizDelete"]').click(function(){var b=a('select[name="templateQuiz"] option:selected').val();
46
- c.templateDelete(b,0)});a('input[name="templateQuestionDelete"]').click(function(){var b=a('select[name="templateQuestion"] option:selected').val();c.templateDelete(b,1)});a('input[name="templateQuizEdit"]').click(function(){var b=a('select[name="templateQuiz"] option:selected').val(),d=a('input[name="templateQuizEditText"]').val();c.templateEdit(b,d,0)});a('input[name="templateQuestionEdit"]').click(function(){var b=a('select[name="templateQuestion"] option:selected').val(),d=a('input[name="templateQuestionEditText"]').val();
47
- c.templateEdit(b,d,1)})})()},d=function(){var c=this,d=a.noop(),e=a(".answer_felder > div"),g=a('input[name="answerPointsActivated"]'),h=a('input[name="points"]'),c={generateArrayIndex:function(){var b=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(f,d){a(this).find('[name^="answerData"]').each(function(){var a=this.name,d=a.search(/\](\[\w+\])+$/),l=
48
- b==c?f:"none";0<d&&(this.name="answerData["+l+a.substring(d,a.length))})})})},globalValidate:function(){if(b.isEmpty(b.getMceContent("question")))return alert(wpProQuizLocalize.no_question_msg),!1;if(!g.is(":checked")){var c=h.val();if(!b.isNumber(c)||1>c)return alert(wpProQuizLocalize.no_nummber_points),!1}else if("free_answer"==a('input[name="answerType"]:checked').val())return alert(wpProQuizLocalize.dif_points),!1;return!1===d()?!1:!0},answerRemove:function(){var b=a(this).parent();if(2>b.parent().children().length)return!1;
49
- 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","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)'),
50
- f=b.find(".wpProQuiz_text:eq(0)");window.org_send_to_editor=window.send_to_editor;var d=tb_remove;window.send_to_editor=function(b){b=a("img",b)[0].outerHTML;f.val(f.val()+b);c.attr("checked",!0);tb_remove();window.send_to_editor=window.org_send_to_editor};window.tb_remove=function(){window.send_to_editor=window.org_send_to_editor;tb_remove=d;tb_remove()};tb_show("","media-upload.php?type=image&TB_iframe=true")}},m={classic_answer:function(){var c=0,f=0,d=0;a(".classic_answer .answerList").children().each(function(){var l=
51
- a(this);b.isEmpty(l.find('textarea[name="answerData[][answer]"]').val())||(c++,l.find('input[name="answerData[][correct]"]:checked').length&&f++,l=l.find('input[name="answerData[][points]"]').val(),b.isNumber(l)&&0<=l&&d++)});return c?f||a('input[name="disableCorrect"]').is(":checked")&&a('input[name="answerPointsDiffModusActivated"]').is(":checked")&&a('input[name="answerPointsActivated"]').is(":checked")&&"single"==a('input[name="answerType"]:checked').val()?d!=c&&g.is(":checked")?(alert(wpProQuizLocalize.no_nummber_points_new),
52
- !1):!0:(alert(wpProQuizLocalize.no_correct_msg),!1):(alert(wpProQuizLocalize.no_answer_msg),!1)},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,f=0;a(".sort_answer .answerList").children().each(function(){var d=a(this);b.isEmpty(d.find('textarea[name="answerData[][answer]"]').val())||
53
- (c++,d=d.find('input[name="answerData[][points]"]').val(),b.isNumber(d)&&0<=d&&f++)});return c?f!=c&&g.is(":checked")?(alert(wpProQuizLocalize.no_nummber_points_new),!1):!0:(alert(wpProQuizLocalize.no_answer_msg),!1)},matrix_sort_answer:function(){var c=0,f=0,d=!0,l=0;a(".matrix_sort_answer .answerList").children().each(function(){var e=a(this),g=e.find('input[name="answerData[][points]"]').val();b.isEmpty(e.find('textarea[name="answerData[][answer]"]').val())?b.isEmpty(e.find('textarea[name="answerData[][sort_string]"]').val())||
54
- (l++,b.isNumber(g)&&0<=g&&f++):(c++,l++,b.isEmpty(e.find('textarea[name="answerData[][sort_string]"]').val())&&(d=!1),b.isNumber(g)&&0<=g&&f++)});return c?d?f!=l&&g.is(":checked")?(alert(wpProQuizLocalize.no_nummber_points_new),!1):!0:(alert(wpProQuizLocalize.no_sort_element_criterion),!1):(alert(wpProQuizLocalize.no_answer_msg),!1)},assessment_answer:function(){return b.isEmpty(b.getMceContent("assessment"))?(alert(wpProQuizLocalize.no_answer_msg),!1):!0}};e.hide();(function(){a("#wpProQuiz_tip").change(function(){b.displayChecked(this,
55
- 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;"single"==b?(a("#singleChoiceOptions").show(),a('input[name="disableCorrect"]').change()):(a("#singleChoiceOptions").hide(),a(".classic_answer .wpProQuiz_classCorrect").parent().parent().show());if("single"==b||"multiple"==b){var c="single"==b?"radio":"checkbox",b="classic_answer";
56
- 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!=m[b]?m[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("");
57
- d.find(".wpProQuiz_points").val(1);d.find(".deleteAnswer").click(c.answerRemove);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(g).change(function(){b.displayChecked(this,a(".wpProQuiz_answerPoints"));b.displayChecked(this,a("#wpProQuiz_showPointsBox"));b.displayChecked(this,
58
- h,!1,!0);b.displayChecked(this,a('input[name="answerPointsDiffModusActivated"]'),!0,!0);this.checked?(a('input[name="answerPointsDiffModusActivated"]').change(),a('input[name="disableCorrect"]').change()):(a(".classic_answer .wpProQuiz_classCorrect").parent().parent().show(),a('input[name="disableCorrect"]').attr("disabled","disabled"))}).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()});
59
- a(".addMedia").click(c.addMediaClick);a('input[name="answerPointsDiffModusActivated"]').change(function(){b.displayChecked(this,a('input[name="disableCorrect"]'),!0,!0);this.checked?a('input[name="disableCorrect"]').change():a(".classic_answer .wpProQuiz_classCorrect").parent().parent().show()}).change();a('input[name="disableCorrect"]').change(function(){b.displayChecked(this,a(".classic_answer .wpProQuiz_classCorrect").parent().parent(),!0)}).change();a("#clickPointDia").click(function(){a(".pointDia").toggle("fast");
60
- return!1});a('input[name="template"]').click(function(d){if("0"==a('select[name="templateSaveList"]').val()&&b.isEmpty(a('input[name="templateName"]').val()))return alert(wpProQuizLocalize.temploate_no_name),d.preventDefault(),!1;c.generateArrayIndex()});a('select[name="templateSaveList"]').change(function(){var b=a('input[name="templateName"]');"0"==a(this).val()?b.show():b.hide()}).change()})()},e=function(){var c=this,d=a("#quizId").val(),e="users",g=a("#wpProQuiz_currentPage"),h=a("#wpProQuiz_pageLeft"),
61
- m=a("#wpProQuiz_pageRight"),k=a("#testSelect"),c={loadStatistic:function(a,c){b.ajaxPost("statisticLoad",{userId:a},function(a){})},loadUsersStatistic:function(){var n={userId:a("#userSelect").val(),quizId:d,testId:a("#testSelect").val()};c.toggleLoadBox(!1);b.ajaxPost("statisticLoad",n,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 n=a("#wpProQuiz_ctr_"+b);c.setStatisticData(n,d)});a("#testSelect option:gt(0)").remove();
62
- 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.parseFormData(b.formData);c.toggleLoadBox(!0)})},loadUsersStatistic_:function(n,e){var g={userId:n,quizId:d,testId:e};c.toggleLoadBox(!1);b.ajaxPost("statisticLoad",g,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 n=a("#wpProQuiz_ctr_"+
63
- b);c.setStatisticData(n,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.parseFormData(b.formData);a("#userSelect").val(n);a("#testSelect").val(e);c.toggleLoadBox(!0)})},parseFormData:function(b){var c=a("#wpProQuiz_form_box");null==b?c.hide():(a.each(b,function(b,c){a("#form_id_"+b).text(c)}),c.show())},setStatisticData:function(a,
 
64
  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);a.find(".wpProQuiz_cCreateTime").text(b.date)},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 g=a("#userSelect").val();confirm(wpProQuizLocalize.reset_statistics_msg)&&
65
- (e={quizId:d,userId:g,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:g.val(),nav:Number(e)};c.toggleLoadBox(!1);b.ajaxPost("statisticLoadOverview",e,function(b){var d=a("#wpProQuiz_statistics_overview_data"),e=d.children(),g=e.first().clone();e.slice(1).remove();a.each(b.items,
66
- function(){var b=g.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)});g.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=
67
- g.val();1==a?h.hide():h.show();a==g.children().length?m.hide():m.show()},refresh:function(){"users"==e?c.loadUsersStatistic():"formOverview"==e?c.loadFormsOverview(!0):c.loadStatisticOverview(!0)},loadFormsOverview:function(e){e={quizId:d,pageLimit:a("#wpProQuiz_fromPageLimit").val(),onlyUser:a("#wpProQuiz_formUser").val(),page:a("#wpProQuiz_formCurrentPage").val(),nav:Number(e)};c.toggleLoadBox(!1);b.ajaxPost("statisticLoadFormOverview",e,function(b){var d=a("#wpProQuiz_statistics_form_data"),e=
68
- d.children(),g=e.first().clone();e.slice(1).remove();a.each(b.items,function(){var b=g.clone();c.setStatisticData(b,this);b.find("a").text(this.userName).data("userId",this.userId).data("testId",this.testId).click(function(){c.switchTabOnLoad("users");c.loadUsersStatistic_(a(this).data("userId"),a(this).data("testId"));return!1});b.show().appendTo(d)});g.remove();c.toggleLoadBox(!0);void 0!=b.page&&c.handleFormNav(b.page)})},handleFormNav:function(b){for(var d=a("#wpProQuiz_formCurrentPage").empty(),
69
- e=1;e<=b;e++)a(document.createElement("option")).val(e).text(e).appendTo(d);c.checkFormNavBar()},checkFormNavBar:function(){var b=a("#wpProQuiz_formCurrentPage").val();1==b?a("#wpProQuiz_formPageLeft").hide():a("#wpProQuiz_formPageLeft").show();b==a("#wpProQuiz_formCurrentPage").children().length?a("#wpProQuiz_formPageRight").hide():a("#wpProQuiz_formPageRight").show()},switchTabOnLoad:function(b){a(".wpProQuiz_tab").removeClass("button-primary").addClass("button-secondary");a(".wpProQuiz_tabContent").hide();
70
- var c=a("#wpProQuiz_typeOverview");"users"==b?(e="users",a("#wpProQuiz_tabUsers").show(),c=a("#wpProQuiz_typeUser")):"formOverview"==b?(e="formOverview",a("#wpProQuiz_tabFormOverview").show(),c=a("#wpProQuiz_typeForm")):(e="overview",a("#wpProQuiz_tabOverview").show());c.removeClass("button-secondary").addClass("button-primary")}};(function(){a("#userSelect, #testSelect").change(function(){c.loadUsersStatistic()});a(".wpProQuiz_update").click(function(){c.refresh()});a("#wpProQuiz_reset").click(function(){c.reset(0)});
71
- 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");b.removeClass("button-secondary").addClass("button-primary");a(".wpProQuiz_tabContent").hide();"wpProQuiz_typeUser"==b.attr("id")?(e="users",a("#wpProQuiz_tabUsers").show(),c.loadUsersStatistic()):"wpProQuiz_typeForm"==b.attr("id")?(e="formOverview",a("#wpProQuiz_tabFormOverview").show(),
72
- c.loadFormsOverview(!0)):(e="overview",a("#wpProQuiz_tabOverview").show(),c.loadStatisticOverview(!0));return!1});a("#wpProQuiz_onlyCompleted").change(function(){g.val(1);c.loadStatisticOverview(!0)});a("#wpProQuiz_pageLimit").change(function(){g.val(1);c.loadStatisticOverview(!0)});h.click(function(){g.val(Number(g.val())-1);c.loadStatisticOverview(!1);c.checkNavBar()});m.click(function(){g.val(Number(g.val())+1);c.loadStatisticOverview(!1);c.checkNavBar()});g.change(function(){c.loadStatisticOverview(!1);
73
- c.checkNavBar()});a("#wpProQuiz_formUser, #wpProQuiz_fromPageLimit").change(function(){a("#wpProQuiz_formCurrentPage").val(1);c.loadFormsOverview(!0)});a("#wpProQuiz_formPageLeft").click(function(){a("#wpProQuiz_formCurrentPage").val(Number(g.val())-1);c.loadFormsOverview(!1);c.checkFormNavBar()});a("#wpProQuiz_formPageRight").click(function(){a("#wpProQuiz_formCurrentPage").val(Number(g.val())+1);c.loadFormsOverview(!1);c.checkFormNavBar()});a("#wpProQuiz_formCurrentPage").change(function(){c.loadFormsOverview(!1);
74
- c.checkFormNavBar()});c.loadUsersStatistic()})()},p=function(){var c=a("#quizId").val(),d=null,e=null,g={data:{quizId:c,users:-1,pageLimit:100,dateFrom:0,dateTo:0,generateNav:0},changeFilter:function(){var b=function(a){a=a.datepicker("getDate");return null===a?0:a.getTime()/1E3};a.extend(this.data,{users:a("#wpProQuiz_historyUser").val(),pageLimit:a("#wpProQuiz_historyPageLimit").val(),dateFrom:b(a("#datepickerFrom")),dateTo:b(a("#datepickerTo")),generateNav:1});return this.data}},h={data:{pageLimit:100,
75
- onlyCompleted:0,generateNav:0,quizId:c},changeFilter:function(){a.extend(this.data,{pageLimit:a("#wpProQuiz_overviewPageLimit").val(),onlyCompleted:Number(a("#wpProQuiz_overviewOnlyCompleted").is(":checked")),generateNav:1})}},m={deleteUserStatistic:function(d,e){if(!confirm(wpProQuizLocalize.reset_statistics_msg))return!1;b.ajaxPost("statisticResetNew",{refId:d,userId:e,quizId:c,type:0},function(){a("#wpProQuiz_user_overlay").hide();g.changeFilter();k.loadHistoryAjax();h.changeFilter();k.loadOverviewAjax()})},
76
- deleteAll:function(){if(!confirm(wpProQuizLocalize.reset_statistics_msg))return!1;b.ajaxPost("statisticResetNew",{quizId:c,type:1},function(){g.changeFilter();k.loadHistoryAjax();h.changeFilter();k.loadOverviewAjax()})}},k={loadHistoryAjax:function(){var c=a.extend({page:g.data.generateNav?1:d.getCurrentPage()},g.data);k.loadBox(!0);var e=a("#wpProQuiz_historyLoadContext").hide();b.ajaxPost("statisticLoadHistory",c,function(b){e.html(b.html).show();b.navi&&d.setNumPage(b.navi);g.data.generateNav=
77
- 0;e.find(".user_statistic").click(function(){k.loadUserAjax(0,a(this).data("ref_id"),!1);return!1});e.find(".wpProQuiz_delete").click(function(){m.deleteUserStatistic(a(this).parents("tr").find(".user_statistic").data("ref_id"),0);return!1});k.loadBox(!1)})},loadUserAjax:function(d,e,g){a("#wpProQuiz_user_overlay, #wpProQuiz_loadUserData").show();var h=a("#wpProQuiz_user_content").hide();b.ajaxPost("statisticLoadUser",{quizId:c,userId:d,refId:e,avg:Number(g)},function(b){h.html(b.html);h.find(".wpProQuiz_update").click(function(){k.loadUserAjax(d,
78
- e,g);return!1});h.find("#wpProQuiz_resetUserStatistic").click(function(){m.deleteUserStatistic(e,d)});h.find(".statistic_data").click(function(){a(this).parents("tr").next().toggle("fast");return!1});a("#wpProQuiz_loadUserData").hide();h.show()})},loadBox:function(b,c){b?a("#wpProQuiz_loadDataHistory").show():a("#wpProQuiz_loadDataHistory").hide()},loadOverviewAjax:function(){var c=a.extend({page:h.data.generateNav?1:e.getCurrentPage()},h.data);a("#wpProQuiz_loadDataOverview").show();var d=a("#wpProQuiz_overviewLoadContext").hide();
79
- b.ajaxPost("statisticLoadOverviewNew",c,function(b){d.html(b.html).show();b.navi&&e.setNumPage(b.navi);h.data.generateNav=0;d.find(".user_statistic").click(function(){k.loadUserAjax(a(this).data("user_id"),0,!0);return!1});d.find(".wpProQuiz_delete").click(function(){m.deleteUserStatistic(0,a(this).parents("tr").find(".user_statistic").data("user_id"));return!1});a("#wpProQuiz_loadDataOverview").hide()})}};(function(){d=new r(a("#historyNavigation"),{onChange:function(){k.loadHistoryAjax()}});e=new r(a("#overviewNavigation"),
80
  {onChange:function(){k.loadOverviewAjax()}});a("#datepickerFrom").datepicker({closeText:wpProQuizLocalize.closeText,currentText:wpProQuizLocalize.currentText,monthNames:wpProQuizLocalize.monthNames,monthNamesShort:wpProQuizLocalize.monthNamesShort,dayNames:wpProQuizLocalize.dayNames,dayNamesShort:wpProQuizLocalize.dayNamesShort,dayNamesMin:wpProQuizLocalize.dayNamesMin,dateFormat:wpProQuizLocalize.dateFormat,firstDay:wpProQuizLocalize.firstDay,changeMonth:!0,onClose:function(b){a("#datepickerTo").datepicker("option",
81
  "minDate",b)}});a("#datepickerTo").datepicker({closeText:wpProQuizLocalize.closeText,currentText:wpProQuizLocalize.currentText,monthNames:wpProQuizLocalize.monthNames,monthNamesShort:wpProQuizLocalize.monthNamesShort,dayNames:wpProQuizLocalize.dayNames,dayNamesShort:wpProQuizLocalize.dayNamesShort,dayNamesMin:wpProQuizLocalize.dayNamesMin,dateFormat:wpProQuizLocalize.dateFormat,firstDay:wpProQuizLocalize.firstDay,changeMonth:!0,onClose:function(b){a("#datepickerFrom").datepicker("option","maxDate",
82
  b)}});a("#filter").click(function(){g.changeFilter();k.loadHistoryAjax()});a("#wpProQuiz_overlay_close").click(function(){a("#wpProQuiz_user_overlay").hide()});a("#wpProQuiz_tabHistory .wpProQuiz_update").click(function(){g.changeFilter();k.loadHistoryAjax();return!1});a("#wpProQuiz_tabOverview .wpProQuiz_update").click(function(){h.changeFilter();k.loadOverviewAjax();return!1});a(".wpProQuiz_resetComplete").click(function(){m.deleteAll();return!1});a("#overviewFilter").click(function(){h.changeFilter();
83
- k.loadOverviewAjax()});g.changeFilter();k.loadHistoryAjax();h.changeFilter();k.loadOverviewAjax()})()};(function(){h();var b=a.noop;a(".wpProQuiz_questionEdit").length?b=d:a(".wpProQuiz_globalSettings").length?b=c:a(".wpProQuiz_statistics").length?b=e:a(".wpProQuiz_statisticsNew").length&&(b=p);b();a(".wpProQuiz_demoImgBox a").mouseover(function(b){var c=a(this),d=a(document).width(),c=c.siblings().outerWidth(!0);b.pageX+c>d&&(b=d-(b.pageX+c+30),a(this).next().css("left",b+"px"));a(this).next().show()}).mouseout(function(){a(this).next().hide()}).click(function(){return!1})})()})()});
1
+ jQuery(document).ready(function(a){function q(c,e){var d={onChange:null},b={contain:null,pageLeft:null,pageRight:null,currentPage:null},h=function(){var a=b.currentPage.children().length,f=Number(b.currentPage.val());b.pageLeft.hide();b.pageRight.hide();1<f&&b.pageLeft.show();f+1<=a&&b.pageRight.show()};this.getCurrentPage=function(){return b.currentPage.val()};this.setNumPage=function(c){b.currentPage.empty();for(var f=1;f<=c;f++)a(document.createElement("option")).val(f).text(f).appendTo(b.currentPage);
2
+ h()};(function(){a.extend(b,{contain:c,pageLeft:c.find(".navigationLeft"),pageRight:c.find(".navigationRight"),currentPage:c.find(".navigationCurrentPage")});a.extend(d,e);b.pageLeft.click(function(){b.currentPage.val(Number(b.currentPage.val())-1);h();if(d.onChange)d.onChange(b.currentPage.val())});b.pageRight.click(function(){b.currentPage.val(Number(b.currentPage.val())+1);h();if(d.onChange)d.onChange(b.currentPage.val())});b.currentPage.change(function(){h();if(d.onChange)d.onChange(b.currentPage.val())})})()}
3
+ a.fn.wpProQuiz_preview=function(){var c={openPreview:function(c){window.open(a(c).attr("href"),"wpProQuizPreview","width=900,height=900")}};(function(){a(".wpProQuiz_prview").click(function(a){c.openPreview(this);a.preventDefault()})})()};a.fn.wpProQuiz_quizOverall=function(){function c(b){b=a.trim(b);return!b||0===b.length}function e(b,c,d){a.post(ajaxurl,{action:"wp_pro_quiz_admin_ajax",func:b,data:c},d,"json")}var d={changeExport:function(b){$input=a(b);$export=a(".wpProQuiz_exportList");$export2=
4
+ a(".wpProQuiz_setQuizCategoryList");$ul=$export.find("ul").first();$ul2=$export2.find("ul").first();$export.find("li").remove();$export2.find("li").remove();a('input[name="exportItems"]').each(function(){$this=a(this);if(this.checked){var b=$this.parent().parent().find(".wpProQuiz_quizName a:eq(0)").text();a("<li>"+b+"</li>").appendTo($ul);a("<li>"+b+"</li>").appendTo($ul2)}})},startExport:function(){$ele=a('input[name="exportItems"]:checked');if(1>$ele.length)return alert(wpProQuizLocalize.no_selected_quiz),
5
+ !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},setCategoriesStart:function(){$ele=a('input[name="exportItems"]:checked');if(1>$ele.length)return alert(wpProQuizLocalize.no_selected_quiz),!1;var b=[];a('input[name="exportItems"]').each(function(){$this=a(this);this.checked&&b.push(this.value)});var c={categoryId:a('select[name="category"]').val(),
6
+ quizIds:b};a("#ajaxLoad").show();e("setQuizMultipleCategories",c,function(a){location.reload()});return!0},addCategory:function(){var b=a.trim(a('input[name="categoryAdd"]').val());c(b)||e("categoryAdd",{categoryName:b,type:"quiz"},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","selected"),a('select[name="category"]').append(b).change())})}};(function(){a(".wpProQuiz_delete").click(function(a){return confirm(wpProQuizLocalize.delete_msg)?
7
+ !0:(a.preventDefault(),!1)});a(".wpProQuiz_import").click(function(b){b.preventDefault();a(".wpProQuiz_importList").show("fast");a(".wpProQuiz_exportList, .wpProQuiz_setQuizCategoryList").hide();a(".wpProQuiz_exportCheck").hide()});a(".wpProQuiz_export").click(function(b){b.preventDefault();a(".wpProQuiz_exportList").show("fast");a(".wpProQuiz_exportCheck").show("fast");a(".wpProQuiz_importList, .wpProQuiz_setQuizCategoryList").hide()});a(".wpProQuiz_setQuizCategory").click(function(b){b.preventDefault();
8
+ a(".wpProQuiz_setQuizCategoryList").show("fast");a(".wpProQuiz_exportCheck").show("fast");a(".wpProQuiz_importList, .wpProQuiz_exportList").hide()});a('input[name="exportItems"]').change(function(){d.changeExport(this)});a('input[name="exportItemsAll"]').change(function(){var b=a('input[name="exportItems"]');this.checked?b.attr("checked",!0):b.attr("checked",!1);b.change()});a("#exportStart").click(function(a){d.startExport()||a.preventDefault()});a("#setCategoriesStart").click(function(a){d.setCategoriesStart()||
9
+ a.preventDefault()});a('select[name="category"]').change(function(){var b=a(this),c=a("#categoryAddBox").hide();"-1"==b.val()&&c.show()}).change();a("#categoryAddBtn").click(function(){d.addCategory()})})()};a.fn.wpProQuiz_questionOverall=function(){var c={saveSort:function(){var e={action:"wp_pro_quiz_update_sort",sort:c.parseSortArray()},d=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=save_sort";a.post(d,e,function(b){a("#sortMsg").show(400).delay(1E3).hide(400)})},
10
+ parseSortArray:function(){var c=[];a("tbody tr").each(function(){c.push(this.id.replace("wpProQuiz_questionId_",""))});return c},sortUpdate:function(c,d){a(".wpProQuiz_questionOverall tbody").children().each(function(){$t=a(this).children().first().text(a(this).index()+1)})},loadQuestionCopy:function(){var c=a("#questionCopySelect"),d=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=load_question";c.hide();c.empty();a("#loadDataImg").show();a.post(d,
11
+ {action:"wp_pro_quiz_load_question",excludeId:1},function(b){a.each(b,function(b,d){var f=a(document.createElement("optgroup"));f.attr("label",d.name);a.each(d.question,function(b,c){a(document.createElement("option")).val(c.id).text(c.name).appendTo(f)});c.append(f)});a("#loadDataImg").hide();c.show()},"json")}};(function(){a(".wp-list-table tbody").sortable({handle:".wpProQuiz_move",update:c.sortUpdate});a(".wpProQuiz_delete").click(function(a){return confirm(wpProQuizLocalize.delete_msg)?!0:(a.preventDefault(),
12
+ !1)});a("#wpProQuiz_saveSort").click(function(a){a.preventDefault();c.saveSort()});a("#wpProQuiz_questionCopy").click(function(e){var d=a(".wpProQuiz_questionCopy");d.is(":visible")?d.hide():(d.show(),c.loadQuestionCopy());e.preventDefault()})})()};a.fn.wpProQuiz_quizEdit=function(){function c(b,c,d){a.post(ajaxurl,{action:"wp_pro_quiz_admin_ajax",func:b,data:c},d,"json")}var e={addCategory:function(){var b=a.trim(a('input[name="categoryAdd"]').val());d(b)||c("categoryAdd",{categoryName:b,type:"quiz"},
13
+ 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","selected"),a('select[name="category"]').append(b).change())})},addResult:function(){a("#resultList").children().each(function(){if("none"==a(this).css("display")){var b=a(this),c=b.find('textarea[name="resultTextGrade[text][]"]'),d=c.attr("id"),f=!0;b.find('input[name="resultTextGrade[prozent][]"]').val("0");b.find('input[name="resultTextGrade[activ][]"]').val("1").keyup();
14
+ void 0==tinymce.editors[d]||tinymce.editors[d].isHidden()||(f=!1);void 0==switchEditors||f||(switchEditors.go(d,"toggle"),switchEditors.go(d,"toggle"));void 0!=tinymce.editors[d]?tinymce.editors[d].setContent(""):c.val("");void 0==tinymce.editors[d]||f||tinyMCE.execCommand("mceRemoveControl",!1,d);b.parent().children(":visible").last().after(b);void 0==tinymce.editors[d]||f||tinyMCE.execCommand("mceAddControl",!1,d);a(this).show();void 0==switchEditors||f||switchEditors.go(d,"toggle");return!1}})},
15
+ deleteResult:function(b){a(b).parent().parent().hide();a(b).siblings('input[name="resultTextGrade[activ][]"]').val("0")},changeResult:function(b){b=a(b);if(e.validResultInput(b.val()))return b.siblings(".resultProzent").text(b.val()),b.removeAttr("style"),!0;b.css("background-color","#FF9696");return!1},validResultInput:function(a){if(d(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(d(a("#wpProQuiz_title").val()))return alert(wpProQuizLocalize.no_title_msg),
16
+ !1;var b="",b=void 0==tinymce.editors.text||tinymce.editors.text.isHidden()?a('textarea[name="text"]').val():tinymce.editors.text.getContent();if(d(b))return alert(wpProQuizLocalize.no_quiz_start_msg),!1;if(a("#wpProQuiz_resultGradeEnabled:checked").length){var c=!0;a("#resultList").children().each(function(){if(a(this).is(":visible")&&!e.validResultInput(a(this).find('input[name="resultTextGrade[prozent][]"]').val()))return c=!1});if(!c)return alert(wpProQuizLocalize.fail_grade_result),!1}return!0},
17
+ 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(b){a("#resetLockMsg").show("fast").delay(2E3).hide("fast")})},generateFormIds:function(){var b=0;a("#form_table tbody > tr").each(function(){a(this).find('[name^="form[]"]').each(function(){var c=a(this).attr("name").substr(6);a(this).attr("name","form["+b+"]"+c)});++b})},updateFormIds:function(){var b=
18
+ -1,c=a(".emailFormVariables option:selected").val(),e=a(".formVariables").empty(),f=a(".emailFormVariables").empty().append('<option value="-1"></option>');-1<a(".emailFormVariables").data("default")&&(c=a(".emailFormVariables").data("default"),a(".emailFormVariables").data("default",-1));a("#form_table tbody > tr").each(function(){a(this).children().first().text(b);var c=a(this).find(".formFieldName").val(),l=a(this).find('[name="form[][type]"] option:selected'),g=a(this).find('[name="form[][fieldname]"]').val();
19
+ 0<=b&&!d(c)&&e.append(a("<li><span>$form{"+b+"}</span> - "+c+"</li>"));4==l.val()&&f.append(a('<option value="'+b+'">'+g+"</option>"));b++});a('.emailFormVariables option[value="'+c+'"]').prop("selected",!0)}},d=function(b){b=a.trim(b);return!b||0===b.length};(function(){a("#statistics_on").change(function(){this.checked?a("#statistics_ip_lock_tr").show():a("#statistics_ip_lock_tr").hide()});a(".addResult").click(function(){e.addResult()});a(".deleteResult").click(function(a){e.deleteResult(this)});
20
+ a('input[name="resultTextGrade[prozent][]"]').keyup(function(a){e.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(b){e.validInput()?e.generateFormIds():b.preventDefault();a('select[name="prerequisiteList[]"] option').attr("selected","selected")});a('input[name="template"]').click(function(b){if("0"==
21
+ a('select[name="templateSaveList"]').val()&&d(a('input[name="templateName"]').val()))return alert(wpProQuizLocalize.temploate_no_name),b.preventDefault(),!1;e.generateFormIds();a('select[name="prerequisiteList[]"] option').attr("selected","selected")});a('select[name="templateSaveList"]').change(function(){var b=a('input[name="templateName"]');"0"==a(this).val()?b.show():b.hide()}).change();a('input[name="quizRunOnce"]').change(function(b){this.checked?(a("#wpProQuiz_quiz_run_once_type").show(),a('input[name="quizRunOnceType"]:checked').change()):
22
+ a("#wpProQuiz_quiz_run_once_type").hide()});a('input[name="quizRunOnceType"]').change(function(b){!this.checked||"1"!=this.value&&"3"!=this.value?a("#wpProQuiz_quiz_run_once_cookie").hide():a("#wpProQuiz_quiz_run_once_cookie").show()});a('input[name="resetQuizLock"]').click(function(a){e.resetLock();return!1});a(".wpProQuiz_demoBox a").mouseover(function(b){var c=a(this),d=a(document).width(),c=c.siblings().outerWidth(!0);b.pageX+c>d&&(b=d-(b.pageX+c+30),a(this).next().css("left",b+"px"));a(this).next().show()}).mouseout(function(){a(this).next().hide()}).click(function(){return!1});
23
+ a('input[name="showMaxQuestion"]').change(function(){this.checked?a("#wpProQuiz_showMaxBox").show():a("#wpProQuiz_showMaxBox").hide()});a("#btnPrerequisiteAdd").click(function(){a('select[name="quizList"] option:selected').removeAttr("selected").appendTo('select[name="prerequisiteList[]"]')});a("#btnPrerequisiteDelete").click(function(){a('select[name="prerequisiteList[]"] option:selected').removeAttr("selected").appendTo('select[name="quizList"]')});a('input[name="prerequisite"]').change(function(){this.checked?
24
+ 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?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();
25
+ 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("#form_add").click(function(){a("#form_table tbody > tr:eq(0)").clone(!0).appendTo("#form_table tbody").show();e.updateFormIds()});a('input[name="form_delete"]').click(function(){var b=a(this).parents("tr");"0"!=b.find('input[name="form[][form_id]"]').val()?(b.find('input[name="form[][form_delete]"]').val(1),
26
+ b.hide()):b.remove();e.updateFormIds()});a("#form_table tbody").sortable({handle:".form_move",update:e.updateFormIds});a(".form_move").click(function(){return!1});a('select[name="form[][type]"]').change(function(){switch(Number(a(this).val())){case 7:case 8:a(this).siblings(".editDropDown").show();break;default:a(this).siblings(".editDropDown, .dropDownEditBox").hide()}}).change();a(".editDropDown").click(function(){a(".dropDownEditBox").not(a(this).siblings(".dropDownEditBox").toggle()).hide();return!1});
27
+ a(".dropDownEditBox input").click(function(){a(this).parent().hide()});a('.formFieldName, select[name="form[][type]"]').change(function(){e.updateFormIds()});a('select[name="category"]').change(function(){var b=a(this),c=a("#categoryAddBox").hide();"-1"==b.val()&&c.show()}).change();a("#categoryAddBtn").click(function(){e.addCategory()});a('input[name="emailNotification"]').change(function(){var b=a("#adminEmailSettings tr:gt(0)");0<a('input[name="emailNotification"]:checked').val()?b.show():b.hide()}).change();
28
+ a('input[name="userEmailNotification"]').change(function(){var b=a("#userEmailSettings tr:gt(0)");0<a('input[name="userEmailNotification"]:checked').val()?b.show():b.hide()}).change();e.updateFormIds();a('input[name="email[html]"]').change(function(){if(void 0==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",
29
+ "tmce"):switchEditors.go("userEmailEditor","html")}).change()})()};a.fn.wpProQuiz_statistics=function(){var c="wpProQuiz_typeAnonymeUser",e=!0,d={loadStatistics:function(b){var c=(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(c,b,d.setStatistics,"json")},setStatistics:function(b){var d=
30
+ a(".wpProQuiz_statistics_table"),e=d.find("tbody");if("wpProQuiz_typeOverview"!=c){var f=function(a,b,f){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);1==f&&d.find(".wpProQuiz_cResult").text(b.result+"%")};f(d,b.clear,!1);a.each(b.items,function(a,b){f(e.find("#wpProQuiz_tr_"+b.id),b,!1)});f(d.find("tfoot"),b.global,!0);
31
+ a("#wpProQuiz_loadData").hide();a("#wpProQuiz_statistics_content, .wpProQuiz_statistics_table").show()}},loadOverview:function(){a(".wpProQuiz_statistics_table, #wpProQuiz_statistics_content, #wpProQuiz_statistics_overview").hide();a("#wpProQuiz_loadData").show();var b=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=load_statistics",h={action:"wp_pro_quiz_load_statistics",overview:!0,pageLimit:a("#wpProQuiz_pageLimit").val(),onlyCompleted:Number(a("#wpProQuiz_onlyCompleted").is(":checked")),
32
+ page:a("#wpProQuiz_currentPage").val(),generatePageNav:Number(e)};a.post(b,h,function(b){a("#wpProQuiz_statistics_overview_data").empty();if("wpProQuiz_typeOverview"==c){var f=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(b.items,function(b,
33
+ c){var d=f.clone();d.find("a").text(c.userName).data("userId",c.userId).click(function(){a("#userSelect").val(a(this).data("userId"));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");
34
+ a("#wpProQuiz_statistics_overview_data").append(d)});void 0!=b.page&&(d.setPageNav(b.page),e=!1);a("#wpProQuiz_loadData").hide();a("#wpProQuiz_statistics_overview").show()}},"json")},loadFormOverview:function(){a("#wpProQuiz_tabFormOverview").show()},changeTab:function(b){c=b;"wpProQuiz_typeRegisteredUser"==b?d.loadStatistics(a("#userSelect").val()):"wpProQuiz_typeAnonymeUser"==b?d.loadStatistics(0):"wpProQuiz_typeForm"==b?d.loadFormOverview():d.loadOverview()},resetStatistic:function(b){var e="wpProQuiz_typeRegisteredUser"==
35
+ c?a("#userSelect").val():0,n=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=reset";a.post(n,{action:"wp_pro_quiz_statistics",userId:e,complete:b},function(a){d.changeTab(c)})},setPageNav:function(b){b=Math.ceil(b/a("#wpProQuiz_pageLimit").val());a("#wpProQuiz_currentPage").empty();for(var c=1;c<=b;c++)a(document.createElement("option")).val(c).text(c).appendTo(a("#wpProQuiz_currentPage"));a("#wpProQuiz_pageLeft, #wpProQuiz_pageRight").hide();1<a("#wpProQuiz_currentPage option").length&&
36
+ a("#wpProQuiz_pageRight").show()}};(function(){a(".wpProQuiz_tab").click(function(b){b=a(this);if(b.hasClass("button-primary"))return!1;"wpProQuiz_typeRegisteredUser"==b.attr("id")?a("#wpProQuiz_userBox").show():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")});
37
+ a(".wpProQuiz_update").click(function(){d.changeTab(c);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)&&d.resetStatistic(!0);return!1});a("#wpProQuiz_pageLimit, #wpProQuiz_onlyCompleted").change(function(){a("#wpProQuiz_currentPage").val(0);e=!0;d.changeTab(c);return!1});a("#wpProQuiz_currentPage").change(function(){a("#wpProQuiz_pageLeft, #wpProQuiz_pageRight").hide();
38
+ 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():a("#wpProQuiz_pageLeft, #wpProQuiz_pageRight").show());d.changeTab(c)});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",
39
+ "selected");a("#wpProQuiz_currentPage").change();return!1});d.changeTab("wpProQuiz_typeAnonymeUser")})()};a.fn.wpProQuiz_toplist=function(){var c=a("#wpProQuiz_sorting"),e=a("#wpProQuiz_pageLimit"),d=a("#wpProQuiz_currentPage"),b=a("#wpProQuiz_loadData"),h=a("#wpProQuiz_pageLeft"),n=a("#wpProQuiz_pageRight"),f=a("#wpProQuiz_toplistTable tbody"),p=a("#wpProQuiz_toplistTable tbody tr:eq(0)").clone(),l=a("#wpProQuiz_content"),g={loadData:function(f){var p=(window.location.pathname+window.location.search).replace("admin.php",
40
+ "admin-ajax.php")+"&action=load_toplist",k=this,s={action:"wp_pro_quiz_load_toplist",sort:c.val(),limit:e.val(),page:d.val()};void 0!=f&&a.extend(s,f);b.show();l.hide();a.post(p,s,function(a){k.handleDataRequest(a.data);void 0!=a.nav&&k.handleNav(a.nav);b.hide();l.show()},"json")},handleNav:function(b){d.empty();for(var f=1;f<=b.pages;f++)a(document.createElement("option")).val(f).text(f).appendTo(d);this.checkNav()},handleDataRequest:function(b){var c=this;f.empty();a.each(b,function(a,b){var c=
41
+ 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);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(f)});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(f);
42
  a(".wpProQuiz_delete").click(function(){if(confirm(wpProQuizLocalize.confirm_delete_entry)){var b=Array(a(this).closest("tr").find('input[name="checkedData[]"]').val());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=
43
+ a(this).closest("tr"),f=b.find(".inline_editUsername").val(),d=b.find(".inline_editEmail").val();if(c.isEmpty(f)||c.isEmpty(d))return alert(wpProQuizLocalize.not_all_fields_completed),!1;c.loadData({a:"edit",toplistId:b.find('input[name="checkedData[]"]').val(),name:f,email:d});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();
44
+ 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=d.val();1==a?h.hide():h.show();a==d.children().length?n.hide():n.show()},isEmpty:function(b){b=a.trim(b);return!b||0===b.length}};(function(){c.change(function(){g.loadData()});e.change(function(){g.loadData({nav:1})});d.change(function(){g.checkNav();g.loadData()});h.click(function(){d.val(Number(d.val())-1);g.checkNav();
45
+ g.loadData()});n.click(function(){d.val(Number(d.val())+1);g.checkNav();g.loadData()});a("#wpProQuiz_deleteAll").click(function(){g.loadData({a:"deleteAll"})});a("#wpProQuiz_action").click(function(){var b=a("#wpProQuiz_actionName").val();if("0"!=b){var c=a('input[name="checkedData[]"]:checked').map(function(){return a(this).val()}).get();g.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",
46
+ "checked")});g.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();(function(){var c=this,c={displayChecked:function(a,
47
+ b,c,d){a=c?!a.checked:a.checked;d?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(b){b=a.trim(b);return!c.isEmpty(b)&&!isNaN(b)},getMceContent:function(b){var c=tinymce.editors[b];return void 0==c||c.isHidden()?a("#"+b).val():c.getContent()},ajaxPost:function(b,c,d){a.post(ajaxurl,{action:"wp_pro_quiz_admin_ajax",func:b,data:c},d,"json")}},e=function(){a(".wpProQuiz_tab_wrapper a").click(function(){var b=
48
+ a(this),c=b.data("tab"),d=b.siblings(".button-primary").removeClass("button-primary").addClass("button-secondary");b.removeClass("button-secondary").addClass("button-primary");a(d.data("tab")).hide("fast");a(c).show("fast");a(document).trigger({type:"changeTab",tabId:c});return!1})},d=function(){var b={categoryDelete:function(b,f){c.ajaxPost("categoryDelete",{categoryId:b},function(c){c.err||(a('select[name="category'+f+'"] option[value="'+b+'"]').remove(),a('select[name="category'+f+'"]').change())})},
49
+ categoryEdit:function(b,f,d){var e={categoryId:b,categoryName:a.trim(f)};c.isEmpty(f)?alert(wpProQuizLocalize.category_no_name):c.ajaxPost("categoryEdit",e,function(c){c.err||(a('select[name="category'+d+'"] option[value="'+b+'"]').text(e.categoryName),a('select[name="category'+d+'"]').change())})},changeTimeFormat:function(b,c){"0"!=c.val()&&a('input[name="'+b+'"]').val(c.val())},templateDelete:function(b,f){c.ajaxPost("templateDelete",{templateId:b,type:f},function(c){c.err||(f?(a('select[name="templateQuestion"] option[value="'+
50
+ b+'"]').remove(),a('select[name="templateQuestion"]').change()):(a('select[name="templateQuiz"] option[value="'+b+'"]').remove(),a('select[name="templateQuiz"]').change()))})},templateEdit:function(b,f,d){if(c.isEmpty(f))alert(wpProQuizLocalize.category_no_name);else{var e={templateId:b,name:a.trim(f),type:d};c.ajaxPost("templateEdit",e,function(c){c.err||(d?(a('select[name="templateQuestion"] option[value="'+b+'"]').text(e.name),a('select[name="templateQuestion"]').change()):(a('select[name="templateQuiz"] option[value="'+
51
+ b+'"]').text(e.name),a('select[name="templateQuiz"]').change()))})}}};(function(){a('select[name="category"]').change(function(){a('input[name="categoryEditText"]').val(a(this).find(":selected").text())}).change();a('input[name="categoryDelete"]').click(function(){var c=a('select[name="category"] option:selected').val();b.categoryDelete(c,"")});a('input[name="categoryEdit"]').click(function(){var c=a('select[name="category"] option:selected').val(),d=a('input[name="categoryEditText"]').val();b.categoryEdit(c,
52
+ d,"")});a('select[name="categoryQuiz"]').change(function(){a('input[name="categoryQuizEditText"]').val(a(this).find(":selected").text())}).change();a('input[name="categoryQuizDelete"]').click(function(){var c=a('select[name="categoryQuiz"] option:selected').val();b.categoryDelete(c,"Quiz")});a('input[name="categoryQuizEdit"]').click(function(){var c=a('select[name="categoryQuiz"] option:selected').val(),d=a('input[name="categoryQuizEditText"]').val();b.categoryEdit(c,d,"Quiz")});a("#statistic_time_format_select").change(function(){b.changeTimeFormat("statisticTimeFormat",
53
+ 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==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",
54
+ "html")}).change();a('select[name="templateQuiz"]').change(function(){a('input[name="templateQuizEditText"]').val(a(this).find(":selected").text())}).change();a('select[name="templateQuestion"]').change(function(){a('input[name="templateQuestionEditText"]').val(a(this).find(":selected").text())}).change();a('input[name="templateQuizDelete"]').click(function(){var c=a('select[name="templateQuiz"] option:selected').val();b.templateDelete(c,0)});a('input[name="templateQuestionDelete"]').click(function(){var c=
55
+ a('select[name="templateQuestion"] option:selected').val();b.templateDelete(c,1)});a('input[name="templateQuizEdit"]').click(function(){var c=a('select[name="templateQuiz"] option:selected').val(),d=a('input[name="templateQuizEditText"]').val();b.templateEdit(c,d,0)});a('input[name="templateQuestionEdit"]').click(function(){var c=a('select[name="templateQuestion"] option:selected').val(),d=a('input[name="templateQuestionEditText"]').val();b.templateEdit(c,d,1)})})()},b=function(){var b=this,d=a.noop(),
56
+ e=a(".answer_felder > div"),g=a('input[name="answerPointsActivated"]'),r=a('input[name="points"]'),b={generateArrayIndex:function(){var b=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,f){a(this).find('[name^="answerData"]').each(function(){var a=this.name,f=a.search(/\](\[\w+\])+$/),e=b==c?d:"none";0<f&&(this.name="answerData["+e+a.substring(f,a.length))})})})},
57
+ globalValidate:function(){if(c.isEmpty(c.getMceContent("question")))return alert(wpProQuizLocalize.no_question_msg),!1;if(!g.is(":checked")){var b=r.val();if(!c.isNumber(b)||1>b)return alert(wpProQuizLocalize.no_nummber_points),!1}else if("free_answer"==a('input[name="answerType"]:checked').val())return alert(wpProQuizLocalize.dif_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 b=
58
+ a.trim(a('input[name="categoryAdd"]').val());c.isEmpty(b)||c.ajaxPost("categoryAdd",{categoryName:b},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","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)'),f=b.find(".wpProQuiz_text:eq(0)");
59
+ window.org_send_to_editor=window.send_to_editor;var d=tb_remove;window.send_to_editor=function(b){b=a("img",b)[0].outerHTML;f.val(f.val()+b);c.attr("checked",!0);tb_remove();window.send_to_editor=window.org_send_to_editor};window.tb_remove=function(){window.send_to_editor=window.org_send_to_editor;tb_remove=d;tb_remove()};tb_show("","media-upload.php?type=image&TB_iframe=true")}},h={classic_answer:function(){var b=0,f=0,d=0;a(".classic_answer .answerList").children().each(function(){var e=a(this);
60
+ c.isEmpty(e.find('textarea[name="answerData[][answer]"]').val())||(b++,e.find('input[name="answerData[][correct]"]:checked').length&&f++,e=e.find('input[name="answerData[][points]"]').val(),c.isNumber(e)&&0<=e&&d++)});return b?f||a('input[name="disableCorrect"]').is(":checked")&&a('input[name="answerPointsDiffModusActivated"]').is(":checked")&&a('input[name="answerPointsActivated"]').is(":checked")&&"single"==a('input[name="answerType"]:checked').val()?d!=b&&g.is(":checked")?(alert(wpProQuizLocalize.no_nummber_points_new),
61
+ !1):!0:(alert(wpProQuizLocalize.no_correct_msg),!1):(alert(wpProQuizLocalize.no_answer_msg),!1)},free_answer:function(){return c.isEmpty(a('.free_answer textarea[name="answerData[][answer]"]').val())?(alert(wpProQuizLocalize.no_answer_msg),!1):!0},cloze_answer:function(){return c.isEmpty(c.getMceContent("cloze"))?(alert(wpProQuizLocalize.no_answer_msg),!1):!0},sort_answer:function(){var b=0,f=0;a(".sort_answer .answerList").children().each(function(){var d=a(this);c.isEmpty(d.find('textarea[name="answerData[][answer]"]').val())||
62
+ (b++,d=d.find('input[name="answerData[][points]"]').val(),c.isNumber(d)&&0<=d&&f++)});return b?f!=b&&g.is(":checked")?(alert(wpProQuizLocalize.no_nummber_points_new),!1):!0:(alert(wpProQuizLocalize.no_answer_msg),!1)},matrix_sort_answer:function(){var b=0,d=0,f=!0,e=0;a(".matrix_sort_answer .answerList").children().each(function(){var g=a(this),l=g.find('input[name="answerData[][points]"]').val();c.isEmpty(g.find('textarea[name="answerData[][answer]"]').val())?c.isEmpty(g.find('textarea[name="answerData[][sort_string]"]').val())||
63
+ (e++,c.isNumber(l)&&0<=l&&d++):(b++,e++,c.isEmpty(g.find('textarea[name="answerData[][sort_string]"]').val())&&(f=!1),c.isNumber(l)&&0<=l&&d++)});return b?f?d!=e&&g.is(":checked")?(alert(wpProQuizLocalize.no_nummber_points_new),!1):!0:(alert(wpProQuizLocalize.no_sort_element_criterion),!1):(alert(wpProQuizLocalize.no_answer_msg),!1)},assessment_answer:function(){return c.isEmpty(c.getMceContent("assessment"))?(alert(wpProQuizLocalize.no_answer_msg),!1):!0}};e.hide();(function(){a("#wpProQuiz_tip").change(function(){c.displayChecked(this,
64
+ a("#wpProQuiz_tipBox"))}).change();a("#wpProQuiz_correctSameText").change(function(){c.displayChecked(this,a("#wpProQuiz_incorrectMassageBox"),!0)}).change();a('input[name="answerType"]').click(function(){e.hide();var b=this.value;"single"==b?(a("#singleChoiceOptions").show(),a('input[name="disableCorrect"]').change()):(a("#singleChoiceOptions").hide(),a(".classic_answer .wpProQuiz_classCorrect").parent().parent().show());if("single"==b||"multiple"==b){var c="single"==b?"radio":"checkbox",b="classic_answer";
65
+ 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!=h[b]?h[b]:a.noop();a("."+b).show()});a('input[name="answerType"]:checked').click();a(".deleteAnswer").click(b.answerRemove);a(".addAnswer").click(function(){var c=a(this).siblings("ul"),d=c.find("li:eq(0)").clone();d.find(".wpProQuiz_checkbox").removeAttr("checked");d.find(".wpProQuiz_text").val("");
66
+ d.find(".wpProQuiz_points").val(1);d.find(".deleteAnswer").click(b.answerRemove);d.find(".addMedia").click(b.addMediaClick);d.appendTo(c);return!1});a(".sort_answer ul, .classic_answer ul, .matrix_sort_answer ul").sortable({handle:".wpProQuiz_move"});a("#saveQuestion").click(function(){if(!b.globalValidate())return!1;b.generateArrayIndex();return!0});a(g).change(function(){c.displayChecked(this,a(".wpProQuiz_answerPoints"));c.displayChecked(this,a("#wpProQuiz_showPointsBox"));c.displayChecked(this,
67
+ r,!1,!0);c.displayChecked(this,a('input[name="answerPointsDiffModusActivated"]'),!0,!0);this.checked?(a('input[name="answerPointsDiffModusActivated"]').change(),a('input[name="disableCorrect"]').change()):(a(".classic_answer .wpProQuiz_classCorrect").parent().parent().show(),a('input[name="disableCorrect"]').attr("disabled","disabled"))}).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(){b.addCategory()});
68
+ a(".addMedia").click(b.addMediaClick);a('input[name="answerPointsDiffModusActivated"]').change(function(){c.displayChecked(this,a('input[name="disableCorrect"]'),!0,!0);this.checked?a('input[name="disableCorrect"]').change():a(".classic_answer .wpProQuiz_classCorrect").parent().parent().show()}).change();a('input[name="disableCorrect"]').change(function(){c.displayChecked(this,a(".classic_answer .wpProQuiz_classCorrect").parent().parent(),!0)}).change();a("#clickPointDia").click(function(){a(".pointDia").toggle("fast");
69
+ return!1});a('input[name="template"]').click(function(d){if("0"==a('select[name="templateSaveList"]').val()&&c.isEmpty(a('input[name="templateName"]').val()))return alert(wpProQuizLocalize.temploate_no_name),d.preventDefault(),!1;b.generateArrayIndex()});a('select[name="templateSaveList"]').change(function(){var b=a('input[name="templateName"]');"0"==a(this).val()?b.show():b.hide()}).change()})()},h=function(){var b=this,d=a("#quizId").val(),e="users",g=a("#wpProQuiz_currentPage"),h=a("#wpProQuiz_pageLeft"),
70
+ m=a("#wpProQuiz_pageRight"),k=a("#testSelect"),b={loadStatistic:function(a,b){c.ajaxPost("statisticLoad",{userId:a},function(a){})},loadUsersStatistic:function(){var e={userId:a("#userSelect").val(),quizId:d,testId:a("#testSelect").val()};b.toggleLoadBox(!1);c.ajaxPost("statisticLoad",e,function(c){a.each(c.question,function(){var c=a("#wpProQuiz_tr_"+this.questionId);b.setStatisticData(c,this)});a.each(c.category,function(c,d){var e=a("#wpProQuiz_ctr_"+c);b.setStatisticData(e,d)});a("#testSelect option:gt(0)").remove();
71
+ var d=a("#testSelect");a.each(c.tests,function(){var b=a(document.createElement("option"));b.val(this.id);b.text(this.date);c.testId==this.id&&b.attr("selected",!0);d.append(b)});b.parseFormData(c.formData);b.toggleLoadBox(!0)})},loadUsersStatistic_:function(e,t){var g={userId:e,quizId:d,testId:t};b.toggleLoadBox(!1);c.ajaxPost("statisticLoad",g,function(c){a.each(c.question,function(){var c=a("#wpProQuiz_tr_"+this.questionId);b.setStatisticData(c,this)});a.each(c.category,function(c,d){var e=a("#wpProQuiz_ctr_"+
72
+ c);b.setStatisticData(e,d)});a("#testSelect option:gt(0)").remove();var d=a("#testSelect");a.each(c.tests,function(){var b=a(document.createElement("option"));b.val(this.id);b.text(this.date);c.testId==this.id&&b.attr("selected",!0);d.append(b)});b.parseFormData(c.formData);a("#userSelect").val(e);a("#testSelect").val(t);b.toggleLoadBox(!0)})},parseFormData:function(b){var c=a("#wpProQuiz_form_box");null==b?c.hide():(a.each(b,function(b,c){a("#form_id_"+b).text(c)}),c.show())},setStatisticData:function(a,
73
  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);a.find(".wpProQuiz_cCreateTime").text(b.date)},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 g=a("#userSelect").val();confirm(wpProQuizLocalize.reset_statistics_msg)&&
74
+ (e={quizId:d,userId:g,testId:k.val(),type:e},b.toggleLoadBox(!1),c.ajaxPost("statisticReset",e,function(){b.loadUsersStatistic()}))},loadStatisticOverview:function(e){e={quizId:d,pageLimit:a("#wpProQuiz_pageLimit").val(),onlyCompleted:Number(a("#wpProQuiz_onlyCompleted").is(":checked")),page:g.val(),nav:Number(e)};b.toggleLoadBox(!1);c.ajaxPost("statisticLoadOverview",e,function(c){var d=a("#wpProQuiz_statistics_overview_data"),e=d.children(),g=e.first().clone();e.slice(1).remove();a.each(c.items,
75
+ function(){var c=g.clone();b.setStatisticData(c,this);c.find("a").text(this.userName).data("userId",this.userId).click(function(){a("#userSelect").val(a(this).data("userId"));a("#wpProQuiz_typeUser").click();return!1});c.show().appendTo(d)});g.remove();b.toggleLoadBox(!0);void 0!=c.page&&b.handleNav(c.page)})},handleNav:function(c){for(var d=a("#wpProQuiz_currentPage").empty(),e=1;e<=c;e++)a(document.createElement("option")).val(e).text(e).appendTo(d);b.checkNavBar()},checkNavBar:function(){var a=
76
+ g.val();1==a?h.hide():h.show();a==g.children().length?m.hide():m.show()},refresh:function(){"users"==e?b.loadUsersStatistic():"formOverview"==e?b.loadFormsOverview(!0):b.loadStatisticOverview(!0)},loadFormsOverview:function(e){e={quizId:d,pageLimit:a("#wpProQuiz_fromPageLimit").val(),onlyUser:a("#wpProQuiz_formUser").val(),page:a("#wpProQuiz_formCurrentPage").val(),nav:Number(e)};b.toggleLoadBox(!1);c.ajaxPost("statisticLoadFormOverview",e,function(c){var d=a("#wpProQuiz_statistics_form_data"),e=
77
+ d.children(),g=e.first().clone();e.slice(1).remove();a.each(c.items,function(){var c=g.clone();b.setStatisticData(c,this);c.find("a").text(this.userName).data("userId",this.userId).data("testId",this.testId).click(function(){b.switchTabOnLoad("users");b.loadUsersStatistic_(a(this).data("userId"),a(this).data("testId"));return!1});c.show().appendTo(d)});g.remove();b.toggleLoadBox(!0);void 0!=c.page&&b.handleFormNav(c.page)})},handleFormNav:function(c){for(var d=a("#wpProQuiz_formCurrentPage").empty(),
78
+ e=1;e<=c;e++)a(document.createElement("option")).val(e).text(e).appendTo(d);b.checkFormNavBar()},checkFormNavBar:function(){var b=a("#wpProQuiz_formCurrentPage").val();1==b?a("#wpProQuiz_formPageLeft").hide():a("#wpProQuiz_formPageLeft").show();b==a("#wpProQuiz_formCurrentPage").children().length?a("#wpProQuiz_formPageRight").hide():a("#wpProQuiz_formPageRight").show()},switchTabOnLoad:function(b){a(".wpProQuiz_tab").removeClass("button-primary").addClass("button-secondary");a(".wpProQuiz_tabContent").hide();
79
+ var c=a("#wpProQuiz_typeOverview");"users"==b?(e="users",a("#wpProQuiz_tabUsers").show(),c=a("#wpProQuiz_typeUser")):"formOverview"==b?(e="formOverview",a("#wpProQuiz_tabFormOverview").show(),c=a("#wpProQuiz_typeForm")):(e="overview",a("#wpProQuiz_tabOverview").show());c.removeClass("button-secondary").addClass("button-primary")}};(function(){a("#userSelect, #testSelect").change(function(){b.loadUsersStatistic()});a(".wpProQuiz_update").click(function(){b.refresh()});a("#wpProQuiz_reset").click(function(){b.reset(0)});
80
+ a("#wpProQuiz_resetUser").click(function(){b.reset(1)});a(".wpProQuiz_resetComplete").click(function(){b.reset(2)});a(".wpProQuiz_tab").click(function(){var c=a(this);a(".wpProQuiz_tab").removeClass("button-primary").addClass("button-secondary");c.removeClass("button-secondary").addClass("button-primary");a(".wpProQuiz_tabContent").hide();"wpProQuiz_typeUser"==c.attr("id")?(e="users",a("#wpProQuiz_tabUsers").show(),b.loadUsersStatistic()):"wpProQuiz_typeForm"==c.attr("id")?(e="formOverview",a("#wpProQuiz_tabFormOverview").show(),
81
+ b.loadFormsOverview(!0)):(e="overview",a("#wpProQuiz_tabOverview").show(),b.loadStatisticOverview(!0));return!1});a("#wpProQuiz_onlyCompleted").change(function(){g.val(1);b.loadStatisticOverview(!0)});a("#wpProQuiz_pageLimit").change(function(){g.val(1);b.loadStatisticOverview(!0)});h.click(function(){g.val(Number(g.val())-1);b.loadStatisticOverview(!1);b.checkNavBar()});m.click(function(){g.val(Number(g.val())+1);b.loadStatisticOverview(!1);b.checkNavBar()});g.change(function(){b.loadStatisticOverview(!1);
82
+ b.checkNavBar()});a("#wpProQuiz_formUser, #wpProQuiz_fromPageLimit").change(function(){a("#wpProQuiz_formCurrentPage").val(1);b.loadFormsOverview(!0)});a("#wpProQuiz_formPageLeft").click(function(){a("#wpProQuiz_formCurrentPage").val(Number(g.val())-1);b.loadFormsOverview(!1);b.checkFormNavBar()});a("#wpProQuiz_formPageRight").click(function(){a("#wpProQuiz_formCurrentPage").val(Number(g.val())+1);b.loadFormsOverview(!1);b.checkFormNavBar()});a("#wpProQuiz_formCurrentPage").change(function(){b.loadFormsOverview(!1);
83
+ b.checkFormNavBar()});b.loadUsersStatistic()})()},n=function(){var b=a("#quizId").val(),d=null,e=null,g={data:{quizId:b,users:-1,pageLimit:100,dateFrom:0,dateTo:0,generateNav:0},changeFilter:function(){var b=function(a){a=a.datepicker("getDate");return null===a?0:a.getTime()/1E3};a.extend(this.data,{users:a("#wpProQuiz_historyUser").val(),pageLimit:a("#wpProQuiz_historyPageLimit").val(),dateFrom:b(a("#datepickerFrom")),dateTo:b(a("#datepickerTo")),generateNav:1});return this.data}},h={data:{pageLimit:100,
84
+ onlyCompleted:0,generateNav:0,quizId:b},changeFilter:function(){a.extend(this.data,{pageLimit:a("#wpProQuiz_overviewPageLimit").val(),onlyCompleted:Number(a("#wpProQuiz_overviewOnlyCompleted").is(":checked")),generateNav:1})}},m={deleteUserStatistic:function(d,e){if(!confirm(wpProQuizLocalize.reset_statistics_msg))return!1;c.ajaxPost("statisticResetNew",{refId:d,userId:e,quizId:b,type:0},function(){a("#wpProQuiz_user_overlay").hide();g.changeFilter();k.loadHistoryAjax();h.changeFilter();k.loadOverviewAjax()})},
85
+ deleteAll:function(){if(!confirm(wpProQuizLocalize.reset_statistics_msg))return!1;c.ajaxPost("statisticResetNew",{quizId:b,type:1},function(){g.changeFilter();k.loadHistoryAjax();h.changeFilter();k.loadOverviewAjax()})}},k={loadHistoryAjax:function(){var b=a.extend({page:g.data.generateNav?1:d.getCurrentPage()},g.data);k.loadBox(!0);var e=a("#wpProQuiz_historyLoadContext").hide();c.ajaxPost("statisticLoadHistory",b,function(b){e.html(b.html).show();b.navi&&d.setNumPage(b.navi);g.data.generateNav=
86
+ 0;e.find(".user_statistic").click(function(){k.loadUserAjax(0,a(this).data("ref_id"),!1);return!1});e.find(".wpProQuiz_delete").click(function(){m.deleteUserStatistic(a(this).parents("tr").find(".user_statistic").data("ref_id"),0);return!1});k.loadBox(!1)})},loadUserAjax:function(d,e,g){a("#wpProQuiz_user_overlay, #wpProQuiz_loadUserData").show();var h=a("#wpProQuiz_user_content").hide();c.ajaxPost("statisticLoadUser",{quizId:b,userId:d,refId:e,avg:Number(g)},function(b){h.html(b.html);h.find(".wpProQuiz_update").click(function(){k.loadUserAjax(d,
87
+ e,g);return!1});h.find("#wpProQuiz_resetUserStatistic").click(function(){m.deleteUserStatistic(e,d)});h.find(".statistic_data").click(function(){a(this).parents("tr").next().toggle("fast");return!1});a("#wpProQuiz_loadUserData").hide();h.show()})},loadBox:function(b,c){b?a("#wpProQuiz_loadDataHistory").show():a("#wpProQuiz_loadDataHistory").hide()},loadOverviewAjax:function(){var b=a.extend({page:h.data.generateNav?1:e.getCurrentPage()},h.data);a("#wpProQuiz_loadDataOverview").show();var d=a("#wpProQuiz_overviewLoadContext").hide();
88
+ c.ajaxPost("statisticLoadOverviewNew",b,function(b){d.html(b.html).show();b.navi&&e.setNumPage(b.navi);h.data.generateNav=0;d.find(".user_statistic").click(function(){k.loadUserAjax(a(this).data("user_id"),0,!0);return!1});d.find(".wpProQuiz_delete").click(function(){m.deleteUserStatistic(0,a(this).parents("tr").find(".user_statistic").data("user_id"));return!1});a("#wpProQuiz_loadDataOverview").hide()})}};(function(){d=new q(a("#historyNavigation"),{onChange:function(){k.loadHistoryAjax()}});e=new q(a("#overviewNavigation"),
89
  {onChange:function(){k.loadOverviewAjax()}});a("#datepickerFrom").datepicker({closeText:wpProQuizLocalize.closeText,currentText:wpProQuizLocalize.currentText,monthNames:wpProQuizLocalize.monthNames,monthNamesShort:wpProQuizLocalize.monthNamesShort,dayNames:wpProQuizLocalize.dayNames,dayNamesShort:wpProQuizLocalize.dayNamesShort,dayNamesMin:wpProQuizLocalize.dayNamesMin,dateFormat:wpProQuizLocalize.dateFormat,firstDay:wpProQuizLocalize.firstDay,changeMonth:!0,onClose:function(b){a("#datepickerTo").datepicker("option",
90
  "minDate",b)}});a("#datepickerTo").datepicker({closeText:wpProQuizLocalize.closeText,currentText:wpProQuizLocalize.currentText,monthNames:wpProQuizLocalize.monthNames,monthNamesShort:wpProQuizLocalize.monthNamesShort,dayNames:wpProQuizLocalize.dayNames,dayNamesShort:wpProQuizLocalize.dayNamesShort,dayNamesMin:wpProQuizLocalize.dayNamesMin,dateFormat:wpProQuizLocalize.dateFormat,firstDay:wpProQuizLocalize.firstDay,changeMonth:!0,onClose:function(b){a("#datepickerFrom").datepicker("option","maxDate",
91
  b)}});a("#filter").click(function(){g.changeFilter();k.loadHistoryAjax()});a("#wpProQuiz_overlay_close").click(function(){a("#wpProQuiz_user_overlay").hide()});a("#wpProQuiz_tabHistory .wpProQuiz_update").click(function(){g.changeFilter();k.loadHistoryAjax();return!1});a("#wpProQuiz_tabOverview .wpProQuiz_update").click(function(){h.changeFilter();k.loadOverviewAjax();return!1});a(".wpProQuiz_resetComplete").click(function(){m.deleteAll();return!1});a("#overviewFilter").click(function(){h.changeFilter();
92
+ k.loadOverviewAjax()});g.changeFilter();k.loadHistoryAjax();h.changeFilter();k.loadOverviewAjax()})()};(function(){e();var c=a.noop;a(".wpProQuiz_questionEdit").length?c=b:a(".wpProQuiz_globalSettings").length?c=d:a(".wpProQuiz_statistics").length?c=h:a(".wpProQuiz_statisticsNew").length&&(c=n);c();a(".wpProQuiz_demoImgBox a").mouseover(function(b){var c=a(this),d=a(document).width(),c=c.siblings().outerWidth(!0);b.pageX+c>d&&(b=d-(b.pageX+c+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
@@ -1252,7 +1252,26 @@
1252
  $pointFields.eq(1).text(config.globalPoints);
1253
  $pointFields.eq(2).text(results.comp.result + '%');
1254
 
1255
- $e.find('.wpProQuiz_resultsList > li').eq(plugin.methode.findResultIndex(results.comp.result)).show();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1256
 
1257
  plugin.methode.setAverageResult(results.comp.result, false);
1258
 
@@ -1390,6 +1409,7 @@
1390
  $e.find('.wpProQuiz_clozeCorrect, .wpProQuiz_QuestionButton, .wpProQuiz_resultsList > li').hide();
1391
 
1392
  $e.find('.wpProQuiz_question_page, input[name="tip"]').show();
 
1393
 
1394
  globalElements.results.find('.wpProQuiz_time_limit_expired').hide();
1395
 
1252
  $pointFields.eq(1).text(config.globalPoints);
1253
  $pointFields.eq(2).text(results.comp.result + '%');
1254
 
1255
+ //Result-Text START
1256
+ var $resultText = $e.find('.wpProQuiz_resultsList > li').eq(plugin.methode.findResultIndex(results.comp.result));
1257
+
1258
+ var formData = formClass.getFormData();
1259
+
1260
+ $resultText.find('.wpProQuiz_resultForm').each(function() {
1261
+ var $this = $(this);
1262
+ var formId = $this.data('form_id');
1263
+ var data = formData[formId];
1264
+
1265
+ if(typeof data === 'object') {
1266
+ data = data['day'] + '-' + data['month'] + '-' + data['year'];
1267
+ }
1268
+
1269
+ $this.text(data).show();
1270
+ });
1271
+
1272
+ $resultText.show();
1273
+
1274
+ //Result-Text END
1275
 
1276
  plugin.methode.setAverageResult(results.comp.result, false);
1277
 
1409
  $e.find('.wpProQuiz_clozeCorrect, .wpProQuiz_QuestionButton, .wpProQuiz_resultsList > li').hide();
1410
 
1411
  $e.find('.wpProQuiz_question_page, input[name="tip"]').show();
1412
+ $e.find('.wpProQuiz_resultForm').text('').hide();
1413
 
1414
  globalElements.results.find('.wpProQuiz_time_limit_expired').hide();
1415
 
js/wpProQuiz_front.min.js CHANGED
@@ -1,47 +1,48 @@
1
- (function(g){g.wpProQuizFront=function(M,e){var b=g(M),d=this,h={},B={},V=0,k=null,q=[],W="",E=!1,N=1,X=0,Y=0,F=0,Z=0,G=0,O=0,P=0,x=0,$=0,r=0,aa=0,y=0,ba=0,H=0,Q=0,ca=0,R=0,da=0,S=0,ea=0,fa=0,ga=b.find('input[name="back"]'),z=b.find('input[name="next"]'),m=b.find(".wpProQuiz_quiz"),v=b.find(".wpProQuiz_list"),A=b.find(".wpProQuiz_results"),w=b.find(".wpProQuiz_text"),C=b.find(".wpProQuiz_time_limit"),I=b.find(".wpProQuiz_toplistShowInButton"),T=g(),ha="",U=0,ia=function(){var a=e.timelimit,c=0,b=
2
- {stop:function(){a&&(window.clearInterval(c),C.hide())},start:function(){if(a){var f=1E3*a,g=C.find("span").text(d.methode.parseTime(a)),e=C.find(".wpProQuiz_progress");C.show();var n=+new Date;c=window.setInterval(function(){var a=+new Date-n,c=f-a;500<=a&&g.text(d.methode.parseTime(Math.ceil(c/1E3)));e.css("width",100*(c/f)+"%");0>=c&&(b.stop(),d.methode.finishQuiz(!0))},16)}}};return b}(),u=new function(){function a(a){var c="",b=k[a];b.review?c="#FFB800":b.solved&&(c="#6CA54C");n.eq(a).css("background-color",
3
- c)}function c(a){a.preventDefault();a=a.pageY-J;0>a&&(a=0);a>h&&(a=h);e.attr("style","margin-top: "+-(D*a)+"px !important");p.css({top:a})}function l(a){a.preventDefault();g(document).unbind(".scrollEvent")}var f=[],p=[],e=[],n=[],h=0,J=0,D=0,K=0,t=0,k=[];this.init=function(){f=b.find(".wpProQuiz_reviewQuestion");p=f.find("div");e=f.find("ol");n=e.children();p.mousedown(function(a){a.preventDefault();a.stopPropagation();J=a.pageY-p.offset().top+K;g(document).bind("mouseup.scrollEvent",l);g(document).bind("mousemove.scrollEvent",
4
- c)});n.click(function(a){d.methode.showQuestion(g(this).index())});b.bind("questionSolved",function(c){k[c.values.index].solved=c.values.solved;a(c.values.index)});b.bind("changeQuestion",function(a){n.removeClass("wpProQuiz_reviewQuestionTarget");n.eq(a.values.index).addClass("wpProQuiz_reviewQuestionTarget");a=n.eq(a.values.index);var c=a.offset().top,b=f.offset().top,c=c-b;if(0>c-4||100<c+32)a=b-n.eq(0).offset().top-(b-e.offset().top)+a.position().top,a>t&&(a=t),b=a/D,e.attr("style","margin-top: "+
5
- -a+"px !important"),p.css({top:b})});b.bind("reviewQuestion",function(c){k[c.values.index].review=!k[c.values.index].review;a(c.values.index)});f.bind("mousewheel DOMMouseScroll",function(a){a.preventDefault();a=a.originalEvent;a=20*(a.wheelDelta?-a.wheelDelta/120:a.detail/3);a=K-e.offset().top+a;a>t&&(a=t);0>a&&(a=0);var c=a/D;e.attr("style","margin-top: "+-a+"px !important");p.css({top:c});return!1})};this.show=function(a){r&&f.parent().show();b.find(".wpProQuiz_reviewDiv .wpProQuiz_button2").show();
6
- if(!a){e.attr("style","margin-top: 0px !important");p.css({top:0});a=e.outerHeight();var c=f.height();h=c-p.height();J=0;t=a-c;D=t/h;this.reset();100<a&&p.show();K=p.offset().top}};this.hide=function(){f.parent().hide()};this.toggle=function(){if(r){f.parent().toggle();n.removeClass("wpProQuiz_reviewQuestionTarget");b.find(".wpProQuiz_reviewDiv .wpProQuiz_button2").hide();e.attr("style","margin-top: 0px !important");p.css({top:0});var a=e.outerHeight(),c=f.height();h=c-p.height();J=0;t=a-c;D=t/h;
7
- 100<a&&p.show();K=p.offset().top}};this.reset=function(){for(var a=0,c=n.length;a<c;a++)k[a]={};n.removeClass("wpProQuiz_reviewQuestionTarget").css("background-color","")}},s=new function(){var a=0,c=-1,b=0,f=!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(){f&&this.stopQuiz();b=+new Date;f=!0};this.stopQuiz=function(){f&&(h.comp.quizTime+=Math.round((new Date-
8
- b)/1E3),f=!1)};this.init=function(){}},ja=function(a,c,b,f){var e=!0,h=0,n=g.isArray(c.points),k={};({singleMulti:function(){var a=f.find(".wpProQuiz_questionInput").attr("disabled","disabled"),b=c.diffMode;f.children().each(function(l){var f=g(this),k=f.data("pos");l=a.eq(l).is(":checked");c.correct[k]?(l?n&&(h=b?c.points[k]:h+c.points[k]):e=!1,c.disCorrect?e=!0:d.methode.marker(f,!0)):l?(c.disCorrect?e=!0:(d.methode.marker(f,!1),e=!1),b&&(h=c.points[k])):n&&!b&&(h+=c.points[k])})},sort_answer:function(){var a=
9
- f.children();a.each(function(a,b){var l=g(this);k[a]=l.data("pos");a==l.data("pos")?(d.methode.marker(l,!0),n&&(h+=c.points[a])):(d.methode.marker(l,!1),e=!1)});a.children().css({"box-shadow":"0 0",cursor:"auto"});f.sortable("destroy");a.sort(function(a,c){return g(a).data("pos")>g(c).data("pos")?1:-1});f.append(a)},matrix_sort_answer:function(){var a=f.children(),m=[];k={0:-1};a.each(function(){var a=g(this),b=a.data("pos"),a=a.find(".wpProQuiz_maxtrixSortCriterion"),l=a.children();l.length&&(k[b]=
10
- l.data("pos"));l.length&&0<=g.inArray(String(b),String(l.data("correct")).split(","))?(d.methode.marker(a,!0),n&&(h+=c.points[b])):(e=!1,d.methode.marker(a,!1));m[b]=a});d.methode.resetMatrix(b);b.find(".wpProQuiz_sortStringItem").each(function(){var a=m[g(this).data("pos")];void 0!=a&&a.append(this)}).css({"box-shadow":"0 0",cursor:"auto"});b.find(".wpProQuiz_sortStringList, .wpProQuiz_maxtrixSortCriterion").sortable("destroy")},free_answer:function(){var a=f.children(),b=a.find(".wpProQuiz_questionInput").attr("disabled",
11
- "disabled").val();0<=g.inArray(g.trim(b).toLowerCase(),c.correct)?d.methode.marker(a,!0):(d.methode.marker(a,!1),e=!1)},cloze_answer:function(){f.find(".wpProQuiz_cloze").each(function(a,b){var l=g(this).children(),f=l.eq(0),l=l.eq(1),k=d.methode.cleanupCurlyQuotes(f.val());0<=g.inArray(k,c.correct[a])?(n&&(h+=c.points[a]),F||f.css("background-color","#B0DAB0")):(F||f.css("background-color","#FFBABA"),e=!1,l.show());f.attr("disabled","disabled")})},assessment_answer:function(){e=!0;var a=0;f.find(".wpProQuiz_questionInput").attr("disabled",
12
- "disabled").filter(":checked").each(function(){a+=parseInt(g(this).val())});h=a}})[a]();!n&&e&&(h=c.points);return{c:e,p:h,s:k}},L=new function(){var a={isEmpty:function(a){a=g.trim(a);return!a||0===a.length}};this.checkForm=function(){var c=!0;b.find(".wpProQuiz_forms input, .wpProQuiz_forms textarea, .wpProQuiz_forms .wpProQuiz_formFields, .wpProQuiz_forms select").each(function(){var b=g(this),f=1==b.data("required"),e=b.data("type"),d=!0,h=g.trim(b.val());switch(e){case 0:case 1:case 7:f&&(d=
13
- !a.isEmpty(h));break;case 2:if(f||!a.isEmpty(h))d=!a.isEmpty(h)&&!isNaN(h);break;case 4:if(f||!a.isEmpty(h))d=!a.isEmpty(h)&&RegExp(/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/).test(h);break;case 3:f&&(d=b.is(":checked"));break;case 5:case 8:f&&(d=void 0!==b.find('input[type="radio"]:checked').val());break;case 6:var k=0,m=0;b.find("select").each(function(){k++;m+=a.isEmpty(g(this).val())?0:1});if(f||0<
14
- m)d=k==m}d?b.siblings(".wpProQuiz_invalidate").hide():(c=!1,b.siblings(".wpProQuiz_invalidate").show())});return c};this.getFormData=function(){var a={};b.find(".wpProQuiz_forms input, .wpProQuiz_forms textarea, .wpProQuiz_forms .wpProQuiz_formFields, .wpProQuiz_forms select").each(function(){var b=g(this),f=b.data("form_id");switch(b.data("type")){case 0:case 1:case 7:case 2:case 4:a[f]=b.val();break;case 3:a[f]=b.is(":checked")?1:0;break;case 5:case 8:a[f]=b.find('input[type="radio"]:checked').val();
15
- break;case 6:a[f]={day:b.find('select[name="wpProQuiz_field_'+f+'_day"]').val(),month:b.find('select[name="wpProQuiz_field_'+f+'_month"]').val(),year:b.find('select[name="wpProQuiz_field_'+f+'_year"]').val()}}});return a}},ka=function(a){b.find(".wpProQuiz_questionList").each(function(){var c=g(this),b=c.data("question_id"),f=c.data("type"),d={};if("single"==f||"multiple"==f)c.find(".wpProQuiz_questionListItem").each(function(){d[g(this).data("pos")]=+g(this).find(".wpProQuiz_questionInput").is(":checked")});
16
- else if("free_answer"==f)d[0]=c.find(".wpProQuiz_questionInput").val();else{if("sort_answer"==f||"matrix_sort_answer"==f)return!0;if("cloze_answer"==f){var e=0;c.find(".wpProQuiz_cloze input").each(function(){d[e++]=g(this).val()})}else"assessment_answer"==f&&(d[0]="",c.find(".wpProQuiz_questionInput:checked").each(function(){d[g(this).data("index")]=g(this).val()}))}a[b].data=d})};d.methode={parseBitOptions:function(){if(e.bo){X=e.bo&1;Y=e.bo&2;F=e.bo&4;Z=e.bo&8;G=e.bo&16;P=e.bo&64;r=e.bo&128;x=
17
- e.bo&256;$=e.bo&512;aa=e.bo&1024;y=e.bo&2048;ba=e.bo&4096;H=e.bo&8192;Q=e.bo&16384;ca=e.bo&32768;var a=e.bo&32;a&&void 0!=jQuery.support&&void 0!=jQuery.support.cors&&!1==jQuery.support.cors&&(O=a)}},setClozeStyle:function(){b.find(".wpProQuiz_cloze input").each(function(){for(var a=g(this),c="",b=a.data("wordlen"),f=0;f<b;f++)c+="w";c=g(document.createElement("span")).css("visibility","hidden").text(c).appendTo(g("body"));b=c.width();c.remove();a.width(b+5)})},parseTime:function(a){var c=parseInt(a%
18
- 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 g.trim(a).toLowerCase()},resetMatrix:function(a){a.each(function(){var a=g(this),b=a.find(".wpProQuiz_sortStringList");a.find(".wpProQuiz_sortStringItem").each(function(){b.append(g(this))})})},marker:function(a,b){F||(b?a.addClass("wpProQuiz_answerCorrect"):
19
- a.addClass("wpProQuiz_answerIncorrect"))},startQuiz:function(a){if(S)R=1;else if(R=0,da)w.hide(),b.find(".wpProQuiz_lock").show();else if(ea)w.hide(),b.find(".wpProQuiz_prerequisite").show();else if(fa)w.hide(),b.find(".wpProQuiz_startOnlyRegisteredUser").show();else if(Q&&!a)w.hide(),b.find(".wpProQuiz_loadQuiz").show(),d.methode.loadQuizDataAjax(!0);else if(!H||0!=e.formPos||L.checkForm()){d.methode.loadQuizData();Y&&d.methode.random(v);X&&d.methode.random(b.find(".wpProQuiz_questionList"));ca&&
20
- d.methode.sortCategories();d.methode.random(b.find(".wpProQuiz_sortStringList"));d.methode.random(b.find('[data-type="sort_answer"]'));b.find(".wpProQuiz_listItem").each(function(a,b){var f=g(this);f.find(".wpProQuiz_question_page span:eq(0)").text(a+1);f.find("> h5 span").text(a+1);f.find(".wpProQuiz_questionListItem").each(function(a,b){g(this).find("> span:not(.wpProQuiz_cloze)").text(a+1+". ")})});z=b.find('input[name="next"]');switch(e.mode){case 3:b.find('input[name="checkSingle"]').show();
21
- break;case 2:b.find('input[name="check"]').show();!$&&r&&b.find('input[name="skip"]').show();break;case 1:b.find('input[name="back"]').slice(1).show();case 0:z.show()}(ba||3==e.mode)&&b.find(".wpProQuiz_question_page").hide();a=z.last();W=a.val();a.val(e.lbn);a=v.children();T=b.find(".wpProQuiz_list > li");3==e.mode?d.methode.showSinglePage(0):(k=a.eq(0).show(),a=k.find(".wpProQuiz_questionList").data("question_id"),s.questionStart(a));s.startQuiz();b.find(".wpProQuiz_sortable").parents("ul").sortable({update:function(a,
22
- d){var f=g(this).parents(".wpProQuiz_listItem");b.trigger({type:"questionSolved",values:{item:f,index:f.index(),solved:!0}})}}).disableSelection();b.find(".wpProQuiz_sortStringList, .wpProQuiz_maxtrixSortCriterion").sortable({connectWith:".wpProQuiz_maxtrixSortCriterion:not(:has(li)), .wpProQuiz_sortStringList",placeholder:"wpProQuiz_placehold",update:function(a,d){var f=g(this).parents(".wpProQuiz_listItem");b.trigger({type:"questionSolved",values:{item:f,index:f.index(),solved:!0}})}}).disableSelection();
23
- q=[];ia.start();V=+new Date;h={comp:{points:0,correctQuestions:0,quizTime:0}};b.find(".wpProQuiz_questionList").each(function(){var a=g(this).data("question_id");h[a]={time:0}});B={};g.each(e.catPoints,function(a,b){B[a]=0});w.hide();b.find(".wpProQuiz_loadQuiz").hide();m.show();u.show();3!=e.mode&&b.trigger({type:"changeQuestion",values:{item:k,index:k.index()}})}},showSingleQuestion:function(a){a=a?Math.ceil(a/e.qpp):1;this.showSinglePage(a)},showSinglePage:function(a){$listItem=v.children().hide();
24
- if(e.qpp){a=a?+a:1;var c=Math.ceil(b.find(".wpProQuiz_list > li").length/e.qpp);if(!(a>c)){var l=b.find('input[name="wpProQuiz_pageLeft"]').hide(),f=b.find('input[name="wpProQuiz_pageRight"]').hide(),g=b.find('input[name="checkSingle"]').hide();1<a&&l.val(l.data("text").replace(/%d/,a-1)).show();a==c?g.show():f.val(f.data("text").replace(/%d/,a+1)).show();N=a;a=e.qpp*(a-1);$listItem.slice(a,a+e.qpp).show();d.methode.scrollTo(m)}}else $listItem.show()},nextQuestion:function(){this.showQuestionObject(k.next())},
25
- prevQuestion:function(){this.showQuestionObject(k.prev())},showQuestion:function(a){var b=T.eq(a);3==e.mode||E?(e.qpp&&d.methode.showSingleQuestion(a+1),d.methode.scrollTo(b,1),s.startQuiz()):this.showQuestionObject(b)},showQuestionObject:function(a){if(!a.length&&y&&x&&r)for(var c=0,e=b.find(".wpProQuiz_listItem").length;c<e;c++)if(!q[c])return alert(WpProQuizGlobal.questionsNotSolved),!1;k.hide();k=a.show();d.methode.scrollTo(m);b.trigger({type:"changeQuestion",values:{item:k,index:k.index()}});
26
- k.length?(a=k.find(".wpProQuiz_questionList").data("question_id"),s.questionStart(a)):d.methode.showQuizSummary()},skipQuestion:function(){b.trigger({type:"skipQuestion",values:{item:k,index:k.index()}});d.methode.nextQuestion()},reviewQuestion:function(){b.trigger({type:"reviewQuestion",values:{item:k,index:k.index()}})},showQuizSummary:function(){s.questionStop();s.stopQuiz();if(x||!r)H&&1==e.formPos?(u.hide(),m.hide(),d.methode.scrollTo(b.find(".wpProQuiz_infopage").show())):d.methode.finishQuiz();
27
- 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(b){a.hide();m.show();u.show(!0);d.methode.showQuestion(g(this).index())});for(var c=0,l=0,f=q.length;l<f;l++)q[l]&&c++;a.find("span:eq(0)").text(c);u.hide();m.hide();a.show();d.methode.scrollTo(a)}},finishQuiz:function(a){s.questionStop();s.stopQuiz();ia.stop();var c=(+new Date-V)/1E3,c=e.timelimit&&c>
28
- e.timelimit?e.timelimit:c;b.find(".wpProQuiz_quiz_time span").text(d.methode.parseTime(c));a&&A.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);$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();
29
- d.methode.setAverageResult(h.comp.result,!1);this.setCategoryOverview();d.methode.sendCompletedQuiz();P&&U&&d.methode.addToplist();u.hide();b.find(".wpProQuiz_checkPage, .wpProQuiz_infopage").hide();m.hide();A.show();d.methode.scrollTo(A)},setCategoryOverview:function(){h.comp.cats={};b.find(".wpProQuiz_catOverview li").each(function(){var a=g(this),b=a.data("category_id");if(void 0===e.catPoints[b])return a.hide(),!0;var d=Math.round(1E4*(B[b]/e.catPoints[b]))/100;h.comp.cats[b]=d;a.find(".wpProQuiz_catPercent").text(d+
30
- "%");a.show()})},questionSolved:function(a){q[a.values.index]=a.values.solved},sendCompletedQuiz:function(){if(!G){ka(h);var a=L.getFormData();d.methode.ajax({action:"wp_pro_quiz_completed_quiz",quizId:e.quizId,results:h,forms:a})}},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(){E=!E;I.hide();m.toggle();b.find(".wpProQuiz_QuestionButton").hide();v.children().show();u.toggle();b.find(".wpProQuiz_question_page").hide()},
31
- random:function(a){a.each(function(){var a=g(this).children().get().sort(function(){return Math.round(Math.random())-0.5});g(a).appendTo(a[0].parentNode)})},sortCategories:function(){var a=g(".wpProQuiz_list").children().get().sort(function(a,b){var d=g(a).find(".wpProQuiz_questionList").data("question_id"),h=g(b).find(".wpProQuiz_questionList").data("question_id");return e.json[d].catId-e.json[h].catId});g(a).appendTo(a[0].parentNode)},restartQuiz:function(){A.hide();w.show();v.children().hide();
32
- I.hide();u.hide();b.find(".wpProQuiz_questionInput, .wpProQuiz_cloze input").removeAttr("disabled").removeAttr("checked").css("background-color","");b.find('.wpProQuiz_questionListItem input[type="text"]').val("");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");
33
- b.find(".wpProQuiz_clozeCorrect, .wpProQuiz_QuestionButton, .wpProQuiz_resultsList > li").hide();b.find('.wpProQuiz_question_page, input[name="tip"]').show();A.find(".wpProQuiz_time_limit_expired").hide();z.last().val(W);E=!1},checkQuestion:function(a,c){a=void 0==a?k:a;a.each(function(){var a=g(this),d=a.find(".wpProQuiz_questionList"),k=e.json[d.data("question_id")],m=k.type;s.questionStop();if(a.data("check"))return!0;if("single"==k.type||"multiple"==k.type)m="singleMulti";d=ja(m,k,a,d);a.find(".wpProQuiz_response").show();
34
- a.find('input[name="check"]').hide();a.find('input[name="skip"]').hide();a.find('input[name="next"]').show();h[k.id].points=d.p;h[k.id].correct=Number(d.c);h[k.id].data=d.s;h.comp.points+=d.p;B[k.catId]+=d.p;d.c?(a.find(".wpProQuiz_correct").show(),h.comp.correctQuestions+=1):a.find(".wpProQuiz_incorrect").show();a.find(".wpProQuiz_responsePoints").text(d.p);a.data("check",!0);c||b.trigger({type:"questionSolved",values:{item:a,index:a.index(),solved:!0}})})},showTip:function(){var a=g(this),c=a.siblings(".wpProQuiz_question").find(".wpProQuiz_questionList").data("question_id");
35
- a.siblings(".wpProQuiz_tipp").toggle("fast");h[c].tip=1;g(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"),g(document).unbind(".tipEvent"))})},ajax:function(a,b,d){O&&(jQuery.support.cors=!0);g.post(WpProQuizGlobal.ajaxurl,a,b,d||"json");O&&(jQuery.support.cors=!1)},checkQuizLock:function(){S=1;d.methode.ajax({action:"wp_pro_quiz_check_lock",quizId:e.quizId},function(a){void 0!=
36
- a.lock&&(da=a.lock.is,a.lock.pre&&b.find('input[name="restartQuiz"]').hide());void 0!=a.prerequisite&&(ea=1,b.find(".wpProQuiz_prerequisite span").text(a.prerequisite));void 0!=a.startUserLock&&(fa=a.startUserLock);S=0;R&&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);void 0!=a.averageResult&&d.methode.setAverageResult(a.averageResult,!0)})},setAverageResult:function(a,
37
- 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(),ha=a.token,U=0,a.userId?(d.hide(),U=1,P&&c.hide()):(d.show(),c=d.children().eq(1),a.captcha?(c.find('input[name="wpProQuiz_captchaPrefix"]').val(a.captcha.code),
38
- 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)&&g("html,body").animate({scrollTop:d},300)},addToplist:function(){if(!G){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:e.quizId,token:ha,
39
- 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",b.captcha.img),c.find('input[name="wpProQuiz_captchaPrefix"]').val(b.captcha.code),
40
- 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(a){a=g(this);var 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(a){a=
41
- g(this).parents(".wpProQuiz_listItem");var c=this.checked;b.trigger({type:"questionSolved",values:{item:a,index:a.index(),solved:c}})});b.find(".wpProQuiz_cloze input").change(function(){var a=g(this).parents(".wpProQuiz_listItem"),c=!0;a.find(".wpProQuiz_cloze input").each(function(){if(""==g(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(a){a=
42
- g(this).parents(".wpProQuiz_listItem");var c=0;a.find('.wpProQuiz_questionList[data-type="multiple"] .wpProQuiz_questionInput').each(function(a){this.checked&&c++});b.trigger({type:"questionSolved",values:{item:a,index:a.index(),solved:c?!0:!1}})})},loadQuizDataAjax:function(a){d.methode.ajax({action:"wp_pro_quiz_admin_ajax",func:"quizLoadData",data:{quizId:e.quizId}},function(c){e.globalPoints=c.globalPoints;e.catPoints=c.catPoints;e.json=c.json;m.remove();b.find(".wpProQuiz_quizAnker").after(c.content);
43
- ga=b.find('input[name="back"]');z=b.find('input[name="next"]');m=b.find(".wpProQuiz_quiz");v=b.find(".wpProQuiz_list");A=b.find(".wpProQuiz_results");w=b.find(".wpProQuiz_text");C=b.find(".wpProQuiz_time_limit");I=b.find(".wpProQuiz_toplistShowInButton");T=g();d.methode.initQuiz();a&&d.methode.startQuiz(!0)})},initQuiz:function(){d.methode.setClozeStyle();d.methode.registerSolved();z.click(function(){if(y&&!q[k.index()]&&(x||!r))return alert(WpProQuizGlobal.questionNotSolved),!1;d.methode.nextQuestion()});
44
- ga.click(function(){d.methode.prevQuestion()});b.find('input[name="check"]').click(function(){if(y&&!q[k.index()]&&(x||!r))return alert(WpProQuizGlobal.questionNotSolved),!1;d.methode.checkQuestion()});b.find('input[name="checkSingle"]').click(function(){if(y&&(x||!r))for(var a=0,c=b.find(".wpProQuiz_listItem").length;a<c;a++)if(!q[a])return alert(WpProQuizGlobal.questionsNotSolved),!1;d.methode.showQuizSummary()});b.find('input[name="tip"]').click(d.methode.showTip);b.find('input[name="skip"]').click(d.methode.skipQuestion);
45
- b.find('input[name="wpProQuiz_pageLeft"]').click(function(){d.methode.showSinglePage(N-1)});b.find('input[name="wpProQuiz_pageRight"]').click(function(){d.methode.showSinglePage(N+1)})}};d.preInit=function(){d.methode.parseBitOptions();u.init();b.find('input[name="startQuiz"]').click(function(){d.methode.startQuiz();return!1});Z&&!G&&d.methode.checkQuizLock();b.find('input[name="reShowQuestion"]').click(function(){d.methode.showQustionList()});b.find('input[name="restartQuiz"]').click(function(){d.methode.restartQuiz()});
46
- 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(){if(y)for(var a=0,c=b.find(".wpProQuiz_listItem").length;a<c;a++)if(!q[a])return alert(WpProQuizGlobal.questionsNotSolved),!1;H&&1==e.formPos&&!L.checkForm()||d.methode.finishQuiz()});b.find('input[name="endInfopage"]').click(function(){L.checkForm()&&
47
- d.methode.finishQuiz()});b.find('input[name="showToplist"]').click(function(){m.hide();I.toggle()});b.bind("questionSolved",d.methode.questionSolved);Q||d.methode.initQuiz();aa&&d.methode.startQuiz()};d.preInit()};g.fn.wpProQuizFront=function(M){return this.each(function(){void 0==g(this).data("wpProQuizFront")&&g(this).data("wpProQuizFront",new g.wpProQuizFront(this,M))})}})(jQuery);
 
1
+ (function(g){g.wpProQuizFront=function(M,e){var b=g(M),d=this,h={},A={},V=0,k=null,p=[],W="",F=!1,N=1,X=0,Y=0,G=0,Z=0,H=0,O=0,P=0,w=0,$=0,q=0,aa=0,x=0,ba=0,I=0,Q=0,ca=0,R=0,da=0,S=0,ea=0,fa=0,ga=b.find('input[name="back"]'),y=b.find('input[name="next"]'),n=b.find(".wpProQuiz_quiz"),u=b.find(".wpProQuiz_list"),z=b.find(".wpProQuiz_results"),v=b.find(".wpProQuiz_text"),B=b.find(".wpProQuiz_time_limit"),J=b.find(".wpProQuiz_toplistShowInButton"),T=g(),ha="",U=0,ia=function(){var a=e.timelimit,c=0,b=
2
+ {stop:function(){a&&(window.clearInterval(c),B.hide())},start:function(){if(a){var f=1E3*a,m=B.find("span").text(d.methode.parseTime(a)),g=B.find(".wpProQuiz_progress");B.show();var e=+new Date;c=window.setInterval(function(){var a=+new Date-e,c=f-a;500<=a&&m.text(d.methode.parseTime(Math.ceil(c/1E3)));g.css("width",c/f*100+"%");0>=c&&(b.stop(),d.methode.finishQuiz(!0))},16)}}};return b}(),t=new function(){function a(a){var c="",b=C[a];b.review?c="#FFB800":b.solved&&(c="#6CA54C");h.eq(a).css("background-color",
3
+ c)}function c(a){a.preventDefault();a=a.pageY-K;0>a&&(a=0);a>k&&(a=k);e.attr("style","margin-top: "+-(D*a)+"px !important");m.css({top:a})}function l(a){a.preventDefault();g(document).unbind(".scrollEvent")}var f=[],m=[],e=[],h=[],k=0,K=0,D=0,L=0,s=0,C=[];this.init=function(){f=b.find(".wpProQuiz_reviewQuestion");m=f.find("div");e=f.find("ol");h=e.children();m.mousedown(function(a){a.preventDefault();a.stopPropagation();K=a.pageY-m.offset().top+L;g(document).bind("mouseup.scrollEvent",l);g(document).bind("mousemove.scrollEvent",
4
+ c)});h.click(function(a){d.methode.showQuestion(g(this).index())});b.bind("questionSolved",function(c){C[c.values.index].solved=c.values.solved;a(c.values.index)});b.bind("changeQuestion",function(a){h.removeClass("wpProQuiz_reviewQuestionTarget");h.eq(a.values.index).addClass("wpProQuiz_reviewQuestionTarget");a=h.eq(a.values.index);var c=a.offset().top,b=f.offset().top,c=c-b;if(0>c-4||100<c+32)a=b-h.eq(0).offset().top-(b-e.offset().top)+a.position().top,a>s&&(a=s),b=a/D,e.attr("style","margin-top: "+
5
+ -a+"px !important"),m.css({top:b})});b.bind("reviewQuestion",function(c){C[c.values.index].review=!C[c.values.index].review;a(c.values.index)});f.bind("mousewheel DOMMouseScroll",function(a){a.preventDefault();a=a.originalEvent;a=20*(a.wheelDelta?-a.wheelDelta/120:a.detail/3);a=L-e.offset().top+a;a>s&&(a=s);0>a&&(a=0);var c=a/D;e.attr("style","margin-top: "+-a+"px !important");m.css({top:c});return!1})};this.show=function(a){q&&f.parent().show();b.find(".wpProQuiz_reviewDiv .wpProQuiz_button2").show();
6
+ if(!a){e.attr("style","margin-top: 0px !important");m.css({top:0});a=e.outerHeight();var c=f.height();k=c-m.height();K=0;s=a-c;D=s/k;this.reset();100<a&&m.show();L=m.offset().top}};this.hide=function(){f.parent().hide()};this.toggle=function(){if(q){f.parent().toggle();h.removeClass("wpProQuiz_reviewQuestionTarget");b.find(".wpProQuiz_reviewDiv .wpProQuiz_button2").hide();e.attr("style","margin-top: 0px !important");m.css({top:0});var a=e.outerHeight(),c=f.height();k=c-m.height();K=0;s=a-c;D=s/k;
7
+ 100<a&&m.show();L=m.offset().top}};this.reset=function(){for(var a=0,c=h.length;a<c;a++)C[a]={};h.removeClass("wpProQuiz_reviewQuestionTarget").css("background-color","")}},r=new function(){var a=0,c=-1,b=0,f=!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(){f&&this.stopQuiz();b=+new Date;f=!0};this.stopQuiz=function(){f&&(h.comp.quizTime+=Math.round((new Date-
8
+ b)/1E3),f=!1)};this.init=function(){}},ja=function(a,c,b,f){var m=!0,e=0,h=g.isArray(c.points),k={};({singleMulti:function(){var a=f.find(".wpProQuiz_questionInput").attr("disabled","disabled"),b=c.diffMode;f.children().each(function(l){var f=g(this),k=f.data("pos");l=a.eq(l).is(":checked");c.correct[k]?(l?h&&(e=b?c.points[k]:e+c.points[k]):m=!1,c.disCorrect?m=!0:d.methode.marker(f,!0)):l?(c.disCorrect?m=!0:(d.methode.marker(f,!1),m=!1),b&&(e=c.points[k])):h&&!b&&(e+=c.points[k])})},sort_answer:function(){var a=
9
+ f.children();a.each(function(a,b){var l=g(this);k[a]=l.data("pos");a==l.data("pos")?(d.methode.marker(l,!0),h&&(e+=c.points[a])):(d.methode.marker(l,!1),m=!1)});a.children().css({"box-shadow":"0 0",cursor:"auto"});f.sortable("destroy");a.sort(function(a,c){return g(a).data("pos")>g(c).data("pos")?1:-1});f.append(a)},matrix_sort_answer:function(){var a=f.children(),n=[];k={0:-1};a.each(function(){var a=g(this),b=a.data("pos"),a=a.find(".wpProQuiz_maxtrixSortCriterion"),l=a.children();l.length&&(k[b]=
10
+ l.data("pos"));l.length&&0<=g.inArray(String(b),String(l.data("correct")).split(","))?(d.methode.marker(a,!0),h&&(e+=c.points[b])):(m=!1,d.methode.marker(a,!1));n[b]=a});d.methode.resetMatrix(b);b.find(".wpProQuiz_sortStringItem").each(function(){var a=n[g(this).data("pos")];void 0!=a&&a.append(this)}).css({"box-shadow":"0 0",cursor:"auto"});b.find(".wpProQuiz_sortStringList, .wpProQuiz_maxtrixSortCriterion").sortable("destroy")},free_answer:function(){var a=f.children(),b=a.find(".wpProQuiz_questionInput").attr("disabled",
11
+ "disabled").val();0<=g.inArray(g.trim(b).toLowerCase(),c.correct)?d.methode.marker(a,!0):(d.methode.marker(a,!1),m=!1)},cloze_answer:function(){f.find(".wpProQuiz_cloze").each(function(a,b){var l=g(this).children(),f=l.eq(0),l=l.eq(1),k=d.methode.cleanupCurlyQuotes(f.val());0<=g.inArray(k,c.correct[a])?(h&&(e+=c.points[a]),G||f.css("background-color","#B0DAB0")):(G||f.css("background-color","#FFBABA"),m=!1,l.show());f.attr("disabled","disabled")})},assessment_answer:function(){m=!0;var a=0;f.find(".wpProQuiz_questionInput").attr("disabled",
12
+ "disabled").filter(":checked").each(function(){a+=parseInt(g(this).val())});e=a}})[a]();!h&&m&&(e=c.points);return{c:m,p:e,s:k}},E=new function(){var a={isEmpty:function(a){a=g.trim(a);return!a||0===a.length}};this.checkForm=function(){var c=!0;b.find(".wpProQuiz_forms input, .wpProQuiz_forms textarea, .wpProQuiz_forms .wpProQuiz_formFields, .wpProQuiz_forms select").each(function(){var b=g(this),f=1==b.data("required"),e=b.data("type"),d=!0,h=g.trim(b.val());switch(e){case 0:case 1:case 7:f&&(d=
13
+ !a.isEmpty(h));break;case 2:if(f||!a.isEmpty(h))d=!a.isEmpty(h)&&!isNaN(h);break;case 4:if(f||!a.isEmpty(h))d=!a.isEmpty(h)&&(new RegExp(/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/)).test(h);break;case 3:f&&(d=b.is(":checked"));break;case 5:case 8:f&&(d=void 0!==b.find('input[type="radio"]:checked').val());break;case 6:var k=0,n=0;b.find("select").each(function(){k++;n+=a.isEmpty(g(this).val())?0:1});if(f||
14
+ 0<n)d=k==n}d?b.siblings(".wpProQuiz_invalidate").hide():(c=!1,b.siblings(".wpProQuiz_invalidate").show())});return c};this.getFormData=function(){var a={};b.find(".wpProQuiz_forms input, .wpProQuiz_forms textarea, .wpProQuiz_forms .wpProQuiz_formFields, .wpProQuiz_forms select").each(function(){var b=g(this),f=b.data("form_id");switch(b.data("type")){case 0:case 1:case 7:case 2:case 4:a[f]=b.val();break;case 3:a[f]=b.is(":checked")?1:0;break;case 5:case 8:a[f]=b.find('input[type="radio"]:checked').val();
15
+ break;case 6:a[f]={day:b.find('select[name="wpProQuiz_field_'+f+'_day"]').val(),month:b.find('select[name="wpProQuiz_field_'+f+'_month"]').val(),year:b.find('select[name="wpProQuiz_field_'+f+'_year"]').val()}}});return a}},ka=function(a){b.find(".wpProQuiz_questionList").each(function(){var c=g(this),b=c.data("question_id"),f=c.data("type"),e={};if("single"==f||"multiple"==f)c.find(".wpProQuiz_questionListItem").each(function(){e[g(this).data("pos")]=+g(this).find(".wpProQuiz_questionInput").is(":checked")});
16
+ else if("free_answer"==f)e[0]=c.find(".wpProQuiz_questionInput").val();else{if("sort_answer"==f||"matrix_sort_answer"==f)return!0;if("cloze_answer"==f){var d=0;c.find(".wpProQuiz_cloze input").each(function(){e[d++]=g(this).val()})}else"assessment_answer"==f&&(e[0]="",c.find(".wpProQuiz_questionInput:checked").each(function(){e[g(this).data("index")]=g(this).val()}))}a[b].data=e})};d.methode={parseBitOptions:function(){if(e.bo){X=e.bo&1;Y=e.bo&2;G=e.bo&4;Z=e.bo&8;H=e.bo&16;P=e.bo&64;q=e.bo&128;w=
17
+ e.bo&256;$=e.bo&512;aa=e.bo&1024;x=e.bo&2048;ba=e.bo&4096;I=e.bo&8192;Q=e.bo&16384;ca=e.bo&32768;var a=e.bo&32;a&&void 0!=jQuery.support&&void 0!=jQuery.support.cors&&0==jQuery.support.cors&&(O=a)}},setClozeStyle:function(){b.find(".wpProQuiz_cloze input").each(function(){for(var a=g(this),c="",b=a.data("wordlen"),f=0;f<b;f++)c+="w";c=g(document.createElement("span")).css("visibility","hidden").text(c).appendTo(g("body"));b=c.width();c.remove();a.width(b+5)})},parseTime:function(a){var c=parseInt(a%
18
+ 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 g.trim(a).toLowerCase()},resetMatrix:function(a){a.each(function(){var a=g(this),b=a.find(".wpProQuiz_sortStringList");a.find(".wpProQuiz_sortStringItem").each(function(){b.append(g(this))})})},marker:function(a,b){G||(b?a.addClass("wpProQuiz_answerCorrect"):
19
+ a.addClass("wpProQuiz_answerIncorrect"))},startQuiz:function(a){if(S)R=1;else if(R=0,da)v.hide(),b.find(".wpProQuiz_lock").show();else if(ea)v.hide(),b.find(".wpProQuiz_prerequisite").show();else if(fa)v.hide(),b.find(".wpProQuiz_startOnlyRegisteredUser").show();else if(Q&&!a)v.hide(),b.find(".wpProQuiz_loadQuiz").show(),d.methode.loadQuizDataAjax(!0);else if(!I||0!=e.formPos||E.checkForm()){d.methode.loadQuizData();Y&&d.methode.random(u);X&&d.methode.random(b.find(".wpProQuiz_questionList"));ca&&
20
+ d.methode.sortCategories();d.methode.random(b.find(".wpProQuiz_sortStringList"));d.methode.random(b.find('[data-type="sort_answer"]'));b.find(".wpProQuiz_listItem").each(function(a,b){var f=g(this);f.find(".wpProQuiz_question_page span:eq(0)").text(a+1);f.find("> h5 span").text(a+1);f.find(".wpProQuiz_questionListItem").each(function(a,b){g(this).find("> span:not(.wpProQuiz_cloze)").text(a+1+". ")})});y=b.find('input[name="next"]');switch(e.mode){case 3:b.find('input[name="checkSingle"]').show();
21
+ break;case 2:b.find('input[name="check"]').show();!$&&q&&b.find('input[name="skip"]').show();break;case 1:b.find('input[name="back"]').slice(1).show();case 0:y.show()}(ba||3==e.mode)&&b.find(".wpProQuiz_question_page").hide();a=y.last();W=a.val();a.val(e.lbn);a=u.children();T=b.find(".wpProQuiz_list > li");3==e.mode?d.methode.showSinglePage(0):(k=a.eq(0).show(),a=k.find(".wpProQuiz_questionList").data("question_id"),r.questionStart(a));r.startQuiz();b.find(".wpProQuiz_sortable").parents("ul").sortable({update:function(a,
22
+ e){var f=g(this).parents(".wpProQuiz_listItem");b.trigger({type:"questionSolved",values:{item:f,index:f.index(),solved:!0}})}}).disableSelection();b.find(".wpProQuiz_sortStringList, .wpProQuiz_maxtrixSortCriterion").sortable({connectWith:".wpProQuiz_maxtrixSortCriterion:not(:has(li)), .wpProQuiz_sortStringList",placeholder:"wpProQuiz_placehold",update:function(a,e){var f=g(this).parents(".wpProQuiz_listItem");b.trigger({type:"questionSolved",values:{item:f,index:f.index(),solved:!0}})}}).disableSelection();
23
+ p=[];ia.start();V=+new Date;h={comp:{points:0,correctQuestions:0,quizTime:0}};b.find(".wpProQuiz_questionList").each(function(){var a=g(this).data("question_id");h[a]={time:0}});A={};g.each(e.catPoints,function(a,b){A[a]=0});v.hide();b.find(".wpProQuiz_loadQuiz").hide();n.show();t.show();3!=e.mode&&b.trigger({type:"changeQuestion",values:{item:k,index:k.index()}})}},showSingleQuestion:function(a){a=a?Math.ceil(a/e.qpp):1;this.showSinglePage(a)},showSinglePage:function(a){$listItem=u.children().hide();
24
+ if(e.qpp){a=a?+a:1;var c=Math.ceil(b.find(".wpProQuiz_list > li").length/e.qpp);if(!(a>c)){var l=b.find('input[name="wpProQuiz_pageLeft"]').hide(),f=b.find('input[name="wpProQuiz_pageRight"]').hide(),g=b.find('input[name="checkSingle"]').hide();1<a&&l.val(l.data("text").replace(/%d/,a-1)).show();a==c?g.show():f.val(f.data("text").replace(/%d/,a+1)).show();N=a;a=e.qpp*(a-1);$listItem.slice(a,a+e.qpp).show();d.methode.scrollTo(n)}}else $listItem.show()},nextQuestion:function(){this.showQuestionObject(k.next())},
25
+ prevQuestion:function(){this.showQuestionObject(k.prev())},showQuestion:function(a){var b=T.eq(a);3==e.mode||F?(e.qpp&&d.methode.showSingleQuestion(a+1),d.methode.scrollTo(b,1),r.startQuiz()):this.showQuestionObject(b)},showQuestionObject:function(a){if(!a.length&&x&&w&&q)for(var c=0,e=b.find(".wpProQuiz_listItem").length;c<e;c++)if(!p[c])return alert(WpProQuizGlobal.questionsNotSolved),!1;k.hide();k=a.show();d.methode.scrollTo(n);b.trigger({type:"changeQuestion",values:{item:k,index:k.index()}});
26
+ k.length?(a=k.find(".wpProQuiz_questionList").data("question_id"),r.questionStart(a)):d.methode.showQuizSummary()},skipQuestion:function(){b.trigger({type:"skipQuestion",values:{item:k,index:k.index()}});d.methode.nextQuestion()},reviewQuestion:function(){b.trigger({type:"reviewQuestion",values:{item:k,index:k.index()}})},showQuizSummary:function(){r.questionStop();r.stopQuiz();if(w||!q)I&&1==e.formPos?(t.hide(),n.hide(),d.methode.scrollTo(b.find(".wpProQuiz_infopage").show())):d.methode.finishQuiz();
27
+ 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(b){a.hide();n.show();t.show(!0);d.methode.showQuestion(g(this).index())});for(var c=0,l=0,f=p.length;l<f;l++)p[l]&&c++;a.find("span:eq(0)").text(c);t.hide();n.hide();a.show();d.methode.scrollTo(a)}},finishQuiz:function(a){r.questionStop();r.stopQuiz();ia.stop();var c=(+new Date-V)/1E3,c=e.timelimit&&c>
28
+ e.timelimit?e.timelimit:c;b.find(".wpProQuiz_quiz_time span").text(d.methode.parseTime(c));a&&z.find(".wpProQuiz_time_limit_expired").show();d.methode.checkQuestion(u.children(),!0);b.find(".wpProQuiz_correct_answer").text(h.comp.correctQuestions);h.comp.result=Math.round(h.comp.points/e.globalPoints*1E4)/100;$pointFields=b.find(".wpProQuiz_points span");$pointFields.eq(0).text(h.comp.points);$pointFields.eq(1).text(e.globalPoints);$pointFields.eq(2).text(h.comp.result+"%");a=b.find(".wpProQuiz_resultsList > li").eq(d.methode.findResultIndex(h.comp.result));
29
+ var l=E.getFormData();a.find(".wpProQuiz_resultForm").each(function(){var a=g(this),b=a.data("form_id"),b=l[b];"object"===typeof b&&(b=b.day+"-"+b.month+"-"+b.year);a.text(b).show()});a.show();d.methode.setAverageResult(h.comp.result,!1);this.setCategoryOverview();d.methode.sendCompletedQuiz();P&&U&&d.methode.addToplist();t.hide();b.find(".wpProQuiz_checkPage, .wpProQuiz_infopage").hide();n.hide();z.show();d.methode.scrollTo(z)},setCategoryOverview:function(){h.comp.cats={};b.find(".wpProQuiz_catOverview li").each(function(){var a=
30
+ g(this),b=a.data("category_id");if(void 0===e.catPoints[b])return a.hide(),!0;var d=Math.round(A[b]/e.catPoints[b]*1E4)/100;h.comp.cats[b]=d;a.find(".wpProQuiz_catPercent").text(d+"%");a.show()})},questionSolved:function(a){p[a.values.index]=a.values.solved},sendCompletedQuiz:function(){if(!H){ka(h);var a=E.getFormData();d.methode.ajax({action:"wp_pro_quiz_completed_quiz",quizId:e.quizId,results:h,forms:a})}},findResultIndex:function(a){for(var b=e.resultsGrade,d=-1,f=999999,g=0;g<b.length;g++){var h=
31
+ b[g];a>=h&&a-h<f&&(f=a-h,d=g)}return d},showQustionList:function(){F=!F;J.hide();n.toggle();b.find(".wpProQuiz_QuestionButton").hide();u.children().show();t.toggle();b.find(".wpProQuiz_question_page").hide()},random:function(a){a.each(function(){var a=g(this).children().get().sort(function(){return Math.round(Math.random())-.5});g(a).appendTo(a[0].parentNode)})},sortCategories:function(){var a=g(".wpProQuiz_list").children().get().sort(function(a,b){var f=g(a).find(".wpProQuiz_questionList").data("question_id"),
32
+ d=g(b).find(".wpProQuiz_questionList").data("question_id");return e.json[f].catId-e.json[d].catId});g(a).appendTo(a[0].parentNode)},restartQuiz:function(){z.hide();v.show();u.children().hide();J.hide();t.hide();b.find(".wpProQuiz_questionInput, .wpProQuiz_cloze input").removeAttr("disabled").removeAttr("checked").css("background-color","");b.find('.wpProQuiz_questionListItem input[type="text"]').val("");b.find(".wpProQuiz_answerCorrect, .wpProQuiz_answerIncorrect").removeClass("wpProQuiz_answerCorrect wpProQuiz_answerIncorrect");
33
+ 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();b.find(".wpProQuiz_resultForm").text("").hide();z.find(".wpProQuiz_time_limit_expired").hide();y.last().val(W);
34
+ F=!1},checkQuestion:function(a,c){a=void 0==a?k:a;a.each(function(){var a=g(this),f=a.find(".wpProQuiz_questionList"),d=e.json[f.data("question_id")],k=d.type;r.questionStop();if(a.data("check"))return!0;if("single"==d.type||"multiple"==d.type)k="singleMulti";f=ja(k,d,a,f);a.find(".wpProQuiz_response").show();a.find('input[name="check"]').hide();a.find('input[name="skip"]').hide();a.find('input[name="next"]').show();h[d.id].points=f.p;h[d.id].correct=Number(f.c);h[d.id].data=f.s;h.comp.points+=f.p;
35
+ A[d.catId]+=f.p;f.c?(a.find(".wpProQuiz_correct").show(),h.comp.correctQuestions+=1):a.find(".wpProQuiz_incorrect").show();a.find(".wpProQuiz_responsePoints").text(f.p);a.data("check",!0);c||b.trigger({type:"questionSolved",values:{item:a,index:a.index(),solved:!0}})})},showTip:function(){var a=g(this),c=a.siblings(".wpProQuiz_question").find(".wpProQuiz_questionList").data("question_id");a.siblings(".wpProQuiz_tipp").toggle("fast");h[c].tip=1;g(document).bind("mouseup.tipEvent",function(a){var c=
36
+ 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"),g(document).unbind(".tipEvent"))})},ajax:function(a,b,d){O&&(jQuery.support.cors=!0);g.post(WpProQuizGlobal.ajaxurl,a,b,d||"json");O&&(jQuery.support.cors=!1)},checkQuizLock:function(){S=1;d.methode.ajax({action:"wp_pro_quiz_check_lock",quizId:e.quizId},function(a){void 0!=a.lock&&(da=a.lock.is,a.lock.pre&&b.find('input[name="restartQuiz"]').hide());void 0!=a.prerequisite&&
37
+ (ea=1,b.find(".wpProQuiz_prerequisite span").text(a.prerequisite));void 0!=a.startUserLock&&(fa=a.startUserLock);S=0;R&&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);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",
38
+ 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(),ha=a.token,U=0,a.userId?(d.hide(),U=1,P&&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",a.captcha.img),c.find('input[name="wpProQuiz_captcha"]').val(""),
39
+ c.show()):c.hide())):c.hide()},scrollTo:function(a,b){var d=a.offset().top-100;(b||(window.pageYOffset||document.body.scrollTop)>d)&&g("html,body").animate({scrollTop:d},300)},addToplist:function(){if(!H){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:e.quizId,token:ha,name:c.find('input[name="wpProQuiz_toplistName"]').val(),email:c.find('input[name="wpProQuiz_toplistEmail"]').val(),
40
+ 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",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&&
41
+ wpProQuiz_fetchToplist()},registerSolved:function(){b.find('.wpProQuiz_questionInput[type="text"]').change(function(a){a=g(this);var 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(a){a=g(this).parents(".wpProQuiz_listItem");var c=this.checked;
42
+ b.trigger({type:"questionSolved",values:{item:a,index:a.index(),solved:c}})});b.find(".wpProQuiz_cloze input").change(function(){var a=g(this).parents(".wpProQuiz_listItem"),c=!0;a.find(".wpProQuiz_cloze input").each(function(){if(""==g(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(a){a=g(this).parents(".wpProQuiz_listItem");var c=0;a.find('.wpProQuiz_questionList[data-type="multiple"] .wpProQuiz_questionInput').each(function(a){this.checked&&
43
+ c++});b.trigger({type:"questionSolved",values:{item:a,index:a.index(),solved:c?!0:!1}})})},loadQuizDataAjax:function(a){d.methode.ajax({action:"wp_pro_quiz_admin_ajax",func:"quizLoadData",data:{quizId:e.quizId}},function(c){e.globalPoints=c.globalPoints;e.catPoints=c.catPoints;e.json=c.json;n.remove();b.find(".wpProQuiz_quizAnker").after(c.content);ga=b.find('input[name="back"]');y=b.find('input[name="next"]');n=b.find(".wpProQuiz_quiz");u=b.find(".wpProQuiz_list");z=b.find(".wpProQuiz_results");
44
+ v=b.find(".wpProQuiz_text");B=b.find(".wpProQuiz_time_limit");J=b.find(".wpProQuiz_toplistShowInButton");T=g();d.methode.initQuiz();a&&d.methode.startQuiz(!0)})},initQuiz:function(){d.methode.setClozeStyle();d.methode.registerSolved();y.click(function(){if(x&&!p[k.index()]&&(w||!q))return alert(WpProQuizGlobal.questionNotSolved),!1;d.methode.nextQuestion()});ga.click(function(){d.methode.prevQuestion()});b.find('input[name="check"]').click(function(){if(x&&!p[k.index()]&&(w||!q))return alert(WpProQuizGlobal.questionNotSolved),
45
+ !1;d.methode.checkQuestion()});b.find('input[name="checkSingle"]').click(function(){if(x&&(w||!q))for(var a=0,c=b.find(".wpProQuiz_listItem").length;a<c;a++)if(!p[a])return alert(WpProQuizGlobal.questionsNotSolved),!1;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="wpProQuiz_pageLeft"]').click(function(){d.methode.showSinglePage(N-1)});b.find('input[name="wpProQuiz_pageRight"]').click(function(){d.methode.showSinglePage(N+
46
+ 1)})}};d.preInit=function(){d.methode.parseBitOptions();t.init();b.find('input[name="startQuiz"]').click(function(){d.methode.startQuiz();return!1});Z&&!H&&d.methode.checkQuizLock();b.find('input[name="reShowQuestion"]').click(function(){d.methode.showQustionList()});b.find('input[name="restartQuiz"]').click(function(){d.methode.restartQuiz()});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);
47
+ b.find('input[name="endQuizSummary"]').click(function(){if(x)for(var a=0,c=b.find(".wpProQuiz_listItem").length;a<c;a++)if(!p[a])return alert(WpProQuizGlobal.questionsNotSolved),!1;I&&1==e.formPos&&!E.checkForm()||d.methode.finishQuiz()});b.find('input[name="endInfopage"]').click(function(){E.checkForm()&&d.methode.finishQuiz()});b.find('input[name="showToplist"]').click(function(){n.hide();J.toggle()});b.bind("questionSolved",d.methode.questionSolved);Q||d.methode.initQuiz();aa&&d.methode.startQuiz()};
48
+ d.preInit()};g.fn.wpProQuizFront=function(M){return this.each(function(){void 0==g(this).data("wpProQuizFront")&&g(this).data("wpProQuizFront",new g.wpProQuizFront(this,M))})}})(jQuery);
languages/wp-pro-quiz-ar.mo CHANGED
Binary file
languages/wp-pro-quiz-ar.po CHANGED
@@ -1,15 +1,15 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Wp-Pro-Quiz\n"
4
- "POT-Creation-Date: 2013-09-14 18:49+0100\n"
5
- "PO-Revision-Date: 2013-09-14 18:49+0100\n"
6
  "Last-Translator: Julius Fischer <webmaster@it-gecko.de>\n"
7
  "Language-Team: abuhassan <sajja2002@hotmail.com>\n"
8
- "Language: Arabic\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.5.7\n"
13
  "X-Poedit-KeywordsList: __;_e\n"
14
  "X-Poedit-Basepath: ..\n"
15
  "X-Poedit-SearchPath-0: .\n"
@@ -61,7 +61,7 @@ msgstr ""
61
  #: lib/controller/WpProQuiz_Controller_Admin.php:111
62
  #: lib/view/WpProQuiz_View_FrontToplist.php:26
63
  #: lib/view/WpProQuiz_View_QuestionOverall.php:71
64
- #: lib/view/WpProQuiz_View_QuizOverall.php:121
65
  #: lib/view/WpProQuiz_View_StatisticsAjax.php:33
66
  #: lib/view/WpProQuiz_View_StatisticsAjax.php:597
67
  msgid "No data available"
@@ -101,11 +101,11 @@ msgstr ""
101
  msgid "Today"
102
  msgstr ""
103
 
104
- #: lib/controller/WpProQuiz_Controller_Front.php:44
105
- #: lib/controller/WpProQuiz_Controller_Front.php:63
106
  #: lib/controller/WpProQuiz_Controller_Preview.php:15
107
  #: lib/view/WpProQuiz_View_AdminToplist.php:47
108
- #: lib/view/WpProQuiz_View_FrontQuiz.php:191
109
  #: lib/view/WpProQuiz_View_QuestionOverall.php:98
110
  #: lib/view/WpProQuiz_View_Statistics.php:46
111
  #: lib/view/WpProQuiz_View_StatisticsNew.php:73
@@ -115,20 +115,20 @@ msgstr ""
115
  msgid "Loading"
116
  msgstr ""
117
 
118
- #: lib/controller/WpProQuiz_Controller_Front.php:45
119
- #: lib/controller/WpProQuiz_Controller_Front.php:64
120
  #: lib/controller/WpProQuiz_Controller_Preview.php:16
121
  msgid "You must answer this question."
122
  msgstr ""
123
 
124
- #: lib/controller/WpProQuiz_Controller_Front.php:46
125
- #: lib/controller/WpProQuiz_Controller_Front.php:65
126
  #: lib/controller/WpProQuiz_Controller_Preview.php:17
127
  msgid "You must answer all questions before you can completed the quiz."
128
  msgstr ""
129
 
130
- #: lib/controller/WpProQuiz_Controller_Front.php:47
131
- #: lib/controller/WpProQuiz_Controller_Front.php:66
132
  #: lib/controller/WpProQuiz_Controller_Preview.php:18
133
  msgid "All fields have to be filled."
134
  msgstr ""
@@ -145,10 +145,10 @@ msgstr ""
145
  #: lib/controller/WpProQuiz_Controller_Question.php:540
146
  #: lib/controller/WpProQuiz_Controller_Quiz.php:37
147
  #: lib/controller/WpProQuiz_Controller_Quiz.php:41
148
- #: lib/controller/WpProQuiz_Controller_Quiz.php:282
149
- #: lib/controller/WpProQuiz_Controller_Quiz.php:296
150
- #: lib/controller/WpProQuiz_Controller_Quiz.php:380
151
- #: lib/controller/WpProQuiz_Controller_Quiz.php:585
152
  #: lib/controller/WpProQuiz_Controller_Statistics.php:40
153
  #: lib/controller/WpProQuiz_Controller_Toplist.php:88
154
  msgid "You do not have sufficient permissions to access this page."
@@ -171,8 +171,8 @@ msgstr "لا يمكن استكمال الملف"
171
 
172
  #: lib/controller/WpProQuiz_Controller_Question.php:9
173
  #: lib/controller/WpProQuiz_Controller_Question.php:19
174
- #: lib/controller/WpProQuiz_Controller_Quiz.php:56
175
- #: lib/controller/WpProQuiz_Controller_Quiz.php:313
176
  msgid "Quiz not found"
177
  msgstr "لم يتم العثور على الاختبار"
178
 
@@ -209,68 +209,70 @@ msgstr "السؤال: %d"
209
  msgid "questions copied"
210
  msgstr ""
211
 
212
- #: lib/controller/WpProQuiz_Controller_Quiz.php:87
213
- #: lib/controller/WpProQuiz_Controller_Quiz.php:328
214
  msgid "Quiz edited"
215
  msgstr "تم تحرير الاختبار"
216
 
217
- #: lib/controller/WpProQuiz_Controller_Quiz.php:89
218
  msgid "quiz created"
219
  msgstr ""
220
 
221
- #: lib/controller/WpProQuiz_Controller_Quiz.php:111
222
- #: lib/controller/WpProQuiz_Controller_Quiz.php:349
223
- #: lib/controller/WpProQuiz_Controller_Quiz.php:421
224
  msgid "Quiz title or quiz description are not filled"
225
  msgstr "لم يتم تعبئة عنوان او وصف الاختبار"
226
 
227
- #: lib/controller/WpProQuiz_Controller_Quiz.php:128
228
- #: lib/controller/WpProQuiz_Controller_Quiz.php:306
229
  #: lib/view/WpProQuiz_View_QuestionOverall.php:21
230
  msgid "Edit quiz"
231
  msgstr "تحرير الاختبار"
232
 
233
- #: lib/controller/WpProQuiz_Controller_Quiz.php:128
234
- #: lib/controller/WpProQuiz_Controller_Quiz.php:384
235
- #: lib/controller/WpProQuiz_Controller_Quiz.php:402
236
  msgid "Create quiz"
237
  msgstr "انشاء اختبار"
238
 
239
- #: lib/controller/WpProQuiz_Controller_Quiz.php:499
240
  msgid "Template stored"
241
  msgstr ""
242
 
243
- #: lib/controller/WpProQuiz_Controller_Quiz.php:604
244
  msgid "Quiz deleted"
245
  msgstr "تم حذف الاختبار"
246
 
247
- #: lib/controller/WpProQuiz_Controller_Quiz.php:830
248
  #: lib/controller/WpProQuiz_Controller_QuizCompleted.php:190
249
- #: lib/view/WpProQuiz_View_FrontQuiz.php:609
250
  msgid "Not categorized"
251
  msgstr ""
252
 
253
- #: lib/controller/WpProQuiz_Controller_Quiz.php:836
254
  #: lib/controller/WpProQuiz_Controller_QuizCompleted.php:196
255
- #: lib/view/WpProQuiz_View_FrontQuiz.php:604
256
  msgid "Categories"
257
  msgstr ""
258
 
259
  #: lib/controller/WpProQuiz_Controller_Statistics.php:56
260
- #: lib/controller/WpProQuiz_Controller_Statistics.php:662
261
  #: lib/view/WpProQuiz_View_QuestionEdit.php:91
 
 
262
  msgid "No category"
263
  msgstr ""
264
 
265
- #: lib/controller/WpProQuiz_Controller_Statistics.php:568
266
- #: lib/controller/WpProQuiz_Controller_Statistics.php:611
267
- #: lib/controller/WpProQuiz_Controller_Statistics.php:687
268
  #: lib/view/WpProQuiz_View_StatisticsAjax.php:606
269
  msgid "Anonymous"
270
  msgstr ""
271
 
272
- #: lib/controller/WpProQuiz_Controller_Statistics.php:613
273
- #: lib/controller/WpProQuiz_Controller_Statistics.php:695
274
  msgid "Deleted user"
275
  msgstr ""
276
 
@@ -322,11 +324,14 @@ msgstr ""
322
  msgid "XML could not be loaded."
323
  msgstr ""
324
 
 
 
325
  #: lib/model/WpProQuiz_Model_GlobalSettingsMapper.php:47
326
  #: lib/model/WpProQuiz_Model_GlobalSettingsMapper.php:79
327
  msgid "Wp-Pro-Quiz: One user completed a quiz"
328
  msgstr ""
329
 
 
330
  #: lib/model/WpProQuiz_Model_GlobalSettingsMapper.php:49
331
  msgid ""
332
  "Wp-Pro-Quiz\n"
@@ -338,6 +343,7 @@ msgid ""
338
  "\n"
339
  msgstr ""
340
 
 
341
  #: lib/model/WpProQuiz_Model_GlobalSettingsMapper.php:81
342
  msgid ""
343
  "Wp-Pro-Quiz\n"
@@ -363,15 +369,15 @@ msgid "A powerful and beautiful quiz plugin for WordPress."
363
  msgstr ""
364
 
365
  #: lib/plugin/WpProQuiz_Plugin_BpAchievementsV3.php:21
366
- #: lib/view/WpProQuiz_View_QuizOverall.php:54
367
  msgid "WP-Pro-Quiz"
368
  msgstr ""
369
 
370
  #: lib/view/WpProQuiz_View_AdminToplist.php:7
371
  #: lib/view/WpProQuiz_View_FrontToplist.php:8
372
- #: lib/view/WpProQuiz_View_QuizEdit.php:984
373
- #: lib/view/WpProQuiz_View_QuizEdit.php:996
374
- #: lib/view/WpProQuiz_View_QuizOverall.php:106
375
  msgid "Leaderboard"
376
  msgstr ""
377
 
@@ -402,17 +408,17 @@ msgid "Sort by:"
402
  msgstr ""
403
 
404
  #: lib/view/WpProQuiz_View_AdminToplist.php:18
405
- #: lib/view/WpProQuiz_View_QuizEdit.php:1076
406
  msgid "best user"
407
  msgstr ""
408
 
409
  #: lib/view/WpProQuiz_View_AdminToplist.php:19
410
- #: lib/view/WpProQuiz_View_QuizEdit.php:1080
411
  msgid "newest entry"
412
  msgstr ""
413
 
414
  #: lib/view/WpProQuiz_View_AdminToplist.php:20
415
- #: lib/view/WpProQuiz_View_QuizEdit.php:1084
416
  msgid "oldest entry"
417
  msgstr ""
418
 
@@ -426,7 +432,7 @@ msgstr ""
426
 
427
  #: lib/view/WpProQuiz_View_AdminToplist.php:38
428
  #: lib/view/WpProQuiz_View_AdminToplist.php:57
429
- #: lib/view/WpProQuiz_View_QuizEdit.php:1344
430
  msgid "Type"
431
  msgstr ""
432
 
@@ -442,7 +448,7 @@ msgid "User"
442
  msgstr ""
443
 
444
  #: lib/view/WpProQuiz_View_AdminToplist.php:56
445
- #: lib/view/WpProQuiz_View_FrontQuiz.php:199
446
  msgid "E-Mail"
447
  msgstr ""
448
 
@@ -452,8 +458,8 @@ msgid "Entered on"
452
  msgstr ""
453
 
454
  #: lib/view/WpProQuiz_View_AdminToplist.php:59
455
- #: lib/view/WpProQuiz_View_FrontQuiz.php:849
456
- #: lib/view/WpProQuiz_View_FrontQuiz.php:867
457
  #: lib/view/WpProQuiz_View_FrontToplist.php:17
458
  #: lib/view/WpProQuiz_View_QuestionEdit.php:49
459
  #: lib/view/WpProQuiz_View_QuestionEdit.php:56
@@ -470,7 +476,7 @@ msgid "Points"
470
  msgstr "درجات"
471
 
472
  #: lib/view/WpProQuiz_View_AdminToplist.php:60
473
- #: lib/view/WpProQuiz_View_FrontQuiz.php:563
474
  #: lib/view/WpProQuiz_View_Statistics.php:111
475
  #: lib/view/WpProQuiz_View_Statistics.php:245
476
  #: lib/view/WpProQuiz_View_Statistics.php:324
@@ -482,21 +488,23 @@ msgstr "النتائج"
482
 
483
  #: lib/view/WpProQuiz_View_AdminToplist.php:72
484
  #: lib/view/WpProQuiz_View_GobalSettings.php:140
485
- #: lib/view/WpProQuiz_View_GobalSettings.php:165
486
- #: lib/view/WpProQuiz_View_GobalSettings.php:190
 
487
  #: lib/view/WpProQuiz_View_QuestionOverall.php:51
488
- #: lib/view/WpProQuiz_View_QuizOverall.php:90
489
  msgid "Edit"
490
  msgstr "تحرير"
491
 
492
  #: lib/view/WpProQuiz_View_AdminToplist.php:75
493
  #: lib/view/WpProQuiz_View_AdminToplist.php:100
494
  #: lib/view/WpProQuiz_View_GobalSettings.php:139
495
- #: lib/view/WpProQuiz_View_GobalSettings.php:164
496
- #: lib/view/WpProQuiz_View_GobalSettings.php:189
 
497
  #: lib/view/WpProQuiz_View_QuestionOverall.php:55
498
- #: lib/view/WpProQuiz_View_QuizEdit.php:1391
499
- #: lib/view/WpProQuiz_View_QuizOverall.php:94
500
  #: lib/view/WpProQuiz_View_StatisticsAjax.php:43
501
  #: lib/view/WpProQuiz_View_StatisticsAjax.php:631
502
  msgid "Delete"
@@ -522,193 +530,193 @@ msgstr ""
522
  msgid "Delete all entries"
523
  msgstr ""
524
 
525
- #: lib/view/WpProQuiz_View_FrontQuiz.php:77
526
- #: lib/view/WpProQuiz_View_FrontQuiz.php:161
527
- #: lib/view/WpProQuiz_View_FrontQuiz.php:447
528
- #: lib/view/WpProQuiz_View_FrontQuiz.php:551
529
- #: lib/view/WpProQuiz_View_FrontQuiz.php:924
530
- #: lib/view/WpProQuiz_View_QuizEdit.php:384
531
- #: lib/view/WpProQuiz_View_QuizEdit.php:394
532
- #: lib/view/WpProQuiz_View_QuizEdit.php:399
533
  msgid "Quiz-summary"
534
  msgstr ""
535
 
536
- #: lib/view/WpProQuiz_View_FrontQuiz.php:77
537
- #: lib/view/WpProQuiz_View_FrontQuiz.php:161
538
- #: lib/view/WpProQuiz_View_FrontQuiz.php:473
539
- #: lib/view/WpProQuiz_View_FrontQuiz.php:490
540
- #: lib/view/WpProQuiz_View_FrontQuiz.php:926
541
  msgid "Finish quiz"
542
  msgstr ""
543
 
544
- #: lib/view/WpProQuiz_View_FrontQuiz.php:189
545
  msgid "Your result has been entered into leaderboard"
546
  msgstr ""
547
 
548
- #: lib/view/WpProQuiz_View_FrontQuiz.php:196
549
  #: lib/view/WpProQuiz_View_FrontToplist.php:15
550
  #: lib/view/WpProQuiz_View_QuestionOverall.php:28
551
- #: lib/view/WpProQuiz_View_QuizOverall.php:68
552
  msgid "Name"
553
  msgstr "الاسم"
554
 
555
- #: lib/view/WpProQuiz_View_FrontQuiz.php:204
556
  msgid "Captcha"
557
  msgstr ""
558
 
559
- #: lib/view/WpProQuiz_View_FrontQuiz.php:210
560
  msgid "Send"
561
  msgstr ""
562
 
563
- #: lib/view/WpProQuiz_View_FrontQuiz.php:301
564
- #: lib/view/WpProQuiz_View_FrontQuiz.php:400
565
  msgid "You must fill out this field."
566
  msgstr ""
567
 
568
- #: lib/view/WpProQuiz_View_FrontQuiz.php:304
569
  msgid "You must specify a number."
570
  msgstr ""
571
 
572
- #: lib/view/WpProQuiz_View_FrontQuiz.php:305
573
  msgid "You must specify a text."
574
  msgstr ""
575
 
576
- #: lib/view/WpProQuiz_View_FrontQuiz.php:306
577
  msgid "You must specify an email address."
578
  msgstr ""
579
 
580
- #: lib/view/WpProQuiz_View_FrontQuiz.php:307
581
  msgid "You must specify a date."
582
  msgstr ""
583
 
584
- #: lib/view/WpProQuiz_View_FrontQuiz.php:386
585
  #: lib/view/WpProQuiz_View_StatisticsAjax.php:549
586
  msgid "Yes"
587
  msgstr ""
588
 
589
- #: lib/view/WpProQuiz_View_FrontQuiz.php:391
590
  #: lib/view/WpProQuiz_View_StatisticsAjax.php:549
591
  msgid "No"
592
  msgstr ""
593
 
594
- #: lib/view/WpProQuiz_View_FrontQuiz.php:417
595
  msgid ""
596
  "You have already completed the quiz before. Hence you can not start it again."
597
  msgstr ""
598
 
599
- #: lib/view/WpProQuiz_View_FrontQuiz.php:427
600
  msgid "You must sign in or sign up to start the quiz."
601
  msgstr ""
602
 
603
- #: lib/view/WpProQuiz_View_FrontQuiz.php:437
604
  msgid "You have to finish following quiz, to start this quiz:"
605
  msgstr ""
606
 
607
- #: lib/view/WpProQuiz_View_FrontQuiz.php:449
608
  #, php-format
609
  msgid "%s of %s questions completed"
610
  msgstr ""
611
 
612
- #: lib/view/WpProQuiz_View_FrontQuiz.php:451
613
  #: lib/view/WpProQuiz_View_Import.php:44
614
- #: lib/view/WpProQuiz_View_QuizOverall.php:85
615
  msgid "Questions"
616
  msgstr "اسئلة"
617
 
618
- #: lib/view/WpProQuiz_View_FrontQuiz.php:466
619
- #: lib/view/WpProQuiz_View_FrontQuiz.php:481
620
  msgid "Information"
621
  msgstr ""
622
 
623
- #: lib/view/WpProQuiz_View_FrontQuiz.php:508
624
  msgid "Start quiz"
625
  msgstr "بدأ الاختبار"
626
 
627
- #: lib/view/WpProQuiz_View_FrontQuiz.php:517
628
- #: lib/view/WpProQuiz_View_QuizEdit.php:154
629
- #: lib/view/WpProQuiz_View_QuizEdit.php:159
630
  msgid "Time limit"
631
  msgstr "الوقت المحدد"
632
 
633
- #: lib/view/WpProQuiz_View_FrontQuiz.php:538
634
  msgid "Answered"
635
  msgstr ""
636
 
637
- #: lib/view/WpProQuiz_View_FrontQuiz.php:542
638
  msgid "Review"
639
  msgstr ""
640
 
641
- #: lib/view/WpProQuiz_View_FrontQuiz.php:549
642
  msgid "Review question"
643
  msgstr ""
644
 
645
- #: lib/view/WpProQuiz_View_FrontQuiz.php:566
646
  #, php-format
647
  msgid "%s of %s questions answered correctly"
648
  msgstr "تم اجابة %s من %s اسئلة بشكل صحيح"
649
 
650
- #: lib/view/WpProQuiz_View_FrontQuiz.php:570
651
  msgid "Your time: <span></span>"
652
  msgstr "وقتك: <span></span>"
653
 
654
- #: lib/view/WpProQuiz_View_FrontQuiz.php:574
655
  msgid "Time has elapsed"
656
  msgstr "مضى من الوقت"
657
 
658
- #: lib/view/WpProQuiz_View_FrontQuiz.php:578
659
  #, php-format
660
  msgid "You have reached %s of %s points, (%s)"
661
  msgstr "لقد وصلت الي %s من %s لنقاط, (%s)"
662
 
663
- #: lib/view/WpProQuiz_View_FrontQuiz.php:586
664
  msgid "Average score"
665
  msgstr ""
666
 
667
- #: lib/view/WpProQuiz_View_FrontQuiz.php:593
668
  msgid "Your score"
669
  msgstr ""
670
 
671
- #: lib/view/WpProQuiz_View_FrontQuiz.php:642
672
  msgid "Restart quiz"
673
  msgstr "اعادة الاختبار"
674
 
675
- #: lib/view/WpProQuiz_View_FrontQuiz.php:644
676
  msgid "View questions"
677
  msgstr "استعراض الاسئلة"
678
 
679
- #: lib/view/WpProQuiz_View_FrontQuiz.php:647
680
  msgid "Show leaderboard"
681
  msgstr ""
682
 
683
- #: lib/view/WpProQuiz_View_FrontQuiz.php:704
684
  #, php-format
685
  msgid "Question %s of %s"
686
  msgstr "اسئلة %s من %s "
687
 
688
- #: lib/view/WpProQuiz_View_FrontQuiz.php:707
689
  #: lib/view/WpProQuiz_View_QuestionEdit.php:110
690
  #: lib/view/WpProQuiz_View_Statistics.php:104
691
  #: lib/view/WpProQuiz_View_StatisticsAjax.php:155
692
  msgid "Question"
693
  msgstr "اسئلة"
694
 
695
- #: lib/view/WpProQuiz_View_FrontQuiz.php:711
696
  #, php-format
697
  msgid "%d points"
698
  msgstr "%d درجات"
699
 
700
- #: lib/view/WpProQuiz_View_FrontQuiz.php:717
701
  #, php-format
702
  msgid "Category: %s"
703
  msgstr ""
704
 
705
- #: lib/view/WpProQuiz_View_FrontQuiz.php:726
706
  #: lib/view/WpProQuiz_View_QuestionEdit.php:347
707
  msgid "Sort elements"
708
  msgstr "ترتيب العناصر"
709
 
710
- #: lib/view/WpProQuiz_View_FrontQuiz.php:847
711
- #: lib/view/WpProQuiz_View_FrontQuiz.php:854
712
  #: lib/view/WpProQuiz_View_QuestionEdit.php:305
713
  #: lib/view/WpProQuiz_View_Statistics.php:106
714
  #: lib/view/WpProQuiz_View_Statistics.php:241
@@ -719,8 +727,8 @@ msgstr "ترتيب العناصر"
719
  msgid "Correct"
720
  msgstr "صحيح"
721
 
722
- #: lib/view/WpProQuiz_View_FrontQuiz.php:865
723
- #: lib/view/WpProQuiz_View_FrontQuiz.php:872
724
  #: lib/view/WpProQuiz_View_Statistics.php:107
725
  #: lib/view/WpProQuiz_View_Statistics.php:242
726
  #: lib/view/WpProQuiz_View_StatisticsAjax.php:25
@@ -729,37 +737,37 @@ msgstr "صحيح"
729
  msgid "Incorrect"
730
  msgstr "خطأ"
731
 
732
- #: lib/view/WpProQuiz_View_FrontQuiz.php:893
733
  #: lib/view/WpProQuiz_View_FrontQuiz.php:904
 
734
  #: lib/view/WpProQuiz_View_QuestionEdit.php:154
735
  msgid "Hint"
736
  msgstr "تلميح"
737
 
738
- #: lib/view/WpProQuiz_View_FrontQuiz.php:900
739
- #: lib/view/WpProQuiz_View_QuizEdit.php:413
740
- #: lib/view/WpProQuiz_View_QuizEdit.php:418
741
  msgid "Skip question"
742
  msgstr ""
743
 
744
- #: lib/view/WpProQuiz_View_FrontQuiz.php:902
745
  msgid "Back"
746
  msgstr "العودة"
747
 
748
- #: lib/view/WpProQuiz_View_FrontQuiz.php:906
749
  msgid "Check"
750
  msgstr "التحقق"
751
 
752
- #: lib/view/WpProQuiz_View_FrontQuiz.php:907
753
  msgid "Next"
754
  msgstr ""
755
 
756
- #: lib/view/WpProQuiz_View_FrontQuiz.php:920
757
- #: lib/view/WpProQuiz_View_FrontQuiz.php:921
758
  #, php-format
759
  msgid "Page %d"
760
  msgstr ""
761
 
762
- #: lib/view/WpProQuiz_View_FrontQuiz.php:942
763
  msgid "Quiz is loading..."
764
  msgstr ""
765
 
@@ -787,18 +795,15 @@ msgstr ""
787
  msgid "Global settings"
788
  msgstr ""
789
 
790
- #: lib/view/WpProQuiz_View_GobalSettings.php:13
791
- msgid "E-Mail settings"
792
- msgstr ""
793
-
794
  #: lib/view/WpProQuiz_View_GobalSettings.php:14
795
- #: lib/view/WpProQuiz_View_GobalSettings.php:371
796
  msgid "Settings in case of problems"
797
  msgstr ""
798
 
799
  #: lib/view/WpProQuiz_View_GobalSettings.php:30
800
  #: lib/view/WpProQuiz_View_QuestionEdit.php:263
801
- #: lib/view/WpProQuiz_View_QuizEdit.php:610
 
802
  #: lib/view/WpProQuiz_View_WpqSupport.php:45
803
  msgid "Save"
804
  msgstr "حفظ"
@@ -835,176 +840,213 @@ msgstr ""
835
  msgid "Category management"
836
  msgstr ""
837
 
838
- #: lib/view/WpProQuiz_View_GobalSettings.php:147
839
- #: lib/view/WpProQuiz_View_GobalSettings.php:152
 
 
 
 
 
840
  msgid "Quiz template management"
841
  msgstr ""
842
 
843
- #: lib/view/WpProQuiz_View_GobalSettings.php:172
844
- #: lib/view/WpProQuiz_View_GobalSettings.php:177
845
  msgid "Question template management"
846
  msgstr ""
847
 
848
- #: lib/view/WpProQuiz_View_GobalSettings.php:205
849
- #: lib/view/WpProQuiz_View_GobalSettings.php:501
 
850
  msgid "Admin e-mail settings"
851
  msgstr ""
852
 
853
- #: lib/view/WpProQuiz_View_GobalSettings.php:211
 
 
854
  msgid "To:"
855
  msgstr ""
856
 
857
- #: lib/view/WpProQuiz_View_GobalSettings.php:218
 
858
  msgid ""
859
  "Separate multiple email addresses with a comma, e.g. wp@test.com, test@test."
860
  "com"
861
  msgstr ""
862
 
863
- #: lib/view/WpProQuiz_View_GobalSettings.php:224
864
- #: lib/view/WpProQuiz_View_GobalSettings.php:296
 
 
865
  msgid "From:"
866
  msgstr ""
867
 
868
- #: lib/view/WpProQuiz_View_GobalSettings.php:237
869
- #: lib/view/WpProQuiz_View_GobalSettings.php:306
 
 
870
  msgid "Subject:"
871
  msgstr ""
872
 
873
- #: lib/view/WpProQuiz_View_GobalSettings.php:247
874
- #: lib/view/WpProQuiz_View_GobalSettings.php:316
 
 
875
  msgid "HTML"
876
  msgstr ""
877
 
878
- #: lib/view/WpProQuiz_View_GobalSettings.php:251
879
- #: lib/view/WpProQuiz_View_GobalSettings.php:320
880
- #: lib/view/WpProQuiz_View_GobalSettings.php:386
881
- #: lib/view/WpProQuiz_View_GobalSettings.php:408
882
- #: lib/view/WpProQuiz_View_GobalSettings.php:460
883
- #: lib/view/WpProQuiz_View_QuizEdit.php:55
884
- #: lib/view/WpProQuiz_View_QuizEdit.php:74
885
- #: lib/view/WpProQuiz_View_QuizEdit.php:93
886
- #: lib/view/WpProQuiz_View_QuizEdit.php:112
887
- #: lib/view/WpProQuiz_View_QuizEdit.php:128
888
- #: lib/view/WpProQuiz_View_QuizEdit.php:144
889
- #: lib/view/WpProQuiz_View_QuizEdit.php:181
890
- #: lib/view/WpProQuiz_View_QuizEdit.php:221
891
- #: lib/view/WpProQuiz_View_QuizEdit.php:279
892
- #: lib/view/WpProQuiz_View_QuizEdit.php:308
893
- #: lib/view/WpProQuiz_View_QuizEdit.php:369
894
- #: lib/view/WpProQuiz_View_QuizEdit.php:471
895
- #: lib/view/WpProQuiz_View_QuizEdit.php:493
896
- #: lib/view/WpProQuiz_View_QuizEdit.php:512
897
- #: lib/view/WpProQuiz_View_QuizEdit.php:650
898
- #: lib/view/WpProQuiz_View_QuizEdit.php:675
899
- #: lib/view/WpProQuiz_View_QuizEdit.php:701
900
- #: lib/view/WpProQuiz_View_QuizEdit.php:727
901
- #: lib/view/WpProQuiz_View_QuizEdit.php:753
902
- #: lib/view/WpProQuiz_View_QuizEdit.php:795
903
- #: lib/view/WpProQuiz_View_QuizEdit.php:814
904
- #: lib/view/WpProQuiz_View_QuizEdit.php:839
905
- #: lib/view/WpProQuiz_View_QuizEdit.php:889
906
- #: lib/view/WpProQuiz_View_QuizEdit.php:909
907
- #: lib/view/WpProQuiz_View_QuizEdit.php:934
908
- #: lib/view/WpProQuiz_View_QuizEdit.php:959
909
- #: lib/view/WpProQuiz_View_QuizEdit.php:1001
910
- #: lib/view/WpProQuiz_View_QuizEdit.php:1034
911
- #: lib/view/WpProQuiz_View_QuizEdit.php:1048
912
- #: lib/view/WpProQuiz_View_QuizEdit.php:1096
913
- #: lib/view/WpProQuiz_View_QuizEdit.php:1178
914
- #: lib/view/WpProQuiz_View_QuizEdit.php:1179
915
- #: lib/view/WpProQuiz_View_QuizEdit.php:1180
916
- #: lib/view/WpProQuiz_View_QuizEdit.php:1181
917
- #: lib/view/WpProQuiz_View_QuizEdit.php:1284
 
 
 
918
  msgid "Activate"
919
  msgstr ""
920
 
921
- #: lib/view/WpProQuiz_View_GobalSettings.php:257
922
- #: lib/view/WpProQuiz_View_GobalSettings.php:326
 
 
923
  msgid "Message body:"
924
  msgstr ""
925
 
926
- #: lib/view/WpProQuiz_View_GobalSettings.php:265
927
- #: lib/view/WpProQuiz_View_GobalSettings.php:334
 
 
928
  msgid "Allowed variables"
929
  msgstr ""
930
 
931
- #: lib/view/WpProQuiz_View_GobalSettings.php:267
932
- #: lib/view/WpProQuiz_View_GobalSettings.php:336
 
 
933
  msgid "User-ID"
934
  msgstr ""
935
 
936
- #: lib/view/WpProQuiz_View_GobalSettings.php:268
937
- #: lib/view/WpProQuiz_View_GobalSettings.php:337
 
 
938
  #: lib/view/WpProQuiz_View_Statistics.php:322
939
  #: lib/view/WpProQuiz_View_StatisticsAjax.php:22
940
  msgid "Username"
941
  msgstr ""
942
 
943
- #: lib/view/WpProQuiz_View_GobalSettings.php:269
944
- #: lib/view/WpProQuiz_View_GobalSettings.php:338
 
 
945
  msgid "Quiz-Name"
946
  msgstr ""
947
 
948
- #: lib/view/WpProQuiz_View_GobalSettings.php:270
949
- #: lib/view/WpProQuiz_View_GobalSettings.php:339
 
 
950
  msgid "Result in precent"
951
  msgstr ""
952
 
953
- #: lib/view/WpProQuiz_View_GobalSettings.php:271
954
- #: lib/view/WpProQuiz_View_GobalSettings.php:340
 
 
955
  msgid "Reached points"
956
  msgstr ""
957
 
958
- #: lib/view/WpProQuiz_View_GobalSettings.php:272
959
- #: lib/view/WpProQuiz_View_GobalSettings.php:341
 
 
960
  msgid "IP-address of the user"
961
  msgstr ""
962
 
963
- #: lib/view/WpProQuiz_View_GobalSettings.php:273
964
- #: lib/view/WpProQuiz_View_GobalSettings.php:342
 
 
965
  msgid "Category-Overview"
966
  msgstr ""
967
 
968
- #: lib/view/WpProQuiz_View_GobalSettings.php:290
969
- #: lib/view/WpProQuiz_View_GobalSettings.php:502
 
970
  msgid "User e-mail settings"
971
  msgstr ""
972
 
973
- #: lib/view/WpProQuiz_View_GobalSettings.php:357
974
  msgid "to activate"
975
  msgstr ""
976
 
977
- #: lib/view/WpProQuiz_View_GobalSettings.php:359
978
  msgid "not to activate"
979
  msgstr ""
980
 
981
- #: lib/view/WpProQuiz_View_GobalSettings.php:365
982
  #: lib/view/WpProQuiz_View_WpqSupport.php:50
983
  msgid "Please note"
984
  msgstr ""
985
 
986
- #: lib/view/WpProQuiz_View_GobalSettings.php:367
987
  msgid ""
988
  "These settings should only be set in cases of problems with Wp-Pro-Quiz."
989
  msgstr ""
990
 
991
- #: lib/view/WpProQuiz_View_GobalSettings.php:377
992
- #: lib/view/WpProQuiz_View_GobalSettings.php:382
993
  msgid "Automatically add [raw] shortcode"
994
  msgstr ""
995
 
996
- #: lib/view/WpProQuiz_View_GobalSettings.php:386
997
  #, php-format
998
  msgid "It is recommended %s this option on your system."
999
  msgstr ""
1000
 
1001
- #: lib/view/WpProQuiz_View_GobalSettings.php:389
1002
  msgid ""
1003
  "If this option is activated, a [raw] shortcode is automatically set around "
1004
  "WpProQuiz shortcode ( [WpProQuiz X] ) into [raw] [WpProQuiz X] [/raw]"
1005
  msgstr ""
1006
 
1007
- #: lib/view/WpProQuiz_View_GobalSettings.php:392
1008
  #: lib/view/WpProQuiz_View_QuizOverall.php:42
1009
  msgid ""
1010
  "Own themes changes internal order of filters, what causes the problems. "
@@ -1013,85 +1055,86 @@ msgstr ""
1013
  "الثيمات الخاصة تغير النظام الداخلي للمرشحات، مما يسبب المشاكل. مع الرمز "
1014
  "القصير إضافية [الخام] يتم منع هذا. MIB"
1015
 
1016
- #: lib/view/WpProQuiz_View_GobalSettings.php:399
1017
- #: lib/view/WpProQuiz_View_GobalSettings.php:404
1018
  msgid "Do not load the Javascript-files in the footer"
1019
  msgstr ""
1020
 
1021
- #: lib/view/WpProQuiz_View_GobalSettings.php:411
1022
  msgid ""
1023
  "Generally all WpProQuiz-Javascript files are loaded in the footer and only "
1024
  "when they are really needed."
1025
  msgstr ""
1026
 
1027
- #: lib/view/WpProQuiz_View_GobalSettings.php:414
1028
  msgid "In very old Wordpress themes this can lead to problems."
1029
  msgstr ""
1030
 
1031
- #: lib/view/WpProQuiz_View_GobalSettings.php:417
1032
  msgid ""
1033
  "If you activate this option, all WpProQuiz-Javascript files are loaded in "
1034
  "the header even if they are not needed."
1035
  msgstr ""
1036
 
1037
- #: lib/view/WpProQuiz_View_GobalSettings.php:420
1038
  #, php-format
1039
  msgid ""
1040
  "Anyone who wants to learn more about this topic should read through the "
1041
  "following websites %s and %s."
1042
  msgstr ""
1043
 
1044
- #: lib/view/WpProQuiz_View_GobalSettings.php:429
1045
- #: lib/view/WpProQuiz_View_GobalSettings.php:434
1046
  msgid "Touch Library"
1047
  msgstr ""
1048
 
1049
- #: lib/view/WpProQuiz_View_GobalSettings.php:438
1050
- #: lib/view/WpProQuiz_View_QuizEdit.php:403
1051
- #: lib/view/WpProQuiz_View_QuizEdit.php:422
1052
- #: lib/view/WpProQuiz_View_QuizEdit.php:441
1053
- #: lib/view/WpProQuiz_View_QuizEdit.php:864
 
1054
  msgid "Deactivate"
1055
  msgstr ""
1056
 
1057
- #: lib/view/WpProQuiz_View_GobalSettings.php:441
1058
  msgid "In Version 0.13 a new Touch Library was added for mobile devices."
1059
  msgstr ""
1060
 
1061
- #: lib/view/WpProQuiz_View_GobalSettings.php:444
1062
  msgid "If you have any problems with the Touch Library, please deactivate it."
1063
  msgstr ""
1064
 
1065
- #: lib/view/WpProQuiz_View_GobalSettings.php:451
1066
- #: lib/view/WpProQuiz_View_GobalSettings.php:456
1067
  msgid "jQuery support cors"
1068
  msgstr ""
1069
 
1070
- #: lib/view/WpProQuiz_View_GobalSettings.php:463
1071
  msgid "Is required only in rare cases."
1072
  msgstr ""
1073
 
1074
- #: lib/view/WpProQuiz_View_GobalSettings.php:466
1075
  msgid "If you have problems with the front ajax, please activate it."
1076
  msgstr ""
1077
 
1078
- #: lib/view/WpProQuiz_View_GobalSettings.php:469
1079
  msgid "e.g. Domain with special characters in combination with IE"
1080
  msgstr ""
1081
 
1082
- #: lib/view/WpProQuiz_View_GobalSettings.php:476
1083
- #: lib/view/WpProQuiz_View_GobalSettings.php:481
1084
- #: lib/view/WpProQuiz_View_GobalSettings.php:483
1085
  msgid "Repair database"
1086
  msgstr ""
1087
 
1088
- #: lib/view/WpProQuiz_View_GobalSettings.php:485
1089
  msgid "No date will be deleted. Only WP-Pro-Quiz tables will be repaired."
1090
  msgstr ""
1091
 
1092
  #: lib/view/WpProQuiz_View_Import.php:21
1093
- #: lib/view/WpProQuiz_View_QuizOverall.php:130
1094
- #: lib/view/WpProQuiz_View_QuizOverall.php:153
1095
  msgid "Import"
1096
  msgstr "استيراد"
1097
 
@@ -1112,10 +1155,76 @@ msgid "Quiz name"
1112
  msgstr "اسم الاختبار"
1113
 
1114
  #: lib/view/WpProQuiz_View_Import.php:69
1115
- #: lib/view/WpProQuiz_View_QuizOverall.php:164
1116
  msgid "Start import"
1117
  msgstr "ابدأ الاستيراد"
1118
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1119
  #: lib/view/WpProQuiz_View_QuestionEdit.php:33
1120
  #: lib/view/WpProQuiz_View_QuizEdit.php:29
1121
  msgid "load template"
@@ -1130,8 +1239,9 @@ msgstr "العنوان"
1130
  #: lib/view/WpProQuiz_View_QuestionEdit.php:125
1131
  #: lib/view/WpProQuiz_View_QuestionEdit.php:142
1132
  #: lib/view/WpProQuiz_View_QuestionEdit.php:154
1133
- #: lib/view/WpProQuiz_View_QuizEdit.php:541
1134
- #: lib/view/WpProQuiz_View_QuizEdit.php:984
 
1135
  msgid "(optional)"
1136
  msgstr "(اختيار)"
1137
 
@@ -1147,8 +1257,8 @@ msgstr ""
1147
  #: lib/view/WpProQuiz_View_QuestionEdit.php:110
1148
  #: lib/view/WpProQuiz_View_QuestionEdit.php:211
1149
  #: lib/view/WpProQuiz_View_QuizEdit.php:34
1150
- #: lib/view/WpProQuiz_View_QuizEdit.php:530
1151
- #: lib/view/WpProQuiz_View_QuizEdit.php:1165
1152
  msgid "(required)"
1153
  msgstr "(مطلوب)"
1154
 
@@ -1176,6 +1286,8 @@ msgstr ""
1176
 
1177
  #: lib/view/WpProQuiz_View_QuestionEdit.php:80
1178
  #: lib/view/WpProQuiz_View_QuestionOverall.php:29
 
 
1179
  #: lib/view/WpProQuiz_View_Statistics.php:124
1180
  #: lib/view/WpProQuiz_View_StatisticsAjax.php:174
1181
  msgid "Category"
@@ -1188,15 +1300,23 @@ msgid ""
1188
  msgstr ""
1189
 
1190
  #: lib/view/WpProQuiz_View_QuestionEdit.php:86
 
 
1191
  msgid "You can manage categories in global settings."
1192
  msgstr ""
1193
 
1194
  #: lib/view/WpProQuiz_View_QuestionEdit.php:90
1195
  #: lib/view/WpProQuiz_View_QuestionEdit.php:100
 
 
 
 
1196
  msgid "Create new category"
1197
  msgstr ""
1198
 
1199
  #: lib/view/WpProQuiz_View_QuestionEdit.php:102
 
 
1200
  msgid "Create"
1201
  msgstr ""
1202
 
@@ -1322,24 +1442,24 @@ msgid ""
1322
  msgstr ""
1323
 
1324
  #: lib/view/WpProQuiz_View_QuestionEdit.php:266
1325
- #: lib/view/WpProQuiz_View_QuizEdit.php:613
1326
  msgid "template name"
1327
  msgstr ""
1328
 
1329
  #: lib/view/WpProQuiz_View_QuestionEdit.php:268
1330
- #: lib/view/WpProQuiz_View_QuizEdit.php:615
1331
  msgid "Create new template"
1332
  msgstr ""
1333
 
1334
  #: lib/view/WpProQuiz_View_QuestionEdit.php:276
1335
- #: lib/view/WpProQuiz_View_QuizEdit.php:623
1336
  msgid "Save as template"
1337
  msgstr ""
1338
 
1339
  #: lib/view/WpProQuiz_View_QuestionEdit.php:295
1340
  #: lib/view/WpProQuiz_View_QuestionEdit.php:345
1341
  #: lib/view/WpProQuiz_View_QuestionEdit.php:398
1342
- #: lib/view/WpProQuiz_View_QuizEdit.php:40
1343
  msgid "Options"
1344
  msgstr "خيارات"
1345
 
@@ -1371,7 +1491,7 @@ msgstr ""
1371
  #: lib/view/WpProQuiz_View_QuestionEdit.php:385
1372
  #: lib/view/WpProQuiz_View_QuestionEdit.php:427
1373
  #: lib/view/WpProQuiz_View_QuestionOverall.php:59
1374
- #: lib/view/WpProQuiz_View_QuizEdit.php:1392
1375
  msgid "Move"
1376
  msgstr "تحريك"
1377
 
@@ -1435,28 +1555,28 @@ msgstr ""
1435
 
1436
  #: lib/view/WpProQuiz_View_QuestionEdit.php:485
1437
  #: lib/view/WpProQuiz_View_QuestionEdit.php:494
1438
- #: lib/view/WpProQuiz_View_QuizEdit.php:378
1439
- #: lib/view/WpProQuiz_View_QuizEdit.php:384
1440
- #: lib/view/WpProQuiz_View_QuizEdit.php:656
1441
- #: lib/view/WpProQuiz_View_QuizEdit.php:683
1442
- #: lib/view/WpProQuiz_View_QuizEdit.php:709
1443
- #: lib/view/WpProQuiz_View_QuizEdit.php:735
1444
- #: lib/view/WpProQuiz_View_QuizEdit.php:761
1445
- #: lib/view/WpProQuiz_View_QuizEdit.php:820
1446
- #: lib/view/WpProQuiz_View_QuizEdit.php:845
1447
- #: lib/view/WpProQuiz_View_QuizEdit.php:870
1448
- #: lib/view/WpProQuiz_View_QuizEdit.php:915
1449
- #: lib/view/WpProQuiz_View_QuizEdit.php:940
1450
- #: lib/view/WpProQuiz_View_QuizEdit.php:965
1451
- #: lib/view/WpProQuiz_View_QuizEdit.php:1137
1452
- #: lib/view/WpProQuiz_View_QuizEdit.php:1147
1453
- #: lib/view/WpProQuiz_View_QuizEdit.php:1200
1454
- #: lib/view/WpProQuiz_View_QuizEdit.php:1208
1455
- #: lib/view/WpProQuiz_View_QuizEdit.php:1216
1456
- #: lib/view/WpProQuiz_View_QuizEdit.php:1224
1457
- #: lib/view/WpProQuiz_View_QuizEdit.php:1307
1458
- #: lib/view/WpProQuiz_View_QuizEdit.php:1319
1459
- #: lib/view/WpProQuiz_View_QuizEdit.php:1326
1460
  msgid "Demo"
1461
  msgstr ""
1462
 
@@ -1540,71 +1660,76 @@ msgstr ""
1540
  msgid "Quiz title"
1541
  msgstr "عنوان الاختبار"
1542
 
1543
- #: lib/view/WpProQuiz_View_QuizEdit.php:46
 
 
 
 
 
1544
  msgid "Hide quiz title"
1545
  msgstr "اخفاء عنوان الاختبار"
1546
 
1547
- #: lib/view/WpProQuiz_View_QuizEdit.php:51
1548
  msgid "Hide title"
1549
  msgstr "اخفاء العنوان"
1550
 
1551
- #: lib/view/WpProQuiz_View_QuizEdit.php:58
1552
  msgid "The title serves as quiz heading."
1553
  msgstr "العنوان يظهر كعنوانا من اجل الاختبار."
1554
 
1555
- #: lib/view/WpProQuiz_View_QuizEdit.php:65
1556
- #: lib/view/WpProQuiz_View_QuizEdit.php:70
1557
  msgid "Hide \"Restart quiz\" button"
1558
  msgstr "اخفاء زر\"اعادة الاختبار\""
1559
 
1560
- #: lib/view/WpProQuiz_View_QuizEdit.php:77
1561
  msgid "Hide the \"Restart quiz\" button in the Frontend."
1562
  msgstr "اخفاء زر \"اعادة الاختبار\" في الواجهة"
1563
 
1564
- #: lib/view/WpProQuiz_View_QuizEdit.php:84
1565
- #: lib/view/WpProQuiz_View_QuizEdit.php:89
1566
  msgid "Hide \"View question\" button"
1567
  msgstr "اخفاء زر \"عرض السؤال\""
1568
 
1569
- #: lib/view/WpProQuiz_View_QuizEdit.php:96
1570
  msgid "Hide the \"View question\" button in the Frontend."
1571
  msgstr "اخفاء زر \"عرض السؤال\" في الواجهة"
1572
 
1573
- #: lib/view/WpProQuiz_View_QuizEdit.php:103
1574
- #: lib/view/WpProQuiz_View_QuizEdit.php:108
1575
  msgid "Display question randomly"
1576
  msgstr "اعرض الاسئلة عشوائياً"
1577
 
1578
- #: lib/view/WpProQuiz_View_QuizEdit.php:119
1579
- #: lib/view/WpProQuiz_View_QuizEdit.php:124
1580
  msgid "Display answers randomly"
1581
  msgstr "اعرض الاجابات عشوائياً"
1582
 
1583
- #: lib/view/WpProQuiz_View_QuizEdit.php:135
1584
- #: lib/view/WpProQuiz_View_QuizEdit.php:140
1585
  msgid "Sort questions by category"
1586
  msgstr ""
1587
 
1588
- #: lib/view/WpProQuiz_View_QuizEdit.php:147
1589
  msgid ""
1590
  "Also works in conjunction with the \"display randomly question\" option."
1591
  msgstr ""
1592
 
1593
- #: lib/view/WpProQuiz_View_QuizEdit.php:162
1594
  msgid "Seconds"
1595
  msgstr "ثواني"
1596