Wp-Pro-Quiz - Version 0.8

Version Description

  • Bugfix im Frontend und Backend
Download this release

Release Info

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

Code changes from version 0.7 to 0.8

css/wpProQuiz_front.css CHANGED
@@ -46,6 +46,8 @@
46
 
47
  .wpProQuiz_questionListItem > table{
48
  border-collapse: collapse !important;
 
 
49
  width: 100%;
50
  }
51
 
@@ -54,7 +56,7 @@
54
  margin-bottom: 0 !important;
55
  }
56
 
57
- .wpProQuiz_list, wpProQuiz_listItem, .wpProQuiz_questionList, .wpProQuiz_sortStringList, .wpProQuiz_sortStringList, .wpProQuiz_maxtrixSortCriterion, .wpProQuiz_resultsList {
58
  list-style: none !important;
59
  padding: 0 !important;
60
  margin: 0 !important;
@@ -70,7 +72,6 @@
70
  position: relative !important;
71
  }
72
  .wpProQuiz_response {
73
- display: none !important;
74
  background: #F8FAF5 !important;
75
  border: 1px solid #C4C4C4 !important;
76
  padding: 5px !important;
@@ -109,7 +110,6 @@
109
  margin-bottom: 5px !important;
110
  }
111
  .wpProQuiz_time_limit_expired {
112
- display: none !important;
113
  font-weight: bold !important;
114
  font-size: 15px !important;
115
  text-align: center !important;
@@ -167,9 +167,6 @@
167
  padding: 5px !important;
168
  vertical-align: middle !important;
169
  }
170
- .wpProQuiz_resultsList > li {
171
- display: none !important;
172
- }
173
  .wpProQuiz_points {
174
  font-weight: bold !important;
175
  text-align: center !important;
46
 
47
  .wpProQuiz_questionListItem > table{
48
  border-collapse: collapse !important;
49
+ margin: 0 !important;
50
+ padding: 0 !important;
51
  width: 100%;
52
  }
53
 
56
  margin-bottom: 0 !important;
57
  }
58
 
59
+ .wpProQuiz_list, .wpProQuiz_listItem, .wpProQuiz_questionList, .wpProQuiz_sortStringList, .wpProQuiz_sortStringList, .wpProQuiz_maxtrixSortCriterion, .wpProQuiz_resultsList {
60
  list-style: none !important;
61
  padding: 0 !important;
62
  margin: 0 !important;
72
  position: relative !important;
73
  }
74
  .wpProQuiz_response {
 
75
  background: #F8FAF5 !important;
76
  border: 1px solid #C4C4C4 !important;
77
  padding: 5px !important;
110
  margin-bottom: 5px !important;
111
  }
112
  .wpProQuiz_time_limit_expired {
 
113
  font-weight: bold !important;
114
  font-size: 15px !important;
115
  text-align: center !important;
167
  padding: 5px !important;
168
  vertical-align: middle !important;
169
  }
 
 
 
170
  .wpProQuiz_points {
171
  font-weight: bold !important;
172
  text-align: center !important;
css/wpProQuiz_front.min.css CHANGED
@@ -1 +1 @@
1
- .wpProQuiz_answerCorrect{background:#6DB46D!important;font-weight:700!important;}.wpProQuiz_answerCorrect label{font-weight:700!important;}.wpProQuiz_answerIncorrect{background:#FF9191!important;font-weight:700!important;}.wpProQuiz_content{margin-top:10px!important;margin-bottom:10px!important;}.wpProQuiz_content h2{margin-bottom:10px!important;}.wpProQuiz_content input[type=button],.wpProQuiz_content input[type=button]:hover{margin:0!important;padding:5px 10px!important;background:#13455B!important;border-radius:11px!important;color:#FFF!important;font-weight:700!important;border:1px solid #13455B!important;box-shadow:1px 1px 1px #333!important;text-shadow:none!important;}.wpProQuiz_question_page{margin-bottom:10px!important;}.wpProQuiz_question_page span{font-weight:700!important;}.wpProQuiz_questionListItem{padding:3px!important;margin-bottom:5px!important;}.wpProQuiz_questionListItem > table{border-collapse:collapse!important;width:100%;}.wpProQuiz_questionListItem:last-child{padding:3px!important;margin-bottom:0!important;}.wpProQuiz_list,wpProQuiz_listItem,.wpProQuiz_questionList,.wpProQuiz_sortStringList,.wpProQuiz_sortStringList,.wpProQuiz_maxtrixSortCriterion,.wpProQuiz_resultsList{list-style:none!important;padding:0!important;margin:0!important;}.wpProQuiz_questionList{margin-bottom:10px!important;background:#F8FAF5!important;border:1px solid #C3D1A3!important;padding:5px!important;list-style:none!important;}.wpProQuiz_listItem{position:relative!important;}.wpProQuiz_response{display:none!important;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:700!important;}.wpProQuiz_sort{width:25px!important;}.wpProQuiz_results h3{margin-bottom:10px!important;}.wpProQuiz_sort_correct_answer{font-weight:700!important;margin-right:5px!important;display:none!important;}.wpProQuiz_sortable,.wpProQuiz_sortStringItem{padding:5px!important;border:1px solid #D3D3D3!important;box-shadow:2px 2px 1px #EEE;background-color:#F8FAF5!important;cursor:move;}.wpProQuiz_time_limit .time{font-weight:700!important;margin-top:5px!important;margin-bottom:5px!important;}.wpProQuiz_time_limit .progress{height:10px!important;background-color:blue!important;margin-bottom:5px!important;}.wpProQuiz_time_limit_expired{display:none!important;font-weight:700!important;font-size:15px!important;text-align:center!important;}.wpProQuiz_question_text{margin-bottom:10px!important;}.wpProQuiz_tipp{padding:10px!important;background-color:#DDECFF!important;border:1px dotted #363636!important;border-radius:10px!important;position:absolute!important;bottom:35px!important;left:5px!important;right:5px!important;box-shadow:2px 2px 5px 0 #313131!important;z-index:99999!important;}.wpProQuiz_matrixSortString,.wpProQuiz_matrixSortString > h3{margin-bottom:10px!important;margin-top:0!important;}.wpProQuiz_matrixSortString{background:#F8FAF5!important;border:1px solid #C3D1A3!important;padding:5px!important;}.wpProQuiz_sortStringList{padding:10px!important;}.wpProQuiz_sortStringList > li{float:left!important;margin-left:5px!important;margin-right:5px!important;margin-bottom:5px!important;}.wpProQuiz_sortStringItem{margin:0!important;}.wpProQuiz_maxtrixSortCriterion{padding:10px!important;}.wpProQuiz_placehold{background-color:#FFFFC2!important;padding:5px!important;height:30px!important;min-width:50px!important;}.wpProQuiz_maxtrixSortText{padding:5px!important;}.wpProQuiz_mextrixTr > td{border:1px solid #D1D1D1!important;padding:5px!important;vertical-align:middle!important;}.wpProQuiz_resultsList > li{display:none!important;}.wpProQuiz_points{font-weight:700!important;text-align:center!important;margin-bottom:20px!important;}.wpProQuiz_cloze input{background:transparent;border:0!important;border-bottom:1px solid!important;height:18px!important;margin:0!important;padding:0 4px!important;color:#000!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:400;}
1
+ .wpProQuiz_answerCorrect{background:#6DB46D!important;font-weight:700!important;}.wpProQuiz_answerCorrect label{font-weight:700!important;}.wpProQuiz_answerIncorrect{background:#FF9191!important;font-weight:700!important;}.wpProQuiz_content{margin-top:10px!important;margin-bottom:10px!important;}.wpProQuiz_content h2{margin-bottom:10px!important;}.wpProQuiz_content input[type=button],.wpProQuiz_content input[type=button]:hover{margin:0!important;padding:5px 10px!important;background:#13455B!important;border-radius:11px!important;color:#FFF!important;font-weight:700!important;border:1px solid #13455B!important;box-shadow:1px 1px 1px #333!important;text-shadow:none!important;}.wpProQuiz_question_page{margin-bottom:10px!important;}.wpProQuiz_question_page span{font-weight:700!important;}.wpProQuiz_questionListItem{padding:3px!important;margin-bottom:5px!important;}.wpProQuiz_questionListItem > table{border-collapse:collapse!important;margin:0!important;padding:0!important;width:100%;}.wpProQuiz_questionListItem:last-child{padding:3px!important;margin-bottom:0!important;}.wpProQuiz_list,.wpProQuiz_listItem,.wpProQuiz_questionList,.wpProQuiz_sortStringList,.wpProQuiz_sortStringList,.wpProQuiz_maxtrixSortCriterion,.wpProQuiz_resultsList{list-style:none!important;padding:0!important;margin:0!important;}.wpProQuiz_questionList{margin-bottom:10px!important;background:#F8FAF5!important;border:1px solid #C3D1A3!important;padding:5px!important;list-style:none!important;}.wpProQuiz_listItem{position:relative!important;}.wpProQuiz_response{background:#F8FAF5!important;border:1px solid #C4C4C4!important;padding:5px!important;margin-bottom:15px!important;box-shadow:1px 1px 2px #AAA!important;}.wpProQuiz_response span{font-weight:700!important;}.wpProQuiz_sort{width:25px!important;}.wpProQuiz_results h3{margin-bottom:10px!important;}.wpProQuiz_sort_correct_answer{font-weight:700!important;margin-right:5px!important;display:none!important;}.wpProQuiz_sortable,.wpProQuiz_sortStringItem{padding:5px!important;border:1px solid #D3D3D3!important;box-shadow:2px 2px 1px #EEE;background-color:#F8FAF5!important;cursor:move;}.wpProQuiz_time_limit .time{font-weight:700!important;margin-top:5px!important;margin-bottom:5px!important;}.wpProQuiz_time_limit .progress{height:10px!important;background-color:blue!important;margin-bottom:5px!important;}.wpProQuiz_time_limit_expired{font-weight:700!important;font-size:15px!important;text-align:center!important;}.wpProQuiz_question_text{margin-bottom:10px!important;}.wpProQuiz_tipp{padding:10px!important;background-color:#DDECFF!important;border:1px dotted #363636!important;border-radius:10px!important;position:absolute!important;bottom:35px!important;left:5px!important;right:5px!important;box-shadow:2px 2px 5px 0 #313131!important;z-index:99999!important;}.wpProQuiz_matrixSortString,.wpProQuiz_matrixSortString > h3{margin-bottom:10px!important;margin-top:0!important;}.wpProQuiz_matrixSortString{background:#F8FAF5!important;border:1px solid #C3D1A3!important;padding:5px!important;}.wpProQuiz_sortStringList{padding:10px!important;}.wpProQuiz_sortStringList > li{float:left!important;margin-left:5px!important;margin-right:5px!important;margin-bottom:5px!important;}.wpProQuiz_sortStringItem{margin:0!important;}.wpProQuiz_maxtrixSortCriterion{padding:10px!important;}.wpProQuiz_placehold{background-color:#FFFFC2!important;padding:5px!important;height:30px!important;min-width:50px!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:700!important;text-align:center!important;margin-bottom:20px!important;}.wpProQuiz_cloze input{background:transparent;border:0!important;border-bottom:1px solid!important;height:18px!important;margin:0!important;padding:0 4px!important;color:#000!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:400;}
js/wpProQuiz_admin.js CHANGED
@@ -247,10 +247,17 @@ jQuery(document).ready(function($) {
247
  };
248
 
249
  var validate = function () {
250
- var question = tinymce.editors.question.getContent();
 
251
  var type = $('input[name="answerType"]:checked');
252
  var $points = $('input[name="points"]');
253
 
 
 
 
 
 
 
254
  if(isNaN($points.val()) || $points.val() < 1) {
255
  alert(wpProQuizLocalize.no_nummber_points);
256
  $points.focus();
@@ -316,7 +323,13 @@ jQuery(document).ready(function($) {
316
  return false;
317
  }
318
  } else if(type.val() == 'cloze_answer') {
319
- var clozeText = tinymce.editors.cloze.getContent();
 
 
 
 
 
 
320
 
321
  if(isEmpty(clozeText)) {
322
  alert(wpProQuizLocalize.no_answer_msg);
@@ -325,7 +338,6 @@ jQuery(document).ready(function($) {
325
  }
326
 
327
  return true;
328
-
329
  };
330
 
331
  var isEmpty = function(str) {
@@ -405,13 +417,18 @@ jQuery(document).ready(function($) {
405
  $('#resultList').children().each(function() {
406
  if($(this).css('display') == 'none') {
407
 
408
- var $this = $(this);
409
- var id = $this.find('textarea[name="resultTextGrade[text][]"]').attr('id');
 
410
 
411
  $this.find('input[name="resultTextGrade[prozent][]"]').val('0');
412
  $this.find('input[name="resultTextGrade[activ][]"]').val('1').keyup();
413
 
414
- tinymce.editors[id].setContent('');
 
 
 
 
415
 
416
  tinyMCE.execCommand('mceRemoveControl', false, id);
417
 
@@ -468,7 +485,15 @@ jQuery(document).ready(function($) {
468
  return false;
469
  }
470
 
471
- if(isEmpty(tinymce.editors.text.getContent())) {
 
 
 
 
 
 
 
 
472
  alert(wpProQuizLocalize.no_quiz_start_msg);
473
  return false;
474
  }
247
  };
248
 
249
  var validate = function () {
250
+
251
+ var question = '';
252
  var type = $('input[name="answerType"]:checked');
253
  var $points = $('input[name="points"]');
254
 
255
+ if(tinymce.editors.question != undefined) {
256
+ question = tinymce.editors.question.getContent();
257
+ } else {
258
+ question = $('textarea[name="question"]').val();
259
+ }
260
+
261
  if(isNaN($points.val()) || $points.val() < 1) {
262
  alert(wpProQuizLocalize.no_nummber_points);
263
  $points.focus();
323
  return false;
324
  }
325
  } else if(type.val() == 'cloze_answer') {
326
+ var clozeText = '';
327
+
328
+ if(tinymce.editors.cloze != undefined) {
329
+ clozeText = tinymce.editors.cloze.getContent();
330
+ } else {
331
+ clozeText = $('textarea[name="cloze"]').val();
332
+ }
333
 
334
  if(isEmpty(clozeText)) {
335
  alert(wpProQuizLocalize.no_answer_msg);
338
  }
339
 
340
  return true;
 
341
  };
342
 
343
  var isEmpty = function(str) {
417
  $('#resultList').children().each(function() {
418
  if($(this).css('display') == 'none') {
419
 
420
+ var $this = $(this);
421
+ var $text = $this.find('textarea[name="resultTextGrade[text][]"]');
422
+ var id = $text.attr('id');
423
 
424
  $this.find('input[name="resultTextGrade[prozent][]"]').val('0');
425
  $this.find('input[name="resultTextGrade[activ][]"]').val('1').keyup();
426
 
427
+ if(tinymce.editors[id] != undefined) {
428
+ tinymce.editors[id].setContent('');
429
+ } else {
430
+ $text.val('');
431
+ }
432
 
433
  tinyMCE.execCommand('mceRemoveControl', false, id);
434
 
485
  return false;
486
  }
487
 
488
+ var text = '';
489
+
490
+ if(tinymce.editors.text != undefined) {
491
+ text = tinymce.editors.text.getContent();
492
+ } else {
493
+ text = $('textarea[name="text"]').val();
494
+ }
495
+
496
+ if(isEmpty(text)) {
497
  alert(wpProQuizLocalize.no_quiz_start_msg);
498
  return false;
499
  }
js/wpProQuiz_admin.min.js CHANGED
@@ -5,14 +5,14 @@ a('input[name="exportItems"]');this.checked?c.attr("checked",!0):c.attr("checked
5
  break;case "matrix_sort_answer":c.displayMatrixSortAnswer();break;case "cloze_answer":c.displayClozeAnswer()}});a(".addAnswer").click(function(){c.addAnswer(this)});a(".deleteAnswer").click(function(){c.deleteAnswer(this)});a("#saveQuestion").click(function(){return d()});a(".sort_answer ul, .classic_answer ul, .matrix_sort_answer ul").sortable({handle:".wpProQuiz_move",update:function(){c.setValueClassicAnswer()}});a("#wpProQuiz_correctSameText").change(function(){this.checked?a("#wpProQuiz_incorrectMassageBox").hide():
6
  a("#wpProQuiz_incorrectMassageBox").show()});a("#wpProQuiz_tip").change(function(){this.checked?a("#wpProQuiz_tipBox").show():a("#wpProQuiz_tipBox").hide()})},displaySingle:function(b){a(".classic_answer").find('input[name="answerJson[classic_answer][correct][]"]').each(function(){a("<input type="+b+" />").attr({name:this.name,value:this.value,checked:this.checked}).insertBefore(this)}).remove();a(".classic_answer").css("display","block")},displayFreeAnswer:function(){a(".free_answer").css("display",
7
  "block")},displaySortAnswer:function(){a(".sort_answer").css("display","block")},displayMatrixSortAnswer:function(){a(".matrix_sort_answer").show()},displayClozeAnswer:function(){a(".cloze_answer").show()},addAnswer:function(b){a(b).siblings("ul").children().first().clone().css("display","block").appendTo(a(b).siblings("ul"));c.setValueClassicAnswer();a(".deleteAnswer").click(function(){c.deleteAnswer(this)})},deleteAnswer:function(b){a(b).parent("li").remove();c.setValueClassicAnswer()},setValueClassicAnswer:function(){var b=
8
- 0;a('input[name="answerJson[classic_answer][correct][]"]').each(function(){this.value=b++});b=0;a('input[name="answerJson[answer_matrix_sort][sort_string_html][]"]').each(function(){this.value=b++});b=0;a('input[name="answerJson[answer_matrix_sort][answer_html][]"]').each(function(){this.value=b++})}},d=function(){var c=tinymce.editors.question.getContent(),d=a('input[name="answerType"]:checked'),f=a('input[name="points"]');if(isNaN(f.val())||1>f.val())return alert(wpProQuizLocalize.no_nummber_points),
9
- f.focus(),!1;if(b(c))return alert(wpProQuizLocalize.no_question_msg),!1;if("single"==d.val()||"multiple"==d.val()){var e=!0;if(1>a('input[name="answerJson[classic_answer][correct][]"]:checked').each(function(){e=""!=a.trim(a(this).parent().siblings("textarea").val())?e&1:!1}).size())return alert(wpProQuizLocalize.no_correct_msg),!1;if(!e)return alert(wpProQuizLocalize.no_answer_msg),!1}else if("sort_answer"==d.val()){if(e=!1,a('textarea[name="answerJson[answer_sort][answer][]"]').each(function(){e=
10
- b(a(this).val())?e|0:!0}),!e)return alert(wpProQuizLocalize.no_answer_msg),!1}else if("matrix_sort_answer"==d.val()){if(e=!1,a('textarea[name="answerJson[answer_matrix_sort][answer][]"]').each(function(){if(b(a(this).val()))e|=0;else{var c=a(this).parent().parent().find('textarea[name="answerJson[answer_matrix_sort][sort_string][]"]');e=b(c.val())?e|0:!0}}),!e)return alert(wpProQuizLocalize.no_answer_msg),!1}else if("cloze_answer"==d.val()&&(c=tinymce.editors.cloze.getContent(),b(c)))return alert(wpProQuizLocalize.no_answer_msg),
11
- !1;return!0},b=function(b){b=a.trim(b);return!b||0===b.length};c.setup();1>a('input[name="answerType"][checked="checked"]').size()&&a('input[name="answerType"][value="single"]').attr({checked:"checked"});a('input[name="answerType"]:checked').click();a("#wpProQuiz_correctSameText").change();a("#wpProQuiz_tip").change()};a.fn.wpProQuiz_questionOverall=function(){var c={saveSort:function(){var d={action:"wp_pro_quiz_update_sort",sort:c.parseSortArray()},b=(window.location.pathname+window.location.search).replace("admin.php",
12
- "admin-ajax.php")+"&action=save_sort";a.post(b,d,function(b){console.debug(b);a("#sortMsg").show(400).delay(1E3).hide(400)})},parseSortArray:function(){var c=[];a("tbody tr").each(function(){c.push(this.id.replace("wpProQuiz_questionId_",""))});return c},sortUpdate:function(){a(".wpProQuiz_questionOverall tbody").children().each(function(){$t=a(this).children().first().text(a(this).index()+1)})}};a(".wp-list-table tbody").sortable({handle:".wpProQuiz_move",update:c.sortUpdate});a(".wpProQuiz_delete").click(function(a){return!confirm(wpProQuizLocalize.delete_msg)?
13
- (a.preventDefault(),!1):!0});a("#wpProQuiz_saveSort").click(function(a){a.preventDefault();c.saveSort()});console.debug(a)};a.fn.wpProQuiz_quizEdit=function(){var c={addResult:function(){a("#resultList").children().each(function(){if("none"==a(this).css("display")){var b=a(this),c=b.find('textarea[name="resultTextGrade[text][]"]').attr("id");b.find('input[name="resultTextGrade[prozent][]"]').val("0");b.find('input[name="resultTextGrade[activ][]"]').val("1").keyup();tinymce.editors[c].setContent("");
14
- tinyMCE.execCommand("mceRemoveControl",!1,c);b.parent().children(":visible").last().after(b);tinyMCE.execCommand("mceAddControl",!1,c);a(this).show();return!1}})},deleteResult:function(b){a(b).parent().parent().hide();a(b).siblings('input[name="resultTextGrade[activ][]"]').val("0")},changeResult:function(b){b=a(b);if(c.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;
15
- 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),!1;if(d(tinymce.editors.text.getContent()))return alert(wpProQuizLocalize.no_quiz_start_msg),!1;if(a("#wpProQuiz_resultGradeEnabled:checked").length){var b=!0;console.debug("hier");a("#resultList").children().each(function(){if(a(this).is(":visible")&&!c.validResultInput(a(this).find('input[name="resultTextGrade[prozent][]"]').val()))return b=
16
- !1});if(!b)return alert(wpProQuizLocalize.fail_grade_result),!1}return!0}},d=function(b){b=a.trim(b);return!b||0===b.length};a("#statistics_on").change(function(){this.checked?a("#statistics_ip_lock_tr").show():a("#statistics_ip_lock_tr").hide()});a(".addResult").click(function(){c.addResult()});a(".deleteResult").click(function(){c.deleteResult(this)});a('input[name="resultTextGrade[prozent][]"]').keyup(function(){c.changeResult(this)}).keydown(function(a){13==a.which&&a.preventDefault()});a("#wpProQuiz_resultGradeEnabled").change(function(){this.checked?
17
- (a("#resultGrade").show(),a("#resultNormal").hide()):(a("#resultGrade").hide(),a("#resultNormal").show())});a("#wpProQuiz_save").click(function(a){c.validInput()||a.preventDefault()});a("#statistics_on").change();a("#wpProQuiz_resultGradeEnabled").change()};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();
18
- a(".wpProQuiz_questionEdit").length&&a(".wpProQuiz_questionEdit").wpProQuiz_questionEdit();a(".wpProQuiz_questionOverall").length&&a(".wpProQuiz_questionOverall").wpProQuiz_questionOverall()});
5
  break;case "matrix_sort_answer":c.displayMatrixSortAnswer();break;case "cloze_answer":c.displayClozeAnswer()}});a(".addAnswer").click(function(){c.addAnswer(this)});a(".deleteAnswer").click(function(){c.deleteAnswer(this)});a("#saveQuestion").click(function(){return d()});a(".sort_answer ul, .classic_answer ul, .matrix_sort_answer ul").sortable({handle:".wpProQuiz_move",update:function(){c.setValueClassicAnswer()}});a("#wpProQuiz_correctSameText").change(function(){this.checked?a("#wpProQuiz_incorrectMassageBox").hide():
6
  a("#wpProQuiz_incorrectMassageBox").show()});a("#wpProQuiz_tip").change(function(){this.checked?a("#wpProQuiz_tipBox").show():a("#wpProQuiz_tipBox").hide()})},displaySingle:function(b){a(".classic_answer").find('input[name="answerJson[classic_answer][correct][]"]').each(function(){a("<input type="+b+" />").attr({name:this.name,value:this.value,checked:this.checked}).insertBefore(this)}).remove();a(".classic_answer").css("display","block")},displayFreeAnswer:function(){a(".free_answer").css("display",
7
  "block")},displaySortAnswer:function(){a(".sort_answer").css("display","block")},displayMatrixSortAnswer:function(){a(".matrix_sort_answer").show()},displayClozeAnswer:function(){a(".cloze_answer").show()},addAnswer:function(b){a(b).siblings("ul").children().first().clone().css("display","block").appendTo(a(b).siblings("ul"));c.setValueClassicAnswer();a(".deleteAnswer").click(function(){c.deleteAnswer(this)})},deleteAnswer:function(b){a(b).parent("li").remove();c.setValueClassicAnswer()},setValueClassicAnswer:function(){var b=
8
+ 0;a('input[name="answerJson[classic_answer][correct][]"]').each(function(){this.value=b++});b=0;a('input[name="answerJson[answer_matrix_sort][sort_string_html][]"]').each(function(){this.value=b++});b=0;a('input[name="answerJson[answer_matrix_sort][answer_html][]"]').each(function(){this.value=b++})}},d=function(){var c="",d=a('input[name="answerType"]:checked'),f=a('input[name="points"]'),c=void 0!=tinymce.editors.question?tinymce.editors.question.getContent():a('textarea[name="question"]').val();
9
+ if(isNaN(f.val())||1>f.val())return alert(wpProQuizLocalize.no_nummber_points),f.focus(),!1;if(b(c))return alert(wpProQuizLocalize.no_question_msg),!1;if("single"==d.val()||"multiple"==d.val()){var e=!0;if(1>a('input[name="answerJson[classic_answer][correct][]"]:checked').each(function(){e=""!=a.trim(a(this).parent().siblings("textarea").val())?e&1:!1}).size())return alert(wpProQuizLocalize.no_correct_msg),!1;if(!e)return alert(wpProQuizLocalize.no_answer_msg),!1}else if("sort_answer"==d.val()){if(e=
10
+ !1,a('textarea[name="answerJson[answer_sort][answer][]"]').each(function(){e=b(a(this).val())?e|0:!0}),!e)return alert(wpProQuizLocalize.no_answer_msg),!1}else if("matrix_sort_answer"==d.val()){if(e=!1,a('textarea[name="answerJson[answer_matrix_sort][answer][]"]').each(function(){if(b(a(this).val()))e|=0;else{var c=a(this).parent().parent().find('textarea[name="answerJson[answer_matrix_sort][sort_string][]"]');e=b(c.val())?e|0:!0}}),!e)return alert(wpProQuizLocalize.no_answer_msg),!1}else if("cloze_answer"==
11
+ d.val()&&(c="",c=void 0!=tinymce.editors.cloze?tinymce.editors.cloze.getContent():a('textarea[name="cloze"]').val(),b(c)))return alert(wpProQuizLocalize.no_answer_msg),!1;return!0},b=function(b){b=a.trim(b);return!b||0===b.length};c.setup();1>a('input[name="answerType"][checked="checked"]').size()&&a('input[name="answerType"][value="single"]').attr({checked:"checked"});a('input[name="answerType"]:checked').click();a("#wpProQuiz_correctSameText").change();a("#wpProQuiz_tip").change()};a.fn.wpProQuiz_questionOverall=
12
+ function(){var c={saveSort:function(){var d={action:"wp_pro_quiz_update_sort",sort:c.parseSortArray()},b=(window.location.pathname+window.location.search).replace("admin.php","admin-ajax.php")+"&action=save_sort";a.post(b,d,function(b){console.debug(b);a("#sortMsg").show(400).delay(1E3).hide(400)})},parseSortArray:function(){var c=[];a("tbody tr").each(function(){c.push(this.id.replace("wpProQuiz_questionId_",""))});return c},sortUpdate:function(){a(".wpProQuiz_questionOverall tbody").children().each(function(){$t=
13
+ a(this).children().first().text(a(this).index()+1)})}};a(".wp-list-table tbody").sortable({handle:".wpProQuiz_move",update:c.sortUpdate});a(".wpProQuiz_delete").click(function(a){return!confirm(wpProQuizLocalize.delete_msg)?(a.preventDefault(),!1):!0});a("#wpProQuiz_saveSort").click(function(a){a.preventDefault();c.saveSort()});console.debug(a)};a.fn.wpProQuiz_quizEdit=function(){var c={addResult:function(){a("#resultList").children().each(function(){if("none"==a(this).css("display")){var b=a(this),
14
+ c=b.find('textarea[name="resultTextGrade[text][]"]'),d=c.attr("id");b.find('input[name="resultTextGrade[prozent][]"]').val("0");b.find('input[name="resultTextGrade[activ][]"]').val("1").keyup();void 0!=tinymce.editors[d]?tinymce.editors[d].setContent(""):c.val("");tinyMCE.execCommand("mceRemoveControl",!1,d);b.parent().children(":visible").last().after(b);tinyMCE.execCommand("mceAddControl",!1,d);a(this).show();return!1}})},deleteResult:function(b){a(b).parent().parent().hide();a(b).siblings('input[name="resultTextGrade[activ][]"]').val("0")},
15
+ changeResult:function(b){b=a(b);if(c.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),!1;var b="",b=void 0!=tinymce.editors.text?tinymce.editors.text.getContent():
16
+ a('textarea[name="text"]').val();if(d(b))return alert(wpProQuizLocalize.no_quiz_start_msg),!1;if(a("#wpProQuiz_resultGradeEnabled:checked").length){var g=!0;console.debug("hier");a("#resultList").children().each(function(){if(a(this).is(":visible")&&!c.validResultInput(a(this).find('input[name="resultTextGrade[prozent][]"]').val()))return g=!1});if(!g)return alert(wpProQuizLocalize.fail_grade_result),!1}return!0}},d=function(b){b=a.trim(b);return!b||0===b.length};a("#statistics_on").change(function(){this.checked?
17
+ a("#statistics_ip_lock_tr").show():a("#statistics_ip_lock_tr").hide()});a(".addResult").click(function(){c.addResult()});a(".deleteResult").click(function(){c.deleteResult(this)});a('input[name="resultTextGrade[prozent][]"]').keyup(function(){c.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(a){c.validInput()||
18
+ a.preventDefault()});a("#statistics_on").change();a("#wpProQuiz_resultGradeEnabled").change()};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_questionEdit").length&&a(".wpProQuiz_questionEdit").wpProQuiz_questionEdit();a(".wpProQuiz_questionOverall").length&&a(".wpProQuiz_questionOverall").wpProQuiz_questionOverall()});
lib/controller/WpProQuiz_Controller_Front.php CHANGED
@@ -33,10 +33,10 @@ class WpProQuiz_Controller_Front {
33
  'wpProQuiz_front_javascript',
34
  plugins_url('js/wpProQuiz_front.min.js', $this->_plugin_file),
35
  array('jquery-ui-sortable'),
36
- WPPROQUIZ_VERSION
 
37
  );
38
 
39
-
40
  if(is_numeric($id)) {
41
  ob_start();
42
 
33
  'wpProQuiz_front_javascript',
34
  plugins_url('js/wpProQuiz_front.min.js', $this->_plugin_file),
35
  array('jquery-ui-sortable'),
36
+ WPPROQUIZ_VERSION,
37
+ true
38
  );
39
 
 
40
  if(is_numeric($id)) {
41
  ob_start();
42
 
lib/view/WpProQuiz_View_FrontQuiz.php CHANGED
@@ -76,7 +76,7 @@ class WpProQuiz_View_FrontQuiz extends WpProQuiz_View_View {
76
  <p class="wpProQuiz_quiz_time">
77
  <?php _e('Your time: <span></span>', 'wp-pro-quiz') ?>
78
  </p>
79
- <p class="wpProQuiz_time_limit_expired">
80
  <?php _e('Time has elapsed', 'wp-pro-quiz'); ?>
81
  </p>
82
  <p class="wpProQuiz_points">
@@ -85,7 +85,7 @@ class WpProQuiz_View_FrontQuiz extends WpProQuiz_View_View {
85
  <div>
86
  <ul class="wpProQuiz_resultsList">
87
  <?php foreach($result['text'] as $resultText) { ?>
88
- <li>
89
  <div>
90
  <?php echo do_shortcode(apply_filters('comment_text', $resultText)); ?>
91
  </div>
@@ -202,7 +202,7 @@ class WpProQuiz_View_FrontQuiz extends WpProQuiz_View_View {
202
  <?php } ?>
203
  </ul>
204
  </div>
205
- <div class="wpProQuiz_response">
206
  <div style="display: none;" class="wpProQuiz_correct">
207
  <span>
208
  <?php _e('Correct', 'wp-pro-quiz'); ?>
76
  <p class="wpProQuiz_quiz_time">
77
  <?php _e('Your time: <span></span>', 'wp-pro-quiz') ?>
78
  </p>
79
+ <p class="wpProQuiz_time_limit_expired" style="display: none;">
80
  <?php _e('Time has elapsed', 'wp-pro-quiz'); ?>
81
  </p>
82
  <p class="wpProQuiz_points">
85
  <div>
86
  <ul class="wpProQuiz_resultsList">
87
  <?php foreach($result['text'] as $resultText) { ?>
88
+ <li style="display: none;">
89
  <div>
90
  <?php echo do_shortcode(apply_filters('comment_text', $resultText)); ?>
91
  </div>
202
  <?php } ?>
203
  </ul>
204
  </div>
205
+ <div class="wpProQuiz_response" style="display: none;">
206
  <div style="display: none;" class="wpProQuiz_correct">
207
  <span>
208
  <?php _e('Correct', 'wp-pro-quiz'); ?>
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: xeno010
3
  Tags: quiz, test, answer, question, learning
4
  Requires at least: 3.3
5
  Tested up to: 3.4.2
6
- Stable tag: 0.7
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -106,4 +106,7 @@ Own themes changes internal order of filters, what causes the problems. With ad
106
  * Import / export function added
107
 
108
  = 0.7 =
109
- * CSS: !important added to all CSS-properties
 
 
 
3
  Tags: quiz, test, answer, question, learning
4
  Requires at least: 3.3
5
  Tested up to: 3.4.2
6
+ Stable tag: 0.8
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
106
  * Import / export function added
107
 
108
  = 0.7 =
109
+ * CSS: !important added to all CSS-properties
110
+
111
+ = 0.8 =
112
+ * Bugfix im Frontend und Backend
wp-pro-quiz.php CHANGED
@@ -3,12 +3,12 @@
3
  Plugin Name: WP-Pro-Quiz
4
  Plugin URI: http://wordpress.org/extend/plugins/wp-pro-quiz
5
  Description: A powerful and beautiful quiz plugin for WordPress.
6
- Version: 0.7
7
  Author: Julius Fischer
8
  Author URI: http://www.it-gecko.de
9
  */
10
 
11
- define('WPPROQUIZ_VERSION', '0.7');
12
 
13
  include_once 'lib/controller/WpProQuiz_Controller_Admin.php';
14
  include_once 'lib/helper/WpProQuiz_Helper_DbUpgrade.php';
3
  Plugin Name: WP-Pro-Quiz
4
  Plugin URI: http://wordpress.org/extend/plugins/wp-pro-quiz
5
  Description: A powerful and beautiful quiz plugin for WordPress.
6
+ Version: 0.8
7
  Author: Julius Fischer
8
  Author URI: http://www.it-gecko.de
9
  */
10
 
11
+ define('WPPROQUIZ_VERSION', '0.8');
12
 
13
  include_once 'lib/controller/WpProQuiz_Controller_Admin.php';
14
  include_once 'lib/helper/WpProQuiz_Helper_DbUpgrade.php';