Línea 48... |
Línea 48... |
48 |
|
48 |
|
49 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
|
49 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
|
50 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
|
50 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
|
Línea -... |
Línea 51... |
- |
|
51 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-input-number/input-number-format.jquery.js'));
|
- |
|
52 |
|
- |
|
53 |
// bootbox Alert //
|
51 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-input-number/input-number-format.jquery.js'));
|
54 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootbox/bootbox.min.js'));
|
Línea 52... |
Línea 55... |
52 |
|
55 |
|
Línea 1078... |
Línea 1081... |
1078 |
var questionNumber = j + 1;
|
1081 |
var questionNumber = j + 1;
|
1079 |
var numberCorrect = 0;
|
1082 |
var numberCorrect = 0;
|
Línea 1080... |
Línea 1083... |
1080 |
|
1083 |
|
1081 |
|
1084 |
|
1082 |
if(objFormGenerator.sections[i].questions[j].options.length == 0) {
|
1085 |
if(objFormGenerator.sections[i].questions[j].options.length == 0) {
|
1083 |
$.fn.showError('El "' + objFormGenerator.sections[i].name + '" seccion, La pregunta #' + questionNumber + ' no tiene opciones');
|
1086 |
$.fn.showError('El "' + objFormGenerator.sections[i].name + '" sección, La pregunta #' + questionNumber + ' no tiene opciones');
|
1084 |
error = true;
|
1087 |
error = true;
|
Línea 1109... |
Línea 1112... |
1109 |
}
|
1112 |
}
|
Línea 1110... |
Línea 1113... |
1110 |
|
1113 |
|
Línea 1111... |
Línea 1114... |
1111 |
if(objFormGenerator.sections[i].questions[j].type == 'simple' || objFormGenerator.sections[i].questions[j].type == 'multiple' ) {
|
1114 |
if(objFormGenerator.sections[i].questions[j].type == 'simple' || objFormGenerator.sections[i].questions[j].type == 'multiple' ) {
|
1112 |
|
1115 |
|
1113 |
if(numberCorrect == 0) {
|
1116 |
if(numberCorrect == 0) {
|
1114 |
$.fn.showError('El "' + objFormGenerator.sections[i].name + '" seccion, La pregunta #' + questionNumber + ' no tiene una opcion correcta');
|
1117 |
$.fn.showError('El "' + objFormGenerator.sections[i].name + '" sección, La pregunta #' + questionNumber + ' no tiene una opcion correcta');
|
1115 |
error = true;
|
1118 |
error = true;
|
1116 |
break;
|
1119 |
break;
|
1117 |
}
|
1120 |
}
|
1118 |
if(objFormGenerator.sections[i].questions[j].type == 'simple' && numberCorrect > 1) {
|
1121 |
if(objFormGenerator.sections[i].questions[j].type == 'simple' && numberCorrect > 1) {
|
1119 |
$.fn.showError('El "' + objFormGenerator.sections[i].name + '" seccion, La pregunta #' + questionNumber + ' tiene más de una opción correcta');
|
1122 |
$.fn.showError('El "' + objFormGenerator.sections[i].name + '" sección, La pregunta #' + questionNumber + ' tiene más de una opción correcta');
|
1120 |
error = true;
|
1123 |
error = true;
|
1121 |
break;
|
1124 |
break;
|
1122 |
}
|
1125 |
}
|
1123 |
if(objFormGenerator.sections[i].questions[j].type == 'multiple' && numberCorrect == 1) {
|
1126 |
if(objFormGenerator.sections[i].questions[j].type == 'multiple' && numberCorrect == 1) {
|
1124 |
$.fn.showError('El "' + objFormGenerator.sections[i].name + '" seccion, La pregunta #' + questionNumber + ' solo tiene una opción correcta');
|
1127 |
$.fn.showError('El "' + objFormGenerator.sections[i].name + '" sección, La pregunta #' + questionNumber + ' solo tiene una opción correcta');
|
1125 |
error = true;
|
1128 |
error = true;
|
1126 |
break;
|
1129 |
break;
|
Línea 1127... |
Línea 1130... |
1127 |
}
|
1130 |
}
|
Línea 1128... |
Línea 1131... |
1128 |
}
|
1131 |
}
|
1129 |
|
1132 |
|
1130 |
//console.log('totalOption = ' + totalOption + ' valueQuestion = ' + valueQuestion );
|
1133 |
//console.log('totalOption = ' + totalOption + ' valueQuestion = ' + valueQuestion );
|
1131 |
|
1134 |
|
1132 |
if(objFormGenerator.sections[i].questions[j].type == 'multiple' && totalOption > valueQuestion ) {
|
1135 |
if(objFormGenerator.sections[i].questions[j].type == 'multiple' && totalOption > valueQuestion ) {
|
Línea 1133... |
Línea 1136... |
1133 |
$.fn.showError('El "' + objFormGenerator.sections[i].name + '" seccion, La pregunta #' + questionNumber + ' la suma de los valores de las opciones es mayor que el valor de la pregunta');
|
1136 |
$.fn.showError('El "' + objFormGenerator.sections[i].name + '" sección, La pregunta #' + questionNumber + ' la suma de los valores de las opciones es mayor que el valor de la pregunta');
|
Línea 1134... |
Línea 1137... |
1134 |
error = true;
|
1137 |
error = true;
|
1135 |
break;
|
1138 |
break;
|
1136 |
}
|
1139 |
}
|
1137 |
|
1140 |
|
1138 |
//console.log('maxOption = ' + maxOption + ' valueQuestion = ' + valueQuestion );
|
1141 |
//console.log('maxOption = ' + maxOption + ' valueQuestion = ' + valueQuestion );
|
1139 |
|
1142 |
|