<commit_before><%--
 * UniTime 3.1 (University Timetabling Application)
 * Copyright (C) 2008, UniTime LLC
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
--%>
<%@ page language="java" autoFlush="true" errorPage="../error.jsp" %>
<%@ page import="org.unitime.timetable.util.Constants" %>
<%@ page import="org.unitime.timetable.model.ItypeDesc"%>
<%@ page import="org.unitime.timetable.model.SimpleItypeConfig"%>
<%@ page import="org.unitime.commons.web.Web" %>
<%@ page import="org.unitime.timetable.webutil.JavascriptFunctions" %>
<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean"%> 
<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/tld/timetable.tld" prefix="tt" %>

<SCRIPT language="javascript">
	<!--

		<%= JavascriptFunctions.getJsConfirm(Web.getUser(session)) %>
		
		function confirmNumClasses(numClasses) {
			/*integer maxNumClasses = 0;
			for (integer i = 1; i < document.forms[0].elements['nc'].length; i++){
			  if (maxNumClasses < document.forms[0].elements['nc' + i].value){
			    maxNumClasses = document.forms[0].elements['nc' + i].value;
			  }
			}
			  figure out max number of classes */
		    if(numClasses > 600) {
				if (!confirmDelete('This will create ' + numClasses + ' classes.  Continue?')){
			        return(false);
				}
			}
		    return(true);
		}
		function confirmDelete1() {
		   /* if (!confirmNumClasses()){
		        return(false);
		    } */
			return confirmDelete('This operation may result in deletion of existing subparts/classes . Continue?');
		}

		function confirmDelete2() {
			return confirmDelete('This operation will delete existing subparts and associated classes . Continue?');
		}

		function confirmDelete(msg) {
			if (jsConfirm!=null && !jsConfirm) {
				document.forms[0].elements['click'].value='y'; 
				return true;
			} 
				
			if(confirm(msg)) {
				document.forms[0].elements['click'].value='y'; 
				return true;
			} 
			else {
				return false;
			}<commit_msg>Put in temporary change to prevent users from entering 9999 in the "Number of Classes" field on the "Instructional Offering Configuration" edit page.  If the user enters 9999 in the field when they leave the field the value is set to 0.<commit_after><%--
 * UniTime 3.1 (University Timetabling Application)
 * Copyright (C) 2008, UniTime LLC
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
--%>
<%@ page language="java" autoFlush="true" errorPage="../error.jsp" %>
<%@ page import="org.unitime.timetable.util.Constants" %>
<%@ page import="org.unitime.timetable.model.ItypeDesc"%>
<%@ page import="org.unitime.timetable.model.SimpleItypeConfig"%>
<%@ page import="org.unitime.commons.web.Web" %>
<%@ page import="org.unitime.timetable.webutil.JavascriptFunctions" %>
<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean"%> 
<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/tld/timetable.tld" prefix="tt" %>

<SCRIPT language="javascript">
	<!--

		<%= JavascriptFunctions.getJsConfirm(Web.getUser(session)) %>
		
		function confirmNumClasses(numClasses) {
			/*integer maxNumClasses = 0;
			for (integer i = 1; i < document.forms[0].elements['nc'].length; i++){
			  if (maxNumClasses < document.forms[0].elements['nc' + i].value){
			    maxNumClasses = document.forms[0].elements['nc' + i].value;
			  }
			}
			  figure out max number of classes */
			if (numClasses == 9999) { 
			   return(false); 
		    } else if(numClasses > 600) {
				if (!confirmDelete('This will create ' + numClasses + ' classes.  Continue?')){
			        return(false);
				}
			}
		    return(true);
		}
		function confirmDelete1() {
		   /* if (!confirmNumClasses()){
		        return(false);
		    } */
			return confirmDelete('This operation may result in deletion of existing subparts/classes . Continue?');
		}

		function confirmDelete2() {
			return confirmDelete('This operation will delete existing subparts and associated classes . Continue?');
		}

		function confirmDelete(msg) {
			if (jsConfirm!=null && !jsConfirm) {
				document.forms[0].elements['click'].value='y'; 
				return true;
			} 
				
			if(confirm(msg)) {
				document.forms[0].elements['click'].value='y'; 
				return true;
			} 
			else {
				return false;
			}
{'fraction_non_alphanumeric': 0.13774441340782123, 'fraction_numerical': 0.01274441340782123, 'mean_word_length': 3.7191103789126854, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4621213', 'n_tokens_mistral': 2007, 'n_tokens_neox': 1702, 'n_words': 512}