Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 141 | Rev 143 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 141 Rev 142
Línea 1014... Línea 1014...
1014
        },
1014
        },
1015
		submitHandler: function(form) {
1015
		submitHandler: function(form) {
Línea 1016... Línea 1016...
1016
		   
1016
		   
1017
		    var error = false;
1017
		    var error = false;
1018
		    if(objFormGenerator.sections.length == 0) {
1018
		    if(objFormGenerator.sections.length == 0) {
1019
		    	$.fn.showError('ERROR_SECCTIONS'.replace('%s','text'));
1019
		    	$.fn.showError('ERROR_SECCTIONS');
1020
		    	error = true;
1020
		    	error = true;
Línea 1021... Línea 1021...
1021
		    } else {
1021
		    } else {
1022
		    	
1022
		    	
Línea 1023... Línea 1023...
1023
		    	for(i = 0; i < objFormGenerator.sections.length; i++) 
1023
		    	for(i = 0; i < objFormGenerator.sections.length; i++) 
1024
		    	{
1024
		    	{
1025
		    		
1025
		    		
1026
		    		if(objFormGenerator.sections[i].questions.length == 0) {
1026
		    		if(objFormGenerator.sections[i].questions.length == 0) {
Línea 1027... Línea 1027...
1027
		    			//$.fn.showError( 'ERROR_QUESTION'.replace('%s', objFormGenerator.sections[i].name ));
1027
		    			$.fn.showError( 'ERROR_QUESTION'.replace('%s', objFormGenerator.sections[i].name ));
1028
		    			break;
1028
		    			break;
Línea 1044... Línea 1044...
1044
		    				var numberCorrect = 0;
1044
		    				var numberCorrect = 0;
Línea 1045... Línea 1045...
1045
		    				
1045
		    				
Línea 1046... Línea 1046...
1046
		    				
1046
		    				
1047
		    				if(objFormGenerator.sections[i].questions[j].options.length == 0) {
1047
		    				if(objFormGenerator.sections[i].questions[j].options.length == 0) {
1048
 
1048
 
1049
								//$.fn.showError( ERROR_OPTIONS.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
1049
								$.fn.showError( 'ERROR_OPTIONS'.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
Línea 1050... Línea 1050...
1050
								error = true;
1050
								error = true;
Línea 1074... Línea 1074...
1074
		    				}
1074
		    				}
Línea 1075... Línea 1075...
1075
 
1075
 
Línea 1076... Línea 1076...
1076
		    				if(objFormGenerator.sections[i].questions[j].type == 'simple' || objFormGenerator.sections[i].questions[j].type == 'multiple' ) {
1076
		    				if(objFormGenerator.sections[i].questions[j].type == 'simple' || objFormGenerator.sections[i].questions[j].type == 'multiple' ) {
1077
		    				
1077
		    				
1078
    		    				if(numberCorrect == 0) {
1078
    		    				if(numberCorrect == 0) {
1079
    		    					//$.fn.showError( ERROR_OPTIONS_CORRECT.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
1079
    		    					$.fn.showError( 'ERROR_OPTIONS_CORRECT'.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
1080
    		    					error = true;
1080
    		    					error = true;
1081
    		    					break;
1081
    		    					break;
1082
    		    				}
1082
    		    				}
1083
    		    				if(objFormGenerator.sections[i].questions[j].type == 'simple' && numberCorrect > 1) {
1083
    		    				if(objFormGenerator.sections[i].questions[j].type == 'simple' && numberCorrect > 1) {
1084
    		    					//$.fn.showError( ERROR_OPTIONS_DUPLICATE_CORRECT.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
1084
    		    					$.fn.showError( 'ERROR_OPTIONS_DUPLICATE_CORRECT'.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
1085
    		    					error = true;
1085
    		    					error = true;
1086
    		    					break;
1086
    		    					break;
1087
    		    				}
1087
    		    				}
1088
    		    				if(objFormGenerator.sections[i].questions[j].type == 'multiple' && numberCorrect == 1) {
1088
    		    				if(objFormGenerator.sections[i].questions[j].type == 'multiple' && numberCorrect == 1) {
1089
    		    					//$.fn.showError( ERROR_OPTIONS_ONE_CORRECT.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
1089
    		    					$.fn.showError( 'ERROR_OPTIONS_ONE_CORRECT'.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
1090
    		    					error = true;
1090
    		    					error = true;
1091
    		    					break;
1091
    		    					break;
Línea 1092... Línea 1092...
1092
    		    				}
1092
    		    				}
Línea 1093... Línea 1093...
1093
		    				}
1093
		    				}
1094
 
1094
 
1095
			 				if(objFormGenerator.sections[i].questions[j].type == 'multiple' && totalOption > valueQuestion ) {
1095
			 				if(objFormGenerator.sections[i].questions[j].type == 'multiple' && totalOption > valueQuestion ) {
1096
 
1096
 
Línea 1097... Línea 1097...
1097
								//$.fn.showError( ERROR_OPTIONS_SUM_VALUES.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
1097
								$.fn.showError( 'ERROR_OPTIONS_SUM_VALUES'.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
1098
		    					error = true;
1098
		    					error = true;
1099
		    					break;
1099
		    					break;
1100
			    			}
1100
			    			}
1101
 
1101
 
1102
		    				if(objFormGenerator.sections[i].questions[j].type == 'rating-open' && maxOption > valueQuestion ) {
1102
		    				if(objFormGenerator.sections[i].questions[j].type == 'rating-open' && maxOption > valueQuestion ) {
Línea 1103... Línea 1103...
1103
								//$.fn.showError( ERROR_OPTIONS_MAX_OPTION.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
1103
								$.fn.showError( 'ERROR_OPTIONS_MAX_OPTION'.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
Línea 1104... Línea 1104...
1104
		    					error = true;
1104
		    					error = true;
1105
		    					break;
1105
		    					break;
1106
			    			}
1106
			    			}
1107
						}
1107
						}
1108
	
1108
	
1109
		    		}
1109
		    		}