You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(275) |
Jul
(81) |
Aug
(19) |
Sep
(26) |
Oct
(190) |
Nov
(118) |
Dec
(16) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(9) |
Feb
(318) |
Mar
(251) |
Apr
(354) |
May
(209) |
Jun
(261) |
Jul
(226) |
Aug
(136) |
Sep
(156) |
Oct
(30) |
Nov
(5) |
Dec
(13) |
| 2009 |
Jan
(26) |
Feb
(35) |
Mar
(63) |
Apr
(21) |
May
(26) |
Jun
(33) |
Jul
(55) |
Aug
(71) |
Sep
(23) |
Oct
(40) |
Nov
(18) |
Dec
(13) |
| 2010 |
Jan
(17) |
Feb
(98) |
Mar
(39) |
Apr
(25) |
May
(107) |
Jun
(257) |
Jul
(270) |
Aug
(206) |
Sep
(237) |
Oct
(187) |
Nov
(302) |
Dec
(187) |
| 2011 |
Jan
(63) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Tomas M. <to...@us...> - 2010-12-01 17:34:19
|
Update of /cvsroot/unitime/UniTimeBannerAddOn/JavaSource/org/unitime/banner/util In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv22821/JavaSource/org/unitime/banner/util Modified Files: SendBannerAuditXml.java BannerChangeAction.java MeetingElement.java Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) Index: SendBannerAuditXml.java =================================================================== RCS file: /cvsroot/unitime/UniTimeBannerAddOn/JavaSource/org/unitime/banner/util/SendBannerAuditXml.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SendBannerAuditXml.java 14 Oct 2010 10:42:22 -0000 1.3 --- SendBannerAuditXml.java 1 Dec 2010 17:34:11 -0000 1.4 *************** *** 49,52 **** --- 49,65 ---- */ public static void main(String[] args) throws Exception { + if (args.length != 4){ + Debug.error("The following arguments are required:"); + Debug.error(" <Academic Initiative> <Year> <Term> <Syncronize>"); + Debug.error(""); + Debug.error(" Academic Initiative - The value set as the academic initiative for the session."); + Debug.error(" Year - The value set as the academic year for the session."); + Debug.error(" Term - The value set as the academic term for the session."); + Debug.error(" Syncronize - Either TRUE or FALSE. "); + Debug.error(" If the audit should send a message to syncronize banner to match the values in UniTime set this to TRUE."); + Debug.error(""); + throw(new Exception("Missing arguments.")); + } + ToolBox.configureLogging(); *************** *** 57,63 **** args[1], args[2]); Document document = bsea.saveXml(session, new Properties()); Element root = document.getRootElement(); ! root.addAttribute("SYNC", args[3]); // Delete existing AUDIT messages for term --- 70,88 ---- args[1], args[2]); + if (session == null){ + Debug.error("Session not found for:"); + Debug.error(" Academic Initiative = " + (args[0] == null?"<no value>":args[0])); + Debug.error(" Year = " + (args[1] == null?"<no value>":args[1])); + Debug.error(" Term = " + (args[2] == null?"<no value>":args[2])); + throw(new Exception("ERROR: No Session Found.")); + } + if (!"TRUE".equalsIgnoreCase(args[3]) && !"FALSE".equalsIgnoreCase(args[3])){ + Debug.error("Invalid value for Syncronize parameter: " + args[3]); + Debug.error(" valid values are: TRUE, FALSE"); + throw(new Exception("ERROR: Invalid value for Syncronize.")); + } Document document = bsea.saveXml(session, new Properties()); Element root = document.getRootElement(); ! root.addAttribute("SYNC", args[3].toUpperCase()); // Delete existing AUDIT messages for term Index: MeetingElement.java =================================================================== RCS file: /cvsroot/unitime/UniTimeBannerAddOn/JavaSource/org/unitime/banner/util/MeetingElement.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MeetingElement.java 14 Oct 2010 14:04:47 -0000 1.2 --- MeetingElement.java 1 Dec 2010 17:34:11 -0000 1.3 *************** *** 24,27 **** --- 24,28 ---- import java.util.Calendar; import java.util.Date; + import java.util.Enumeration; import java.util.Iterator; import java.util.TreeMap; *************** *** 118,122 **** - @SuppressWarnings({ "unchecked", "unchecked" }) public static Vector<MeetingElement> createMeetingElementsFor(BannerSection bannerSection, Class_ clazz, org.hibernate.Session hibSession, BannerMessage bannerMessage){ Vector<MeetingElement> elements = new Vector<MeetingElement>(); --- 119,122 ---- *************** *** 263,272 **** } ! private void setDaysOfWeek(IntEnumeration e){ if (e == null){ return; } while (e.hasMoreElements()){ ! int day = (int)e.nextInt(); if (day == Constants.DAY_MON){ monday = true; --- 263,272 ---- } ! private void setDaysOfWeek(Enumeration<Integer> e){ if (e == null){ return; } while (e.hasMoreElements()){ ! int day = e.nextElement(); if (day == Constants.DAY_MON){ monday = true; Index: BannerChangeAction.java =================================================================== RCS file: /cvsroot/unitime/UniTimeBannerAddOn/JavaSource/org/unitime/banner/util/BannerChangeAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BannerChangeAction.java 20 Jul 2010 03:28:10 -0000 1.1 --- BannerChangeAction.java 1 Dec 2010 17:34:11 -0000 1.2 *************** *** 82,86 **** * @see org.unitime.timetable.interfaces.ExternalClassEditAction#performExternalExternalClassEditAction(org.unitime.timetable.model.Class_, org.hibernate.Session) */ - @SuppressWarnings("unchecked") public void performExternalClassEditAction(Class_ clazz, Session hibSession) { --- 82,85 ---- *************** *** 198,202 **** * @see org.unitime.timetable.interfaces.ExternalSolutionCommitAction#performExternalSolutionCommitAction(org.unitime.timetable.model.Solution, org.hibernate.Session) */ - @SuppressWarnings("unchecked") public void performExternalSolutionCommitAction(Set<Solution> solutions, Session hibSession) { --- 197,200 ---- |
|
From: Tomas M. <to...@us...> - 2010-12-01 17:34:19
|
Update of /cvsroot/unitime/UniTimeBannerAddOn/Documentation/Interfaces In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv22821/Documentation/Interfaces Added Files: BannerStudentUpdates.dtd Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) --- NEW FILE: BannerStudentUpdates.dtd --- <!-- * UniTime 3.1 (University Timetabling Application) * Copyright (C) 2010, 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. --> <!ELEMENT enrollment EMPTY > <!ATTLIST enrollment crn NMTOKEN #REQUIRED > <!ELEMENT student ( enrollment* ) > <!ATTLIST student academicArea NMTOKEN #REQUIRED > <!ATTLIST student classification NMTOKEN #REQUIRED > <!ATTLIST student email CDATA #IMPLIED > <!ATTLIST student externalId NMTOKEN #REQUIRED > <!ATTLIST student firstName NMTOKEN #REQUIRED > <!ATTLIST student lastName NMTOKEN #REQUIRED > <!ATTLIST student major NMTOKEN #REQUIRED > <!ATTLIST student middleName NMTOKEN #IMPLIED > <!ATTLIST student session NMTOKEN #REQUIRED > <!ELEMENT studentUpdates ( student+ ) > |
|
From: Tomas M. <to...@us...> - 2010-12-01 17:34:19
|
Update of /cvsroot/unitime/UniTimeBannerAddOn/JavaSource/org/unitime/banner/commons/hibernate/util In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv22821/JavaSource/org/unitime/banner/commons/hibernate/util Modified Files: BannerUpdateListener.java Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) Index: BannerUpdateListener.java =================================================================== RCS file: /cvsroot/unitime/UniTimeBannerAddOn/JavaSource/org/unitime/banner/commons/hibernate/util/BannerUpdateListener.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BannerUpdateListener.java 14 Oct 2010 14:04:47 -0000 1.2 --- BannerUpdateListener.java 1 Dec 2010 17:34:10 -0000 1.3 *************** *** 46,49 **** --- 46,50 ---- DataExchangeHelper.sExportRegister.put("schedule", BannerSectionAuditExport.class); DataExchangeHelper.sImportRegister.put("enterprise", org.unitime.banner.dataexchange.BannerStudentEnrollmentMessage.class); + DataExchangeHelper.sImportRegister.put("studentUpdates", org.unitime.banner.dataexchange.BannerStudentDataUpdate.class); } |
|
From: Tomas M. <to...@us...> - 2010-12-01 17:34:19
|
Update of /cvsroot/unitime/UniTimeBannerAddOn/JavaSource/org/unitime/banner/commons/hibernate/clob In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv22821/JavaSource/org/unitime/banner/commons/hibernate/clob Removed Files: XmlClobType.java Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) --- XmlClobType.java DELETED --- |
|
From: Tomas M. <to...@us...> - 2010-12-01 17:34:18
|
Update of /cvsroot/unitime/UniTimeBannerAddOn/Documentation/Database/MySQL/Changes In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv22821/Documentation/Database/MySQL/Changes Added Files: 02 Banner Response Indexes.sql 03 Banner CRN Lookup Indexes.sql Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) --- NEW FILE: 03 Banner CRN Lookup Indexes.sql --- /* * UniTime 3.1 (University Timetabling Application) * Copyright (C) 2010, 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. */ /* * Author: Stephanie Schluttenhofer */ use timetable; /* * Add indexes to the Banner Section and Banner Session tables */ create index idx_banner_section_sess_crn on banner_section(session_id, crn); create index idx_banner_session_term_code on banner_session(banner_term_code); /* * Update database version */ update application_config set value='3' where name='tmtbl.db.banner.version'; commit; --- NEW FILE: 02 Banner Response Indexes.sql --- /* * UniTime 3.1 (University Timetabling Application) * Copyright (C) 2010, 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. */ /* * Author: Stephanie Schluttenhofer */ use timetable; /* * Add indexes to the Banner Response table */ create index idx_response_term_code on banner_response(term_code); create index idx_response_crn on banner_response(crn); create index idx_response_xlst_group on banner_response(xlst_group); /* * Update database version */ update application_config set value='2' where name='tmtbl.db.banner.version'; commit; |
|
From: Tomas M. <to...@us...> - 2010-12-01 17:34:18
|
Update of /cvsroot/unitime/UniTimeBannerAddOn/JavaSource/org/unitime/banner/form In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv22821/JavaSource/org/unitime/banner/form Modified Files: BannerOfferingModifyForm.java BannerCourseListForm.java Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) Index: BannerOfferingModifyForm.java =================================================================== RCS file: /cvsroot/unitime/UniTimeBannerAddOn/JavaSource/org/unitime/banner/form/BannerOfferingModifyForm.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BannerOfferingModifyForm.java 20 Jul 2010 03:28:10 -0000 1.1 --- BannerOfferingModifyForm.java 1 Dec 2010 17:34:11 -0000 1.2 *************** *** 92,95 **** --- 92,96 ---- private List classHasErrors; + /* private static String BANNER_SECTION_IDS_TOKEN = "bannerSectionIds"; private static String BANNER_SECTION_SECTION_IDS_TOKEN = "bannerSectionSectionIds"; *************** *** 104,108 **** private static String ROOMS_TOKEN = "rooms"; private static String INSTRUCTORS_TOKEN = "instructors"; ! // --------------------------------------------------------- Classes --- 105,109 ---- private static String ROOMS_TOKEN = "rooms"; private static String INSTRUCTORS_TOKEN = "instructors"; ! */ // --------------------------------------------------------- Classes *************** *** 275,307 **** } - private boolean determineBooleanValueAtIndex(List l, int index){ - if (l == null){ - return(false); - } - if (l.size() == 0){ - return(false); - } - if (l.size() < (index + 1)){ - return(false); - } - if (l.get(index) == null){ - return(false); - } - if (l.get(index) instanceof Boolean) { - Boolean value = (Boolean) l.get(index); - return(value.booleanValue()); - } - if (l.get(index) instanceof String) { - String str_value = (String) l.get(index); - if (str_value.equals("on")){ - return(true); - } else if (str_value.equals("yes")){ - return(true); - } else { - return(Boolean.parseBoolean(str_value)); - } - } - return(false); - } public List getBannerSectionIds() { return bannerSectionIds; --- 276,279 ---- *************** *** 401,423 **** } - private int indexOfLastChildClass(String classId){ - - int clsIndex = this.getBannerSectionIds().indexOf(classId); - int index = clsIndex + 1; - while (index < (this.getBannerSectionIds().size())){ - if (this.getBannerSectionLabelIndents().get(index).toString().equals(this.getBannerSectionLabelIndents().get(clsIndex).toString())){ - break; - } else { - if (this.getBannerSectionLabelIndents().get(index).toString().length() < this.getBannerSectionLabelIndents().get(clsIndex).toString().length()){ - break; - } - } - index++; - } - index--; - return index; - } - - public Integer getSubjectAreaId() { return subjectAreaId; --- 373,376 ---- Index: BannerCourseListForm.java =================================================================== RCS file: /cvsroot/unitime/UniTimeBannerAddOn/JavaSource/org/unitime/banner/form/BannerCourseListForm.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BannerCourseListForm.java 20 Jul 2010 03:28:10 -0000 1.1 --- BannerCourseListForm.java 1 Dec 2010 17:34:11 -0000 1.2 *************** *** 63,68 **** private String buttonAction; - private InstructionalOffering instructionalOffering; - private String subjectAreaAbbv; --- 63,66 ---- *************** *** 75,86 **** /** - * @param instructionalOffering - * The instructionalOffering to set. - */ - public void setInstructionalOffering(InstructionalOffering instructionalOffering) { - this.instructionalOffering = instructionalOffering; - } - - /** * @return Returns the controlCourseOfferings. */ --- 73,76 ---- *************** *** 284,288 **** showNotOffered=null; buttonAction=null; - instructionalOffering=null; subjectAreaAbbv=null; isControl=null; --- 274,277 ---- |
|
From: Tomas M. <to...@us...> - 2010-12-01 12:22:22
|
Update of /cvsroot/unitime/UniTime/Documentation/Interfaces In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv2046/Documentation/Interfaces Modified Files: CourseOfferingExport.dtd Log Message: added incremental toggle Index: CourseOfferingExport.dtd =================================================================== RCS file: /cvsroot/unitime/UniTime/Documentation/Interfaces/CourseOfferingExport.dtd,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** CourseOfferingExport.dtd 1 Dec 2010 11:10:48 -0000 1.10 --- CourseOfferingExport.dtd 1 Dec 2010 12:22:14 -0000 1.11 *************** *** 73,76 **** --- 73,77 ---- <!ATTLIST offerings useMeetsWith ( false | true ) #IMPLIED > <!ATTLIST offerings created CDATA #IMPLIED > + <!ATTLIST offerings incremental ( false | true ) "false" > <!ELEMENT room EMPTY > |
|
From: Tomas M. <to...@us...> - 2010-12-01 12:22:10
|
Update of /cvsroot/unitime/UniTime/WebContent/help In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv2024/WebContent/help Modified Files: Release-Notes.xml Log Message: added incremental toggle Index: Release-Notes.xml =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/help/Release-Notes.xml,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** Release-Notes.xml 1 Dec 2010 11:10:52 -0000 1.72 --- Release-Notes.xml 1 Dec 2010 12:22:02 -0000 1.73 *************** *** 143,146 **** --- 143,159 ---- <line>Course timetabling solver: handling of meet with constraint improved</line> <line>Course offerings: course number can be in lower case (automatic conversion to upper case is disabled when tmtbl.courseNumber.upperCase property is set to false)</line> + <line>Course offering import: allow for incremental mode + <line>Set by attribute incremental on the root element (boolean, defalts to false)</line> + <line>If incremental, course offerings / courses that are not included in the file are left untouched (i.e., not deleted at the end)</line> + </line> + <line>Timetable: Allow for boolean expressions in the filter (e.g., ME or ENAD will match all rooms from ME or ENAD buildings) + <line>Also allow for regular expressions (e.g., regex:"ME .*[A-Za-z]" will match all ME rooms ending with a character)</line> + <line>By default, the name must contain all the terms (e.g., ME 200 will only match ME 200 room and not ME 2001)</line> + <line>Partial matches can be done by using find: attribute (e.g., find:"ME 200")</line> + <line>Term matches are case insensitive (me will match ME building)</line> + <line>Also, when displaying save solution, display dates instead of extended date pattern names.</line> + </line> + <line>Test HQL: Allow to change the maximal number of displayed lines by setting the tmtbl.test_hql.max_line application property.</line> + <line>XML imports: Ensure that the user that initiated the import is used for the change-log and also for sending emails in the course offering import.</line> </description> </item> |
|
From: Nightly B. <no...@un...> - 2010-12-01 12:07:26
|
Download the resultant file at http://www.unitime.org/uct_builds.php, see the attached build and change logs for more details. |
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13954/JavaSource/org/unitime/timetable/action Modified Files: SubjectAreaEditAction.java LoginAction.java DeptStatusTypeEditAction.java UserEditAction.java TilesRedirectAction.java InstructorSearchAction.java ReservationEditAction.java PreferenceLevelListAction.java CourseReservationEditAction.java ExactTimeEditAction.java MeetingListAction.java TimetableManagerListAction.java ClassInstructorAssignmentAction.java EditRoomGroupAction.java InstructorListAction.java RoomGroupListAction.java InstructionalOfferingModifyAction.java ClassInfoAction.java PreferencesAction.java EventEditAction.java SolverInfoDefAction.java StudentSolverAction.java EventDetailAction.java EventStandardNotesAction.java ReservationListAction.java ExamListAction.java DesignatorListAction.java DepartmentEditAction.java RoomSearchAction.java InstructorPrefEditAction.java CrossListsModifyAction.java ExamDistributionPrefsAction.java SettingsAction.java SolverLogAction.java InstructionalOfferingChangeAction.java LastChangesAction.java CbsAction.java EditRoomDeptAction.java BuildingEditAction.java SessionEditAction.java SectioningDemoAction.java ExamGridAction.java SchedulingSubpartDetailAction.java SolverSettingsAction.java PosReservationEditAction.java ExamSolverAction.java ExamDetailAction.java InstructionalOfferingDetailAction.java DistributionPrefsAction.java ExamEditAction.java BackAction.java SolverParamDefAction.java ExamPdfReportAction.java InstructionalOfferingShowSearchAction.java RoomGroupAddAction.java ClassAssignmentsReportShowSearchAction.java ExamAssignmentReportAction.java EditRoomAction.java EnrollmentAuditPdfReportAction.java SolverParamGroupsAction.java DistributionTypeListAction.java RoomTypeEditAction.java ExamSolverLogAction.java PersonalizedExamReportAction.java DataImportAction.java ItypeDescEditAction.java UnassignedExamsAction.java ClassDetailAction.java TimetableAction.java InstructorListUpdateAction.java InstructionalOfferingListAction.java AssignmentHistoryAction.java CourseOfferingEditAction.java RoleListAction.java SolutionReportAction.java RoomGroupSearchAction.java AssignedExamsAction.java RoomFeatureSearchAction.java UnassignedAction.java ListSolutionsAction.java EventGridAction.java HibernateQueryTestAction.java ClassEditAction.java ApplicationConfigAction.java ExamChangesAction.java AddNonUnivLocationAction.java InstructorAddAction.java ClassSearchAction.java EditRoomFeatureAction.java DatePatternEditAction.java AddSpecialUseRoomAction.java StudentSolverLogAction.java InstructionalOfferingSearchAction.java SubjectListAction.java SchedulingSubpartEditAction.java RoomDetailAction.java SolutionChangesAction.java ItypeDescListAction.java EventListAction.java ClassAssignmentsReportListAction.java RoomAvailabilityAction.java ManagerSettingsAction.java DistributionTypeEditAction.java RoomFeatureAddAction.java EditRoomPrefAction.java ReservationAction.java InstructorInfoEditAction.java ClassListAction.java RoomDeptEditAction.java ExamCbsAction.java SolverGroupEditAction.java ClassAssignmentsReportSearchAction.java ManageSolversAction.java EventRoomAvailabilityAction.java BuildingListAction.java RoomListAction.java IndividualReservationEditAction.java RollForwardSessionAction.java EventAddAction.java StudentGroupReservationEditAction.java InquiryAction.java SponsoringOrgListAction.java RoomFeatureListAction.java SponsoringOrgEditAction.java SuggestionsAction.java TimetableManagerEditAction.java AcademicAreaReservationEditAction.java InstructorDetailAction.java RoomGroupEditAction.java InstructorAction.java ChameleonAction.java DesignatorEditAction.java DepartmentListAction.java ClassShowSearchAction.java EventAddInfoAction.java TimePatternEditAction.java SessionListAction.java AssignedClassesAction.java ExamsAction.java ExamPeriodEditAction.java ExamInfoAction.java InstructionalOfferingConfigEditAction.java RoomDeptListAction.java EventStandardNoteEditAction.java RoomFeatureEditAction.java SolverAction.java ClassesAction.java Removed Files: CurriculumListAction.java Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) Index: SettingsAction.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action/SettingsAction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SettingsAction.java 17 Jun 2008 21:24:44 -0000 1.4 --- SettingsAction.java 1 Dec 2010 11:10:46 -0000 1.5 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.action; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.action; Index: TimetableAction.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action/TimetableAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TimetableAction.java 17 Jun 2008 21:24:43 -0000 1.2 --- TimetableAction.java 1 Dec 2010 11:10:47 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.action; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.action; *************** *** 71,75 **** } ! myForm.setLoaded(table.reload(request.getSession())); if ("Export PDF".equals(op)) { --- 71,75 ---- } ! myForm.setLoaded(table.reload(request)); if ("Export PDF".equals(op)) { Index: InstructorSearchAction.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action/InstructorSearchAction.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** InstructorSearchAction.java 17 Jun 2008 21:24:44 -0000 1.3 --- InstructorSearchAction.java 1 Dec 2010 11:10:46 -0000 1.4 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.action; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.action; Index: TimetableManagerEditAction.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action/TimetableManagerEditAction.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TimetableManagerEditAction.java 8 Oct 2009 19:01:21 -0000 1.7 --- TimetableManagerEditAction.java 1 Dec 2010 11:10:47 -0000 1.8 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.action; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.action; *************** *** 22,30 **** import java.util.ArrayList; import java.util.Collections; - import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; - import java.util.Map; import java.util.Set; import java.util.Vector; --- 22,28 ---- *************** *** 32,36 **** import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; - import javax.servlet.http.HttpSession; import org.apache.struts.action.Action; --- 30,33 ---- *************** *** 48,51 **** --- 45,49 ---- import org.unitime.timetable.form.TimetableManagerForm; import org.unitime.timetable.interfaces.ExternalUidLookup; + import org.unitime.timetable.interfaces.ExternalUidLookup.UserInfo; import org.unitime.timetable.model.ChangeLog; import org.unitime.timetable.model.Department; *************** *** 98,102 **** } - HttpSession httpSession = request.getSession(); MessageResources rsc = getResources(request); User user = Web.getUser(request.getSession()); --- 96,99 ---- *************** *** 291,314 **** if (id!=null && id.trim().length()>0 && frm.getLookupEnabled().booleanValue()) { - HashMap attributes = new HashMap(); - attributes.put(ExternalUidLookup.SEARCH_ID, id); - String className = ApplicationProperties.getProperty("tmtbl.manager.external_id.lookup.class"); ExternalUidLookup lookup = (ExternalUidLookup) (Class.forName(className).newInstance()); ! Map results = lookup.doLookup(attributes); ! if (results==null) ! throw new Exception (lookup.getErrorMessage()); ! frm.setExternalId((String)results.get(ExternalUidLookup.EXTERNAL_ID)); ! frm.setLookupResult((String)results.get(ExternalUidLookup.USERNAME)); if (frm.getFirstName() == null || frm.getFirstName().trim().length() == 0){ ! frm.setFirstName((String)results.get(ExternalUidLookup.FIRST_NAME)); } if (frm.getMiddleName() == null || frm.getMiddleName().trim().length() == 0){ ! frm.setMiddleName((String)results.get(ExternalUidLookup.MIDDLE_NAME)); } if (frm.getLastName() == null || frm.getLastName().trim().length() == 0){ ! frm.setLastName((String)results.get(ExternalUidLookup.LAST_NAME)); } ! frm.setEmail((String)results.get(ExternalUidLookup.EMAIL)); } } --- 288,307 ---- if (id!=null && id.trim().length()>0 && frm.getLookupEnabled().booleanValue()) { String className = ApplicationProperties.getProperty("tmtbl.manager.external_id.lookup.class"); ExternalUidLookup lookup = (ExternalUidLookup) (Class.forName(className).newInstance()); ! UserInfo results = lookup.doLookup(id); ! if (results == null) return; ! frm.setExternalId(results.getExternalId()); ! frm.setLookupResult(results.getUserName()); if (frm.getFirstName() == null || frm.getFirstName().trim().length() == 0){ ! frm.setFirstName(results.getFirstName()); } if (frm.getMiddleName() == null || frm.getMiddleName().trim().length() == 0){ ! frm.setMiddleName(results.getMiddleName()); } if (frm.getLastName() == null || frm.getLastName().trim().length() == 0){ ! frm.setLastName(results.getLastName()); } ! frm.setEmail(results.getEmail()); } } Index: RoomSearchAction.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action/RoomSearchAction.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** RoomSearchAction.java 5 Aug 2008 00:43:49 -0000 1.9 --- RoomSearchAction.java 1 Dec 2010 11:10:46 -0000 1.10 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.action; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.action; Index: EventDetailAction.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action/EventDetailAction.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** EventDetailAction.java 2 Aug 2009 15:07:29 -0000 1.32 --- EventDetailAction.java 1 Dec 2010 11:10:46 -0000 1.33 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,28 **** * * 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. */ package org.unitime.timetable.action; - import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashSet; import java.util.Iterator; - import java.util.Locale; import java.util.Set; import java.util.TreeSet; --- 15,26 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.action; import java.util.Date; import java.util.HashSet; import java.util.Iterator; import java.util.Set; import java.util.TreeSet; *************** *** 182,186 **** en.setUser(uname); en.setMeetingCollection(meetings); ! en.setTextNote(myForm.getNewEventNote()); en.setEvent(event); hibSession.saveOrUpdate(en); --- 180,184 ---- en.setUser(uname); en.setMeetingCollection(meetings); ! en.setTextNote(myForm.getEventNoteWithAttachement()); en.setEvent(event); hibSession.saveOrUpdate(en); *************** *** 188,193 **** hibSession.saveOrUpdate(event); ! new EventEmail(event, EventEmail.sActionApprove, Event.getMultiMeetings(meetings), myForm.getNewEventNote()).send(request); myForm.setSelectedMeetings(null); myForm.setNewEventNote(null); --- 186,232 ---- hibSession.saveOrUpdate(event); ! new EventEmail(event, EventEmail.sActionApprove, Event.getMultiMeetings(meetings), myForm.getEventNoteWithAttachement(), myForm.getAttachement()).send(request); ! ! myForm.setSelectedMeetings(null); ! myForm.setNewEventNote(null); ! } ! tx.commit(); ! if (!errors.isEmpty()) ! saveErrors(request, errors); ! } catch (Exception e) { ! if (tx!=null) tx.rollback(); ! throw e; ! } ! ! } ! ! if(iOp.equals("Inquire")) { ! Long[] selectedMeetings = (myForm.getSelectedMeetings() == null ? null : myForm.getSelectedMeetings()); ! org.hibernate.Session hibSession = new EventDAO().getSession(); ! Transaction tx = null; ! try { ! tx = hibSession.beginTransaction(); ! ActionMessages errors = new ActionMessages(); ! HashSet<Meeting> meetings = new HashSet(); ! if (selectedMeetings == null || selectedMeetings.length == 0) { ! meetings.addAll(event.getMeetings()); ! } else { ! for (int i=0; i<selectedMeetings.length; i++) ! meetings.add(MeetingDAO.getInstance().get(selectedMeetings[i])); ! } ! if (!meetings.isEmpty()) { ! EventNote en = new EventNote(); ! en.setTimeStamp(new Date()); ! en.setNoteType(EventNote.sEventNoteTypeInquire); ! en.setUser(uname); ! en.setMeetingCollection(meetings); ! en.setTextNote(myForm.getEventNoteWithAttachement()); ! en.setEvent(event); ! hibSession.saveOrUpdate(en); ! event.getNotes().add(en); ! hibSession.saveOrUpdate(event); + new EventEmail(event, EventEmail.sActionInquire, Event.getMultiMeetings(meetings), myForm.getEventNoteWithAttachement(), myForm.getAttachement()).send(request); + myForm.setSelectedMeetings(null); myForm.setNewEventNote(null); *************** *** 238,242 **** en.setUser(uname); en.setMeetingCollection(meetings); ! en.setTextNote(myForm.getNewEventNote()); en.setEvent(event); hibSession.saveOrUpdate(en); --- 277,281 ---- en.setUser(uname); en.setMeetingCollection(meetings); ! en.setTextNote(myForm.getEventNoteWithAttachement()); en.setEvent(event); hibSession.saveOrUpdate(en); *************** *** 244,248 **** hibSession.saveOrUpdate(event); ! new EventEmail(event, EventEmail.sActionReject, Event.getMultiMeetings(meetings), myForm.getNewEventNote()).send(request); myForm.setSelectedMeetings(null); --- 283,287 ---- hibSession.saveOrUpdate(event); ! new EventEmail(event, EventEmail.sActionReject, Event.getMultiMeetings(meetings), myForm.getEventNoteWithAttachement(), myForm.getAttachement()).send(request); myForm.setSelectedMeetings(null); *************** *** 301,305 **** en.setUser(uname); en.setMeetingCollection(meetings); ! en.setTextNote(myForm.getNewEventNote()); en.setEvent(event); hibSession.saveOrUpdate(en); --- 340,344 ---- en.setUser(uname); en.setMeetingCollection(meetings); ! en.setTextNote(myForm.getEventNoteWithAttachement()); en.setEvent(event); hibSession.saveOrUpdate(en); *************** *** 307,311 **** hibSession.saveOrUpdate(event); ! new EventEmail(event, EventEmail.sActionDelete, Event.getMultiMeetings(meetings), myForm.getNewEventNote()).send(request); if (event.getMeetings().isEmpty()) { --- 346,350 ---- hibSession.saveOrUpdate(event); ! new EventEmail(event, EventEmail.sActionDelete, Event.getMultiMeetings(meetings), myForm.getEventNoteWithAttachement(), myForm.getAttachement()).send(request); if (event.getMeetings().isEmpty()) { *************** *** 375,379 **** (ec.getPhone()==null?"":ec.getPhone())); } - SimpleDateFormat iDateFormat = new SimpleDateFormat("EEE MM/dd, yyyy", Locale.US); if (event.getMainContact()!=null && user.getId().equals(event.getMainContact().getExternalUniqueId())) { myForm.setCanDelete(true); --- 414,417 ---- Index: TilesRedirectAction.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action/TilesRedirectAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TilesRedirectAction.java 17 Jun 2008 21:24:44 -0000 1.2 --- TilesRedirectAction.java 1 Dec 2010 11:10:46 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.action; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.action; Index: ItypeDescEditAction.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action/ItypeDescEditAction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ItypeDescEditAction.java 17 Jun 2008 21:24:45 -0000 1.4 --- ItypeDescEditAction.java 1 Dec 2010 11:10:47 -0000 1.5 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.action; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.action; Index: BackAction.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action/BackAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BackAction.java 17 Jun 2008 21:24:45 -0000 1.2 --- BackAction.java 1 Dec 2010 11:10:46 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.action; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.action; Index: RoomFeatureListAction.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action/RoomFeatureListAction.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** RoomFeatureListAction.java 17 Jun 2008 21:24:44 -0000 1.10 --- RoomFeatureListAction.java 1 Dec 2010 11:10:47 -0000 1.11 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.action; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.action; *************** *** 64,73 **** import org.unitime.timetable.webutil.PdfWebTable; ! import com.lowagie.text.Document; ! import com.lowagie.text.FontFactory; ! import com.lowagie.text.Paragraph; ! import com.lowagie.text.Rectangle; ! import com.lowagie.text.pdf.PdfPTable; ! import com.lowagie.text.pdf.PdfWriter; --- 64,73 ---- import org.unitime.timetable.webutil.PdfWebTable; ! import com.itextpdf.text.Document; ! import com.itextpdf.text.FontFactory; ! import com.itextpdf.text.Paragraph; ! import com.itextpdf.text.Rectangle; ! import com.itextpdf.text.pdf.PdfPTable; ! import com.itextpdf.text.pdf.PdfWriter; *************** *** 396,428 **** } - /** - * - * @param request - * @param roomFeatureEditForm - * @throws Exception - */ - private String getDeptCode(HttpServletRequest request) throws Exception { - HttpSession webSession = request.getSession(); - User user = Web.getUser(webSession); - boolean isAdmin = user.getRole().equals(Roles.ADMIN_ROLE); - Long sessionId = Session.getCurrentAcadSession(user).getUniqueId(); - String mgrId = (String)user.getAttribute(Constants.TMTBL_MGR_ID_ATTR_NAME); - TimetableManagerDAO tdao = new TimetableManagerDAO(); - TimetableManager manager = tdao.get(new Long(mgrId)); - Set departments = new TreeSet(manager.departmentsForSession(sessionId)); - - //set default department - if (!isAdmin && (departments.size() == 1)) { - Department d = (Department) departments.iterator().next(); - return d.getDeptCode(); - } else if (webSession.getAttribute(Constants.DEPT_CODE_ATTR_ROOM_NAME) != null) { - String code = webSession.getAttribute(Constants.DEPT_CODE_ATTR_ROOM_NAME).toString(); - return code; - } else { - return null; - } - } - - public static void buildPdfFeatureTable(HttpServletRequest request, RoomFeatureListForm roomFeatureListForm) throws Exception { FileOutputStream out = null; --- 396,399 ---- *************** *** 534,539 **** Department rfOwner = Department.findByDeptCode(drf.getDeptCode(), sessionId); - boolean isOwner = isAdmin || owner.getDepartments().contains(rfOwner); - boolean isEditable = rfOwner.isEditableBy(user); String ownerName = "@@ITALIC Not defined"; if (rfOwner != null) { --- 505,508 ---- Index: RoomDeptListAction.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action/RoomDeptListAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RoomDeptListAction.java 17 Jun 2008 21:24:45 -0000 1.2 --- RoomDeptListAction.java 1 Dec 2010 11:10:47 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.action; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.action; *************** *** 99,103 **** HttpSession webSession = request.getSession(); User user = Web.getUser(webSession); - Long sessionId = Session.getCurrentAcadSession(user).getSessionId(); WebTable.setOrder(request.getSession(),"roomDeptList.ord",request.getParameter("ord"),1); --- 99,102 ---- *************** *** 107,113 **** new String[] { "left", "left", "left", "right", "left" }, new boolean[] {true, true, true, true, true}); webTable.setRowStyle("white-space:nowrap"); - org.hibernate.Session hibSession = null; - boolean timeVertical = RequiredTimeTable.getTimeGridVertical(user); String timeGridSize = RequiredTimeTable.getTimeGridSize(user); --- 106,110 ---- Index: RoomDeptEditAction.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action/RoomDeptEditAction.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** RoomDeptEditAction.java 17 Jun 2008 21:24:44 -0000 1.6 --- RoomDeptEditAction.java 1 Dec 2010 11:10:47 -0000 1.7 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.action; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.action; Index: EnrollmentAuditPdfReportAction.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action/EnrollmentAuditPdfReportAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EnrollmentAuditPdfReportAction.java 27 Mar 2010 11:11:41 -0000 1.1 --- EnrollmentAuditPdfReportAction.java 1 Dec 2010 11:10:47 -0000 1.2 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.action; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.action; *************** *** 24,31 **** import java.io.FileOutputStream; import java.io.IOException; - import java.util.Date; import java.util.Hashtable; import java.util.Map; - import java.util.Properties; import java.util.StringTokenizer; import java.util.TreeSet; --- 24,29 ---- *************** *** 33,48 **** import java.util.zip.ZipOutputStream; - import javax.activation.DataHandler; - import javax.activation.FileDataSource; - import javax.mail.Authenticator; - import javax.mail.BodyPart; - import javax.mail.Multipart; - import javax.mail.PasswordAuthentication; - import javax.mail.Transport; - import javax.mail.Message.RecipientType; - import javax.mail.internet.InternetAddress; - import javax.mail.internet.MimeBodyPart; - import javax.mail.internet.MimeMessage; - import javax.mail.internet.MimeMultipart; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; --- 31,34 ---- *************** *** 55,58 **** --- 41,45 ---- import org.apache.struts.action.ActionMessage; import org.apache.struts.action.ActionMessages; + import org.unitime.commons.Email; import org.unitime.commons.web.Web; import org.unitime.timetable.ApplicationProperties; *************** *** 60,64 **** import org.unitime.timetable.model.Session; import org.unitime.timetable.model.SubjectArea; - import org.unitime.timetable.model.TimetableManager; import org.unitime.timetable.model.dao.SessionDAO; import org.unitime.timetable.model.dao.SubjectAreaDAO; --- 47,50 ---- *************** *** 81,86 **** } - TimetableManager mgr = TimetableManager.getManager(Web.getUser(request.getSession())); - // Read operation to be performed String op = (myForm.getOp()!=null?myForm.getOp():request.getParameter("op")); --- 67,70 ---- *************** *** 151,204 **** myForm.log("<font color='orange'>No report generated.</font>"); else if (myForm.getEmail()) { - InternetAddress from = - (mgr.getEmailAddress()==null? - new InternetAddress( - ApplicationProperties.getProperty("tmtbl.inquiry.sender",ApplicationProperties.getProperty("tmtbl.contact.email")), - ApplicationProperties.getProperty("tmtbl.inquiry.sender.name")): - new InternetAddress(mgr.getEmailAddress(),mgr.getName())); myForm.log("Sending email(s)..."); - Properties p = ApplicationProperties.getProperties(); - if (p.getProperty("mail.smtp.host")==null && p.getProperty("tmtbl.smtp.host")!=null) - p.setProperty("mail.smtp.host", p.getProperty("tmtbl.smtp.host")); - Authenticator a = null; - if (ApplicationProperties.getProperty("tmtbl.mail.user")!=null && ApplicationProperties.getProperty("tmtbl.mail.pwd")!=null) { - a = new Authenticator() { - public PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication( - ApplicationProperties.getProperty("tmtbl.mail.user"), - ApplicationProperties.getProperty("tmtbl.mail.pwd")); - } - }; - } - javax.mail.Session mailSession = javax.mail.Session.getDefaultInstance(p, a); - MimeMessage mail = new MimeMessage(mailSession); - mail.setSubject(myForm.getSubject()==null?"Enrollment Audit Report":myForm.getSubject()); - Multipart body = new MimeMultipart(); - MimeBodyPart text = new MimeBodyPart(); - text.setText((myForm.getMessage()==null?"":myForm.getMessage()+"\r\n\r\n")+ - "For an up-to-date report, please visit "+ - request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/\r\n\r\n"+ - "This email was automatically generated by "+ - "UniTime "+Constants.VERSION+"."+Constants.BLD_NUMBER.replaceAll("@build.number@", "?")+ - " (Univesity Timetabling Application, http://www.unitime.org)."); - body.addBodyPart(text); - if (myForm.getAddress()!=null) for (StringTokenizer s=new StringTokenizer(myForm.getAddress(),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.TO, new InternetAddress(s.nextToken())); - if (myForm.getCc()!=null) for (StringTokenizer s=new StringTokenizer(myForm.getCc(),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.CC, new InternetAddress(s.nextToken())); - if (myForm.getBcc()!=null) for (StringTokenizer s=new StringTokenizer(myForm.getBcc(),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.BCC, new InternetAddress(s.nextToken())); - if (from!=null) - mail.setFrom(from); - for (Map.Entry<String, File> entry : output.entrySet()) { - BodyPart attachement = new MimeBodyPart(); - attachement.setDataHandler(new DataHandler(new FileDataSource(entry.getValue()))); - attachement.setFileName(session.getAcademicTerm()+session.getSessionStartYear()+"_"+entry.getKey()); - body.addBodyPart(attachement); - } - mail.setSentDate(new Date()); - mail.setContent(body); try { ! Transport.send(mail); myForm.log("Email sent."); } catch (Exception e) { --- 135,158 ---- myForm.log("<font color='orange'>No report generated.</font>"); else if (myForm.getEmail()) { myForm.log("Sending email(s)..."); try { ! Email mail = new Email(); ! mail.setSubject(myForm.getSubject()==null?"Enrollment Audit Report":myForm.getSubject()); ! mail.setText((myForm.getMessage()==null?"":myForm.getMessage()+"\r\n\r\n")+ ! "For an up-to-date report, please visit "+ ! request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/\r\n\r\n"+ ! "This email was automatically generated by "+ ! "UniTime "+Constants.VERSION+"."+Constants.BLD_NUMBER.replaceAll("@build.number@", "?")+ ! " (Univesity Timetabling Application, http://www.unitime.org)."); ! if (myForm.getAddress()!=null) for (StringTokenizer s=new StringTokenizer(myForm.getAddress(),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipient(s.nextToken(), null); ! if (myForm.getCc()!=null) for (StringTokenizer s=new StringTokenizer(myForm.getCc(),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipientCC(s.nextToken(), null); ! if (myForm.getBcc()!=null) for (StringTokenizer s=new StringTokenizer(myForm.getBcc(),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipientBCC(s.nextToken(), null); ! for (Map.Entry<String, File> entry : output.entrySet()) { ! mail.addAttachement(entry.getValue(), session.getAcademicTerm()+session.getSessionStartYear()+"_"+entry.getKey()); ! } ! mail.send(); myForm.log("Email sent."); } catch (Exception e) { Index: InstructorInfoEditAction.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action/InstructorInfoEditAction.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** InstructorInfoEditAction.java 12 Feb 2010 12:44:09 -0000 1.7 --- InstructorInfoEditAction.java 1 Dec 2010 11:10:47 -0000 1.8 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.action; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.action; *************** *** 91,96 **** InstructorEditForm frm = (InstructorEditForm) form; - User user = Web.getUser(httpSession); - Long sessionId = (Long) user.getAttribute(Constants.SESSION_ID_ATTR_NAME); MessageResources rsc = getResources(request); ActionMessages errors = new ActionMessages(); --- 91,94 ---- Index: InstructionalOfferingConfigEditAction.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action/InstructionalOfferingConfigEditAction.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** InstructionalOfferingConfigEditAction.java 16 Feb 2010 20:28:02 -0000 1.14 --- InstructionalOfferingConfigEditAction.java 1 Dec 2010 11:10:47 -0000 1.15 *************** *** 1,4 **** /* ! * UniTime 3.1 (University Timetabling Application) * Copyright (C) 2008-2009, UniTime LLC, and individual contributors * as indicated by the @authors tag. --- 1,4 ---- /* ! * UniTime 3.2 (University Timetabling Application) * Copyright (C) 2008-2009, UniTime LLC, and individual contributors * as indicated by the @authors tag. *************** *** 6,10 **** * 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. * --- 6,10 ---- * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.action; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.action; *************** *** 66,70 **** import org.unitime.timetable.model.RoomPref; import org.unitime.timetable.model.SchedulingSubpart; - import org.unitime.timetable.model.Session; import org.unitime.timetable.model.SimpleItypeConfig; import org.unitime.timetable.model.TimePattern; --- 66,69 ---- *************** *** 398,402 **** throw new Exception ("Course Offering not found for id: " + courseOfferingId); - Session s = co.getSubjectArea().getSession(); InstructionalOffering io = co.getInstructionalOffering(); --- 397,400 ---- *************** *** 1184,1191 **** HashMap notDeletedSubparts ) throws Exception { - User user = Web.getUser(request.getSession()); - - ItypeDesc itype = sic.getItype(); - // Set attributes String subpartId = request.getParameter("subpartId" + sic.getId()); --- 1182,1185 ---- *************** *** 1223,1227 **** int mxlpc = sic.getMaxLimitPerClass(); int mpw = sic.getMinPerWeek(); - int nc = sic.getNumClasses(); int nr = sic.getNumRooms(); float rr = sic.getRoomRatio(); --- 1217,1220 ---- *************** *** 1232,1236 **** mnlpc = 0; mxlpc = 0; - nc = 1; nr = 0; rr = 0; --- 1225,1228 ---- *************** *** 1242,1246 **** SchedulingSubpart subpart = null; - Set childSubparts = null; // Subpart does not exist --- 1234,1237 ---- *************** *** 1256,1260 **** subpart.setAutoSpreadInTime(new Boolean(true)); subpart.setStudentAllowOverlap(new Boolean(false)); - childSubparts = new HashSet(); ioc.addToschedulingSubparts(subpart); --- 1247,1250 ---- *************** *** 1294,1298 **** if (tmpSubpart.getUniqueId().longValue()==sid) { subpart = tmpSubpart; - childSubparts = tmpSubpart.getChildSubparts(); break; } --- 1284,1287 ---- *************** *** 1582,1586 **** int mnlpc = sic.getMinLimitPerClass(); int mxlpc = sic.getMaxLimitPerClass(); - int mpw = sic.getMinPerWeek(); int nc = sic.getNumClasses(); int nr = sic.getNumRooms(); --- 1571,1574 ---- *************** *** 1601,1605 **** SchedulingSubpart subpart = null; - Set childSubparts = null; // Subpart does not exist --- 1589,1592 ---- *************** *** 1613,1617 **** if (tmpSubpart.getUniqueId().longValue()==sid) { subpart = tmpSubpart; - childSubparts = tmpSubpart.getChildSubparts(); break; } --- 1600,1603 ---- *************** *** 1626,1630 **** int numCls = classes.size(); boolean readOnly = false; - boolean readOnlyParent = false; //if (!subpart.isEditableBy(Web.getUser(request.getSession())) || subpart.hasMixedManagedClasses()) { --- 1612,1615 ---- *************** *** 1784,1789 **** } } - int cpNumClasses = cpClasses.size(); - int peerNumClasses = parent.getClasses().size(); int diff = (numCls - nc) / cpClasses.size(); Debug.debug("Deleting " + diff + " classes per current parent"); --- 1769,1772 ---- *************** *** 1793,1797 **** for (Iterator ci=parentClassKeys.iterator(); ci.hasNext(); ) { Long parentClassId = (Long) ci.next(); - int parentClassCount = ((Integer)cpClasses.get(parentClassId)).intValue(); Debug.debug("Deleting " + diff + " classes for parent class: " + parentClassId.toString()); --- 1776,1779 ---- Index: DistributionPrefsAction.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action/DistributionPrefsAction.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DistributionPrefsAction.java 21 Aug 2009 15:32:27 -0000 1.8 --- DistributionPrefsAction.java 1 Dec 2010 11:10:46 -0000 1.9 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.action; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.action; *************** *** 637,641 **** String distPrefId = frm.getDistPrefId(); List saList = frm.getSubjectArea(); - List cnList = frm.getCourseNbr(); List suList = frm.getItype(); List clList = frm.getClassNumber(); --- 637,640 ---- *************** *** 674,678 **** dp.setPrefLevel(PreferenceLevel.getPreferenceLevel( Integer.parseInt(frm.getPrefLevel()) )); ! Department owningDept = null; boolean sameOwningDept = true; User user = Web.getUser(httpSession); Session session = Session.getCurrentAcadSession(user); --- 673,677 ---- dp.setPrefLevel(PreferenceLevel.getPreferenceLevel( Integer.parseInt(frm.getPrefLevel()) )); ! Department owningDept = null; User user = Web.getUser(httpSession); Session session = Session.getCurrentAcadSession(user); *************** *** 715,719 **** ... [truncated message content] |
|
From: Tomas M. <to...@us...> - 2010-12-01 11:11:35
|
Update of /cvsroot/unitime/UniTime/Documentation/Database/Oracle In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13954/Documentation/Database/Oracle Modified Files: woebegon.dat schema.sql woebegon-data.sql Added Files: blank.dat blank-data.sql Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) Index: schema.sql =================================================================== RCS file: /cvsroot/unitime/UniTime/Documentation/Database/Oracle/schema.sql,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** schema.sql 22 Jul 2008 19:08:51 -0000 1.16 --- schema.sql 1 Dec 2010 11:10:52 -0000 1.17 *************** *** 1,5234 **** ! /* ! * 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, [...15384 lines suppressed...] ! minvalue 1 ! maxvalue 9999999999 ! start with 590 ! increment by 1 ! cache 20; ! ! prompt ! prompt Creating sequence USER_SETTINGS_SEQ ! prompt =================================== ! prompt ! create sequence timetable.USER_SETTINGS_SEQ ! minvalue 1 ! maxvalue 999999999999999999999999999 ! start with 944 ! increment by 1 ! cache 20; ! ! commit; ! ! spool off Index: woebegon-data.sql =================================================================== RCS file: /cvsroot/unitime/UniTime/Documentation/Database/Oracle/woebegon-data.sql,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** woebegon-data.sql 22 Jul 2008 19:08:51 -0000 1.14 --- woebegon-data.sql 1 Dec 2010 11:10:52 -0000 1.15 *************** *** 1,19809 **** ! /* ! * 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, [...53823 lines suppressed...] ! alter table TIME_PREF enable all triggers; ! prompt Enabling triggers for TMTBL_MGR_TO_ROLES... ! alter table TMTBL_MGR_TO_ROLES enable all triggers; ! prompt Enabling triggers for USERS... ! alter table USERS enable all triggers; ! prompt Enabling triggers for USER_DATA... ! alter table USER_DATA enable all triggers; ! prompt Enabling triggers for WAITLIST... ! alter table WAITLIST enable all triggers; ! prompt Enabling triggers for XCONFLICT... ! alter table XCONFLICT enable all triggers; ! prompt Enabling triggers for XCONFLICT_EXAM... ! alter table XCONFLICT_EXAM enable all triggers; ! prompt Enabling triggers for XCONFLICT_INSTRUCTOR... ! alter table XCONFLICT_INSTRUCTOR enable all triggers; ! prompt Enabling triggers for XCONFLICT_STUDENT... ! alter table XCONFLICT_STUDENT enable all triggers; ! set feedback on ! set define on ! prompt Done. --- NEW FILE: blank.dat --- (This appears to be a binary file; contents omitted.) Index: woebegon.dat =================================================================== RCS file: /cvsroot/unitime/UniTime/Documentation/Database/Oracle/woebegon.dat,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 Binary files /tmp/cvsQ5g5xU and /tmp/cvs7jiYjr differ --- NEW FILE: blank-data.sql --- /* * UniTime 3.2 (University Timetabling Application) * Copyright (C) 2008 - 2010, 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 3 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, see <http://www.gnu.org/licenses/>. * */ [...5013 lines suppressed...] alter table TIME_PREF enable all triggers; prompt Enabling triggers for TMTBL_MGR_TO_ROLES... alter table TMTBL_MGR_TO_ROLES enable all triggers; prompt Enabling triggers for USERS... alter table USERS enable all triggers; prompt Enabling triggers for USER_DATA... alter table USER_DATA enable all triggers; prompt Enabling triggers for WAITLIST... alter table WAITLIST enable all triggers; prompt Enabling triggers for XCONFLICT... alter table XCONFLICT enable all triggers; prompt Enabling triggers for XCONFLICT_EXAM... alter table XCONFLICT_EXAM enable all triggers; prompt Enabling triggers for XCONFLICT_INSTRUCTOR... alter table XCONFLICT_INSTRUCTOR enable all triggers; prompt Enabling triggers for XCONFLICT_STUDENT... alter table XCONFLICT_STUDENT enable all triggers; set feedback on set define on prompt Done. |
Update of /cvsroot/unitime/UniTime/WebContent/admin In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13954/WebContent/admin Modified Files: subjectList.jsp roomGroupAdd.jsp prefsLevelList.jsp deptStatusTypeEdit.jsp sessionEdit.jsp roomList.jsp solverParamGroups.jsp roomGroupEdit.jsp roomFeatureSearch.jsp solverGroups.jsp roomGroupSearch.jsp userEdit.jsp setUpRoomPref.jsp sessionList.jsp rollForwardSession.jsp examPeriods.jsp editRoomFeature.jsp buildingEdit.jsp classOwnerChange.jsp roomSearch.jsp applicationConfig.jsp addSpecialUseRoom.jsp departmentList.jsp lastChanges.jsp timePatterns.jsp eventStandardNotes.jsp departmentEdit.jsp solverSettings.jsp chameleon.jsp exactTimeEdit.jsp distributionTypeEdit.jsp globalRoomFeatureEdit.jsp subjectAreaEdit.jsp editRoomGroup.jsp distributionTypeList.jsp editRoomDept.jsp sectioningDemo.jsp settings.jsp timetableManagerEdit.jsp datePatterns.jsp roomFeatureList.jsp roomGroupList.jsp sponsoringOrgList.jsp solverInfoDef.jsp managerRoomFeatureEdit.jsp hibernateStats.jsp solverParamDef.jsp itypeDescList.jsp hibernateQueryTest.jsp dataImport.jsp buildingList.jsp roomDeptEdit.jsp roomFeatureEdit.jsp roomDeptList.jsp roomDetail.jsp roomFeatureAdd.jsp timetableManagerList.jsp itypeDescEdit.jsp addNonUnivLocation.jsp editRoom.jsp sponsoringOrgEdit.jsp eventStandardNoteEdit.jsp activeSessions.jsp roomTypeEdit.jsp Added Files: stats.jsp Removed Files: userinfo.jsp Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) Index: roomTypeEdit.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/roomTypeEdit.jsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** roomTypeEdit.jsp 15 Sep 2008 20:56:08 -0000 1.3 --- roomTypeEdit.jsp 1 Dec 2010 11:10:47 -0000 1.4 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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"%> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ page language="java" autoFlush="true"%> *************** *** 33,37 **** <html:hidden property="canEdit"/> <logic:notEqual name="roomTypeEditForm" property="op" value="List"> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="3"> --- 33,37 ---- <html:hidden property="canEdit"/> <logic:notEqual name="roomTypeEditForm" property="op" value="List"> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="3"> *************** *** 113,117 **** </logic:notEqual> <logic:equal name="roomTypeEditForm" property="op" value="List"> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <tr> <td colspan='5'> --- 113,117 ---- </logic:notEqual> <logic:equal name="roomTypeEditForm" property="op" value="List"> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <tr> <td colspan='5'> Index: eventStandardNoteEdit.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/eventStandardNoteEdit.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** eventStandardNoteEdit.jsp 2 Sep 2008 20:06:16 -0000 1.2 --- eventStandardNoteEdit.jsp 1 Dec 2010 11:10:47 -0000 1.3 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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. --%> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> *************** *** 31,35 **** <html:hidden property="id"/> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <logic:messagesPresent> <TR> --- 31,35 ---- <html:hidden property="id"/> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <logic:messagesPresent> <TR> Index: sponsoringOrgList.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/sponsoringOrgList.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sponsoringOrgList.jsp 11 Jul 2008 20:36:26 -0000 1.2 --- sponsoringOrgList.jsp 1 Dec 2010 11:10:47 -0000 1.3 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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. --%> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> *************** *** 29,33 **** <html:form action="/sponsoringOrgList"> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD> --- 29,33 ---- <html:form action="/sponsoringOrgList"> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD> Index: solverSettings.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/solverSettings.jsp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** solverSettings.jsp 16 Oct 2008 16:33:28 -0000 1.8 --- solverSettings.jsp 1 Dec 2010 11:10:47 -0000 1.9 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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"%> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ page language="java" autoFlush="true"%> *************** *** 46,50 **** if (request.getAttribute("SolverSettings.table")!=null) { %> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="4"> --- 46,50 ---- if (request.getAttribute("SolverSettings.table")!=null) { %> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="4"> *************** *** 75,79 **** <input type='hidden' name='op2' value=''> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan='2'> --- 75,79 ---- <input type='hidden' name='op2' value=''> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan='2'> *************** *** 208,217 **** <logic:equal name="solverSettingsForm" property='<%="useDefault["+def.getUniqueId()+"]"%>' value="false"> <html:select property='<%="parameter["+def.getUniqueId()+"]"%>' disabled="false"> ! <html:options property='<%="enum("+def.getType()+")"%>'/> </html:select> </logic:equal> <logic:equal name="solverSettingsForm" property='<%="useDefault["+def.getUniqueId()+"]"%>' value="true"> <html:select property='<%="parameter["+def.getUniqueId()+"]"%>' disabled="true"> ! <html:options property='<%="enum("+def.getType()+")"%>'/> </html:select> </logic:equal> --- 208,217 ---- <logic:equal name="solverSettingsForm" property='<%="useDefault["+def.getUniqueId()+"]"%>' value="false"> <html:select property='<%="parameter["+def.getUniqueId()+"]"%>' disabled="false"> ! <html:options property='<%=def.getType()%>'/> </html:select> </logic:equal> <logic:equal name="solverSettingsForm" property='<%="useDefault["+def.getUniqueId()+"]"%>' value="true"> <html:select property='<%="parameter["+def.getUniqueId()+"]"%>' disabled="true"> ! <html:options property='<%=def.getType()%>'/> </html:select> </logic:equal> Index: applicationConfig.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/applicationConfig.jsp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** applicationConfig.jsp 17 Jun 2008 21:24:47 -0000 1.7 --- applicationConfig.jsp 1 Dec 2010 11:10:47 -0000 1.8 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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"%> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ page language="java" autoFlush="true"%> *************** *** 36,40 **** <html:form action="/applicationConfig"> <logic:notEqual name="applicationConfigForm" property="op" value="list"> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="2"> --- 36,40 ---- <html:form action="/applicationConfig"> <logic:notEqual name="applicationConfigForm" property="op" value="list"> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="2"> *************** *** 128,132 **** <logic:equal name="applicationConfigForm" property="op" value="list"> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan='3'> --- 128,132 ---- <logic:equal name="applicationConfigForm" property="op" value="list"> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan='3'> *************** *** 144,148 **** <BR> <BR> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <% WebTable.setOrder(request.getSession(),"applicationConfig.ord2",request.getParameter("ord2"),1); --- 144,148 ---- <BR> <BR> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <% WebTable.setOrder(request.getSession(),"applicationConfig.ord2",request.getParameter("ord2"),1); Index: sponsoringOrgEdit.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/sponsoringOrgEdit.jsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sponsoringOrgEdit.jsp 12 Sep 2008 20:52:44 -0000 1.3 --- sponsoringOrgEdit.jsp 1 Dec 2010 11:10:47 -0000 1.4 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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. --%> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> *************** *** 31,35 **** <html:hidden property="id"/> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <logic:messagesPresent> <TR> --- 31,35 ---- <html:hidden property="id"/> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <logic:messagesPresent> <TR> Index: editRoomDept.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/editRoomDept.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** editRoomDept.jsp 17 Jun 2008 21:24:46 -0000 1.2 --- editRoomDept.jsp 1 Dec 2010 11:10:47 -0000 1.3 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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" %> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ page language="java" autoFlush="true" errorPage="../error.jsp" %> *************** *** 44,48 **** <html:hidden property="id"/> <html:hidden property="departments"/> ! <TABLE width="93%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD valign="middle" colspan='2'> --- 44,48 ---- <html:hidden property="id"/> <html:hidden property="departments"/> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD valign="middle" colspan='2'> Index: itypeDescEdit.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/itypeDescEdit.jsp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** itypeDescEdit.jsp 17 Jun 2008 21:24:47 -0000 1.6 --- itypeDescEdit.jsp 1 Dec 2010 11:10:47 -0000 1.7 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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"%> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ page language="java" autoFlush="true"%> *************** *** 31,35 **** <html:hidden property="canDelete"/> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="2"> --- 31,35 ---- <html:hidden property="canDelete"/> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="2"> Index: chameleon.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/chameleon.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** chameleon.jsp 17 Jun 2008 21:24:47 -0000 1.2 --- chameleon.jsp 1 Dec 2010 11:10:47 -0000 1.3 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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" %> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ page language="java" autoFlush="true" errorPage="../error.jsp" %> *************** *** 29,33 **** <html:form action="/chameleon"> ! <TABLE width="93%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="2" valign="middle"> --- 29,33 ---- <html:form action="/chameleon"> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="2" valign="middle"> --- userinfo.jsp DELETED --- Index: solverInfoDef.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/solverInfoDef.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** solverInfoDef.jsp 17 Jun 2008 21:24:46 -0000 1.2 --- solverInfoDef.jsp 1 Dec 2010 11:10:47 -0000 1.3 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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"%> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ page language="java" autoFlush="true"%> *************** *** 28,32 **** <html:hidden property="uniqueId"/><html:errors property="uniqueId"/> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="2"> --- 28,32 ---- <html:hidden property="uniqueId"/><html:errors property="uniqueId"/> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="2"> *************** *** 82,86 **** <BR> <BR> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <%= request.getAttribute("SolverInfoDef.table") %> </TABLE> --- 82,86 ---- <BR> <BR> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <%= request.getAttribute("SolverInfoDef.table") %> </TABLE> Index: eventStandardNotes.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/eventStandardNotes.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** eventStandardNotes.jsp 18 Jul 2008 19:12:08 -0000 1.1 --- eventStandardNotes.jsp 1 Dec 2010 11:10:47 -0000 1.2 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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. --%> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> *************** *** 29,33 **** <html:form action="/eventStandardNotes"> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD> --- 29,33 ---- <html:form action="/eventStandardNotes"> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD> Index: roomDeptEdit.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/roomDeptEdit.jsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** roomDeptEdit.jsp 17 Jun 2008 21:24:47 -0000 1.3 --- roomDeptEdit.jsp 1 Dec 2010 11:10:47 -0000 1.4 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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" %> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ page language="java" autoFlush="true" errorPage="../error.jsp" %> *************** *** 30,34 **** <input type='hidden' name='ord' value=''> ! <TABLE width="93%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD> --- 30,34 ---- <input type='hidden' name='ord' value=''> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD> Index: settings.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/settings.jsp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** settings.jsp 17 Jun 2008 21:24:46 -0000 1.4 --- settings.jsp 1 Dec 2010 11:10:47 -0000 1.5 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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"%> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ page language="java" autoFlush="true"%> *************** *** 31,35 **** <html:hidden property="uniqueId"/><html:errors property="uniqueId"/> <logic:notEqual name="settingsForm" property="op" value="List"> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="2"> --- 31,35 ---- <html:hidden property="uniqueId"/><html:errors property="uniqueId"/> <logic:notEqual name="settingsForm" property="op" value="List"> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="2"> *************** *** 110,114 **** <logic:equal name="settingsForm" property="op" value="List"> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan='4'> --- 110,114 ---- <logic:equal name="settingsForm" property="op" value="List"> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan='4'> Index: roomList.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/roomList.jsp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** roomList.jsp 16 Oct 2008 16:33:28 -0000 1.9 --- roomList.jsp 1 Dec 2010 11:10:47 -0000 1.10 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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"%> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ page language="java" autoFlush="true" errorPage="../error.jsp"%> *************** *** 31,35 **** %> ! <TABLE width="93%" border="0" cellspacing="0" cellpadding="3"> <% String colspan = request.getAttribute("colspan")!=null --- 31,35 ---- %> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <% String colspan = request.getAttribute("colspan")!=null Index: managerRoomFeatureEdit.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/managerRoomFeatureEdit.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** managerRoomFeatureEdit.jsp 17 Jun 2008 21:24:46 -0000 1.2 --- managerRoomFeatureEdit.jsp 1 Dec 2010 11:10:47 -0000 1.3 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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. --%> <%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html"%> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html"%> Index: globalRoomFeatureEdit.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/globalRoomFeatureEdit.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** globalRoomFeatureEdit.jsp 17 Jun 2008 21:24:47 -0000 1.2 --- globalRoomFeatureEdit.jsp 1 Dec 2010 11:10:47 -0000 1.3 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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. --%> <%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean"%> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean"%> Index: examPeriods.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/examPeriods.jsp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** examPeriods.jsp 10 Feb 2010 13:14:34 -0000 1.9 --- examPeriods.jsp 1 Dec 2010 11:10:47 -0000 1.10 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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"%> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ page language="java" autoFlush="true"%> *************** *** 56,60 **** <html:hidden property="autoSetup"/> <logic:equal name="examPeriodEditForm" property="autoSetup" value="true"> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="2"> --- 56,60 ---- <html:hidden property="autoSetup"/> <logic:equal name="examPeriodEditForm" property="autoSetup" value="true"> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="2"> *************** *** 268,272 **** </logic:equal> <logic:equal name="examPeriodEditForm" property="autoSetup" value="false"> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="2"> --- 268,272 ---- </logic:equal> <logic:equal name="examPeriodEditForm" property="autoSetup" value="false"> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="2"> *************** *** 390,394 **** </logic:notEqual> <logic:equal name="examPeriodEditForm" property="op" value="List"> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan='8'> --- 390,394 ---- </logic:notEqual> <logic:equal name="examPeriodEditForm" property="op" value="List"> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan='8'> Index: addNonUnivLocation.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/addNonUnivLocation.jsp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** addNonUnivLocation.jsp 19 Feb 2009 18:51:22 -0000 1.5 --- addNonUnivLocation.jsp 1 Dec 2010 11:10:47 -0000 1.6 *************** *** 1,9 **** <%-- ! * UniTime 3.1 (University Timetabling Application) * Copyright (C) 2008-2009, 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) * Copyright (C) 2008-2009, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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" %> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ page language="java" autoFlush="true" errorPage="../error.jsp" %> *************** *** 23,26 **** --- 23,28 ---- <%@ page import="org.unitime.timetable.util.Constants" %> <%@ page import="org.unitime.timetable.form.NonUnivLocationForm" %> + <%@page import="net.sf.cpsolver.ifs.util.DistanceMetric"%> + <%@page import="org.unitime.timetable.ApplicationProperties"%> <%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %> *************** *** 42,46 **** <html:form action="/addNonUnivLocation" focus="name"> ! <TABLE width="93%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD valign="middle" colspan='2'> --- 44,48 ---- <html:form action="/addNonUnivLocation" focus="name"> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD valign="middle" colspan='2'> *************** *** 76,79 **** --- 78,88 ---- </logic:messagesPresent> + <tt:propertyEquals name="unitime.coordinates.googlemap" value="true"> + </table> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr><td valign="top"> + <table width="100%" border="0" cellspacing="0" cellpadding="3"> + </tt:propertyEquals> + <TR> <TD>Name:</TD> *************** *** 98,101 **** --- 107,119 ---- </TD> </TR> + + <TR> + <TD>Coordinates:</TD> + <TD> + <html:text property="coordX" maxlength="12" size="12" styleId="coordX" onchange="setMarker();"/>, <html:text property="coordY" maxlength="12" size="12" styleId="coordY" onchange="setMarker();"/> + <% DistanceMetric.Ellipsoid ellipsoid = DistanceMetric.Ellipsoid.valueOf(ApplicationProperties.getProperty("unitime.distance.ellipsoid", DistanceMetric.Ellipsoid.LEGACY.name())); %> + <i><%=ellipsoid.getEclipsoindName()%></i> + </TD> + </TR> <TR> *************** *** 133,136 **** --- 151,163 ---- </TR> + <tt:propertyEquals name="unitime.coordinates.googlemap" value="true"> + </table> + </td><td width="1%" nowrap="nowrap" style="padding-right: 3px;"> + <div id="map_canvas" style="width: 600px; height: 400px; border: 1px solid #9CB0CE;"></div> + </td></tr> + </table> + <table width="100%" border="0" cellspacing="0" cellpadding="3"> + </tt:propertyEquals> + <TR> <TD colspan='2'> *************** *** 155,158 **** --- 182,314 ---- </html:form> + <tt:propertyEquals name="unitime.coordinates.googlemap" value="true"> + <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> + <script type="text/javascript" language="javascript"> + var latlng = new google.maps.LatLng(50, -58); + var myOptions = { + zoom: 2, + center: latlng, + mapTypeId: google.maps.MapTypeId.ROADMAP + }; + var geocoder = new google.maps.Geocoder(); + var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); + var marker = marker = new google.maps.Marker({ + position: latlng, + map: map, + draggable: true, + visible: false + }); + + var searchBox = createGoogleSeachControl(map); + + function createGoogleSeachControl(map) { + var controlDiv = document.createElement('DIV'); + controlDiv.index = 1; + controlDiv.style.marginBottom = '15px'; + var controlUI = document.createElement('DIV'); + controlUI.style.backgroundColor = 'transparent'; + controlUI.style.cursor = 'pointer'; + controlUI.style.textAlign = 'center'; + controlUI.title = "Seach"; + controlDiv.appendChild(controlUI); + var controltxtbox = document.createElement('input'); + controltxtbox.setAttribute("id", "txt_googleseach"); + controltxtbox.setAttribute("type", "text"); + controltxtbox.setAttribute("value", ""); + controltxtbox.style.height = '22px'; + controltxtbox.style.width = '450px'; + controltxtbox.style.marginRight = '2px'; + controlUI.appendChild(controltxtbox); + var controlbtn = document.createElement('input'); + controlbtn.setAttribute("id", "btn_googleseach"); + controlbtn.setAttribute("type", "button"); + controlbtn.setAttribute("value", "Geocode"); + controlUI.appendChild(controlbtn); + google.maps.event.addDomListener(controlbtn, 'click', function() { + geoceodeAddress(controltxtbox.value); + }); + controltxtbox.onkeypress = function(e) { + var key = e.keyCode || e.which; + if (key == 13) { + geoceodeAddress(controltxtbox.value); + return false; + } + return true; + }; + map.controls[google.maps.ControlPosition.BOTTOM_LEFT].push(controlDiv); + return controltxtbox; + } + + function geoceodeAddress(address) { + var address = document.getElementById("txt_googleseach").value; + geocoder.geocode({ 'address': address }, function(results, status) { + if (status == google.maps.GeocoderStatus.OK) { + if (results[0]) { + marker.setPosition(results[0].geometry.location); + marker.setTitle(results[0].formatted_address); + marker.setVisible(true); + if (map.getZoom() <= 10) map.setZoom(16); + map.panTo(results[0].geometry.location); + } else { + marker.setVisible(false); + } + } else { + marker.setVisible(false); + } + }); + } + + function geoceodeMarker() { + geocoder.geocode({'location': marker.getPosition()}, function(results, status) { + if (status == google.maps.GeocoderStatus.OK) { + if (results[0]) { + marker.setTitle(results[0].formatted_address); + if (searchBox != null) + searchBox.value = results[0].formatted_address; + } else { + marker.setTitle(null); + if (searchBox != null) searchBox.value = ""; + } + } else { + marker.setTitle(null); + if (searchBox != null) searchBox.value = ""; + } + }); + } + + var t = null; + + google.maps.event.addListener(marker, 'position_changed', function() { + document.getElementById("coordX").value = '' + marker.getPosition().lat().toFixed(6); + document.getElementById("coordY").value = '' + marker.getPosition().lng().toFixed(6); + if (t != null) clearTimeout(t); + t = setTimeout("geoceodeMarker()", 500); + }); + google.maps.event.addListener(map, 'rightclick', function(event) { + marker.setPosition(event.latLng); + marker.setVisible(true); + }); + function setMarker() { + var x = document.getElementById("coordX").value; + var y = document.getElementById("coordY").value; + if (x && y) { + var pos = new google.maps.LatLng(x, y); + marker.setPosition(pos); + marker.setVisible(true); + if (map.getZoom() <= 10) map.setZoom(16); + map.panTo(pos); + } else { + marker.setVisible(false); + } + } + setMarker(); + </script> + </tt:propertyEquals> + <tt:propertyNotEquals name="unitime.coordinates.googlemap" value="true"> + <script type="text/javascript" language="javascript"> + function setMarker() {} + </script> + </tt:propertyNotEquals> + <script type="text/javascript" language="javascript"> // Validator Index: roomDeptList.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/roomDeptList.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roomDeptList.jsp 17 Jun 2008 21:24:47 -0000 1.2 --- roomDeptList.jsp 1 Dec 2010 11:10:47 -0000 1.3 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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"%> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ page language="java" autoFlush="true" errorPage="../error.jsp"%> *************** *** 50,54 **** <!-- room departments list --> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="5"> <% if (request.getAttribute("roomDepts") != null) {%> <%=request.getAttribute("roomDepts")%> --- 50,54 ---- <!-- room departments list --> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="5"> <% if (request.getAttribute("roomDepts") != null) {%> <%=request.getAttribute("roomDepts")%> Index: roomGroupList.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/roomGroupList.jsp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** roomGroupList.jsp 17 Jun 2008 21:24:46 -0000 1.4 --- roomGroupList.jsp 1 Dec 2010 11:10:47 -0000 1.5 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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"%> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ page language="java" autoFlush="true" errorPage="../error.jsp"%> *************** *** 24,28 **** <%@ taglib uri="/WEB-INF/tld/timetable.tld" prefix="tt" %> ! <TABLE width="93%" border="0" cellspacing="0" cellpadding="3"> <TR> --- 24,28 ---- <%@ taglib uri="/WEB-INF/tld/timetable.tld" prefix="tt" %> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> Index: timetableManagerList.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/timetableManagerList.jsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** timetableManagerList.jsp 17 Jun 2008 21:24:47 -0000 1.3 --- timetableManagerList.jsp 1 Dec 2010 11:10:47 -0000 1.4 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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" %> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ page language="java" autoFlush="true" errorPage="../error.jsp" %> *************** *** 24,28 **** <%@ taglib uri="/WEB-INF/tld/timetable.tld" prefix="tt" %> ! <TABLE width="98%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD align="right"> --- 24,28 ---- <%@ taglib uri="/WEB-INF/tld/timetable.tld" prefix="tt" %> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD align="right"> *************** *** 50,54 **** </TABLE> ! <TABLE width="98%" border="0" cellspacing="0" cellpadding="1"> <%=request.getAttribute("schedDeputyList")%> </TABLE> --- 50,54 ---- </TABLE> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="1"> <%=request.getAttribute("schedDeputyList")%> </TABLE> Index: setUpRoomPref.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/setUpRoomPref.jsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** setUpRoomPref.jsp 16 Oct 2008 16:33:28 -0000 1.3 --- setUpRoomPref.jsp 1 Dec 2010 11:10:47 -0000 1.4 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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" %> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ page language="java" autoFlush="true" errorPage="../error.jsp" %> *************** *** 37,41 **** <html:hidden property="id"/> ! <TABLE width="93%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD valign="middle" colspan='2'> --- 37,41 ---- <html:hidden property="id"/> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD valign="middle" colspan='2'> Index: roomDetail.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/admin/roomDetail.jsp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** roomDetail.jsp 17 Jun 2008 21:24:47 -0000 1.8 --- roomDetail.jsp 1 Dec 2010 11:10:47 -0000 1.9 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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" %> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ page language="java" autoFlush="true" errorPage="../error.jsp" %> *************** *** 28,31 **** --- 28,33 ---- <%@ page import="org.unitime.timetable.model.Department" %> <%@ page import="org.apache.struts.util.LabelValueBean" %> + <%@page import="net.sf.cpsolver.ifs.util.DistanceMetric"%> + <%@page import="org.unitime.timetable.ApplicationProperties"%> <%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %> *************** *** 61,67 **** <html:form action="/roomDetail"> <html:hidden property="id"/> <input type='hidden' name='confirm' value='y'/> ! <TABLE width="93%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD valign="middle" colspan='2'> --- 63,71 ---- <html:form action="/roomDetail"> <html:hidden property="id"/> + <html:hidden property="next"/> + <html:hidden property="previous"/> <input type='hidden' name='confirm' value='y'/> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD valign="middle" colspan='2'> *************** *** 85,89 **** <html:submit property="doit" ! accesskey="P" styleClass="btn" titleKey="title.modifyRoomPreference" > <bean:message key="button.modifyRoomPreference" /> --- 89,93 ---- <html:submit property="doit" ! accesskey="M" styleClass="btn" titleKey="title.modifyRoomPreference" > <bean:message key="butt... [truncated message content] |
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/interactive In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13954/JavaSource/org/unitime/timetable/solver/interactive Modified Files: Suggestions.java SuggestionsModel.java Suggestion.java ClassAssignmentDetails.java Hint.java Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) Index: SuggestionsModel.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/interactive/SuggestionsModel.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SuggestionsModel.java 17 Jun 2008 21:24:56 -0000 1.2 --- SuggestionsModel.java 1 Dec 2010 11:10:52 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.solver.interactive; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.solver.interactive; *************** *** 22,25 **** --- 22,26 ---- import java.io.Serializable; import java.util.Enumeration; + import java.util.List; import java.util.TreeSet; import java.util.Vector; *************** *** 174,178 **** public Vector getHints() { return iHints; } ! public void addHint(Long classId, int days, int startSlots, Vector roomIds, Long patternId) { Hint hint = new Hint(classId, days, startSlots, roomIds,patternId); Hint prev = null; --- 175,179 ---- public Vector getHints() { return iHints; } ! public void addHint(Long classId, int days, int startSlots, List<Long> roomIds, Long patternId) { Hint hint = new Hint(classId, days, startSlots, roomIds,patternId); Hint prev = null; Index: Suggestions.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/interactive/Suggestions.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Suggestions.java 23 Dec 2008 16:37:52 -0000 1.4 --- Suggestions.java 1 Dec 2010 11:10:52 -0000 1.5 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.solver.interactive; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.solver.interactive; *************** *** 22,33 **** import java.io.Serializable; ! import java.util.*; ! ! import org.unitime.timetable.model.PreferenceLevel; ! import org.unitime.timetable.solver.interactive.Suggestion; import net.sf.cpsolver.coursett.heuristics.TimetableComparator; ! import net.sf.cpsolver.coursett.model.*; ! import net.sf.cpsolver.ifs.solver.*; /** --- 22,42 ---- import java.io.Serializable; ! import java.util.Collection; ! import java.util.Enumeration; ! import java.util.Hashtable; ! import java.util.Iterator; ! import java.util.Set; ! import java.util.StringTokenizer; ! import java.util.TreeSet; ! import java.util.Vector; import net.sf.cpsolver.coursett.heuristics.TimetableComparator; ! import net.sf.cpsolver.coursett.model.Lecture; ! import net.sf.cpsolver.coursett.model.Placement; ! import net.sf.cpsolver.coursett.model.TimeLocation; ! import net.sf.cpsolver.coursett.model.TimetableModel; ! import net.sf.cpsolver.ifs.solver.Solver; ! ! import org.unitime.timetable.model.PreferenceLevel; /** *************** *** 90,95 **** iMaxRoomSize = model.getMaxRoomSize(); iFilterText = (model.getFilterText()==null?null:model.getFilterText().trim().toUpperCase()); ! for (Enumeration e=iModel.variables().elements();e.hasMoreElements();) { ! Lecture lecture = (Lecture)e.nextElement(); if (lecture.getClassId().equals(model.getClassId())) { iLecture = lecture; --- 99,103 ---- iMaxRoomSize = model.getMaxRoomSize(); iFilterText = (model.getFilterText()==null?null:model.getFilterText().trim().toUpperCase()); ! for (Lecture lecture: iModel.variables()) { if (lecture.getClassId().equals(model.getClassId())) { iLecture = lecture; *************** *** 131,136 **** iCurrentSuggestion = tryAssignment((Placement)null); Hashtable initialAssignments = new Hashtable(); ! for (Enumeration e=iModel.assignedVariables().elements();e.hasMoreElements();) { ! Lecture lec = (Lecture)e.nextElement(); initialAssignments.put(lec,lec.getAssignment()); } --- 139,143 ---- iCurrentSuggestion = tryAssignment((Placement)null); Hashtable initialAssignments = new Hashtable(); ! for (Lecture lec: iModel.assignedVariables()) { initialAssignments.put(lec,lec.getAssignment()); } *************** *** 150,155 **** Vector unAssignedVariables = new Vector(iModel.unassignedVariables()); Hashtable initialAssignments = new Hashtable(); ! for (Enumeration e=iModel.assignedVariables().elements();e.hasMoreElements();) { ! Lecture lec = (Lecture)e.nextElement(); initialAssignments.put(lec,lec.getAssignment()); } --- 157,161 ---- Vector unAssignedVariables = new Vector(iModel.unassignedVariables()); Hashtable initialAssignments = new Hashtable(); ! for (Lecture lec: iModel.assignedVariables()) { initialAssignments.put(lec,lec.getAssignment()); } *************** *** 196,201 **** Vector unAssignedVariables = new Vector(iModel.unassignedVariables()); Hashtable initialAssignments = new Hashtable(); ! for (Enumeration e=iModel.assignedVariables().elements();e.hasMoreElements();) { ! Lecture lec = (Lecture)e.nextElement(); initialAssignments.put(lec,lec.getAssignment()); } --- 202,206 ---- Vector unAssignedVariables = new Vector(iModel.unassignedVariables()); Hashtable initialAssignments = new Hashtable(); ! for (Lecture lec: iModel.assignedVariables()) { initialAssignments.put(lec,lec.getAssignment()); } *************** *** 265,280 **** TreeSet<PlacementValue> vals = new TreeSet(); if (lecture.equals(iLecture)) { ! for (Enumeration e=(lecture.allowBreakHard() || !iAllowBreakHard?lecture.values():lecture.computeValues(true)).elements();e.hasMoreElements();) { ! Placement p = (Placement)e.nextElement(); if (match(p)) vals.add(new PlacementValue(p)); } } else { if (lecture.allowBreakHard() || !iAllowBreakHard) { ! for (Enumeration e=lecture.values().elements();e.hasMoreElements();) { ! vals.add(new PlacementValue((Placement)e.nextElement())); } } else { ! for (Enumeration e=lecture.computeValues(true).elements();e.hasMoreElements();) { ! vals.add(new PlacementValue((Placement)e.nextElement())); } } --- 270,284 ---- TreeSet<PlacementValue> vals = new TreeSet(); if (lecture.equals(iLecture)) { ! for (Placement p: (lecture.allowBreakHard() || !iAllowBreakHard?lecture.values():lecture.computeValues(true))) { if (match(p)) vals.add(new PlacementValue(p)); } } else { if (lecture.allowBreakHard() || !iAllowBreakHard) { ! for (Placement x: lecture.values()) { ! vals.add(new PlacementValue(x)); } } else { ! for (Placement x: lecture.computeValues(true)) { ! vals.add(new PlacementValue(x)); } } *************** *** 382,387 **** public void computeConfTable() { iConfTable = new Vector(); ! for (Enumeration e=iLecture.timeLocations().elements();e.hasMoreElements();) { ! TimeLocation t = (TimeLocation)e.nextElement(); if (!iAllowBreakHard && PreferenceLevel.sProhibited.equals(PreferenceLevel.int2prolog(t.getPreference()))) continue; --- 386,390 ---- public void computeConfTable() { iConfTable = new Vector(); ! for (TimeLocation t: iLecture.timeLocations()) { if (!iAllowBreakHard && PreferenceLevel.sProhibited.equals(PreferenceLevel.int2prolog(t.getPreference()))) continue; *************** *** 393,398 **** public void computeTryAllAssignments() { iAllAssignments = new TreeSet(); ! for (Enumeration e=iLecture.values().elements();e.hasMoreElements();) { ! Placement p = (Placement)e.nextElement(); if (p.equals(iLecture.getAssignment())) continue; if (p.isHard() && !iAllowBreakHard) continue; --- 396,400 ---- public void computeTryAllAssignments() { iAllAssignments = new TreeSet(); ! for (Placement p: iLecture.values()) { if (p.equals(iLecture.getAssignment())) continue; if (p.isHard() && !iAllowBreakHard) continue; Index: ClassAssignmentDetails.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/interactive/ClassAssignmentDetails.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ClassAssignmentDetails.java 27 Jul 2009 14:28:57 -0000 1.6 --- ClassAssignmentDetails.java 1 Dec 2010 11:10:52 -0000 1.7 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.solver.interactive; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.solver.interactive; *************** *** 22,26 **** import java.io.Serializable; import java.text.DecimalFormat; - import java.text.SimpleDateFormat; import java.util.Collections; import java.util.Comparator; --- 22,25 ---- *************** *** 28,31 **** --- 27,31 ---- import java.util.Hashtable; import java.util.Iterator; + import java.util.List; import java.util.Locale; import java.util.Map; *************** *** 60,64 **** import org.unitime.timetable.solver.ui.JenrlInfo; import org.unitime.timetable.util.Constants; - import org.unitime.timetable.util.DateUtils; import org.unitime.timetable.webutil.timegrid.SolutionGridModel; import org.unitime.timetable.webutil.timegrid.SolverGridModel; --- 60,63 ---- *************** *** 71,75 **** import net.sf.cpsolver.coursett.model.RoomLocation; import net.sf.cpsolver.coursett.model.TimeLocation; - import net.sf.cpsolver.coursett.model.TimetableModel; import net.sf.cpsolver.coursett.preference.PreferenceCombination; import net.sf.cpsolver.ifs.model.Constraint; --- 70,73 ---- *************** *** 81,86 **** public class ClassAssignmentDetails implements Serializable, Comparable { private static final long serialVersionUID = 1L; - private static SimpleDateFormat sDateFormat = new SimpleDateFormat("MM/dd/yy", Locale.US); - private static SimpleDateFormat sDateFormatShort = new SimpleDateFormat("MM/dd", Locale.US); public static DecimalFormat sDF = new DecimalFormat("0.###",new java.text.DecimalFormatSymbols(Locale.US)); public static DecimalFormat sJenrDF = new DecimalFormat("0",new java.text.DecimalFormatSymbols(Locale.US)); --- 79,82 ---- *************** *** 100,104 **** private Vector iGroupConstraintInfos = new Vector(); private Vector iBtbInstructorInfos = new Vector(); - private int iYear = -1; public ClassInfo getClazz() { return iClass; } --- 96,99 ---- *************** *** 116,120 **** getAssignedRoom().equals(getInitialRoom()); } ! public void setAssigned(AssignmentPreferenceInfo info, Vector roomIds, int days, int slot) { iAssignedTime = null; if (days>=0 && slot>=0) { --- 111,115 ---- getAssignedRoom().equals(getInitialRoom()); } ! public void setAssigned(AssignmentPreferenceInfo info, List<Long> roomIds, int days, int slot) { iAssignedTime = null; if (days>=0 && slot>=0) { *************** *** 130,139 **** int idx = 0; iAssignedRoom = new RoomInfo[roomIds.size()]; ! for (Enumeration e=roomIds.elements();e.hasMoreElements();idx++) { ! Long roomId = (Long)e.nextElement(); for (Enumeration f=iRooms.elements();f.hasMoreElements();) { RoomInfo room = (RoomInfo)f.nextElement(); if (room.getId().equals(roomId)) { ! iAssignedRoom[idx] = room; break; } } --- 125,133 ---- int idx = 0; iAssignedRoom = new RoomInfo[roomIds.size()]; ! for (Long roomId: roomIds) { for (Enumeration f=iRooms.elements();f.hasMoreElements();) { RoomInfo room = (RoomInfo)f.nextElement(); if (room.getId().equals(roomId)) { ! iAssignedRoom[idx++] = room; break; } } *************** *** 161,165 **** public ClassAssignmentDetails(Solver solver, Lecture lecture, Placement placement, boolean includeConstraints) { - iYear = ((TimetableModel)solver.currentSolution().getModel()).getYear(); iClass = new ClassInfo(lecture.getName(),lecture.getClassId(),lecture.getNrRooms(),SolverGridModel.hardConflicts2pref(lecture,placement),lecture.minRoomSize(),lecture.getOrd(),lecture.getNote()); if (placement!=null) { --- 155,158 ---- *************** *** 167,172 **** iRoom = new RoomInfo[placement.getRoomLocations().size()]; int idx = 0; ! for (Enumeration e=placement.getRoomLocations().elements();e.hasMoreElements();idx++) { ! RoomLocation room = (RoomLocation)e.nextElement(); iRoom[idx] = new RoomInfo(room.getName(),room.getId(),room.getRoomSize(),(room.getPreference()==0 && lecture.nrRoomLocations()==lecture.getNrRooms()?PreferenceLevel.sIntLevelRequired:room.getPreference())); } --- 160,165 ---- iRoom = new RoomInfo[placement.getRoomLocations().size()]; int idx = 0; ! for (Iterator<RoomLocation> e=placement.getRoomLocations().iterator();e.hasNext();idx++) { ! RoomLocation room = e.next(); iRoom[idx] = new RoomInfo(room.getName(),room.getId(),room.getRoomSize(),(room.getPreference()==0 && lecture.nrRoomLocations()==lecture.getNrRooms()?PreferenceLevel.sIntLevelRequired:room.getPreference())); } *************** *** 181,185 **** iInstructor = new InstructorInfo[lecture.getInstructorConstraints().size()]; for (int i=0;i<lecture.getInstructorConstraints().size();i++) { ! InstructorConstraint ic = (InstructorConstraint)lecture.getInstructorConstraints().elementAt(i); iInstructor[i] = new InstructorInfo(ic.getName(),ic.getResourceId()); } --- 174,178 ---- iInstructor = new InstructorInfo[lecture.getInstructorConstraints().size()]; for (int i=0;i<lecture.getInstructorConstraints().size();i++) { ! InstructorConstraint ic = (InstructorConstraint)lecture.getInstructorConstraints().get(i); iInstructor[i] = new InstructorInfo(ic.getName(),ic.getResourceId()); } *************** *** 192,197 **** iInitialRoom = new RoomInfo[initialPlacement.getRoomLocations().size()]; int idx = 0; ! for (Enumeration e=initialPlacement.getRoomLocations().elements();e.hasMoreElements();idx++) { ! RoomLocation room = (RoomLocation)e.nextElement(); iInitialRoom[idx] = new RoomInfo(room.getName(),room.getId(),room.getRoomSize(),(room.getPreference()==0 && lecture.nrRoomLocations()==lecture.getNrRooms()?PreferenceLevel.sIntLevelRequired:room.getPreference())); } --- 185,190 ---- iInitialRoom = new RoomInfo[initialPlacement.getRoomLocations().size()]; int idx = 0; ! for (Iterator<RoomLocation> e=initialPlacement.getRoomLocations().iterator();e.hasNext();idx++) { ! RoomLocation room = e.next(); iInitialRoom[idx] = new RoomInfo(room.getName(),room.getId(),room.getRoomSize(),(room.getPreference()==0 && lecture.nrRoomLocations()==lecture.getNrRooms()?PreferenceLevel.sIntLevelRequired:room.getPreference())); } *************** *** 204,214 **** iInitialTime = new TimeInfo(time.getDayCode(),time.getStartSlot(),(time.getPreference()==0 && lecture.nrTimeLocations()==1?PreferenceLevel.sIntLevelRequired:time.getPreference()), min,time.getDatePatternName(),time.getTimePatternId()); } ! for (Enumeration e=lecture.timeLocations().elements();e.hasMoreElements();) { ! TimeLocation time = (TimeLocation)e.nextElement(); int min = Constants.SLOT_LENGTH_MIN*time.getNrSlotsPerMeeting()-time.getBreakTime(); iTimes.add(new TimeInfo(time.getDayCode(),time.getStartSlot(),(time.getPreference()==0 && lecture.nrTimeLocations()==1?PreferenceLevel.sIntLevelRequired:time.getPreference()),min,time.getDatePatternName(),time.getTimePatternId())); } ! for (Enumeration e=lecture.roomLocations().elements();e.hasMoreElements();) { ! RoomLocation room = (RoomLocation)e.nextElement(); iRooms.add(new RoomInfo(room.getName(),room.getId(),room.getRoomSize(),(room.getPreference()==0 && lecture.nrRoomLocations()==lecture.getNrRooms()?PreferenceLevel.sIntLevelRequired:room.getPreference()))); } --- 197,205 ---- iInitialTime = new TimeInfo(time.getDayCode(),time.getStartSlot(),(time.getPreference()==0 && lecture.nrTimeLocations()==1?PreferenceLevel.sIntLevelRequired:time.getPreference()), min,time.getDatePatternName(),time.getTimePatternId()); } ! for (TimeLocation time: lecture.timeLocations()) { int min = Constants.SLOT_LENGTH_MIN*time.getNrSlotsPerMeeting()-time.getBreakTime(); iTimes.add(new TimeInfo(time.getDayCode(),time.getStartSlot(),(time.getPreference()==0 && lecture.nrTimeLocations()==1?PreferenceLevel.sIntLevelRequired:time.getPreference()),min,time.getDatePatternName(),time.getTimePatternId())); } ! for (RoomLocation room: lecture.roomLocations()) { iRooms.add(new RoomInfo(room.getName(),room.getId(),room.getRoomSize(),(room.getPreference()==0 && lecture.nrRoomLocations()==lecture.getNrRooms()?PreferenceLevel.sIntLevelRequired:room.getPreference()))); } *************** *** 228,238 **** } } ! for (Enumeration e=lecture.constraints().elements();e.hasMoreElements();) { ! Constraint c = (Constraint)e.nextElement(); if (c instanceof GroupConstraint) { GroupConstraint gc = (GroupConstraint)c; DistributionInfo dist = new DistributionInfo(new GroupConstraintInfo(gc)); ! for (Enumeration f=gc.variables().elements();f.hasMoreElements();) { ! Lecture another = (Lecture)f.nextElement(); if (another.equals(lecture)) continue; dist.addClass(another.getClassId()); --- 219,227 ---- } } ! for (Constraint c: lecture.constraints()) { if (c instanceof GroupConstraint) { GroupConstraint gc = (GroupConstraint)c; DistributionInfo dist = new DistributionInfo(new GroupConstraintInfo(gc)); ! for (Lecture another: gc.variables()) { if (another.equals(lecture)) continue; dist.addClass(another.getClassId()); *************** *** 242,249 **** } if (!lecture.getInstructorConstraints().isEmpty() && placement!=null) { ! for (Enumeration e=lecture.getInstructorConstraints().elements();e.hasMoreElements();) { ! InstructorConstraint ic = (InstructorConstraint)e.nextElement(); ! for (Enumeration f=ic.variables().elements();f.hasMoreElements();) { ! Lecture other = (Lecture)f.nextElement(); if (other.equals(lecture) || other.getAssignment()==null) continue; int pref = ic.getDistancePreference(placement, (Placement)other.getAssignment()); --- 231,236 ---- } if (!lecture.getInstructorConstraints().isEmpty() && placement!=null) { ! for (InstructorConstraint ic: lecture.getInstructorConstraints()) { ! for (Lecture other: ic.variables()) { if (other.equals(lecture) || other.getAssignment()==null) continue; int pref = ic.getDistancePreference(placement, (Placement)other.getAssignment()); *************** *** 257,264 **** public ClassAssignmentDetails(Solution solution, Assignment assignment, boolean includeConstraints, Session hibSession, String instructorNameFormat) throws Exception { - //TODO: checked OK, tested OK - iYear = solution.getSession().getSessionStartYear(); - int sessionStartDay = DateUtils.getDayOfYear(solution.getSession().getSessionBeginDateTime()); - int sessionEndDay = DateUtils.getDayOfYear(solution.getSession().getSessionEndDateTime()); if (assignment!=null) { iAssignmentInfo = (AssignmentPreferenceInfo)assignment.getAssignmentInfo("AssignmentInfo"); --- 244,247 ---- *************** *** 439,443 **** if (link) { if (newWindow) { ! return "<a class='noFancyLinks' onMouseOver=\"this.style.cursor='hand';this.style.cursor='pointer';\" onClick=\"window.open('suggestions.do?id="+iClassId+"&op=Reset','suggestions','width=1000,height=600,resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=yes,menubar=no,copyhistory=no').focus();\"><font color='"+PreferenceLevel.prolog2color(iPref)+"'>"+iName+"</font></a>"; } else { return "<a class='noFancyLinks' href='suggestions.do?id="+iClassId+"&op=Select'><font color='"+PreferenceLevel.prolog2color(iPref)+"'>"+iName+"</font></a>"; --- 422,426 ---- if (link) { if (newWindow) { ! return "<a class='noFancyLinks' onMouseOver=\"this.style.cursor='hand';this.style.cursor='pointer';\" onClick=\"showGwtDialog('Suggestions', 'suggestions.do?id="+iClassId+"&op=Reset','900','90%');\"><font color='"+PreferenceLevel.prolog2color(iPref)+"'>"+iName+"</font></a>"; } else { return "<a class='noFancyLinks' href='suggestions.do?id="+iClassId+"&op=Select'><font color='"+PreferenceLevel.prolog2color(iPref)+"'>"+iName+"</font></a>"; *************** *** 670,673 **** --- 653,657 ---- } sb.append(props.isEmpty()?"":" <i>"+props+"</i>"); + sb.append(" <i>" + iInfo.getCurriculumText() + "</i>"); return sb.toString(); } catch (Exception e) { *************** *** 745,749 **** sb.append("<input type='hidden' name='roomState' value='0'/>"); for (int i=0;i<getClazz().nrRooms();i++) ! sb.append("<input type='hidden' name='room"+i+"' value='"+(selection==null?iRoom==null?"":iRoom[i].getId().toString():selection.getRoomIds().elementAt(i).toString())+"'/>"); } for (Enumeration e=elements();e.hasMoreElements();) { --- 729,733 ---- sb.append("<input type='hidden' name='roomState' value='0'/>"); for (int i=0;i<getClazz().nrRooms();i++) ! sb.append("<input type='hidden' name='room"+i+"' value='"+(selection==null?iRoom==null?"":iRoom[i].getId().toString():selection.getRoomIds().get(i).toString())+"'/>"); } for (Enumeration e=elements();e.hasMoreElements();) { Index: Suggestion.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/interactive/Suggestion.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Suggestion.java 17 Jun 2008 21:24:56 -0000 1.2 --- Suggestion.java 1 Dec 2010 11:10:52 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.solver.interactive; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.solver.interactive; *************** *** 91,95 **** } ! public Suggestion(Solver solver, Hashtable initialAssignments, Vector order, Collection unresolvedConflicts) { if (unresolvedConflicts!=null) { iUnresolvedConflicts = new HashSet(); --- 91,95 ---- } ! public Suggestion(Solver<Lecture, Placement> solver, Hashtable<Lecture, Placement> initialAssignments, Vector order, Collection unresolvedConflicts) { if (unresolvedConflicts!=null) { iUnresolvedConflicts = new HashSet(); *************** *** 103,109 **** HashSet gcs = new HashSet(); Hashtable committed = new Hashtable(); ! for (Enumeration e=solver.currentSolution().getModel().assignedVariables().elements();e.hasMoreElements();) { ! Lecture lecture = (Lecture)e.nextElement(); ! Placement p = (Placement)lecture.getAssignment(); Placement ini = (Placement)initialAssignments.get(p.variable()); if (ini==null || !ini.equals(p)) { --- 103,108 ---- HashSet gcs = new HashSet(); Hashtable committed = new Hashtable(); ! for (Lecture lecture: solver.currentSolution().getModel().assignedVariables()) { ! Placement p = lecture.getAssignment(); Placement ini = (Placement)initialAssignments.get(p.variable()); if (ini==null || !ini.equals(p)) { *************** *** 125,132 **** } gcs.addAll(lecture.groupConstraints()); ! for (Enumeration f=lecture.getInstructorConstraints().elements();f.hasMoreElements();) { ! InstructorConstraint ic = (InstructorConstraint)f.nextElement(); ! for (Enumeration g=ic.variables().elements();g.hasMoreElements();) { ! Lecture other = (Lecture)g.nextElement(); if (other.equals(lecture) || other.getAssignment()==null) continue; int pref = ic.getDistancePreference(p, (Placement)other.getAssignment()); --- 124,129 ---- } gcs.addAll(lecture.groupConstraints()); ! for (InstructorConstraint ic: lecture.getInstructorConstraints()) { ! for (Lecture other: ic.variables()) { if (other.equals(lecture) || other.getAssignment()==null) continue; int pref = ic.getDistancePreference(p, (Placement)other.getAssignment()); *************** *** 177,182 **** if (gc.isSatisfied()) continue; DistributionInfo dist = new DistributionInfo(new GroupConstraintInfo(gc)); ! for (Enumeration f=gc.variables().elements();f.hasMoreElements();) { ! Lecture another = (Lecture)f.nextElement(); if (another.getAssignment()!=null) dist.addHint(new Hint(solver, (Placement)another.getAssignment())); --- 174,178 ---- if (gc.isSatisfied()) continue; DistributionInfo dist = new DistributionInfo(new GroupConstraintInfo(gc)); ! for (Lecture another: gc.variables()) { if (another.getAssignment()!=null) dist.addHint(new Hint(solver, (Placement)another.getAssignment())); *************** *** 207,211 **** Placement currentPlacement = (Placement)lecture.getAssignment(); if (currentPlacement==null) ! currentPlacement = (lecture.values().isEmpty()?null:(Placement)lecture.values().firstElement()); Hashtable committed = new Hashtable(); --- 203,207 ---- Placement currentPlacement = (Placement)lecture.getAssignment(); if (currentPlacement==null) ! currentPlacement = (lecture.values().isEmpty()?null:lecture.values().get(0)); Hashtable committed = new Hashtable(); *************** *** 233,238 **** } ! for (Enumeration e=lecture.jenrlConstraints();e.hasMoreElements();) { ! JenrlConstraint jenrl = (JenrlConstraint)e.nextElement(); long j = jenrl.jenrl(lecture, dummyPlacement); if (j>0) { --- 229,233 ---- } ! for (JenrlConstraint jenrl: lecture.jenrlConstraints()) { long j = jenrl.jenrl(lecture, dummyPlacement); if (j>0) { *************** *** 293,302 **** iGlobalGroupConstraintPreference += Math.abs(curPref==0?gc.getPreference():curPref); DistributionInfo dist = new DistributionInfo(new GroupConstraintInfo(gc)); ! for (Enumeration f=gc.variables().elements();f.hasMoreElements();) { ! Lecture another = (Lecture)f.nextElement(); if (another.equals(lecture)) { //dist.addHint(new Hint(solver, dummyPlacement)); } else if (another.getAssignment()!=null) ! dist.addHint(new Hint(solver, (Placement)another.getAssignment())); } iGroupConstraintInfos.addElement(dist); --- 288,296 ---- iGlobalGroupConstraintPreference += Math.abs(curPref==0?gc.getPreference():curPref); DistributionInfo dist = new DistributionInfo(new GroupConstraintInfo(gc)); ! for (Lecture another: gc.variables()) { if (another.equals(lecture)) { //dist.addHint(new Hint(solver, dummyPlacement)); } else if (another.getAssignment()!=null) ! dist.addHint(new Hint(solver, another.getAssignment())); } iGroupConstraintInfos.addElement(dist); *************** *** 570,573 **** --- 564,568 ---- sb.append("</td><td "+(iSecondInfo==null?"":"rowspan='2'")+" nowrap>"); sb.append(props.isEmpty()?"":" <i>"+props+"</i>"); + sb.append(" <i>" + iInfo.getCurriculumText()+"</i>"); if (iSecondInfo!=null) { sb.append("</td></tr><tr><td nowrap>"); Index: Hint.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/interactive/Hint.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Hint.java 17 Jun 2008 21:24:56 -0000 1.2 --- Hint.java 1 Dec 2010 11:10:52 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.solver.interactive; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.solver.interactive; *************** *** 22,27 **** import java.io.Serializable; import java.util.Comparator; - import java.util.Enumeration; import java.util.Iterator; import java.util.Vector; --- 22,27 ---- import java.io.Serializable; import java.util.Comparator; import java.util.Iterator; + import java.util.List; import java.util.Vector; *************** *** 36,40 **** import net.sf.cpsolver.coursett.model.RoomLocation; import net.sf.cpsolver.coursett.model.TimeLocation; ! import net.sf.cpsolver.ifs.model.Model; import net.sf.cpsolver.ifs.solver.Solver; --- 36,40 ---- import net.sf.cpsolver.coursett.model.RoomLocation; import net.sf.cpsolver.coursett.model.TimeLocation; ! import net.sf.cpsolver.coursett.model.TimetableModel; import net.sf.cpsolver.ifs.solver.Solver; *************** *** 47,56 **** private int iDays; private int iStartSlot; ! private Vector iRoomIds; private Long iPatternId; private AssignmentPreferenceInfo iInfo = null; private ClassAssignmentDetails iDetails = null; ! public Hint(Long classId, int days, int startSlot, Vector roomIds, Long patternId) { ! iClassId = classId; iDays = days; iStartSlot = startSlot; iRoomIds = new Vector(1); iRoomIds = new Vector(roomIds); iPatternId = patternId; } public Hint(Solver solver, Placement placement) { --- 47,56 ---- private int iDays; private int iStartSlot; ! private List<Long> iRoomIds; private Long iPatternId; private AssignmentPreferenceInfo iInfo = null; private ClassAssignmentDetails iDetails = null; ! public Hint(Long classId, int days, int startSlot, List<Long> roomIds, Long patternId) { ! iClassId = classId; iDays = days; iStartSlot = startSlot; iRoomIds = roomIds; iPatternId = patternId; } public Hint(Solver solver, Placement placement) { *************** *** 65,81 **** if (populateInfo && solver!=null) iInfo = new AssignmentPreferenceInfo(solver, placement, false); ! if (((Lecture)placement.variable()).isCommitted() && solver!=null) ! iDetails = new ClassAssignmentDetails(solver,(Lecture)placement.variable(),placement,false); } ! public Placement getPlacement(Model model) { return getPlacement(model, true); } ! public Placement getPlacement(Model model, boolean checkValidity) { ! for (Enumeration e1=model.variables().elements();e1.hasMoreElements();) { ! Lecture lecture = (Lecture)e1.nextElement(); if (!lecture.getClassId().equals(iClassId)) continue; TimeLocation timeLocation = null; ! for (Enumeration e2=lecture.timeLocations().elements();e2.hasMoreElements();) { ! TimeLocation t = (TimeLocation)e2.nextElement(); if (t.getDayCode()!=iDays) continue; if (t.getStartSlot()!=iStartSlot) continue; --- 65,79 ---- if (populateInfo && solver!=null) iInfo = new AssignmentPreferenceInfo(solver, placement, false); ! if (placement.variable().isCommitted() && solver!=null) ! iDetails = new ClassAssignmentDetails(solver, placement.variable(),placement,false); } ! public Placement getPlacement(TimetableModel model) { return getPlacement(model, true); } ! public Placement getPlacement(TimetableModel model, boolean checkValidity) { ! for (Lecture lecture: model.variables()) { if (!lecture.getClassId().equals(iClassId)) continue; TimeLocation timeLocation = null; ! for (TimeLocation t: lecture.timeLocations()) { if (t.getDayCode()!=iDays) continue; if (t.getStartSlot()!=iStartSlot) continue; *************** *** 85,92 **** Vector roomLocations = new Vector(); if (lecture.getNrRooms()>0) { ! for (Enumeration e2=iRoomIds.elements();e2.hasMoreElements();) { ! Long roomId = (Long)e2.nextElement(); ! for (Enumeration e3=lecture.roomLocations().elements();e3.hasMoreElements();) { ! RoomLocation r = (RoomLocation)e3.nextElement(); if (r.getId().equals(roomId)) roomLocations.add(r); --- 83,88 ---- Vector roomLocations = new Vector(); if (lecture.getNrRooms()>0) { ! for (Long roomId: iRoomIds) { ! for (RoomLocation r: lecture.roomLocations()) { if (r.getId().equals(roomId)) roomLocations.add(r); *************** *** 119,123 **** } public AssignmentPreferenceInfo getInfo(Solver solver) { ! Placement p = getPlacement(solver.currentSolution().getModel()); if (p==null) return null; return new AssignmentPreferenceInfo(solver, p, false); --- 115,119 ---- } public AssignmentPreferenceInfo getInfo(Solver solver) { ! Placement p = getPlacement((TimetableModel)solver.currentSolution().getModel()); if (p==null) return null; return new AssignmentPreferenceInfo(solver, p, false); *************** *** 125,129 **** public String getNotValidReason(Solver solver) { ! Placement p = getPlacement(solver.currentSolution().getModel(), false); if (p==null) return "Selected placement is not valid (room or instructor not avaiable)."; if (p.isValid()) return "Selected placement is valid."; --- 121,125 ---- public String getNotValidReason(Solver solver) { ! Placement p = getPlacement((TimetableModel)solver.currentSolution().getModel(), false); if (p==null) return "Selected placement is not valid (room or instructor not avaiable)."; if (p.isValid()) return "Selected placement is valid."; *************** *** 134,138 **** public int getDays() { return iDays; } public int getStartSlot() { return iStartSlot; } ! public Vector getRoomIds() { return iRoomIds; } public Long getPatternId() { return iPatternId; } --- 130,134 ---- public int getDays() { return iDays; } public int getStartSlot() { return iStartSlot; } ! public List<Long> getRoomIds() { return iRoomIds; } public Long getPatternId() { return iPatternId; } *************** *** 176,181 **** element.addAttribute("start", String.valueOf(iStartSlot)); if (iRoomIds!=null) { ! for (Enumeration e=iRoomIds.elements();e.hasMoreElements();) { ! Long roomId = (Long)e.nextElement(); if (roomId!=null) element.addElement("room").addAttribute("id", roomId.toString()); --- 172,176 ---- element.addAttribute("start", String.valueOf(iStartSlot)); if (iRoomIds!=null) { ! for (Long roomId: iRoomIds) { if (roomId!=null) element.addElement("room").addAttribute("id", roomId.toString()); |
|
From: Tomas M. <to...@us...> - 2010-12-01 11:11:31
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/studentsct In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13954/JavaSource/org/unitime/timetable/solver/studentsct Modified Files: StudentSectioningDatabaseLoader.java StudentSolverProxy.java StudentSectioningDatabaseSaver.java StudentSolver.java StudentSolverProxyFactory.java RemoteStudentSolverProxy.java Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) Index: StudentSolver.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/studentsct/StudentSolver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** StudentSolver.java 7 Jul 2008 21:13:41 -0000 1.1 --- StudentSolver.java 1 Dec 2010 11:10:51 -0000 1.2 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.solver.studentsct; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.solver.studentsct; *************** *** 24,39 **** import java.io.FileOutputStream; import java.io.IOException; - import java.util.Collection; import java.util.Date; - import java.util.Enumeration; import java.util.HashSet; import java.util.Hashtable; import java.util.Iterator; import java.util.Map; import java.util.Set; - import java.util.Vector; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.unitime.timetable.solver.remote.BackupFileFilter; import org.unitime.timetable.util.Constants; --- 24,38 ---- import java.io.FileOutputStream; import java.io.IOException; import java.util.Date; import java.util.HashSet; import java.util.Hashtable; import java.util.Iterator; + import java.util.List; import java.util.Map; import java.util.Set; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.unitime.timetable.ApplicationProperties; import org.unitime.timetable.solver.remote.BackupFileFilter; import org.unitime.timetable.util.Constants; *************** *** 70,78 **** private boolean iIsPassivated = false; private Map iProgressBeforePassivation = null; ! private Hashtable iCurrentSolutionInfoBeforePassivation = null; ! private Hashtable iBestSolutionInfoBeforePassivation = null; private File iPassivationFolder = null; private String iPassivationPuid = null; ! public static long sInactiveTimeToPassivate = 1800000; --- 69,77 ---- private boolean iIsPassivated = false; private Map iProgressBeforePassivation = null; ! private Map<String, String> iCurrentSolutionInfoBeforePassivation = null; ! private Map<String, String> iBestSolutionInfoBeforePassivation = null; private File iPassivationFolder = null; private String iPassivationPuid = null; ! private Thread iWorkThread = null; *************** *** 84,90 **** public Date getLoadedDate() { if (iLoadedDate==null && !isPassivated()) { ! Vector log = Progress.getInstance(currentSolution().getModel()).getLog(); if (log!=null && !log.isEmpty()) { ! iLoadedDate = ((Progress.Message)log.firstElement()).getDate(); } } --- 83,89 ---- public Date getLoadedDate() { if (iLoadedDate==null && !isPassivated()) { ! List<Progress.Message> log = Progress.getInstance(currentSolution().getModel()).getLog(); if (log!=null && !log.isEmpty()) { ! iLoadedDate = log.get(0).getDate(); } } *************** *** 170,174 **** } ! public Hashtable currentSolutionInfo() { if (isPassivated()) return iCurrentSolutionInfoBeforePassivation; synchronized (super.currentSolution()) { --- 169,173 ---- } ! public Map<String,String> currentSolutionInfo() { if (isPassivated()) return iCurrentSolutionInfoBeforePassivation; synchronized (super.currentSolution()) { *************** *** 177,181 **** } ! public Hashtable bestSolutionInfo() { if (isPassivated()) return iBestSolutionInfoBeforePassivation; synchronized (super.currentSolution()) { --- 176,180 ---- } ! public Map<String,String> bestSolutionInfo() { if (isPassivated()) return iBestSolutionInfoBeforePassivation; synchronized (super.currentSolution()) { *************** *** 220,226 **** StudentSectioningSaver saver = new StudentSectioningDatabaseSaver(this); saver.setCallback(getSavingDoneCallback()); ! Thread thread = new Thread(saver); ! thread.setPriority(THREAD_PRIORITY); ! thread.start(); } --- 219,225 ---- StudentSectioningSaver saver = new StudentSectioningDatabaseSaver(this); saver.setCallback(getSavingDoneCallback()); ! iWorkThread = new Thread(saver); ! iWorkThread.setPriority(THREAD_PRIORITY); ! iWorkThread.start(); } *************** *** 236,242 **** StudentSectioningLoader loader = new StudentSectioningDatabaseLoader(model); loader.setCallback(getLoadingDoneCallback()); ! Thread thread = new Thread(loader); ! thread.setPriority(THREAD_PRIORITY); ! thread.start(); } --- 235,241 ---- StudentSectioningLoader loader = new StudentSectioningDatabaseLoader(model); loader.setCallback(getLoadingDoneCallback()); ! iWorkThread = new Thread(loader); ! iWorkThread.setPriority(THREAD_PRIORITY); ! iWorkThread.start(); } *************** *** 258,262 **** StudentSectioningLoader loader = new StudentSectioningDatabaseLoader(model); loader.setCallback(callBack); ! (new Thread(loader)).start(); } --- 257,262 ---- StudentSectioningLoader loader = new StudentSectioningDatabaseLoader(model); loader.setCallback(callBack); ! iWorkThread = new Thread(loader); ! iWorkThread.start(); } *************** *** 290,295 **** public ReloadingDoneCallback() { iSolutionId = getProperties().getProperty("General.SolutionId"); ! for (Enumeration e=currentSolution().getModel().variables().elements();e.hasMoreElements();) { ! Request request = (Request)e.nextElement(); if (request.getAssignment()!=null) iCurrentAssignmentTable.put(request.getId(),request.getAssignment()); --- 290,294 ---- public ReloadingDoneCallback() { iSolutionId = getProperties().getProperty("General.SolutionId"); ! for (Request request: currentSolution().getModel().variables()) { if (request.getAssignment()!=null) iCurrentAssignmentTable.put(request.getId(),request.getAssignment()); *************** *** 301,306 **** } private Request getRequest(long id) { ! for (Enumeration e=currentSolution().getModel().variables().elements();e.hasMoreElements();) { ! Request request = (Request)e.nextElement(); if (request.getId()==id) return request; } --- 300,304 ---- } private Request getRequest(long id) { ! for (Request request: currentSolution().getModel().variables()) { if (request.getId()==id) return request; } *************** *** 327,331 **** } private void assign(Enrollment enrollment) { ! Hashtable conflictConstraints = currentSolution().getModel().conflictConstraints(enrollment); if (conflictConstraints.isEmpty()) { enrollment.variable().assign(0,enrollment); --- 325,329 ---- } private void assign(Enrollment enrollment) { ! Map<Constraint<Request, Enrollment>, Set<Enrollment>> conflictConstraints = currentSolution().getModel().conflictConstraints(enrollment); if (conflictConstraints.isEmpty()) { enrollment.variable().assign(0,enrollment); *************** *** 333,341 **** iProgress.warn("Unable to assign "+enrollment.variable().getName()+" := "+enrollment.getName()); iProgress.warn(" Reason:"); ! for (Enumeration ex=conflictConstraints.keys();ex.hasMoreElements();) { ! Constraint c = (Constraint)ex.nextElement(); ! Collection vals = (Collection)conflictConstraints.get(c); ! for (Iterator j=vals.iterator();j.hasNext();) { ! Enrollment enrl = (Enrollment) j.next(); iProgress.warn(" "+enrl.getRequest().getName()+" = "+enrl.getName()); } --- 331,337 ---- iProgress.warn("Unable to assign "+enrollment.variable().getName()+" := "+enrollment.getName()); iProgress.warn(" Reason:"); ! for (Constraint<Request, Enrollment> c: conflictConstraints.keySet()) { ! Set<Enrollment> vals = conflictConstraints.get(c); ! for (Enrollment enrl: vals) { iProgress.warn(" "+enrl.getRequest().getName()+" = "+enrl.getName()); } *************** *** 345,350 **** } private void unassignAll() { ! for (Enumeration e=currentSolution().getModel().variables().elements();e.hasMoreElements();) { ! Request request = (Request)e.nextElement(); if (request.getAssignment()!=null) request.unassign(0); } --- 341,345 ---- } private void unassignAll() { ! for (Request request: currentSolution().getModel().variables()) { if (request.getAssignment()!=null) request.unassign(0); } *************** *** 524,529 **** public void clear() { synchronized (currentSolution()) { ! for (Enumeration e=currentSolution().getModel().variables().elements();e.hasMoreElements();) { ! Request request = (Request)e.nextElement(); if (request.getAssignment()!=null) request.unassign(0); } --- 519,523 ---- public void clear() { synchronized (currentSolution()) { ! for (Request request: currentSolution().getModel().variables()) { if (request.getAssignment()!=null) request.unassign(0); } *************** *** 536,540 **** } ! public Solution currentSolution() { activateIfNeeded(); return super.currentSolution(); --- 530,534 ---- } ! public Solution<Request, Enrollment> currentSolution() { activateIfNeeded(); return super.currentSolution(); *************** *** 595,599 **** public synchronized boolean passivateIfNeeded(File folder, String puid) { ! if (isPassivated() || timeFromLastUsed()<sInactiveTimeToPassivate || isWorking()) return false; return passivate(folder, puid); } --- 589,594 ---- public synchronized boolean passivateIfNeeded(File folder, String puid) { ! long inactiveTimeToPassivate = Long.parseLong(ApplicationProperties.getProperty("unitime.solver.passivation.time", "30")) * 60000l; ! if (isPassivated() || inactiveTimeToPassivate <= 0 || timeFromLastUsed() < inactiveTimeToPassivate || isWorking()) return false; return passivate(folder, puid); } *************** *** 602,604 **** --- 597,614 ---- return new Date(iLastTimeStamp); } + + public void interrupt() { + try { + if (iSolverThread != null) { + iStop = true; + if (iSolverThread.isAlive() && !iSolverThread.isInterrupted()) + iSolverThread.interrupt(); + } + if (iWorkThread != null && iWorkThread.isAlive() && !iWorkThread.isInterrupted()) { + iWorkThread.interrupt(); + } + } catch (Exception e) { + sLog.error("Unable to interrupt the solver, reason: " + e.getMessage(), e); + } + } } Index: RemoteStudentSolverProxy.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/studentsct/RemoteStudentSolverProxy.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RemoteStudentSolverProxy.java 7 Jul 2008 21:13:42 -0000 1.1 --- RemoteStudentSolverProxy.java 1 Dec 2010 11:10:51 -0000 1.2 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.solver.studentsct; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.solver.studentsct; Index: StudentSolverProxyFactory.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/studentsct/StudentSolverProxyFactory.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** StudentSolverProxyFactory.java 7 Jul 2008 21:13:41 -0000 1.1 --- StudentSolverProxyFactory.java 1 Dec 2010 11:10:51 -0000 1.2 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.solver.studentsct; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.solver.studentsct; *************** *** 31,35 **** public class StudentSolverProxyFactory implements InvocationHandler { private RemoteSolverServerProxy iProxy; - private RemoteStudentSolverProxy iStudentSolverProxy; private String iPuid = null; --- 31,34 ---- *************** *** 39,46 **** } - public void setStudentSolverProxy(RemoteStudentSolverProxy proxy) { - iStudentSolverProxy = proxy; - } - public static StudentSolverProxy create(RemoteSolverServerProxy proxy, String puid) { StudentSolverProxyFactory handler = new StudentSolverProxyFactory(proxy, puid); --- 38,41 ---- *************** *** 50,54 **** handler ); - handler.setStudentSolverProxy(px); return px; } --- 45,48 ---- Index: StudentSectioningDatabaseSaver.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/studentsct/StudentSectioningDatabaseSaver.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** StudentSectioningDatabaseSaver.java 23 Nov 2010 19:23:56 -0000 1.6 --- StudentSectioningDatabaseSaver.java 1 Dec 2010 11:10:51 -0000 1.7 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,27 **** * * 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. */ package org.unitime.timetable.solver.studentsct; import java.util.Date; - import java.util.Enumeration; - import java.util.Hashtable; import java.util.Iterator; import java.util.List; --- 15,26 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.solver.studentsct; import java.util.Date; import java.util.Iterator; + import java.util.Hashtable; import java.util.List; *************** *** 37,40 **** --- 36,40 ---- import org.unitime.timetable.model.Session; import org.unitime.timetable.model.StudentClassEnrollment; + import org.unitime.timetable.model.StudentSectioningQueue; import org.unitime.timetable.model.WaitList; import org.unitime.timetable.model.dao.SessionDAO; *************** *** 99,107 **** save(session, hibSession); ! tx.commit(); } catch (Exception e) { iProgress.fatal("Unable to save student schedule, reason: "+e.getMessage(),e); sLog.error(e.getMessage(),e); ! tx.rollback(); } finally { // here we need to close the session since this code may run in a separate thread --- 99,110 ---- save(session, hibSession); ! StudentSectioningQueue.allStudentsChanged(hibSession, session.getUniqueId()); ! ! tx.commit(); tx = null; ! } catch (Exception e) { iProgress.fatal("Unable to save student schedule, reason: "+e.getMessage(),e); sLog.error(e.getMessage(),e); ! if (tx != null) tx.rollback(); } finally { // here we need to close the session since this code may run in a separate thread *************** *** 160,165 **** hibSession.delete(wl); i.remove(); } ! for (Enumeration e=student.getRequests().elements();e.hasMoreElements();) { ! Request request = (Request)e.nextElement(); Enrollment enrollment = (Enrollment)request.getAssignment(); if (request instanceof CourseRequest) { --- 163,168 ---- hibSession.delete(wl); i.remove(); } ! for (Iterator e=student.getRequests().iterator();e.hasNext();) { ! Request request = (Request)e.next(); Enrollment enrollment = (Enrollment)request.getAssignment(); if (request instanceof CourseRequest) { *************** *** 169,175 **** WaitList wl = new WaitList(); wl.setStudent(s); ! wl.setCourseOffering(iCourses.get(((Course)courseRequest.getCourses().firstElement()).getId())); wl.setTimestamp(new Date()); wl.setType(new Integer(0)); hibSession.save(wl); } --- 172,179 ---- WaitList wl = new WaitList(); wl.setStudent(s); ! wl.setCourseOffering(iCourses.get(((Course)courseRequest.getCourses().get(0)).getId())); wl.setTimestamp(new Date()); wl.setType(new Integer(0)); + s.getWaitlists().add(wl); hibSession.save(wl); } *************** *** 177,180 **** --- 181,185 ---- org.unitime.timetable.model.CourseRequest cr = iRequests.get(request.getId()+":"+enrollment.getOffering().getId()); if (cr==null) continue; + cr.getClassEnrollments().clear(); for (Iterator j=enrollment.getAssignments().iterator();j.hasNext();) { Section section = (Section)j.next(); *************** *** 185,193 **** --- 190,202 ---- sce.setCourseOffering(cr.getCourseOffering()); sce.setTimestamp(new Date()); + s.getClassEnrollments().add(sce); + cr.getClassEnrollments().add(sce); hibSession.save(sce); } + hibSession.saveOrUpdate(cr); } } } + hibSession.saveOrUpdate(s); } *************** *** 213,218 **** } } ! for (Enumeration e=getModel().getStudents().elements();e.hasMoreElements();) { ! Student student = (Student)e.nextElement(); if (student.isDummy()) continue; saveStudent(hibSession, student); --- 222,227 ---- } } ! for (Iterator e=getModel().getStudents().iterator();e.hasNext();) { ! Student student = (Student)e.next(); if (student.isDummy()) continue; saveStudent(hibSession, student); *************** *** 236,247 **** iProgress.setPhase("Saving expected/held space for online sectioning...", getModel().getOfferings().size()); ! for (Enumeration e=getModel().getOfferings().elements();e.hasMoreElements();) { ! Offering offering = (Offering)e.nextElement(); iProgress.incProgress(); ! for (Enumeration f=offering.getConfigs().elements();f.hasMoreElements();) { ! Config config = (Config)f.nextElement(); ! for (Enumeration g=config.getSubparts().elements();g.hasMoreElements();) { ! Subpart subpart = (Subpart)g.nextElement(); ! for (Enumeration h=subpart.getSections().elements();h.hasMoreElements();) { ! Section section = (Section)h.nextElement(); Class_ clazz = iClasses.get(section.getId()); if (clazz==null) continue; --- 245,256 ---- iProgress.setPhase("Saving expected/held space for online sectioning...", getModel().getOfferings().size()); ! for (Iterator e=getModel().getOfferings().iterator();e.hasNext();) { ! Offering offering = (Offering)e.next(); iProgress.incProgress(); ! for (Iterator f=offering.getConfigs().iterator();f.hasNext();) { ! Config config = (Config)f.next(); ! for (Iterator g=config.getSubparts().iterator();g.hasNext();) { ! Subpart subpart = (Subpart)g.next(); ! for (Iterator h=subpart.getSections().iterator();h.hasNext();) { ! Section section = (Section)h.next(); Class_ clazz = iClasses.get(section.getId()); if (clazz==null) continue; *************** *** 262,273 **** // Update class enrollments ! for (Enumeration e=getModel().getOfferings().elements();e.hasMoreElements();) { ! Offering offering = (Offering)e.nextElement(); ! for (Enumeration f=offering.getConfigs().elements();f.hasMoreElements();) { ! Config config = (Config)f.nextElement(); ! for (Enumeration g=config.getSubparts().elements();g.hasMoreElements();) { ! Subpart subpart = (Subpart)g.nextElement(); ! for (Enumeration h=subpart.getSections().elements();h.hasMoreElements();) { ! Section section = (Section)h.nextElement(); Class_ clazz = iClasses.get(section.getId()); if (clazz==null) continue; --- 271,282 ---- // Update class enrollments ! for (Iterator e=getModel().getOfferings().iterator();e.hasNext();) { ! Offering offering = (Offering)e.next(); ! for (Iterator f=offering.getConfigs().iterator();f.hasNext();) { ! Config config = (Config)f.next(); ! for (Iterator g=config.getSubparts().iterator();g.hasNext();) { ! Subpart subpart = (Subpart)g.next(); ! for (Iterator h=subpart.getSections().iterator();h.hasNext();) { ! Section section = (Section)h.next(); Class_ clazz = iClasses.get(section.getId()); if (clazz==null) continue; Index: StudentSolverProxy.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/studentsct/StudentSolverProxy.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** StudentSolverProxy.java 7 Jul 2008 21:13:42 -0000 1.1 --- StudentSolverProxy.java 1 Dec 2010 11:10:51 -0000 1.2 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.solver.studentsct; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.solver.studentsct; *************** *** 22,26 **** import java.io.File; import java.util.Date; - import java.util.Hashtable; import java.util.Map; --- 22,25 ---- *************** *** 47,52 **** public void saveBest(); public void clear(); ! public Hashtable currentSolutionInfo(); ! public Hashtable bestSolutionInfo(); public boolean isWorking(); --- 46,51 ---- public void saveBest(); public void clear(); ! public Map<String, String> currentSolutionInfo(); ! public Map<String, String> bestSolutionInfo(); public boolean isWorking(); *************** *** 72,74 **** --- 71,75 ---- public boolean passivateIfNeeded(File folder, String puid); public Date getLastUsed(); + + public void interrupt(); } Index: StudentSectioningDatabaseLoader.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/studentsct/StudentSectioningDatabaseLoader.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** StudentSectioningDatabaseLoader.java 7 Jul 2008 21:13:42 -0000 1.1 --- StudentSectioningDatabaseLoader.java 1 Dec 2010 11:10:51 -0000 1.2 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,24 **** * * 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. */ package org.unitime.timetable.solver.studentsct; import java.text.SimpleDateFormat; import java.util.Enumeration; import java.util.HashSet; --- 15,29 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.solver.studentsct; + import java.text.DecimalFormat; import java.text.SimpleDateFormat; + import java.util.BitSet; + import java.util.Calendar; + import java.util.Comparator; + import java.util.Date; import java.util.Enumeration; import java.util.HashSet; *************** *** 26,30 **** import java.util.Iterator; import java.util.List; ! import java.util.Set; import java.util.TreeSet; import java.util.Vector; --- 31,35 ---- import java.util.Iterator; import java.util.List; ! import java.util.Locale; import java.util.TreeSet; import java.util.Vector; *************** *** 34,37 **** --- 39,43 ---- import org.hibernate.FlushMode; import org.hibernate.Transaction; + import org.unitime.timetable.gwt.server.DayCode; import org.unitime.timetable.model.AcademicAreaClassification; import org.unitime.timetable.model.Assignment; *************** *** 55,58 **** --- 61,65 ---- import org.unitime.timetable.model.RoomPref; import org.unitime.timetable.model.SchedulingSubpart; + import org.unitime.timetable.model.SectioningInfo; import org.unitime.timetable.model.Session; import org.unitime.timetable.model.StudentClassEnrollment; *************** *** 61,64 **** --- 68,72 ---- import org.unitime.timetable.model.comparators.SchedulingSubpartComparator; import org.unitime.timetable.model.dao.SessionDAO; + import org.unitime.timetable.util.DateUtils; import net.sf.cpsolver.coursett.model.Lecture; *************** *** 71,74 **** --- 79,83 ---- import net.sf.cpsolver.studentsct.Test; import net.sf.cpsolver.studentsct.model.AcademicAreaCode; + import net.sf.cpsolver.studentsct.model.Choice; import net.sf.cpsolver.studentsct.model.Config; import net.sf.cpsolver.studentsct.model.Course; *************** *** 97,100 **** --- 106,113 ---- private Long iSessionId = null; private long iMakeupAssignmentId = 0; + private BitSet iFreeTimePattern = null; + private Date iDatePatternFirstDate = null; + private boolean iTweakLimits = false; + private boolean iLoadSectioningInfos = false; private Progress iProgress = null; *************** *** 111,114 **** --- 124,129 ---- iTerm = model.getProperties().getProperty("Data.Term"); iSessionId = model.getProperties().getPropertyLong("General.SessionId", null); + iTweakLimits = model.getProperties().getPropertyBoolean("Load.TweakLimits", iTweakLimits); + iLoadSectioningInfos = model.getProperties().getPropertyBoolean("Load.LoadSectioningInfos",iLoadSectioningInfos); iProgress = Progress.getInstance(getModel()); } *************** *** 245,250 **** 0, room.getCapacity().intValue(), ! room.getCoordinateX().intValue(), ! room.getCoordinateY().intValue(), room.isIgnoreTooFar().booleanValue(), null); --- 260,265 ---- 0, room.getCapacity().intValue(), ! room.getCoordinateX(), ! room.getCoordinateY(), room.isIgnoreTooFar().booleanValue(), null); *************** *** 268,352 **** } ! private Section loadSection(Subpart subpart, Section parentSection, Class_ c, int limit) { ! Placement p = null; ! if (iMakeupAssignmentsFromRequiredPrefs) { ! p = makeupPlacement(c); ! } else { ! Assignment a = c.getCommittedAssignment(); ! p = (a==null?null:a.getPlacement()); ! } ! Section section = new Section(c.getUniqueId().longValue(), limit, c.getClassLabel(), subpart, p, getInstructorIds(c), getInstructorNames(c), parentSection); ! if (section.getTime()!=null && section.getTime().getDatePatternId().equals(c.getSession().getDefaultDatePattern().getUniqueId())) ! section.getTime().setDatePattern(section.getTime().getDatePatternId(),"",section.getTime().getWeekCode()); ! if (section.getTime()!=null && section.getTime().getDatePatternName().startsWith("generated")) { ! SimpleDateFormat sdf = new SimpleDateFormat("MM/dd"); ! section.getTime().setDatePattern( ! section.getTime().getDatePatternId(), ! sdf.format(c.effectiveDatePattern().getStartDate())+" - "+sdf.format(c.effectiveDatePattern().getEndDate()), ! section.getTime().getWeekCode()); ! } ! return section; ! } ! ! private Offering loadOffering(InstructionalOffering io, Hashtable courseTable, Hashtable classTable) { ! iProgress.debug("Loading offering "+io.getCourseName()); ! if (!io.hasClasses()) { ! iProgress.warn("Offering "+io.getCourseName()+" has no classes"); ! return null; ! } ! Offering offering = new Offering(io.getUniqueId().longValue(), io.getCourseName()); ! boolean unlimited = false; ! for (Iterator i=io.getInstrOfferingConfigs().iterator();i.hasNext();) { ! InstrOfferingConfig ioc = (InstrOfferingConfig)i.next(); ! if (ioc.isUnlimitedEnrollment().booleanValue()) unlimited = true; ! } ! for (Iterator i=io.getCourseOfferings().iterator();i.hasNext();) { ! CourseOffering co = (CourseOffering)i.next(); int projected = (co.getProjectedDemand()==null?0:co.getProjectedDemand().intValue()); ! int limit = co.getInstructionalOffering().getLimit().intValue(); ! if (unlimited) limit=-1; ! for (Iterator j=co.getInstructionalOffering().getCourseReservations().iterator();j.hasNext();) { ! CourseOfferingReservation reservation = (CourseOfferingReservation)j.next(); if (reservation.getCourseOffering().equals(co) && reservation.getReserved()!=null) ! limit = reservation.getReserved().intValue(); } ! Course course = new Course(co.getUniqueId().longValue(), co.getSubjectAreaAbbv(), co.getCourseNbr(), offering, limit, projected); courseTable.put(co.getUniqueId(), course); - iProgress.trace("created course "+course); } ! Hashtable class2section = new Hashtable(); ! Hashtable ss2subpart = new Hashtable(); ! for (Iterator i=io.getInstrOfferingConfigs().iterator();i.hasNext();) { ! InstrOfferingConfig ioc = (InstrOfferingConfig)i.next(); ! if (!ioc.hasClasses()) { ! iProgress.warn("Config "+ioc.getName()+" has no class"); ! continue; ! } ! Config config = new Config(ioc.getUniqueId().longValue(), ioc.getCourseName()+" ["+ioc.getName()+"]", offering); ! iProgress.trace("created config "+config); ! TreeSet subparts = new TreeSet(new SchedulingSubpartComparator()); subparts.addAll(ioc.getSchedulingSubparts()); ! for (Iterator j=subparts.iterator();j.hasNext();) { ! SchedulingSubpart ss = (SchedulingSubpart)j.next(); String sufix = ss.getSchedulingSubpartSuffix(); ! Subpart parentSubpart = (ss.getParentSubpart()==null?null:(Subpart)ss2subpart.get(ss.getParentSubpart())); ! if (ss.getParentSubpart()!=null && parentSubpart==null) { ! iProgress.error("Subpart "+ss.getSchedulingSubpartLabel()+" has parent "+ss.getParentSubpart().getSchedulingSubpartLabel()+", but the appropriate parent subpart is not loaded."); } ! Subpart subpart = new Subpart(ss.getUniqueId().longValue(), ss.getItype().getItype().toString()+sufix, ss.getItypeDesc().trim()+(sufix==null || sufix.length()==0?"":" ("+sufix+")"), config, parentSubpart); ! ss2subpart.put(ss, subpart); ! iProgress.trace("created subpart "+subpart); ! for (Iterator k=ss.getClasses().iterator();k.hasNext();) { ! Class_ c = (Class_)k.next(); ! int limit = c.getClassLimit(); ! if (ioc.isUnlimitedEnrollment().booleanValue()) limit = -1; ! Section parentSection = (c.getParentClass()==null?null:(Section)class2section.get(c.getParentClass())); if (c.getParentClass()!=null && parentSection==null) { ! iProgress.error("Class "+c.getClassLabel()+" has parent "+c.getParentClass().getClassLabel()+", but the appropriate parent section is not loaded."); } ! Section section = loadSection(subpart, parentSection, c, limit); ! class2section.put(c, section); classTable.put(c.getUniqueId(), section); - iProgress.trace("created section "+section); } } --- 283,361 ---- } ! private Offering loadOffering(InstructionalOffering io, Hashtable<Long, Course> courseTable, Hashtable<Long, Section> classTable) { ! if (io.getInstrOfferingConfigs().isEmpty()) { ! return null; ! } ! String courseName = io.getCourseName(); ! Offering offering = new Offering(io.getUniqueId().longValue(), courseName); ! for (Iterator<CourseOffering> i = io.getCourseOfferings().iterator(); i.hasNext(); ) { ! CourseOffering co = i.next(); int projected = (co.getProjectedDemand()==null?0:co.getProjectedDemand().intValue()); ! boolean unlimited = false; ! int limit = 0; ! for (Iterator<InstrOfferingConfig> j = io.getInstrOfferingConfigs().iterator(); j.hasNext(); ) { ! InstrOfferingConfig ioc = j.next(); ! if (ioc.isUnlimitedEnrollment()) unlimited = true; ! limit += ioc.getLimit(); ! } ! for (Iterator<CourseOfferingReservation> k = co.getCourseReservations().iterator(); k.hasNext(); ) { ! CourseOfferingReservation reservation = k.next(); if (reservation.getCourseOffering().equals(co) && reservation.getReserved()!=null) ! limit = reservation.getReserved(); } ! if (limit >= 9999) unlimited = true; ! if (unlimited) limit=-1; ! Course course = new Course(co.getUniqueId(), co.getSubjectArea().getSubjectAreaAbbreviation(), co.getCourseNbr(), offering, limit, projected); courseTable.put(co.getUniqueId(), course); } ! Hashtable<Long,Section> class2section = new Hashtable<Long,Section>(); ! Hashtable<Long,Subpart> ss2subpart = new Hashtable<Long, Subpart>(); ! DecimalFormat df = new DecimalFormat("000"); ! for (Iterator<InstrOfferingConfig> i = io.getInstrOfferingConfigs().iterator(); i.hasNext(); ) { ! InstrOfferingConfig ioc = i.next(); ! Config config = new Config(ioc.getUniqueId(), courseName + " [" + ioc.getName() + "]", offering); ! TreeSet<SchedulingSubpart> subparts = new TreeSet<SchedulingSubpart>(new SchedulingSubpartComparator()); subparts.addAll(ioc.getSchedulingSubparts()); ! for (SchedulingSubpart ss: subparts) { String sufix = ss.getSchedulingSubpartSuffix(); ! Subpart parentSubpart = (ss.getParentSubpart() == null ? null : (Subpart)ss2subpart.get(ss.getParentSubpart().getUniqueId())); ! if (ss.getParentSubpart() != null && parentSubpart == null) { ! iProgress.error("Subpart " + ss.getSchedulingSubpartLabel() + " has parent " + ! ss.getSchedulingSubpartLabel() +", but the appropriate parent subpart is not loaded."); } ! Subpart subpart = new Subpart(ss.getUniqueId().longValue(), df.format(ss.getItype().getItype()) + sufix, ! ss.getItype().getAbbv().trim(), config, parentSubpart); ! ss2subpart.put(ss.getUniqueId(), subpart); ! for (Iterator<Class_> j = ss.getClasses().iterator(); j.hasNext(); ) { ! Class_ c = j.next(); ! Section parentSection = (c.getParentClass() == null ? null : (Section)class2section.get(c.getParentClass().getUniqueId())); if (c.getParentClass()!=null && parentSection==null) { ! iProgress.error("Class " + c.getClassLabel() + " has parent " + c.getClassLabel() + ", but the appropriate parent section is not loaded."); } ! Assignment a = c.getCommittedAssignment(); ! Placement p = null; ! if (iMakeupAssignmentsFromRequiredPrefs) { ! p = makeupPlacement(c); ! } else if (a != null) { ! p = a.getPlacement(); ! } ! if (p != null && p.getTimeLocation() != null) { ! p.getTimeLocation().setDatePattern( ! p.getTimeLocation().getDatePatternId(), ! datePatternName(p.getTimeLocation()), ! p.getTimeLocation().getWeekCode()); ! } ! int minLimit = c.getExpectedCapacity(); ! int maxLimit = c.getMaxExpectedCapacity(); ! int limit = maxLimit; ! if (minLimit < maxLimit && p != null) { ! int roomLimit = Math.round((c.getRoomRatio() == null ? 1.0f : c.getRoomRatio()) * p.getRoomSize()); ! limit = Math.min(Math.max(minLimit, roomLimit), maxLimit); ! } ! if (ioc.isUnlimitedEnrollment() || limit >= 9999) limit = -1; ! Section section = new Section(c.getUniqueId().longValue(), limit, (c.getExternalUniqueId() == null ? c.getClassSuffix() : c.getExternalUniqueId()), subpart, p, ! getInstructorIds(c), getInstructorNames(c), parentSection); ! class2section.put(c.getUniqueId(), section); classTable.put(c.getUniqueId(), section); } } *************** *** 355,393 **** } ! public Student loadStudent(org.unitime.timetable.model.Student s, Hashtable courseTable, Hashtable classTable) { iProgress.debug("Loading student "+s.getUniqueId()+" (id="+s.getExternalUniqueId()+", name="+s.getName(DepartmentalInstructor.sNameFormatLastFist)+")"); Student student = new Student(s.getUniqueId().longValue()); if (iLoadStudentInfo) loadStudentInfo(student,s); ! int priority = 0; ! for (Iterator i=new TreeSet(s.getCourseDemands()).iterator();i.hasNext();) { ! CourseDemand cd = (CourseDemand)i.next(); if (cd.getFreeTime()!=null) { ! Request request = new FreeTimeRequest( ! cd.getUniqueId().longValue(), ! (cd.getPriority()==null || cd.getPriority()<0?priority++:cd.getPriority()), ! cd.isAlternative().booleanValue(), ! student, ! new TimeLocation( ! cd.getFreeTime().getDayCode().intValue(), ! cd.getFreeTime().getStartSlot().intValue(), ! cd.getFreeTime().getLength().intValue(), ! 0, 0, ! s.getSession().getDefaultDatePattern().getUniqueId(), ! "", ! s.getSession().getDefaultDatePattern().getPatternBitSet(), ! 0) ! ); ! iProgress.trace("added request "+request); } else if (!cd.getCourseRequests().isEmpty()) { ! Vector courses = new Vector(); ! HashSet selChoices = new HashSet(); ! HashSet wlChoices = new HashSet(); ! HashSet assignedSections = new HashSet(); Config assignedConfig = null; ! for (Iterator j=new TreeSet(cd.getCourseRequests()).iterator();j.hasNext();) { ! org.unitime.timetable.model.CourseRequest cr = (org.unitime.timetable.model.CourseRequest)j.next(); ! Course course = (Course)courseTable.get(cr.getCourseOffering().getUniqueId()); if (course==null) { ! iProgress.warn("Course "+cr.getCourseOffering().getCourseName()+" not loaded."); continue; } --- 364,411 ---- } ! public Student loadStudent(org.unitime.timetable.model.Student s, Hashtable<Long,Course> courseTable, Hashtable<Long,Section> classTable) { iProgress.debug("Loading student "+s.getUniqueId()+" (id="+s.getExternalUniqueId()+", name="+s.getName(DepartmentalInstructor.sNameFormatLastFist)+")"); + Student student = new Student(s.getUniqueId().longValue()); if (iLoadStudentInfo) loadStudentInfo(student,s); ! ! TreeSet<CourseDemand> demands = new TreeSet<CourseDemand>(new Comparator<CourseDemand>() { ! public int compare(CourseDemand d1, CourseDemand d2) { ! if (d1.isAlternative() && !d2.isAlternative()) return 1; ! if (!d1.isAlternative() && d2.isAlternative()) return -1; ! int cmp = d1.getPriority().compareTo(d2.getPriority()); ! if (cmp != 0) return cmp; ! return d1.getUniqueId().compareTo(d2.getUniqueId()); ! } ! }); ! demands.addAll(s.getCourseDemands()); ! for (CourseDemand cd: demands) { if (cd.getFreeTime()!=null) { ! TimeLocation ft = new TimeLocation( ! cd.getFreeTime().getDayCode(), ! cd.getFreeTime().getStartSlot(), ! cd.getFreeTime().getLength(), ! 0, 0, -1l, "", iFreeTimePattern, 0); ! new FreeTimeRequest( ! cd.getUniqueId(), ! cd.getPriority(), ! cd.isAlternative(), ! student, ft); } else if (!cd.getCourseRequests().isEmpty()) { ! Vector<Course> courses = new Vector<Course>(); ! HashSet<Choice> selChoices = new HashSet<Choice>(); ! HashSet<Choice> wlChoices = new HashSet<Choice>(); ! HashSet<Section> assignedSections = new HashSet<Section>(); Config assignedConfig = null; ! TreeSet<org.unitime.timetable.model.CourseRequest> crs = new TreeSet<org.unitime.timetable.model.CourseRequest>(new Comparator<org.unitime.timetable.model.CourseRequest>() { ! public int compare(org.unitime.timetable.model.CourseRequest r1, org.unitime.timetable.model.CourseRequest r2) { ! return r1.getOrder().compareTo(r2.getOrder()); ! } ! }); ! crs.addAll(cd.getCourseRequests()); ! for (org.unitime.timetable.model.CourseRequest cr: crs) { ! Course course = courseTable.get(cr.getCourseOffering().getUniqueId()); if (course==null) { ! iProgress.warn("Student " + s.getName(DepartmentalInstructor.sNameFormatInitialLast) + " (" + s.getExternalUniqueId() + ") requests course " + cr.getCourseOffering().getCourseName() + " that is not loaded."); continue; } *************** *** 403,412 **** } if (assignedConfig==null) { ! for (Iterator k=cr.getClassEnrollments().iterator();k.hasNext();) { ! StudentClassEnrollment sce = (StudentClassEnrollment)k.next(); ! Section section = course.getOffering().getSection(sce.getClazz().getUniqueId().longValue()); if (section!=null) { assignedSections.add(section); assignedConfig = section.getSubpart().getConfig(); } } --- 421,439 ---- } if (assignedConfig==null) { ! HashSet<Long> subparts = new HashSet<Long>(); ! for (Iterator<StudentClassEnrollment> i = (cr.getClassEnrollments() == null ? s.getClassEnrollments() : cr.getClassEnrollments()).iterator(); i.hasNext(); ) { ! StudentClassEnrollment enrl = i.next(); ! Section section = course.getOffering().getSection(enrl.getClazz().getUniqueId()); if (section!=null) { assignedSections.add(section); + if (assignedConfig != null && assignedConfig.getId() != section.getSubpart().getConfig().getId()) { + iProgress.error("There is a problem assigning " + course.getName() + " to " + s.getName(DepartmentalInstructor.sNameFormatInitialLast) + " (" + s.getExternalUniqueId() + "): classes from different configurations."); + } assignedConfig = section.getSubpart().getConfig(); + if (!subparts.add(section.getSubpart().getId())) { + iProgress.error("There is a problem assigning " + course.getName() + " to " + s.getName(DepartmentalInstructor.sNameFormatInitialLast) + " (" + s.getExternalUniqueId() + "): two or more classes of the same subpart."); + } + } else { + iProgress.error("There is a problem assigning " + course.getName() + " to " + s.getName(DepartmentalInstructor.sNameFormatInitialLast) + " (" + s.getExternalUniqueId() + "): class " + enrl.getClazz().getClassLabel() + " not known."); } } *************** *** 416,440 **** if (courses.isEmpty()) continue; CourseRequest request = new CourseRequest( ! cd.getUniqueId().longValue(), ! (cd.getPriority()==null || cd.getPriority()<0?priority++:cd.getPriority()), ! cd.isAlternative().booleanValue(), student, courses, ! cd.isWaitlist().booleanValue()); request.getSelectedChoices().addAll(selChoices); request.getWaitlistedChoices().addAll(wlChoices); ! if (assignedConfig!=null && assignedSections.size()==assignedConfig.getSubparts().size()) { Enrollment enrollment = new Enrollment(request, 0, assignedConfig, assignedSections); request.setInitialAssignment(enrollment); } ! iProgress.trace("added request "+request); ! } else { ! iProgress.warn("Course demand "+cd.getUniqueId()+" has no course requests"); } } return student; } private void fixWeights() { --- 443,602 ---- if (courses.isEmpty()) continue; CourseRequest request = new CourseRequest( ! cd.getUniqueId(), ! cd.getPriority(), ! cd.isAlternative(), student, courses, ! cd.isWaitlist()); request.getSelectedChoices().addAll(selChoices); request.getWaitlistedChoices().addAll(wlChoices); ! if (assignedConfig!=null && assignedSections.size() == assignedConfig.getSubparts().size()) { Enrollment enrollment = new Enrollment(request, 0, assignedConfig, assignedSections); request.setInitialAssignment(enrollment); } ! if (assignedConfig!=null && assignedSections.size() != assignedConfig.getSubparts().size()) { ! iProgress.error("There is a problem assigning " + request.getName() + " to " + s.getName(DepartmentalInstructor.sNameFormatInitialLast) + " (" + s.getExternalUniqueId() + ") wrong number of classes (" + ! "has " + assignedSections.size() + ", expected " + assignedConfig.getSubparts().size() + ")."); ! } } } + + if (student.getRequests().isEmpty() && !s.getClassEnrollments().isEmpty()) { + TreeSet<Course> courses = new TreeSet<Course>(new Comparator<Course>() { + public int compare(Course c1, Course c2) { + return (c1.getSubjectArea() + " " + c1.getCourseNumber()).compareTo(c2.getSubjectArea() + " " + c2.getCourseNumber()); + } + }); + for (Iterator<StudentClassEnrollment> i = s.getClassEnrollments().iterator(); i.hasNext(); ) { + StudentClassEnrollment enrl = i.next(); + Course course = courseTable.get(enrl.getCourseOffering().getUniqueId()); + if (course==null) { + iProgress.warn("Student " + s.getName(DepartmentalInstructor.sNameFormatInitialLast) + " (" + s.getExternalUniqueId() + ") requests course " + enrl.getCourseOffering().getCourseName()+" that is not loaded."); + continue; + } + courses.add(course); + } + int priority = 0; + courses: for (Course course: courses) { + Vector<Course> cx = new Vector<Course>(); cx.add(course); + CourseRequest request = new CourseRequest( + course.getId(), + priority++, + false, + student, + cx, + false); + HashSet<Section> assignedSections = new HashSet<Section>(); + Config assignedConfig = null; + HashSet<Long> subparts = new HashSet<Long>(); + for (Iterator<StudentClassEnrollment> i = s.getClassEnrollments().iterator(); i.hasNext(); ) { + StudentClassEnrollment enrl = i.next(); + if (course.getId() != enrl.getCourseOffering().getUniqueId()) continue; + Section section = course.getOffering().getSection(enrl.getClazz().getUniqueId()); + if (section!=null) { + assignedSections.add(section); + if (assignedConfig != null && assignedConfig.getId() != section.getSubpart().getConfig().getId()) { + iProgress.error("There is a problem assigning " + request.getName() + " to " + s.getName(DepartmentalInstructor.sNameFormatInitialLast) + " (" + s.getExternalUniqueId() + "): classes from different configurations."); + continue courses; + } + assignedConfig = section.getSubpart().getConfig(); + if (!subparts.add(section.getSubpart().getId())) { + iProgress.error("There is a problem assigning " + request.getName() + " to " + s.getName(DepartmentalInstructor.sNameFormatInitialLast) + " (" + s.getExternalUniqueId() + "): two or more classes of the same subpart."); ... [truncated message content] |
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/reports/exam In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13954/JavaSource/org/unitime/timetable/reports/exam Modified Files: PdfLegacyExamReport.java AbbvExamScheduleByCourseReport.java StudentExamReport.java PeriodChartReport.java ExamScheduleByPeriodReport.java ExamVerificationReport.java ConflictsByCourseAndStudentReport.java AbbvScheduleByCourseReport.java ExamPeriodChartReport.java ConflictsByCourseAndInstructorReport.java ScheduleByPeriodReport.java ScheduleByCourseReport.java InstructorExamReport.java ScheduleByRoomReport.java Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) Index: PeriodChartReport.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/reports/exam/PeriodChartReport.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** PeriodChartReport.java 7 Feb 2010 09:19:32 -0000 1.17 --- PeriodChartReport.java 1 Dec 2010 11:10:51 -0000 1.18 *************** *** 1,2 **** --- 1,21 ---- + /* + * UniTime 3.2 (University Timetabling Application) + * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors + * as indicated by the @authors tag. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + * + */ package org.unitime.timetable.reports.exam; *************** *** 6,9 **** --- 25,29 ---- import java.util.Collection; import java.util.Enumeration; + import java.util.HashMap; import java.util.Hashtable; import java.util.Iterator; *************** *** 12,17 **** import java.util.Vector; - import net.sf.cpsolver.ifs.util.ToolBox; - import org.apache.log4j.Logger; import org.unitime.timetable.model.ExamPeriod; --- 32,35 ---- *************** *** 22,27 **** import org.unitime.timetable.solver.exam.ui.ExamInfo.ExamSectionInfo; ! import com.lowagie.text.DocumentException; public class PeriodChartReport extends PdfLegacyExamReport { protected static Logger sLog = Logger.getLogger(ScheduleByCourseReport.class); --- 40,48 ---- import org.unitime.timetable.solver.exam.ui.ExamInfo.ExamSectionInfo; ! import com.itextpdf.text.DocumentException; + /** + * @author Tomas Muller + */ public class PeriodChartReport extends PdfLegacyExamReport { protected static Logger sLog = Logger.getLogger(ScheduleByCourseReport.class); *************** *** 49,56 **** } } ! Hashtable<Integer,String> times = new Hashtable(); ! Hashtable<Integer,String> fixedTimes = new Hashtable(); ! Hashtable<Integer,String> days = new Hashtable(); ! TreeSet weeks = new TreeSet(); for (Iterator i=ExamPeriod.findAll(getSession().getUniqueId(), getExamType()).iterator();i.hasNext();) { ExamPeriod period = (ExamPeriod)i.next(); --- 70,76 ---- } } ! HashMap<Integer,String> times = new HashMap<Integer, String>(); ! HashMap<Integer,String> fixedTimes = new HashMap<Integer, String>(); ! HashMap<Integer,String> days = new HashMap<Integer, String>(); for (Iterator i=ExamPeriod.findAll(getSession().getUniqueId(), getExamType()).iterator();i.hasNext();) { ExamPeriod period = (ExamPeriod)i.next(); *************** *** 74,81 **** boolean firstLine = true; for (int dIdx = 0; dIdx < days.size(); dIdx+=nrCols) { ! for (Enumeration e=ToolBox.sortEnumeration(times.keys());e.hasMoreElements();) { ! int time = ((Integer)e.nextElement()).intValue(); int offset = 0; ! String timeStr = (String)times.get(new Integer(time)); String header1 = ""; String header2 = ""; --- 94,100 ---- boolean firstLine = true; for (int dIdx = 0; dIdx < days.size(); dIdx+=nrCols) { ! for (Integer time: new TreeSet<Integer>(times.keySet())) { int offset = 0; ! String timeStr = times.get(time); String header1 = ""; String header2 = ""; *************** *** 86,91 **** String lastDay = null; nrCols = 0; ! for (Enumeration f=ToolBox.sortEnumeration(days.keys());f.hasMoreElements();idx++) { ! int day = ((Integer)f.nextElement()).intValue(); String dayStr = days.get(day); if (idx<dIdx || (firstDay!=null && (dayStr.startsWith("Mon") || day>=firstDayOffset+7)) || nrCols==(iTotals?6:5)) continue; --- 105,110 ---- String lastDay = null; nrCols = 0; ! for (Iterator<Integer> f = new TreeSet<Integer>(days.keySet()).iterator();f.hasNext();idx++) { ! Integer day = f.next(); String dayStr = days.get(day); if (idx<dIdx || (firstDay!=null && (dayStr.startsWith("Mon") || day>=firstDayOffset+7)) || nrCols==(iTotals?6:5)) continue; *************** *** 251,256 **** String line1 = "", line2 = "", line3 = ""; int idx = 0; ! for (Enumeration f=ToolBox.sortEnumeration(days.keys());f.hasMoreElements();idx++) { ! Integer day = (Integer)f.nextElement(); if (idx<dIdx || idx>=dIdx+nrCols) continue; line1 += mpad((String)days.get(day),20)+" "; --- 270,275 ---- String line1 = "", line2 = "", line3 = ""; int idx = 0; ! for (Iterator<Integer> f = new TreeSet<Integer>(days.keySet()).iterator(); f.hasNext(); idx++) { ! Integer day = f.next(); if (idx<dIdx || idx>=dIdx+nrCols) continue; line1 += mpad((String)days.get(day),20)+" "; Index: InstructorExamReport.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/reports/exam/InstructorExamReport.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** InstructorExamReport.java 16 Apr 2010 13:24:24 -0000 1.15 --- InstructorExamReport.java 1 Dec 2010 11:10:51 -0000 1.16 *************** *** 1,2 **** --- 1,21 ---- + /* + * UniTime 3.2 (University Timetabling Application) + * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors + * as indicated by the @authors tag. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + * + */ package org.unitime.timetable.reports.exam; *************** *** 19,23 **** import org.unitime.timetable.model.CourseOffering; import org.unitime.timetable.model.DepartmentalInstructor; - import org.unitime.timetable.model.ExamPeriod; import org.unitime.timetable.model.Location; import org.unitime.timetable.model.Session; --- 38,41 ---- *************** *** 37,42 **** import org.unitime.timetable.solver.exam.ui.ExamInfo.ExamSectionInfo; ! import com.lowagie.text.DocumentException; public class InstructorExamReport extends PdfLegacyExamReport { protected static Logger sLog = Logger.getLogger(InstructorExamReport.class); --- 55,63 ---- import org.unitime.timetable.solver.exam.ui.ExamInfo.ExamSectionInfo; ! import com.itextpdf.text.DocumentException; + /** + * @author Tomas Muller + */ public class InstructorExamReport extends PdfLegacyExamReport { protected static Logger sLog = Logger.getLogger(InstructorExamReport.class); *************** *** 403,407 **** ExamAssignmentInfo exam = section.getExamAssignmentInfo(); if (exam==null || exam.getPeriod()==null) continue; - ExamPeriod period = exam.getPeriod(); iCoursePrinted = false; if (iDirect) for (DirectConflict conflict : exam.getInstructorDirectConflicts()) { --- 424,427 ---- *************** *** 561,565 **** ExamAssignmentInfo exam = section.getExamAssignmentInfo(); if (exam==null || exam.getPeriod()==null) continue; - ExamPeriod period = exam.getPeriod(); iCoursePrinted = false; Vector<Long> students = new Vector<Long>(section.getStudentIds()); --- 581,584 ---- Index: PdfLegacyExamReport.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/reports/exam/PdfLegacyExamReport.java,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** PdfLegacyExamReport.java 18 Nov 2010 17:44:32 -0000 1.35 --- PdfLegacyExamReport.java 1 Dec 2010 11:10:51 -0000 1.36 *************** *** 1,7 **** package org.unitime.timetable.reports.exam; import java.io.File; import java.io.IOException; - import java.io.UnsupportedEncodingException; import java.text.DecimalFormat; import java.text.SimpleDateFormat; --- 1,25 ---- + /* + * UniTime 3.2 (University Timetabling Application) + * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors + * as indicated by the @authors tag. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + * + */ package org.unitime.timetable.reports.exam; import java.io.File; import java.io.IOException; import java.text.DecimalFormat; import java.text.SimpleDateFormat; *************** *** 20,41 **** import java.util.TreeSet; - import javax.activation.DataHandler; - import javax.activation.FileDataSource; - import javax.mail.Authenticator; - import javax.mail.BodyPart; - import javax.mail.MessagingException; - import javax.mail.Multipart; - import javax.mail.PasswordAuthentication; - import javax.mail.Transport; - import javax.mail.Message.RecipientType; - import javax.mail.internet.InternetAddress; - import javax.mail.internet.MimeBodyPart; - import javax.mail.internet.MimeMessage; - import javax.mail.internet.MimeMultipart; - import net.sf.cpsolver.coursett.model.TimeLocation; import org.apache.log4j.Logger; import org.apache.log4j.PropertyConfigurator; import org.unitime.commons.hibernate.util.HibernateUtil; import org.unitime.timetable.ApplicationProperties; --- 38,46 ---- import java.util.TreeSet; import net.sf.cpsolver.coursett.model.TimeLocation; import org.apache.log4j.Logger; import org.apache.log4j.PropertyConfigurator; + import org.unitime.commons.Email; import org.unitime.commons.hibernate.util.HibernateUtil; import org.unitime.timetable.ApplicationProperties; *************** *** 43,47 **** import org.unitime.timetable.model.ClassEvent; import org.unitime.timetable.model.Class_; - import org.unitime.timetable.model.CourseEvent; import org.unitime.timetable.model.DatePattern; import org.unitime.timetable.model.DepartmentalInstructor; --- 48,51 ---- *************** *** 66,70 **** import org.unitime.timetable.util.DateUtils; ! import com.lowagie.text.DocumentException; public abstract class PdfLegacyExamReport extends PdfLegacyReport { --- 70,74 ---- import org.unitime.timetable.util.DateUtils; ! import com.itextpdf.text.DocumentException; public abstract class PdfLegacyExamReport extends PdfLegacyReport { *************** *** 355,359 **** Calendar cal = Calendar.getInstance(Locale.US); cal.setLenient(true); if (iSessionFirstDate == null) ! iSessionFirstDate = DateUtils.getDate(1, iSession.getStartMonth() - 3, iSession.getSessionStartYear()); cal.setTime(iSessionFirstDate); int idx = time.getWeekCode().nextSetBit(0); --- 359,363 ---- Calendar cal = Calendar.getInstance(Locale.US); cal.setLenient(true); if (iSessionFirstDate == null) ! iSessionFirstDate = DateUtils.getDate(1, iSession.getPatternStartMonth(), iSession.getSessionStartYear()); cal.setTime(iSessionFirstDate); int idx = time.getWeekCode().nextSetBit(0); *************** *** 499,528 **** } ! public static void sendEmails(String prefix, Hashtable<String,File> output, Hashtable<SubjectArea,Hashtable<String,File>> outputPerSubject, Hashtable<ExamInstructorInfo,File> ireports, Hashtable<Student,File> sreports) throws MessagingException, UnsupportedEncodingException { ! String managerExternalId = System.getProperty("sender"); ! TimetableManager mgr = (managerExternalId==null?null:TimetableManager.findByExternalId(managerExternalId)); ! InternetAddress from = null; ! if (System.getProperty("email.from")!=null) ! from = new InternetAddress(System.getProperty("email.from"), System.getProperty("email.from.name")); ! else ! from = new InternetAddress( ! ApplicationProperties.getProperty("tmtbl.inquiry.sender",ApplicationProperties.getProperty("tmtbl.contact.email")), ! ApplicationProperties.getProperty("tmtbl.inquiry.sender.name")); ! sLog.info("Sending email(s)..."); - Properties p = ApplicationProperties.getProperties(); - if (p.getProperty("mail.smtp.host")==null && p.getProperty("tmtbl.smtp.host")!=null) - p.setProperty("mail.smtp.host", p.getProperty("tmtbl.smtp.host")); - Authenticator a = null; - if (ApplicationProperties.getProperty("tmtbl.mail.user")!=null && ApplicationProperties.getProperty("tmtbl.mail.pwd")!=null) { - a = new Authenticator() { - public PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication( - ApplicationProperties.getProperty("tmtbl.mail.user"), - ApplicationProperties.getProperty("tmtbl.mail.pwd")); - } - }; - } - javax.mail.Session mailSession = javax.mail.Session.getDefaultInstance(p, a); if (!outputPerSubject.isEmpty() && "true".equals(System.getProperty("email.deputies","false"))) { Hashtable<TimetableManager,Hashtable<String,File>> files2send = new Hashtable(); --- 503,508 ---- } ! public static void sendEmails(String prefix, Hashtable<String,File> output, Hashtable<SubjectArea,Hashtable<String,File>> outputPerSubject, Hashtable<ExamInstructorInfo,File> ireports, Hashtable<Student,File> sreports) { sLog.info("Sending email(s)..."); if (!outputPerSubject.isEmpty() && "true".equals(System.getProperty("email.deputies","false"))) { Hashtable<TimetableManager,Hashtable<String,File>> files2send = new Hashtable(); *************** *** 550,593 **** managers.remove(manager); sLog.info("Sending email to "+manager.getName()+" ("+manager.getEmailAddress()+")..."); - MimeMessage mail = new MimeMessage(mailSession); - mail.setSubject(System.getProperty("email.subject","Examination Report")); - Multipart body = new MimeMultipart(); - BodyPart text = new MimeBodyPart(); - String message = System.getProperty("email.body"); - String url = System.getProperty("email.url"); - text.setText((message==null?"":message+"\r\n\r\n")+ - (url==null?"":"For an up-to-date report, please visit "+url+"/\r\n\r\n")+ - "This email was automatically generated by "+ - "UniTime "+Constants.VERSION+"."+Constants.BLD_NUMBER.replaceAll("@build.number@", "?")+ - " (Univesity Timetabling Application, http://www.unitime.org)."); - body.addBodyPart(text); - mail.addRecipient(RecipientType.TO, new InternetAddress(manager.getEmailAddress(),manager.getName())); - for (Iterator<TimetableManager> i=managers.iterator();i.hasNext();) { - TimetableManager m = (TimetableManager)i.next(); - if (files.equals(files2send.get(m))) { - sLog.info(" Including "+m.getName()+" ("+m.getEmailAddress()+")"); - mail.addRecipient(RecipientType.TO, new InternetAddress(m.getEmailAddress(),m.getName())); - i.remove(); - } - } - if (System.getProperty("email.to")!=null) for (StringTokenizer s=new StringTokenizer(System.getProperty("email.to"),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.TO, new InternetAddress(s.nextToken())); - if (System.getProperty("email.cc")!=null) for (StringTokenizer s=new StringTokenizer(System.getProperty("email.cc"),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.CC, new InternetAddress(s.nextToken())); - if (System.getProperty("email.bcc")!=null) for (StringTokenizer s=new StringTokenizer(System.getProperty("email.bcc"),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.BCC, new InternetAddress(s.nextToken())); - if (from!=null) - mail.setFrom(from); - for (Map.Entry<String, File> entry : files.entrySet()) { - BodyPart attachement = new MimeBodyPart(); - attachement.setDataHandler(new DataHandler(new FileDataSource(entry.getValue()))); - attachement.setFileName(prefix+"_"+entry.getKey()); - body.addBodyPart(attachement); - sLog.info(" Attaching <a href='temp/"+entry.getValue().getName()+"'>"+entry.getKey()+"</a>"); - } - mail.setSentDate(new Date()); - mail.setContent(body); try { ! Transport.send(mail); sLog.info("Email sent."); } catch (Exception e) { --- 530,563 ---- managers.remove(manager); sLog.info("Sending email to "+manager.getName()+" ("+manager.getEmailAddress()+")..."); try { ! Email mail = new Email(); ! mail.setSubject(System.getProperty("email.subject","Examination Report")); ! String message = System.getProperty("email.body"); ! String url = System.getProperty("email.url"); ! mail.setText((message==null?"":message+"\r\n\r\n")+ ! (url==null?"":"For an up-to-date report, please visit "+url+"/\r\n\r\n")+ ! "This email was automatically generated by "+ ! "UniTime "+Constants.VERSION+"."+Constants.BLD_NUMBER.replaceAll("@build.number@", "?")+ ! " (Univesity Timetabling Application, http://www.unitime.org)."); ! mail.addRecipient(manager.getEmailAddress(),manager.getName()); ! for (Iterator<TimetableManager> i=managers.iterator();i.hasNext();) { ! TimetableManager m = (TimetableManager)i.next(); ! if (files.equals(files2send.get(m))) { ! sLog.info(" Including "+m.getName()+" ("+m.getEmailAddress()+")"); ! mail.addRecipient(m.getEmailAddress(), m.getName()); ! i.remove(); ! } ! } ! if (System.getProperty("email.to")!=null) for (StringTokenizer s=new StringTokenizer(System.getProperty("email.to"),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipient(s.nextToken(), null); ! if (System.getProperty("email.cc")!=null) for (StringTokenizer s=new StringTokenizer(System.getProperty("email.cc"),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipientCC(s.nextToken(), null); ! if (System.getProperty("email.bcc")!=null) for (StringTokenizer s=new StringTokenizer(System.getProperty("email.bcc"),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipientBCC(s.nextToken(), null); ! for (Map.Entry<String, File> entry : files.entrySet()) { ! mail.addAttachement(entry.getValue(), prefix+"_"+entry.getKey()); ! sLog.info(" Attaching <a href='temp/"+entry.getValue().getName()+"'>"+entry.getKey()+"</a>"); ! } ! mail.send(); sLog.info("Email sent."); } catch (Exception e) { *************** *** 597,630 **** } } else { - MimeMessage mail = new MimeMessage(mailSession); - mail.setSubject(System.getProperty("email.subject","Examination Report")); - Multipart body = new MimeMultipart(); - BodyPart text = new MimeBodyPart(); - String message = System.getProperty("email.body"); - String url = System.getProperty("email.url"); - text.setText((message==null?"":message+"\r\n\r\n")+ - (url==null?"":"For an up-to-date report, please visit "+url+"/\r\n\r\n")+ - "This email was automatically generated by "+ - "UniTime "+Constants.VERSION+"."+Constants.BLD_NUMBER.replaceAll("@build.number@", "?")+ - " (Univesity Timetabling Application, http://www.unitime.org)."); - body.addBodyPart(text); - if (System.getProperty("email.to")!=null) for (StringTokenizer s=new StringTokenizer(System.getProperty("email.to"),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.TO, new InternetAddress(s.nextToken())); - if (System.getProperty("email.cc")!=null) for (StringTokenizer s=new StringTokenizer(System.getProperty("email.cc"),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.CC, new InternetAddress(s.nextToken())); - if (System.getProperty("email.bcc")!=null) for (StringTokenizer s=new StringTokenizer(System.getProperty("email.bcc"),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.BCC, new InternetAddress(s.nextToken())); - if (from!=null) - mail.setFrom(from); - for (Map.Entry<String, File> entry : output.entrySet()) { - BodyPart attachement = new MimeBodyPart(); - attachement.setDataHandler(new DataHandler(new FileDataSource(entry.getValue()))); - attachement.setFileName(prefix+"_"+entry.getKey()); - body.addBodyPart(attachement); - } - mail.setSentDate(new Date()); - mail.setContent(body); try { ! Transport.send(mail); sLog.info("Email sent."); } catch (Exception e) { --- 567,590 ---- } } else { try { ! Email mail = new Email(); ! mail.setSubject(System.getProperty("email.subject","Examination Report")); ! String message = System.getProperty("email.body"); ! String url = System.getProperty("email.url"); ! mail.setText((message==null?"":message+"\r\n\r\n")+ ! (url==null?"":"For an up-to-date report, please visit "+url+"/\r\n\r\n")+ ! "This email was automatically generated by "+ ! "UniTime "+Constants.VERSION+"."+Constants.BLD_NUMBER.replaceAll("@build.number@", "?")+ ! " (Univesity Timetabling Application, http://www.unitime.org)."); ! if (System.getProperty("email.to")!=null) for (StringTokenizer s=new StringTokenizer(System.getProperty("email.to"),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipient(s.nextToken(), null); ! if (System.getProperty("email.cc")!=null) for (StringTokenizer s=new StringTokenizer(System.getProperty("email.cc"),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipientCC(s.nextToken(), null); ! if (System.getProperty("email.bcc")!=null) for (StringTokenizer s=new StringTokenizer(System.getProperty("email.bcc"),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipientBCC(s.nextToken(), null); ! for (Map.Entry<String, File> entry : output.entrySet()) { ! mail.addAttachement(entry.getValue(), prefix+"_"+entry.getKey()); ! } ! mail.send(); sLog.info("Email sent."); } catch (Exception e) { *************** *** 641,670 **** continue; } - MimeMessage mail = new MimeMessage(mailSession); - mail.setSubject(System.getProperty("email.subject","Examination Report")); - Multipart body = new MimeMultipart(); - BodyPart text = new MimeBodyPart(); - String message = System.getProperty("email.body"); - String url = System.getProperty("email.url"); - text.setText((message==null?"":message+"\r\n\r\n")+ - (url==null?"":"For an up-to-date report, please visit "+url+"/\r\n\r\n")+ - "This email was automatically generated by "+ - "UniTime "+Constants.VERSION+"."+Constants.BLD_NUMBER.replaceAll("@build.number@", "?")+ - " (Univesity Timetabling Application, http://www.unitime.org)."); - body.addBodyPart(text); - mail.addRecipient(RecipientType.TO, new InternetAddress(email)); - if (System.getProperty("email.cc")!=null) for (StringTokenizer s=new StringTokenizer(System.getProperty("email.cc"),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.CC, new InternetAddress(s.nextToken())); - if (System.getProperty("email.bcc")!=null) for (StringTokenizer s=new StringTokenizer(System.getProperty("email.bcc"),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.BCC, new InternetAddress(s.nextToken())); - if (from!=null) mail.setFrom(from); - BodyPart attachement = new MimeBodyPart(); - attachement.setDataHandler(new DataHandler(new FileDataSource(report))); - attachement.setFileName(prefix+(report.getName().endsWith(".txt")?".txt":".pdf")); - body.addBodyPart(attachement); - mail.setSentDate(new Date()); - mail.setContent(body); try { ! Transport.send(mail); sLog.info(" An email was sent to <a href='temp/"+report.getName()+"'>"+instructor.getName()+"</a>."); } catch (Exception e) { --- 601,621 ---- continue; } try { ! Email mail = new Email(); ! mail.setSubject(System.getProperty("email.subject","Examination Report")); ! String message = System.getProperty("email.body"); ! String url = System.getProperty("email.url"); ! mail.setText((message==null?"":message+"\r\n\r\n")+ ! (url==null?"":"For an up-to-date report, please visit "+url+"/\r\n\r\n")+ ! "This email was automatically generated by "+ ! "UniTime "+Constants.VERSION+"."+Constants.BLD_NUMBER.replaceAll("@build.number@", "?")+ ! " (Univesity Timetabling Application, http://www.unitime.org)."); ! mail.addRecipient(email, null); ! if (System.getProperty("email.cc")!=null) for (StringTokenizer s=new StringTokenizer(System.getProperty("email.cc"),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipientCC(s.nextToken(), null); ! if (System.getProperty("email.bcc")!=null) for (StringTokenizer s=new StringTokenizer(System.getProperty("email.bcc"),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipientBCC(s.nextToken(), null); ! mail.addAttachement(report, prefix+(report.getName().endsWith(".txt")?".txt":".pdf")); ! mail.send(); sLog.info(" An email was sent to <a href='temp/"+report.getName()+"'>"+instructor.getName()+"</a>."); } catch (Exception e) { *************** *** 683,712 **** continue; } - MimeMessage mail = new MimeMessage(mailSession); - mail.setSubject(System.getProperty("email.subject","Examination Report")); - Multipart body = new MimeMultipart(); - BodyPart text = new MimeBodyPart(); - String message = System.getProperty("email.body"); - String url = System.getProperty("email.url"); - text.setText((message==null?"":message+"\r\n\r\n")+ - (url==null?"":"For an up-to-date report, please visit "+url+"/\r\n\r\n")+ - "This email was automatically generated by "+ - "UniTime "+Constants.VERSION+"."+Constants.BLD_NUMBER.replaceAll("@build.number@", "?")+ - " (Univesity Timetabling Application, http://www.unitime.org)."); - body.addBodyPart(text); - mail.addRecipient(RecipientType.TO, new InternetAddress(email)); - if (System.getProperty("email.cc")!=null) for (StringTokenizer s=new StringTokenizer(System.getProperty("email.cc"),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.CC, new InternetAddress(s.nextToken())); - if (System.getProperty("email.bcc")!=null) for (StringTokenizer s=new StringTokenizer(System.getProperty("email.bcc"),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.BCC, new InternetAddress(s.nextToken())); - if (from!=null) mail.setFrom(from); - BodyPart attachement = new MimeBodyPart(); - attachement.setDataHandler(new DataHandler(new FileDataSource(report))); - attachement.setFileName(prefix+(report.getName().endsWith(".txt")?".txt":".pdf")); - body.addBodyPart(attachement); - mail.setSentDate(new Date()); - mail.setContent(body); try { ! Transport.send(mail); sLog.info(" An email was sent to <a href='temp/"+report.getName()+"'>"+student.getName(DepartmentalInstructor.sNameFormatLastFist)+"</a>."); } catch (Exception e) { --- 634,654 ---- continue; } try { ! Email mail = new Email(); ! mail.setSubject(System.getProperty("email.subject","Examination Report")); ! String message = System.getProperty("email.body"); ! String url = System.getProperty("email.url"); ! mail.setText((message==null?"":message+"\r\n\r\n")+ ! (url==null?"":"For an up-to-date report, please visit "+url+"/\r\n\r\n")+ ! "This email was automatically generated by "+ ! "UniTime "+Constants.VERSION+"."+Constants.BLD_NUMBER.replaceAll("@build.number@", "?")+ ! " (Univesity Timetabling Application, http://www.unitime.org)."); ! mail.addRecipient(email, null); ! if (System.getProperty("email.cc")!=null) for (StringTokenizer s=new StringTokenizer(System.getProperty("email.cc"),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipientCC(s.nextToken(), null); ! if (System.getProperty("email.bcc")!=null) for (StringTokenizer s=new StringTokenizer(System.getProperty("email.bcc"),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipientBCC(s.nextToken(), null); ! mail.addAttachement(report, prefix+(report.getName().endsWith(".txt")?".txt":".pdf")); ! mail.send(); sLog.info(" An email was sent to <a href='temp/"+report.getName()+"'>"+student.getName(DepartmentalInstructor.sNameFormatLastFist)+"</a>."); } catch (Exception e) { *************** *** 928,932 **** sLog.info(" Loading overlapping class meetings..."); for (Iterator i=new ExamDAO().getSession().createQuery( ! "select p.uniqueId, ce, m from ClassEvent ce inner join ce.meetings m, ExamPeriod p " + "where p.startSlot - :travelTime < m.stopPeriod and m.startPeriod < p.startSlot + p.length + :travelTime and "+ HibernateUtil.addDate("p.session.examBeginDate","p.dateOffset")+" = m.meetingDate and p.session.uniqueId=:sessionId and p.examType=:examType") --- 870,874 ---- sLog.info(" Loading overlapping class meetings..."); for (Iterator i=new ExamDAO().getSession().createQuery( ! "select p.uniqueId, m from ClassEvent ce inner join ce.meetings m, ExamPeriod p " + "where p.startSlot - :travelTime < m.stopPeriod and m.startPeriod < p.startSlot + p.length + :travelTime and "+ HibernateUtil.addDate("p.session.examBeginDate","p.dateOffset")+" = m.meetingDate and p.session.uniqueId=:sessionId and p.examType=:examType") *************** *** 936,941 **** Object[] o = (Object[])i.next(); Long periodId = (Long)o[0]; ! ClassEvent event = (ClassEvent)o[1]; ! Meeting meeting = (Meeting)o[2]; Set<Meeting> meetings = period2meetings.get(periodId); if (meetings==null) { --- 878,882 ---- Object[] o = (Object[])i.next(); Long periodId = (Long)o[0]; ! Meeting meeting = (Meeting)o[1]; Set<Meeting> meetings = period2meetings.get(periodId); if (meetings==null) { *************** *** 946,950 **** sLog.info(" Loading overlapping course meetings..."); for (Iterator i=new ExamDAO().getSession().createQuery( ! "select p.uniqueId, ce, m from CourseEvent ce inner join ce.meetings m, ExamPeriod p " + "where ce.reqAttendance=true and p.startSlot - :travelTime < m.stopPeriod and m.startPeriod < p.startSlot + p.length + :travelTime and "+ HibernateUtil.addDate("p.session.examBeginDate","p.dateOffset")+" = m.meetingDate and p.session.uniqueId=:sessionId and p.examType=:examType") --- 887,891 ---- sLog.info(" Loading overlapping course meetings..."); for (Iterator i=new ExamDAO().getSession().createQuery( ! "select p.uniqueId, m from CourseEvent ce inner join ce.meetings m, ExamPeriod p " + "where ce.reqAttendance=true and p.startSlot - :travelTime < m.stopPeriod and m.startPeriod < p.startSlot + p.length + :travelTime and "+ HibernateUtil.addDate("p.session.examBeginDate","p.dateOffset")+" = m.meetingDate and p.session.uniqueId=:sessionId and p.examType=:examType") *************** *** 954,959 **** Object[] o = (Object[])i.next(); Long periodId = (Long)o[0]; ! CourseEvent event = (CourseEvent)o[1]; ! Meeting meeting = (Meeting)o[2]; Set<Meeting> meetings = period2meetings.get(periodId); if (meetings==null) { --- 895,899 ---- Object[] o = (Object[])i.next(); Long periodId = (Long)o[0]; ! Meeting meeting = (Meeting)o[1]; Set<Meeting> meetings = period2meetings.get(periodId); if (meetings==null) { Index: ExamScheduleByPeriodReport.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/reports/exam/ExamScheduleByPeriodReport.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ExamScheduleByPeriodReport.java 7 Feb 2010 09:19:32 -0000 1.13 --- ExamScheduleByPeriodReport.java 1 Dec 2010 11:10:51 -0000 1.14 *************** *** 1,2 **** --- 1,21 ---- + /* + * UniTime 3.2 (University Timetabling Application) + * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors + * as indicated by the @authors tag. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + * + */ package org.unitime.timetable.reports.exam; *************** *** 15,20 **** import org.unitime.timetable.solver.exam.ui.ExamInfo.ExamSectionInfo; ! import com.lowagie.text.DocumentException; public class ExamScheduleByPeriodReport extends PdfLegacyExamReport { protected static Logger sLog = Logger.getLogger(ExamScheduleByPeriodReport.class); --- 34,42 ---- import org.unitime.timetable.solver.exam.ui.ExamInfo.ExamSectionInfo; ! import com.itextpdf.text.DocumentException; + /** + * @author Tomas Muller + */ public class ExamScheduleByPeriodReport extends PdfLegacyExamReport { protected static Logger sLog = Logger.getLogger(ExamScheduleByPeriodReport.class); Index: ConflictsByCourseAndStudentReport.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/reports/exam/ConflictsByCourseAndStudentReport.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ConflictsByCourseAndStudentReport.java 7 Feb 2010 09:19:32 -0000 1.17 --- ConflictsByCourseAndStudentReport.java 1 Dec 2010 11:10:51 -0000 1.18 *************** *** 1,2 **** --- 1,21 ---- + /* + * UniTime 3.2 (University Timetabling Application) + * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors + * as indicated by the @authors tag. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + * + */ package org.unitime.timetable.reports.exam; *************** *** 12,16 **** import org.apache.log4j.Logger; - import org.unitime.timetable.model.ExamPeriod; import org.unitime.timetable.model.Session; import org.unitime.timetable.model.SubjectArea; --- 31,34 ---- *************** *** 23,27 **** import org.unitime.timetable.solver.exam.ui.ExamInfo.ExamSectionInfo; ! import com.lowagie.text.DocumentException; public class ConflictsByCourseAndStudentReport extends PdfLegacyExamReport { --- 41,45 ---- import org.unitime.timetable.solver.exam.ui.ExamInfo.ExamSectionInfo; ! import com.itextpdf.text.DocumentException; public class ConflictsByCourseAndStudentReport extends PdfLegacyExamReport { *************** *** 73,77 **** ExamAssignmentInfo exam = section.getExamAssignmentInfo(); if (exam==null || exam.getPeriod()==null) continue; - ExamPeriod period = exam.getPeriod(); iCoursePrinted = false; Vector<Long> students = new Vector<Long>(section.getStudentIds()); --- 91,94 ---- Index: StudentExamReport.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/reports/exam/StudentExamReport.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** StudentExamReport.java 16 Apr 2010 13:24:24 -0000 1.13 --- StudentExamReport.java 1 Dec 2010 11:10:51 -0000 1.14 *************** *** 1,2 **** --- 1,21 ---- + /* + * UniTime 3.2 (University Timetabling Application) + * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors + * as indicated by the @authors tag. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + * + */ package org.unitime.timetable.reports.exam; *************** *** 5,9 **** import java.util.Collection; import java.util.Comparator; - import java.util.Date; import java.util.Hashtable; import java.util.Iterator; --- 24,27 ---- *************** *** 17,21 **** import org.unitime.timetable.model.CourseOffering; import org.unitime.timetable.model.DepartmentalInstructor; - import org.unitime.timetable.model.ExamPeriod; import org.unitime.timetable.model.Location; import org.unitime.timetable.model.Session; --- 35,38 ---- *************** *** 35,40 **** import org.unitime.timetable.solver.exam.ui.ExamInfo.ExamSectionInfo; ! import com.lowagie.text.DocumentException; public class StudentExamReport extends PdfLegacyExamReport { protected static Logger sLog = Logger.getLogger(StudentExamReport.class); --- 52,60 ---- import org.unitime.timetable.solver.exam.ui.ExamInfo.ExamSectionInfo; ! import com.itextpdf.text.DocumentException; + /** + * @author Tomas Muller + */ public class StudentExamReport extends PdfLegacyExamReport { protected static Logger sLog = Logger.getLogger(StudentExamReport.class); *************** *** 203,208 **** if (student.getEmail()!=null) println("Email: "+student.getEmail()); - Date lastChange = null; - String changeObject = null; if (iClassSchedule) { StudentClassComparator scc = new StudentClassComparator(student); --- 223,226 ---- *************** *** 347,351 **** ExamAssignmentInfo exam = section.getExamAssignmentInfo(); if (exam==null || exam.getPeriod()==null) continue; - ExamPeriod period = exam.getPeriod(); iCoursePrinted = false; if (iDirect) for (DirectConflict conflict : exam.getDirectConflicts()) { --- 365,368 ---- Index: ConflictsByCourseAndInstructorReport.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/reports/exam/ConflictsByCourseAndInstructorReport.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ConflictsByCourseAndInstructorReport.java 7 Feb 2010 09:19:32 -0000 1.16 --- ConflictsByCourseAndInstructorReport.java 1 Dec 2010 11:10:51 -0000 1.17 *************** *** 1,2 **** --- 1,21 ---- + /* + * UniTime 3.2 (University Timetabling Application) + * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors + * as indicated by the @authors tag. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + * + */ package org.unitime.timetable.reports.exam; *************** *** 9,13 **** import org.apache.log4j.Logger; - import org.unitime.timetable.model.ExamPeriod; import org.unitime.timetable.model.Session; import org.unitime.timetable.model.SubjectArea; --- 28,31 ---- *************** *** 20,25 **** import org.unitime.timetable.solver.exam.ui.ExamInfo.ExamSectionInfo; ! import com.lowagie.text.DocumentException; public class ConflictsByCourseAndInstructorReport extends PdfLegacyExamReport { protected static Logger sLog = Logger.getLogger(ConflictsByCourseAndStudentReport.class); --- 38,46 ---- import org.unitime.timetable.solver.exam.ui.ExamInfo.ExamSectionInfo; ! import com.itextpdf.text.DocumentException; + /** + * @author Tomas Muller + */ public class ConflictsByCourseAndInstructorReport extends PdfLegacyExamReport { protected static Logger sLog = Logger.getLogger(ConflictsByCourseAndStudentReport.class); *************** *** 60,64 **** ExamAssignmentInfo exam = section.getExamAssignmentInfo(); if (exam==null || exam.getPeriod()==null) continue; - ExamPeriod period = exam.getPeriod(); iCoursePrinted = false; for (ExamInstructorInfo instructor : exam.getInstructors()) { --- 81,84 ---- Index: ScheduleByRoomReport.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/reports/exam/ScheduleByRoomReport.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ScheduleByRoomReport.java 7 Feb 2010 09:19:32 -0000 1.12 --- ScheduleByRoomReport.java 1 Dec 2010 11:10:51 -0000 1.13 *************** *** 1,2 **** --- 1,21 ---- + /* + * UniTime 3.2 (University Timetabling Application) + * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors + * as indicated by the @authors tag. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + * + */ package org.unitime.timetable.reports.exam; *************** *** 18,23 **** import org.unitime.timetable.solver.exam.ui.ExamInfo.ExamSectionInfo; ! import com.lowagie.text.DocumentException; public class ScheduleByRoomReport extends PdfLegacyExamReport { protected static Logger sLog = Logger.getLogger(ScheduleByRoomReport.class); --- 37,45 ---- import org.unitime.timetable.solver.exam.ui.ExamInfo.ExamSectionInfo; ! import com.itextpdf.text.DocumentException; + /** + * @author Tomas Muller + */ public class ScheduleByRoomReport extends PdfLegacyExamReport { protected static Logger sLog = Logger.getLogger(ScheduleByRoomReport.class); Index: ExamPeriodChartReport.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/reports/exam/ExamPeriodChartReport.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ExamPeriodChartReport.java 7 Feb 2010 09:19:32 -0000 1.2 --- ExamPeriodChartReport.java 1 Dec 2010 11:10:51 -0000 1.3 *************** *** 1,2 **** --- 1,21 ---- + /* + * UniTime 3.2 (University Timetabling Application) + * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors + * as indicated by the @authors tag. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + * + */ package org.unitime.timetable.reports.exam; *************** *** 6,9 **** --- 25,29 ---- import java.util.Collection; import java.util.Enumeration; + import java.util.HashMap; import java.util.Hashtable; import java.util.Iterator; *************** *** 12,17 **** import java.util.Vector; - import net.sf.cpsolver.ifs.util.ToolBox; - import org.apache.log4j.Logger; import org.unitime.timetable.model.ExamPeriod; --- 32,35 ---- *************** *** 22,27 **** import org.unitime.timetable.solver.exam.ui.ExamInfo.ExamSectionInfo; ! import com.lowagie.text.DocumentException; public class ExamPeriodChartReport extends PdfLegacyExamReport { protected static Logger sLog = Logger.getLogger(ScheduleByCourseReport.class); --- 40,48 ---- import org.unitime.timetable.solver.exam.ui.ExamInfo.ExamSectionInfo; ! import com.itextpdf.text.DocumentException; + /** + * @author Tomas Muller + */ public class ExamPeriodChartReport extends PdfLegacyExamReport { protected static Logger sLog = Logger.getLogger(ScheduleByCourseReport.class); *************** *** 46,53 **** exams.add(exam); } ! Hashtable<Integer,String> times = new Hashtable(); ! Hashtable<Integer,String> fixedTimes = new Hashtable(); ! Hashtable<Integer,String> days = new Hashtable(); ! TreeSet weeks = new TreeSet(); for (Iterator i=ExamPeriod.findAll(getSession().getUniqueId(), getExamType()).iterator();i.hasNext();) { ExamPeriod period = (ExamPeriod)i.next(); --- 67,73 ---- exams.add(exam); } ! HashMap<Integer,String> times = new HashMap<Integer, String>(); ! HashMap<Integer,String> fixedTimes = new HashMap<Integer, String>(); ! HashMap<Integer,String> days = new HashMap<Integer, String>(); for (Iterator i=ExamPeriod.findAll(getSession().getUniqueId(), getExamType()).iterator();i.hasNext();) { ExamPeriod period = (ExamPeriod)i.next(); *************** *** 71,78 **** boolean firstLine = true; for (int dIdx = 0; dIdx < days.size(); dIdx+=nrCols) { ! for (Enumeration e=ToolBox.sortEnumeration(times.keys());e.hasMoreElements();) { ! int time = ((Integer)e.nextElement()).intValue(); int offset = 0; ! String timeStr = (String)times.get(new Integer(time)); String header1 = ""; String header2 = ""; --- 91,97 ---- boolean firstLine = true; for (int dIdx = 0; dIdx < days.size(); dIdx+=nrCols) { ! for (Integer time: new TreeSet<Integer>(times.keySet())) { int offset = 0; ! String timeStr = times.get(time); String header1 = ""; String header2 = ""; *************** *** 83,88 **** String lastDay = null; nrCols = 0; ! for (Enumeration f=ToolBox.sortEnumeration(days.keys());f.hasMoreElements();idx++) { ! int day = ((Integer)f.nextElement()).intValue(); String dayStr = days.get(day); if (idx<dIdx || (firstDay!=null && (dayStr.startsWith("Mon") || day>=firstDayOffset+7)) || nrCols==(iTotals?6:5)) continue; --- 102,107 ---- String lastDay = null; nrCols = 0; ! for (Iterator<Integer> f = new TreeSet<Integer>(days.keySet()).iterator(); f.hasNext(); idx++) { ! int day = f.next(); String dayStr = days.get(day); if (idx<dIdx || (firstDay!=null && (dayStr.startsWith("Mon") || day>=firstDayOffset+7)) || nrCols==(iTotals?6:5)) continue; *************** *** 261,266 **** String line1 = "", line2 = "", line3 = ""; int idx = 0; ! for (Enumeration f=ToolBox.sortEnumeration(days.keys());f.hasMoreElements();idx++) { ! Integer day = (Integer)f.nextElement(); if (idx<dIdx || idx>=dIdx+nrCols) continue; line1 += mpad((String)days.get(day),20)+" "; --- 280,285 ---- String line1 = "", line2 = "", line3 = ""; int idx = 0; ! for (Iterator<Integer> f = new TreeSet<Integer>(days.keySet()).iterator(); f.hasNext(); idx++) { ! int day = f.next(); if (idx<dIdx || idx>=dIdx+nrCols) continue; line1 += mpad((String)days.get(day),20)+" "; Index: AbbvExamScheduleByCourseReport.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/reports/exam/AbbvExamScheduleByCourseReport.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** AbbvExamScheduleByCourseReport.java 7 Feb 2010 09:19:32 -0000 1.9 --- AbbvExamScheduleByCourseReport.java 1 Dec 2010 11:10:51 -0000 1.10 *************** *** 1,2 **** --- 1,21 ---- + /* + * UniTime 3.2 (University Timetabling Application) + * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors + * as indicated by the @authors tag. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + * + */ package org.unitime.timetable.reports.exam; *************** *** 16,21 **** import org.unitime.timetable.solver.exam.ui.ExamInfo.ExamSectionInfo; ! import com.lowagie.text.DocumentException; public class AbbvExamScheduleByCourseReport extends PdfLegacyExamReport { public AbbvExamScheduleByCourseReport(int mode, File file, Session session, int examType, SubjectArea subjectArea, Collection<ExamAssignmentInfo> exams) throws IOException, DocumentException { --- 35,43 ---- import org.unitime.timetable.solver.exam.ui.ExamInfo.ExamSectionInfo; ! import com.itextpdf.text.DocumentException; + /** + * @author Tomas Muller + */ public class AbbvExamScheduleByCourseReport extends PdfLegacyExamReport { public AbbvExamScheduleByCourseReport(int mode, File file, Session session, int examType, SubjectArea subjectArea, Collection<ExamAssignmentInfo> exams) throws IOException, DocumentException { Index: AbbvScheduleByCourseReport.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/reports/exam/AbbvScheduleByCourseReport.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** AbbvScheduleByCourseReport.java 7 Feb 2010 09:19:32 -0000 1.9 --- AbbvScheduleByCourseReport.java 1 Dec 2010 11:10:51 -0000 1.10 *************** *** 1,2 **** --- 1,21 ---- + /* + * UniTime 3.2 (University Timetabling Application) + * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors + ... [truncated message content] |
|
From: Tomas M. <to...@us...> - 2010-12-01 11:11:31
|
Update of /cvsroot/unitime/UniTime/WebContent/sct In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13954/WebContent/sct Modified Files: studentLog.jsp studentSolver.jsp Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) Index: studentLog.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/sct/studentLog.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** studentLog.jsp 7 Jul 2008 21:13:43 -0000 1.1 --- studentLog.jsp 1 Dec 2010 11:10:52 -0000 1.2 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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"%> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ page language="java" autoFlush="true"%> *************** *** 31,35 **** <html:form action="/studentSolverLog"> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="2"> --- 31,35 ---- <html:form action="/studentSolverLog"> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="2"> *************** *** 65,69 **** <logic:empty name="studentSolverLogForm" property="log"> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="2"> --- 65,69 ---- <logic:empty name="studentSolverLogForm" property="log"> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="2"> Index: studentSolver.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/sct/studentSolver.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** studentSolver.jsp 16 Oct 2008 16:33:28 -0000 1.2 --- studentSolver.jsp 1 Dec 2010 11:10:52 -0000 1.3 *************** *** 1,9 **** <%-- ! * 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. * --- 1,9 ---- <%-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 14,19 **** * * 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"%> --- 14,19 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --%> <%@ page language="java" autoFlush="true"%> *************** *** 67,71 **** status = "Solver not started."; %> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="2"> --- 67,71 ---- status = "Solver not started."; %> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD colspan="2"> *************** *** 107,111 **** <% if (parameter.getType().startsWith("enum(") && parameter.getType().endsWith(")")) { %> <html:select property='<%="parameterValue["+parameter.getId()+"]"%>' disabled="<%=disabled || parameter.getDisabled()%>"> ! <html:options property='<%="enum("+parameter.getType()+")"%>'/> </html:select> <html:errors property='<%="parameterValue["+parameter.getId()+"]"%>'/> --- 107,111 ---- <% if (parameter.getType().startsWith("enum(") && parameter.getType().endsWith(")")) { %> <html:select property='<%="parameterValue["+parameter.getId()+"]"%>' disabled="<%=disabled || parameter.getDisabled()%>"> ! <html:options property='<%=parameter.getType()%>'/> </html:select> <html:errors property='<%="parameterValue["+parameter.getId()+"]"%>'/> *************** *** 180,184 **** </TABLE> <BR><BR> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <% if (solver==null) { --- 180,184 ---- </TABLE> <BR><BR> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <% if (solver==null) { *************** *** 198,202 **** <% } else { ! Hashtable info = solver.bestSolutionInfo(); if (info!=null) { %> --- 198,202 ---- <% } else { ! Map<String, String> info = solver.bestSolutionInfo(); if (info!=null) { %> *************** *** 209,217 **** </TR> <% ! Vector keys = new Vector(info.keySet()); Collections.sort(keys,new ListSolutionsForm.InfoComparator()); ! for (Enumeration e=keys.elements();e.hasMoreElements();) { ! String key = (String)e.nextElement(); ! String val = info.get(key).toString(); %> <TR><TD><%=key%>:</TD><TD><%=val%></TD></TR> --- 209,216 ---- </TR> <% ! List<String> keys = new ArrayList<String>(info.keySet()); Collections.sort(keys,new ListSolutionsForm.InfoComparator()); ! for (String key: keys) { ! String val = info.get(key); %> <TR><TD><%=key%>:</TD><TD><%=val%></TD></TR> *************** *** 232,240 **** <% info = solver.currentSolutionInfo(); ! Vector keys = new Vector(info.keySet()); Collections.sort(keys,new ListSolutionsForm.InfoComparator()); ! for (Enumeration e=keys.elements();e.hasMoreElements();) { ! String key = (String)e.nextElement(); ! String val = info.get(key).toString(); %> <TR><TD><%=key%>:</TD><TD><%=val%></TD></TR> --- 231,238 ---- <% info = solver.currentSolutionInfo(); ! List<String> keys = new ArrayList<String>(info.keySet()); Collections.sort(keys,new ListSolutionsForm.InfoComparator()); ! for (String key: keys) { ! String val = info.get(key); %> <TR><TD><%=key%>:</TD><TD><%=val%></TD></TR> *************** *** 283,287 **** <tt:propertyEquals name="tmtbl.solver.remote.allow_jnlp_exec" value="true"> ! <TABLE width="90%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD><DIV class="WelcomeRowHeadBlank"> </DIV></TD> --- 281,285 ---- <tt:propertyEquals name="tmtbl.solver.remote.allow_jnlp_exec" value="true"> ! <TABLE width="100%" border="0" cellspacing="0" cellpadding="3"> <TR> <TD><DIV class="WelcomeRowHeadBlank"> </DIV></TD> |
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13954/JavaSource/org/unitime/timetable/util Modified Files: InstrOfferingPermIdGenerator.java InstructionalOfferingRollForward.java DefaultRoomAvailabilityService.java ImportXmlFile.java DynamicList.java ImportXmlFromDB.java MessageResourcesFactory.java PdfWorksheet.java BlobRoomAvailabilityService.java RoomAvailabilityService.java SessionRollForward.java FailedLoginAttempt.java RoomAvailability.java LoginManager.java DateUtils.java DynamicListObjectFactory.java IdValue.java PdfEventHandler.java CalendarUtils.java LocationPermIdGenerator.java MessageResources.java Constants.java LookupTables.java DefaultExternalClassNameHelper.java ReferenceList.java ComboBoxLookup.java Added Files: AccessDeniedException.java LdapExternalUidLookup.java LdapExternalUidTranslation.java Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) --- NEW FILE: AccessDeniedException.java --- /* * UniTime 3.2 (University Timetabling Application) * Copyright (C) 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 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, see <http://www.gnu.org/licenses/>. * */ package org.unitime.timetable.util; public class AccessDeniedException extends RuntimeException { private static final long serialVersionUID = 2565632362237022274L; public AccessDeniedException(String message) { super(message); } } Index: MessageResourcesFactory.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/MessageResourcesFactory.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MessageResourcesFactory.java 17 Jun 2008 21:24:58 -0000 1.2 --- MessageResourcesFactory.java 1 Dec 2010 11:10:51 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.util; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.util; *************** *** 27,30 **** --- 27,31 ---- public class MessageResourcesFactory extends org.apache.struts.util.MessageResourcesFactory { + private static final long serialVersionUID = -3170113345618008226L; @Override Index: DateUtils.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/DateUtils.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DateUtils.java 8 Sep 2010 15:29:24 -0000 1.6 --- DateUtils.java 1 Dec 2010 11:10:51 -0000 1.7 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.util; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.util; *************** *** 49,53 **** dayOfYear -= x.get(Calendar.DAY_OF_YEAR); } else if (c.get(Calendar.YEAR)>year) { ! Calendar x = Calendar.getInstance(Locale.US); x.set(year,11,31,0,0,0); dayOfYear += x.get(Calendar.DAY_OF_YEAR); --- 49,53 ---- dayOfYear -= x.get(Calendar.DAY_OF_YEAR); } else if (c.get(Calendar.YEAR)>year) { ! Calendar x = Calendar.getInstance(Locale.US); x.set(year,11,31,0,0,0); dayOfYear += x.get(Calendar.DAY_OF_YEAR); *************** *** 69,72 **** --- 69,73 ---- c.set(Calendar.WEEK_OF_YEAR,week); c.set(Calendar.DAY_OF_WEEK,Calendar.SUNDAY); + c.add(Calendar.DAY_OF_YEAR, 1); return c.getTime(); } *************** *** 76,79 **** --- 77,81 ---- c.set(Calendar.WEEK_OF_YEAR,week); c.set(Calendar.DAY_OF_WEEK,Calendar.SATURDAY); + c.add(Calendar.DAY_OF_YEAR, 1); return c.getTime(); } *************** *** 121,125 **** if (month < 0 || month >= 12) { int actualYear = calculateActualYear(month, year); - //TODO: checked OK, tested OK if (month < 0){ while (actualYear < year){ --- 123,126 ---- Index: DynamicListObjectFactory.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/DynamicListObjectFactory.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DynamicListObjectFactory.java 17 Jun 2008 21:24:58 -0000 1.2 --- DynamicListObjectFactory.java 1 Dec 2010 11:10:51 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.util; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.util; Index: ImportXmlFile.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/ImportXmlFile.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ImportXmlFile.java 16 May 2008 19:18:36 -0000 1.2 --- ImportXmlFile.java 1 Dec 2010 11:10:51 -0000 1.3 *************** *** 1,5 **** ! /** * ! */ package org.unitime.timetable.util; --- 1,21 ---- ! /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors ! * as indicated by the @authors tag. * ! * 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 3 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, see <http://www.gnu.org/licenses/>. ! * ! */ package org.unitime.timetable.util; Index: ComboBoxLookup.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/ComboBoxLookup.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ComboBoxLookup.java 17 Jun 2008 21:24:58 -0000 1.2 --- ComboBoxLookup.java 1 Dec 2010 11:10:51 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.util; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.util; Index: PdfWorksheet.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/PdfWorksheet.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PdfWorksheet.java 17 Jun 2008 21:24:58 -0000 1.4 --- PdfWorksheet.java 1 Dec 2010 11:10:51 -0000 1.5 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.util; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.util; *************** *** 29,32 **** --- 29,33 ---- import java.util.Hashtable; import java.util.Iterator; + import java.util.List; import java.util.Set; import java.util.StringTokenizer; *************** *** 65,74 **** import org.unitime.timetable.util.Constants; ! import com.lowagie.text.Document; ! import com.lowagie.text.DocumentException; ! import com.lowagie.text.FontFactory; ! import com.lowagie.text.PageSize; ! import com.lowagie.text.Paragraph; ! import com.lowagie.text.pdf.PdfWriter; import net.sf.cpsolver.coursett.model.RoomLocation; --- 66,75 ---- import org.unitime.timetable.util.Constants; ! import com.itextpdf.text.Document; ! import com.itextpdf.text.DocumentException; ! import com.itextpdf.text.FontFactory; ! import com.itextpdf.text.PageSize; ! import com.itextpdf.text.Paragraph; ! import com.itextpdf.text.pdf.PdfWriter; import net.sf.cpsolver.coursett.model.RoomLocation; *************** *** 82,90 **** private static int sNrChars = 133; private static int sNrLines = 50; - private File iFolder = null; - private File iFile = null; private FileOutputStream iOut = null; private Document iDoc = null; - private PdfWriter iWriter = null; private SubjectArea iSubjectArea = null; private String iCourseNumber = null; --- 83,88 ---- *************** *** 98,102 **** iSubjectArea = sa; iCourseNumber = courseNumber; - iFile = file; if (iCourseNumber!=null && (iCourseNumber.trim().length()==0 || "*".equals(iCourseNumber.trim().length()))) iCourseNumber = null; --- 96,99 ---- *************** *** 104,108 **** iOut = new FileOutputStream(file); ! iWriter = PdfWriter.getInstance(iDoc, iOut); iDoc.addTitle(sa.getSubjectAreaAbbreviation()+(iCourseNumber==null?"":" "+iCourseNumber)+" Worksheet"); --- 101,105 ---- iOut = new FileOutputStream(file); ! PdfWriter.getInstance(iDoc, iOut); iDoc.addTitle(sa.getSubjectAreaAbbreviation()+(iCourseNumber==null?"":" "+iCourseNumber)+" Worksheet"); *************** *** 242,250 **** Assignment assgn = (iUseCommitedAssignments?clazz.getCommittedAssignment():null); if (assgn==null || assgn.getRoomLocations().isEmpty()) { ! Vector roomLocations = TimetableDatabaseLoader.computeRoomLocations(clazz); if (roomLocations.size()==clazz.getNbrRooms().intValue()) { String[] rooms = new String[roomLocations.size()]; for (int x=0;x<roomLocations.size();x++) { ! RoomLocation r = (RoomLocation)roomLocations.elementAt(x); rooms[x] = r.getName(); } --- 239,247 ---- Assignment assgn = (iUseCommitedAssignments?clazz.getCommittedAssignment():null); if (assgn==null || assgn.getRoomLocations().isEmpty()) { ! List<RoomLocation> roomLocations = TimetableDatabaseLoader.computeRoomLocations(clazz); if (roomLocations.size()==clazz.getNbrRooms().intValue()) { String[] rooms = new String[roomLocations.size()]; for (int x=0;x<roomLocations.size();x++) { ! RoomLocation r = (RoomLocation)roomLocations.get(x); rooms[x] = r.getName(); } *************** *** 295,302 **** private String[] instructor(Class_ clazz) { ! Vector leads = clazz.getLeadInstructors(); String[] instr = new String[leads.size()]; for (int x=0;x<clazz.getLeadInstructors().size();x++) { ! DepartmentalInstructor in = (DepartmentalInstructor)leads.elementAt(x); instr[x] = in.nameShort(); } --- 292,299 ---- private String[] instructor(Class_ clazz) { ! List<DepartmentalInstructor> leads = clazz.getLeadInstructors(); String[] instr = new String[leads.size()]; for (int x=0;x<clazz.getLeadInstructors().size();x++) { ! DepartmentalInstructor in = (DepartmentalInstructor)leads.get(x); instr[x] = in.nameShort(); } *************** *** 305,312 **** protected void print(CourseOffering co) throws DocumentException { - //System.out.println(" Printing "+co.getCourseName()+" ..."); if (iLineNo+5>=sNrLines) newPage(); iCourseOffering = co; - String session = lpad(co.getSubjectArea().getSession().getAcademicTerm()+" "+co.getSubjectArea().getSession().getAcademicYear(),17); int courseLimit = -1; InstructionalOffering offering = co.getInstructionalOffering(); --- 302,307 ---- *************** *** 436,440 **** for (Iterator k=classes.iterator();k.hasNext();) { Class_ clazz = (Class_)k.next(); - Assignment assgn = (Assignment)clazz.getCommittedAssignment(); String[] time = time(clazz); String[] rooms = room(clazz); --- 431,434 ---- *************** *** 524,540 **** return rpad(s,' ',len); } - - private String mpad(String s, char ch, int len) { - if (s==null) s=""; - if (s.length()>len) return s.substring(0,len); - while (s.length()<len) - if (s.length()%2==0) s = s + ch; else s = ch + s; - return s; - } - private String mpad(String s, int len) { - return mpad(s,' ',len); - } - private String mpad(String s1, String s2, char ch, int len) { String m = ""; --- 518,522 ---- Index: CalendarUtils.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/CalendarUtils.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CalendarUtils.java 17 Jun 2008 21:24:58 -0000 1.2 --- CalendarUtils.java 1 Dec 2010 11:10:51 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.util; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.util; Index: PdfEventHandler.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/PdfEventHandler.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PdfEventHandler.java 17 Jun 2008 21:24:58 -0000 1.2 --- PdfEventHandler.java 1 Dec 2010 11:10:51 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.util; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.util; *************** *** 25,34 **** import java.util.Date; ! import com.lowagie.text.Document; ! import com.lowagie.text.DocumentException; ! import com.lowagie.text.pdf.BaseFont; ! import com.lowagie.text.pdf.PdfContentByte; ! import com.lowagie.text.pdf.PdfPageEventHelper; ! import com.lowagie.text.pdf.PdfWriter; public class PdfEventHandler extends PdfPageEventHelper { --- 25,34 ---- import java.util.Date; ! import com.itextpdf.text.Document; ! import com.itextpdf.text.DocumentException; ! import com.itextpdf.text.pdf.BaseFont; ! import com.itextpdf.text.pdf.PdfContentByte; ! import com.itextpdf.text.pdf.PdfPageEventHelper; ! import com.itextpdf.text.pdf.PdfWriter; public class PdfEventHandler extends PdfPageEventHelper { Index: DefaultRoomAvailabilityService.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/DefaultRoomAvailabilityService.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DefaultRoomAvailabilityService.java 16 Apr 2010 13:24:25 -0000 1.7 --- DefaultRoomAvailabilityService.java 1 Dec 2010 11:10:51 -0000 1.8 *************** *** 1,2 **** --- 1,21 ---- + /* + * UniTime 3.2 (University Timetabling Application) + * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors + * as indicated by the @authors tag. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + * + */ package org.unitime.timetable.util; *************** *** 11,16 **** import java.util.Vector; - import org.apache.commons.logging.Log; - import org.apache.commons.logging.LogFactory; import org.hibernate.Query; import org.unitime.timetable.interfaces.RoomAvailabilityInterface; --- 30,33 ---- *************** *** 21,25 **** public class DefaultRoomAvailabilityService implements RoomAvailabilityInterface { - private static Log sLog = LogFactory.getLog(DefaultRoomAvailabilityService.class); private Vector<CacheElement> iCache = new Vector<CacheElement>(); --- 38,41 ---- *************** *** 200,204 **** public static class MeetingTimeBlock implements TimeBlock, Comparable<TimeBlock> { ! Long iMeetingId; String iEventName, iEventType; Date iStart, iEnd; --- 216,221 ---- public static class MeetingTimeBlock implements TimeBlock, Comparable<TimeBlock> { ! private static final long serialVersionUID = -5557707709984628517L; ! Long iMeetingId; String iEventName, iEventType; Date iStart, iEnd; Index: DefaultExternalClassNameHelper.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/DefaultExternalClassNameHelper.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DefaultExternalClassNameHelper.java 4 Feb 2010 20:39:22 -0000 1.2 --- DefaultExternalClassNameHelper.java 1 Dec 2010 11:10:51 -0000 1.3 *************** *** 1,5 **** ! /** * ! */ package org.unitime.timetable.util; --- 1,21 ---- ! /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors ! * as indicated by the @authors tag. * ! * 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 3 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, see <http://www.gnu.org/licenses/>. ! * ! */ package org.unitime.timetable.util; --- NEW FILE: LdapExternalUidTranslation.java --- /* * UniTime 3.2 (University Timetabling Application) * Copyright (C) 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 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, see <http://www.gnu.org/licenses/>. * */ package org.unitime.timetable.util; import javax.naming.directory.Attribute; import javax.naming.directory.Attributes; import javax.naming.directory.DirContext; import org.unitime.commons.Debug; import org.unitime.timetable.ApplicationProperties; import org.unitime.timetable.authenticate.jaas.LdapAuthenticateModule; import org.unitime.timetable.interfaces.ExternalUidTranslation; public class LdapExternalUidTranslation implements ExternalUidTranslation { public String translate(String uid, Source source, Source target) { if (uid==null || source.equals(target)) return uid; if (source.equals(Source.LDAP)) return uid2ext(uid); if (target.equals(Source.LDAP)) return ext2uid(uid); return uid; } public String uid2ext(String uid) { try { DirContext ctx = null; try { ctx = LdapAuthenticateModule.getDirContext(); Attributes attributes = ctx.getAttributes( ApplicationProperties.getProperty("tmtbl.authenticate.ldap.uid2ext").replaceAll("%", uid), new String[] { ApplicationProperties.getProperty("tmtbl.authenticate.ldap.externalId", "puid") }); if (attributes!=null) { Attribute puid = attributes.get(ApplicationProperties.getProperty("tmtbl.authenticate.ldap.externalId", "puid")); if (puid!=null) return (String)puid.get(); } } finally { if (ctx!=null) ctx.close(); } } catch (Exception e) { Debug.error("Unable to translate uid to ext, "+e.getMessage()); } return null; } public String ext2uid(String puid) { try { DirContext ctx = null; try { ctx = LdapAuthenticateModule.getDirContext(); Attributes attributes = ctx.getAttributes( ApplicationProperties.getProperty("tmtbl.authenticate.ldap.ext2uid").replaceAll("%", puid), new String[] { ApplicationProperties.getProperty("tmtbl.authenticate.ldap.login", "uid") }); if (attributes!=null) { Attribute uid = attributes.get(ApplicationProperties.getProperty("tmtbl.authenticate.ldap.login", "uid")); if (uid!=null) return (String)uid.get(); } } finally { if (ctx!=null) ctx.close(); } } catch (Exception e) { Debug.error("Unable to translate ext to uid, "+e.getMessage()); } return null; } } Index: ImportXmlFromDB.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/ImportXmlFromDB.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ImportXmlFromDB.java 25 Jun 2008 16:20:54 -0000 1.4 --- ImportXmlFromDB.java 1 Dec 2010 11:10:51 -0000 1.5 *************** *** 1,5 **** ! /** * ! */ package org.unitime.timetable.util; --- 1,21 ---- ! /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors ! * as indicated by the @authors tag. * ! * 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 3 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, see <http://www.gnu.org/licenses/>. ! * ! */ package org.unitime.timetable.util; Index: MessageResources.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/MessageResources.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MessageResources.java 17 Jun 2008 21:24:58 -0000 1.3 --- MessageResources.java 1 Dec 2010 11:10:51 -0000 1.4 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.util; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.util; *************** *** 43,46 **** --- 43,47 ---- */ public class MessageResources extends org.apache.struts.util.MessageResources { + private static final long serialVersionUID = -3234198544455822319L; private static PropertiesConfiguration resource; Index: IdValue.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/IdValue.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IdValue.java 17 Jun 2008 21:24:58 -0000 1.2 --- IdValue.java 1 Dec 2010 11:10:51 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.util; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.util; Index: DynamicList.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/DynamicList.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DynamicList.java 17 Jun 2008 21:24:58 -0000 1.2 --- DynamicList.java 1 Dec 2010 11:10:51 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.util; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.util; Index: Constants.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/Constants.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Constants.java 22 Oct 2010 22:08:24 -0000 1.17 --- Constants.java 1 Dec 2010 11:10:51 -0000 1.18 *************** *** 1,4 **** /* ! * UniTime 3.1 (University Timetabling Application) * Copyright (C) 2008-2009, UniTime LLC, and individual contributors * as indicated by the @authors tag. --- 1,4 ---- /* ! * UniTime 3.2 (University Timetabling Application) * Copyright (C) 2008-2009, UniTime LLC, and individual contributors * as indicated by the @authors tag. *************** *** 6,10 **** * 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. * --- 6,10 ---- * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.util; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.util; *************** *** 72,76 **** /** version */ ! public static String VERSION = "3.1"; /** release date */ --- 72,76 ---- /** version */ ! public static String VERSION = "3.2"; /** release date */ *************** *** 516,520 **** public static boolean isInteger(String str) { try { ! int i = Integer.parseInt(str); } catch (Exception e) { return false; --- 516,520 ---- public static boolean isInteger(String str) { try { ! Integer.parseInt(str); } catch (Exception e) { return false; *************** *** 530,534 **** public static boolean isNumber(String str) { try { ! double i = Double.parseDouble(str); } catch (Exception e) { return false; --- 530,534 ---- public static boolean isNumber(String str) { try { ! Double.parseDouble(str); } catch (Exception e) { return false; *************** *** 589,593 **** return(offset); } ! public static int getDayOfWeek(Date date) { Calendar c = Calendar.getInstance(Locale.US); --- 589,593 ---- return(offset); } ! public static int getDayOfWeek(Date date) { Calendar c = Calendar.getInstance(Locale.US); *************** *** 612,614 **** --- 612,615 ---- } } + } Index: InstrOfferingPermIdGenerator.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/InstrOfferingPermIdGenerator.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** InstrOfferingPermIdGenerator.java 17 Jun 2008 21:24:58 -0000 1.2 --- InstrOfferingPermIdGenerator.java 1 Dec 2010 11:10:51 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.util; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.util; Index: InstructionalOfferingRollForward.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/InstructionalOfferingRollForward.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** InstructionalOfferingRollForward.java 14 May 2010 21:44:27 -0000 1.10 --- InstructionalOfferingRollForward.java 1 Dec 2010 11:10:51 -0000 1.11 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.util; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.util; *************** *** 647,650 **** --- 647,651 ---- } + @SuppressWarnings("unused") private class RollForwardSchedSubpart{ private SchedulingSubpart fromParentSubpart; *************** *** 730,733 **** --- 731,735 ---- } + @SuppressWarnings("unused") private class RollForwardClass { private Class_ fromParentClass; Index: LookupTables.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/LookupTables.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** LookupTables.java 17 Jun 2008 21:24:58 -0000 1.9 --- LookupTables.java 1 Dec 2010 11:10:51 -0000 1.10 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.util; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.util; *************** *** 158,162 **** */ public static void setupTimePatterns(HttpServletRequest request) throws Exception { ! Vector v = TimePattern.findAll(org.unitime.timetable.model.Session.getCurrentAcadSession(Web.getUser(request.getSession())), Boolean.TRUE); request.setAttribute(TimePattern.TIME_PATTERN_ATTR_NAME, v); } --- 158,162 ---- */ public static void setupTimePatterns(HttpServletRequest request) throws Exception { ! List<TimePattern> v = TimePattern.findAll(org.unitime.timetable.model.Session.getCurrentAcadSession(Web.getUser(request.getSession())), Boolean.TRUE); request.setAttribute(TimePattern.TIME_PATTERN_ATTR_NAME, v); } *************** *** 228,232 **** public static void setupDatePatterns(HttpServletRequest request, String inheritString, DatePattern inheritedDatePattern, Department department, DatePattern currentDatePattern) { - User user = Web.getUser(request.getSession()); Vector list = new Vector(); list.addElement(new IdValue(new Long(-1),inheritString+(inheritedDatePattern==null?"":" ("+inheritedDatePattern.getName()+")"))); --- 228,231 ---- *************** *** 251,255 **** */ public static void setupDatePatterns(HttpServletRequest request, org.unitime.timetable.model.Session acadSession, boolean includeExtended, String inheritString, DatePattern inheritedDatePattern, Department department, DatePattern currentDatePattern) { - User user = Web.getUser(request.getSession()); Vector list = new Vector(); list.addElement(new IdValue(new Long(-1),inheritString+(inheritedDatePattern==null?"":" ("+inheritedDatePattern.getName()+")"))); --- 250,253 ---- Index: RoomAvailability.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/RoomAvailability.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RoomAvailability.java 1 Aug 2009 17:23:30 -0000 1.4 --- RoomAvailability.java 1 Dec 2010 11:10:51 -0000 1.5 *************** *** 1,2 **** --- 1,21 ---- + /* + * UniTime 3.2 (University Timetabling Application) + * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors + * as indicated by the @authors tag. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + * + */ package org.unitime.timetable.util; Index: LocationPermIdGenerator.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/LocationPermIdGenerator.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LocationPermIdGenerator.java 17 Jun 2008 21:24:58 -0000 1.3 --- LocationPermIdGenerator.java 1 Dec 2010 11:10:51 -0000 1.4 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.util; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.util; --- NEW FILE: LdapExternalUidLookup.java --- /* * UniTime 3.2 (University Timetabling Application) * Copyright (C) 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 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, see <http://www.gnu.org/licenses/>. * */ package org.unitime.timetable.util; import javax.naming.directory.Attribute; import javax.naming.directory.Attributes; import javax.naming.directory.DirContext; import org.unitime.timetable.ApplicationProperties; import org.unitime.timetable.authenticate.jaas.LdapAuthenticateModule; import org.unitime.timetable.interfaces.ExternalUidLookup; public class LdapExternalUidLookup implements ExternalUidLookup { @Override public UserInfo doLookup(String searchId) throws Exception { String query = ApplicationProperties.getProperty("tmtbl.authenticate.ldap.identify"); if (query == null) return null; DirContext ctx = null; try { ctx = LdapAuthenticateModule.getDirContext(); String idAttributeName = ApplicationProperties.getProperty("tmtbl.authenticate.ldap.externalId","uid"); String loginAttributeName = ApplicationProperties.getProperty("tmtbl.authenticate.ldap.login", "uid"); Attributes attributes = ctx.getAttributes(query.replaceAll("%", searchId), new String[] {idAttributeName, loginAttributeName, "cn", "givenName", "sn", "mail"}); Attribute idAttribute = attributes.get(idAttributeName); if (idAttribute == null) return null; UserInfo user = new UserInfo(); user.setExternalId((String)idAttribute.get()); user.setUserName((String)attributes.get(loginAttributeName).get()); if (attributes.get("cn") != null) user.setName((String)attributes.get("cn").get()); if (attributes.get("givenName") != null) user.setFirstName((String)attributes.get("givenName").get()); if (attributes.get("cn") != null) user.setName((String)attributes.get("cn").get()); if (attributes.get("sn") != null) user.setLastName((String)attributes.get("sn").get()); if (attributes.get("mail") != null) { user.setEmail((String)attributes.get("mail").get()); } else { String email = user.getUserName() + "@"; for (String x: query.split(",")) if (x.startsWith("dc=")) email += (email.endsWith("@") ? "" : ".") + x.substring(3); if (!email.endsWith("@")) user.setEmail(email); } return user; } finally { if (ctx != null) ctx.close(); } } } Index: ReferenceList.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/ReferenceList.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ReferenceList.java 17 Jun 2008 21:24:58 -0000 1.2 --- ReferenceList.java 1 Dec 2010 11:10:51 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.util; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.util; Index: SessionRollForward.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/SessionRollForward.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** SessionRollForward.java 18 Oct 2010 01:11:53 -0000 1.22 --- SessionRollForward.java 1 Dec 2010 11:10:51 -0000 1.23 *************** *** 3,7 **** * 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. * --- 3,7 ---- * 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 3 of the License, or * (at your option) any later version. * *************** *** 12,17 **** * * 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. */ package org.unitime.timetable.util; --- 12,17 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.util; *************** *** 21,24 **** --- 21,25 ---- import java.util.HashMap; import java.util.HashSet; + import java.util.Hashtable; import java.util.Iterator; import java.util.List; *************** *** 33,36 **** --- 34,39 ---- import org.unitime.timetable.ApplicationProperties; import org.unitime.timetable.form.RollForwardSessionForm; + import org.unitime.timetable.model.AcademicArea; + import org.unitime.timetable.model.AcademicClassification; import org.unitime.timetable.model.Building; import org.unitime.timetable.model.BuildingPref; *************** *** 38,41 **** --- 41,49 ---- import org.unitime.timetable.model.Class_; import org.unitime.timetable.model.CourseOffering; + import org.unitime.timetable.model.Curriculum; + import org.unitime.timetable.model.CurriculumClassification; + import org.unitime.timetable.model.CurriculumCourse; + import org.unitime.timetable.model.CurriculumCourseGroup; + import org.unitime.timetable.model.CurriculumProjectionRule; import org.unitime.timetable.model.DatePattern; import org.unitime.timetable.model.Department; *************** *** 60,63 **** --- 68,73 ---- import org.unitime.timetable.model.Location; import org.unitime.timetable.model.NonUniversityLocation; + import org.unitime.timetable.model.PosMajor; + import org.unitime.timetable.model.PosMinor; import org.unitime.timetable.model.PreferenceGroup; import org.unitime.timetable.model.PreferenceLevel; *************** *** 77,83 **** --- 87,96 ---- import org.unitime.timetable.model.TimePref; import org.unitime.timetable.model.TimetableManager; + import org.unitime.timetable.model.dao.AcademicAreaDAO; + import org.unitime.timetable.model.dao.AcademicClassificationDAO; import org.unitime.timetable.model.dao.BuildingDAO; i... [truncated message content] |
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/test In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13954/JavaSource/org/unitime/timetable/test Modified Files: BatchStudentSectioningSaver.java ExportPreferences.java GenAllExamNames.java ClassEnrollmentUpdater.java MakeCurriculaFromLastlikeDemands.java UpdateExamConflicts.java InteractiveTimetablingTest.java GenExactTimeMins.java MakeEventsForAllCommitedAssignments.java BatchStudentSectioningTest.java ImportPreferences.java MakeAssignmentsForClassEvents.java ExamResetRoomPrefs.java StudentSectioningTest.java BatchStudentSectioningLoader.java Added Files: FixCourseTimetablingInconsistencies.java RoomCoordinates.java AssignFirstAvailableTimePattern.java MasarykDefaultPreferences.java Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) Index: MakeAssignmentsForClassEvents.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/test/MakeAssignmentsForClassEvents.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MakeAssignmentsForClassEvents.java 17 Jun 2008 21:24:55 -0000 1.5 --- MakeAssignmentsForClassEvents.java 1 Dec 2010 11:10:48 -0000 1.6 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.test; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.test; Index: BatchStudentSectioningTest.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/test/BatchStudentSectioningTest.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** BatchStudentSectioningTest.java 17 Jun 2008 21:24:55 -0000 1.9 --- BatchStudentSectioningTest.java 1 Dec 2010 11:10:48 -0000 1.10 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.test; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.test; *************** *** 92,97 **** solution.addSolutionListener(new SolutionListener() { public void solutionUpdated(Solution solution) {} ! public void getInfo(Solution solution, java.util.Dictionary info) {} ! public void getInfo(Solution solution, java.util.Dictionary info, java.util.Vector variables) {} public void bestCleared(Solution solution) {} public void bestSaved(Solution solution) { --- 92,97 ---- solution.addSolutionListener(new SolutionListener() { public void solutionUpdated(Solution solution) {} ! public void getInfo(Solution solution, java.util.Map info) {} ! public void getInfo(Solution solution, java.util.Map info, java.util.Collection variables) {} public void bestCleared(Solution solution) {} public void bestSaved(Solution solution) { Index: MakeCurriculaFromLastlikeDemands.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/test/MakeCurriculaFromLastlikeDemands.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MakeCurriculaFromLastlikeDemands.java 20 May 2010 14:02:33 -0000 1.3 --- MakeCurriculaFromLastlikeDemands.java 1 Dec 2010 11:10:48 -0000 1.4 *************** *** 1,4 **** --- 1,25 ---- + /* + * UniTime 3.2 (University Timetabling Application) + * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors + * as indicated by the @authors tag. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + * + */ package org.unitime.timetable.test; + import java.text.DecimalFormat; + import java.util.ArrayList; import java.util.HashSet; import java.util.Hashtable; *************** *** 22,29 **** --- 43,53 ---- import org.unitime.timetable.model.CurriculumClassification; import org.unitime.timetable.model.CurriculumCourse; + import org.unitime.timetable.model.CurriculumCourseGroup; + import org.unitime.timetable.model.CurriculumProjectionRule; import org.unitime.timetable.model.Department; import org.unitime.timetable.model.PosMajor; import org.unitime.timetable.model.Session; import org.unitime.timetable.model.dao._RootDAO; + import org.unitime.timetable.util.Constants; public class MakeCurriculaFromLastlikeDemands { *************** *** 32,38 **** private float iShareLimit = 0.00f; private int iEnrlLimit = 1; ! public MakeCurriculaFromLastlikeDemands(Long sessionId, float shareLimit, int enrlLimit) { iSessionId = sessionId; iShareLimit = shareLimit; iEnrlLimit = enrlLimit; --- 56,64 ---- private float iShareLimit = 0.00f; private int iEnrlLimit = 1; + private float iTotalShareLimit = 0.03f; ! public MakeCurriculaFromLastlikeDemands(Long sessionId, float totalShareLimit, float shareLimit, int enrlLimit) { iSessionId = sessionId; + iTotalShareLimit = totalShareLimit; iShareLimit = shareLimit; iEnrlLimit = enrlLimit; *************** *** 41,46 **** public MakeCurriculaFromLastlikeDemands(Long sessionId) { this(sessionId, ! Float.parseFloat(ApplicationProperties.getProperty("tmtbl.curriculum.lldemands.shareLimit", "0.05")), ! Integer.parseInt(ApplicationProperties.getProperty("tmtbl.curriculum.lldemands.enrlLimit", "20"))); } --- 67,73 ---- public MakeCurriculaFromLastlikeDemands(Long sessionId) { this(sessionId, ! Float.parseFloat(ApplicationProperties.getProperty("tmtbl.curriculum.lldemands.totalShareLimit", "0.03")), ! Float.parseFloat(ApplicationProperties.getProperty("tmtbl.curriculum.lldemands.shareLimit", "0.00")), ! Integer.parseInt(ApplicationProperties.getProperty("tmtbl.curriculum.lldemands.enrlLimit", "0"))); } *************** *** 48,52 **** Hashtable<AcademicArea, Hashtable<PosMajor, Hashtable<AcademicClassification, Hashtable<CourseOffering, Set<Long>>>>> curricula = new Hashtable(); List demands = (List)hibSession.createQuery( ! "select a, m, c, d.student.uniqueId from LastLikeCourseDemand d inner join d.student.academicAreaClassifications a inner join d.student.posMajors m, CourseOffering c where "+ "d.subjectArea.session.uniqueId=:sessionId and c.subjectArea=d.subjectArea and "+ "((d.coursePermId=null and c.courseNbr=d.courseNbr) or "+ --- 75,83 ---- Hashtable<AcademicArea, Hashtable<PosMajor, Hashtable<AcademicClassification, Hashtable<CourseOffering, Set<Long>>>>> curricula = new Hashtable(); List demands = (List)hibSession.createQuery( ! "select a2, f2, m2, c, d.student.uniqueId from LastLikeCourseDemand d inner join d.student.academicAreaClassifications a inner join d.student.posMajors m, CourseOffering c," + ! "AcademicArea a2, AcademicClassification f2, PosMajor m2 where "+ ! "a2.session.uniqueId=:sessionId and a2.academicAreaAbbreviation=a.academicArea.academicAreaAbbreviation and "+ ! "f2.session.uniqueId=:sessionId and f2.code=a.academicClassification.code and " + ! "m2.session.uniqueId=:sessionId and m2.code=m.code and " + "d.subjectArea.session.uniqueId=:sessionId and c.subjectArea=d.subjectArea and "+ "((d.coursePermId=null and c.courseNbr=d.courseNbr) or "+ *************** *** 58,69 **** for (Iterator i=demands.iterator();i.hasNext();) { Object o[] = (Object[])i.next(); ! AcademicAreaClassification a = (AcademicAreaClassification)o[0]; ! PosMajor m = (PosMajor)o[1]; ! CourseOffering c = (CourseOffering)o[2]; ! Long s = (Long)o[3]; ! Hashtable<PosMajor, Hashtable<AcademicClassification, Hashtable<CourseOffering, Set<Long>>>> curacad = curricula.get(a.getAcademicArea()); if (curacad==null) { curacad = new Hashtable(); ! curricula.put(a.getAcademicArea(), curacad); } Hashtable<AcademicClassification, Hashtable<CourseOffering, Set<Long>>> clasf = curacad.get(m); --- 89,101 ---- for (Iterator i=demands.iterator();i.hasNext();) { Object o[] = (Object[])i.next(); ! AcademicArea a = (AcademicArea)o[0]; ! AcademicClassification f = (AcademicClassification)o[1]; ! PosMajor m = (PosMajor)o[2]; ! CourseOffering c = (CourseOffering)o[3]; ! Long s = (Long)o[4]; ! Hashtable<PosMajor, Hashtable<AcademicClassification, Hashtable<CourseOffering, Set<Long>>>> curacad = curricula.get(a); if (curacad==null) { curacad = new Hashtable(); ! curricula.put(a, curacad); } Hashtable<AcademicClassification, Hashtable<CourseOffering, Set<Long>>> clasf = curacad.get(m); *************** *** 72,79 **** curacad.put(m, clasf); } ! Hashtable<CourseOffering, Set<Long>> courses = clasf.get(a.getAcademicClassification()); if (courses==null) { courses = new Hashtable(); ! clasf.put(a.getAcademicClassification(), courses); } Set<Long> students = courses.get(c); --- 104,111 ---- curacad.put(m, clasf); } ! Hashtable<CourseOffering, Set<Long>> courses = clasf.get(f); if (courses==null) { courses = new Hashtable(); ! clasf.put(f, courses); } Set<Long> students = courses.get(c); *************** *** 139,254 **** c.setOrd(ord++); } public void update(org.hibernate.Session hibSession, boolean lastLike) { Hashtable<AcademicArea, Hashtable<PosMajor, Hashtable<AcademicClassification, Hashtable<CourseOffering, Set<Long>>>>> curricula = (lastLike ? loadLastLikeCurricula(hibSession) : loadRealCurricula(hibSession)); ! Hashtable<AcademicArea, Hashtable<PosMajor, Curriculum>> remainingCurricula = new Hashtable(); ! for (Iterator i=hibSession. ! createQuery("select c from Curriculum c where c.academicArea!=null and c.department.session=:sessionId"). ! setLong("sessionId", iSessionId).iterate();i.hasNext();) { ! Curriculum c = (Curriculum)i.next(); ! Hashtable<PosMajor, Curriculum> majors = new Hashtable<PosMajor, Curriculum>(); ! for (Iterator<PosMajor> j = c.getMajors().iterator(); j.hasNext();) { ! PosMajor m = j.next(); ! majors.put(m, c); ! } ! remainingCurricula.put(c.getAcademicArea(), majors); ! } for (Map.Entry<AcademicArea, Hashtable<PosMajor, Hashtable<AcademicClassification, Hashtable<CourseOffering, Set<Long>>>>> e1 : curricula.entrySet()) { ! Hashtable<PosMajor, Curriculum> remainingMajors = remainingCurricula.get(e1.getKey()); for (Map.Entry<PosMajor, Hashtable<AcademicClassification, Hashtable<CourseOffering, Set<Long>>>> e2 : e1.getValue().entrySet()) { ! Curriculum curriculum = (remainingMajors == null ? null : remainingMajors.get(e2.getKey())); ! if (curriculum != null && curriculum.getMajors().size() > 1) { ! curriculum.getMajors().remove(e2.getKey()); ! curriculum = null; } ! sLog.info("Updating curriculum "+e1.getKey().getAcademicAreaAbbreviation()+" ("+e1.getKey().getShortTitle()+") - " + e2.getKey().getCode() + " (" + e2.getKey().getName()+ ")"); ! Hashtable<Department,Integer> deptCounter = null; ! Hashtable<AcademicClassification, CurriculumClassification> remainingClassifications = new Hashtable(); ! if (curriculum==null) { ! curriculum = new Curriculum(); ! curriculum.setAcademicArea(e1.getKey()); ! curriculum.setAbbv(e1.getKey().getAcademicAreaAbbreviation() + "-" + e2.getKey().getCode()); ! curriculum.setName(e1.getKey().getShortTitle()==null?e1.getKey().getLongTitle():e1.getKey().getShortTitle() + " - " + e2.getKey().getName()); ! curriculum.setClassifications(new HashSet()); ! curriculum.setMajors(new HashSet()); ! curriculum.getMajors().add(e2.getKey()); ! deptCounter = new Hashtable(); ! } else { ! remainingMajors.remove(e2.getKey()); ! for (Iterator i=curriculum.getClassifications().iterator();i.hasNext();) { ! CurriculumClassification cc = (CurriculumClassification)i.next(); ! remainingClassifications.put(cc.getAcademicClassification(), cc); } } for (Map.Entry<AcademicClassification, Hashtable<CourseOffering, Set<Long>>> e3 : e2.getValue().entrySet()) { ! CurriculumClassification clasf = null; ! for (Iterator i=curriculum.getClassifications().iterator();i.hasNext();) { ! CurriculumClassification cc = (CurriculumClassification)i.next(); ! if (e3.getKey().equals(cc.getAcademicClassification())) { clasf = cc; break; } ! } ! Hashtable<CourseOffering, CurriculumCourse> remainingCourses = new Hashtable(); ! if (clasf==null) { ! clasf = new CurriculumClassification(); ! clasf.setCurriculum(curriculum); curriculum.getClassifications().add(clasf); ! clasf.setAcademicClassification(e3.getKey()); ! clasf.setName(e3.getKey().getCode()); ! clasf.setCourses(new HashSet()); ! } else { ! for (Iterator i=clasf.getCourses().iterator();i.hasNext();) { ! CurriculumCourse c = (CurriculumCourse)i.next(); ! remainingCourses.put(c.getCourse(), c); ! } ! remainingClassifications.remove(clasf.getAcademicClassification()); ! } ! Set<Long> allStudents = new HashSet(); ! for (Set<Long> students : e3.getValue().values()) allStudents.addAll(students); ! sLog.info(" "+e3.getKey().getCode()+" ("+e3.getKey().getName()+") -- "+allStudents.size()+" students"); ! if (clasf.getNrStudents()==null) clasf.setNrStudents(allStudents.size()); ! clasf.setLlStudents(allStudents.size()); for (Map.Entry<CourseOffering, Set<Long>> e4 : e3.getValue().entrySet()) { ! CurriculumCourse course = null; ! for (Iterator i=clasf.getCourses().iterator();i.hasNext();) { ! CurriculumCourse c = (CurriculumCourse)i.next(); ! if (c.getCourse().equals(e4.getKey())) { ! course = c; break; ! } ! } ! float share = ((float)e4.getValue().size())/allStudents.size(); //sLog.info(" "+e3.getKey().getCourseName()+" has "+e3.getValue().size()+" students ("+new DecimalFormat("0.0").format(100.0*share)+"%)"); ! if (course==null) { ! if (share<iShareLimit && e4.getValue().size()<iEnrlLimit) continue; ! course = new CurriculumCourse(); ! course.setClassification(clasf); clasf.getCourses().add(course); ! course.setCourse(e4.getKey()); ! } else { ! remainingCourses.remove(course.getCourse()); ! } ! if (course.getPercShare()==null) course.setPercShare(share); ! course.setLlShare(share); ! if (deptCounter!=null) { ! Integer cx = deptCounter.get(course.getCourse().getDepartment()); ! deptCounter.put(course.getCourse().getDepartment(), new Integer(1+(cx==null?0:cx.intValue()))); ! } } } sortClassifications(curriculum.getClassifications()); for (Iterator i=curriculum.getClassifications().iterator();i.hasNext();) { CurriculumClassification clasf = (CurriculumClassification)i.next(); sortCourses(clasf.getCourses()); } ! if (deptCounter!=null) { ! Department dept = null; int best = 0; ! for (Map.Entry<Department,Integer> e3 : deptCounter.entrySet()) { ! if (dept==null || best<e3.getValue()) { ! dept = e3.getKey(); best = e3.getValue(); ! } } - curriculum.setDepartment(dept); } hibSession.saveOrUpdate(curriculum); } } } --- 171,394 ---- c.setOrd(ord++); } + + private Hashtable<String,Hashtable<String, Float>> getRules(org.hibernate.Session hibSession, Long acadAreaId) { + Hashtable<String,Hashtable<String, Float>> clasf2major2proj = new Hashtable<String, Hashtable<String,Float>>(); + for (CurriculumProjectionRule rule: (List<CurriculumProjectionRule>)hibSession.createQuery( + "select r from CurriculumProjectionRule r where r.academicArea.uniqueId=:acadAreaId") + .setLong("acadAreaId", acadAreaId).setCacheable(true).list()) { + String majorCode = (rule.getMajor() == null ? "" : rule.getMajor().getCode()); + String clasfCode = rule.getAcademicClassification().getCode(); + Float projection = rule.getProjection(); + Hashtable<String, Float> major2proj = clasf2major2proj.get(clasfCode); + if (major2proj == null) { + major2proj = new Hashtable<String, Float>(); + clasf2major2proj.put(clasfCode, major2proj); + } + major2proj.put(majorCode, projection); + } + return clasf2major2proj; + } + + public float getProjection(Hashtable<String,Hashtable<String, Float>> clasf2major2proj, String majorCode, String clasfCode) { + if (clasf2major2proj == null || clasf2major2proj.isEmpty()) return 1.0f; + Hashtable<String, Float> major2proj = clasf2major2proj.get(clasfCode); + if (major2proj == null) return 1.0f; + Float projection = major2proj.get(majorCode); + if (projection == null) + projection = major2proj.get(""); + return (projection == null ? 1.0f : projection); + } public void update(org.hibernate.Session hibSession, boolean lastLike) { + sLog.info("Deleting existing curricula..."); + for (Iterator<Curriculum> i = hibSession.createQuery("select c from Curriculum c where c.department.session=:sessionId"). + setLong("sessionId", iSessionId).list().iterator(); i.hasNext(); ) { + hibSession.delete(i.next()); + } + hibSession.flush(); + + sLog.info("Loading " + (lastLike ? "last-like" : "current") + " student enrollments..."); Hashtable<AcademicArea, Hashtable<PosMajor, Hashtable<AcademicClassification, Hashtable<CourseOffering, Set<Long>>>>> curricula = (lastLike ? loadLastLikeCurricula(hibSession) : loadRealCurricula(hibSession)); ! ! sLog.info("Creating curricula..."); for (Map.Entry<AcademicArea, Hashtable<PosMajor, Hashtable<AcademicClassification, Hashtable<CourseOffering, Set<Long>>>>> e1 : curricula.entrySet()) { ! Hashtable<String,Hashtable<String, Float>> rules = getRules(hibSession, e1.getKey().getUniqueId()); for (Map.Entry<PosMajor, Hashtable<AcademicClassification, Hashtable<CourseOffering, Set<Long>>>> e2 : e1.getValue().entrySet()) { ! if (!e1.getKey().getPosMajors().contains(e2.getKey())) { ! sLog.warn("Academic area " + e1.getKey().getAcademicAreaAbbreviation() + " - " + Constants.toInitialCase(e1.getKey().getLongTitle() == null ? e1.getKey().getShortTitle() : e1.getKey().getLongTitle()) + ! " does not contain major " + e2.getKey().getCode() + " - " + Constants.toInitialCase(e2.getKey().getName())); ! continue; } ! ! sLog.info("Creating curriculum "+e1.getKey().getAcademicAreaAbbreviation()+" ("+e1.getKey().getShortTitle()+") - " + e2.getKey().getCode() + " (" + e2.getKey().getName()+ ")"); ! Hashtable<Department,Integer> deptCounter = new Hashtable<Department, Integer>(); ! ! Curriculum curriculum = new Curriculum(); ! curriculum.setAcademicArea(e1.getKey()); ! curriculum.setAbbv(e1.getKey().getAcademicAreaAbbreviation() + "/" + e2.getKey().getCode()); ! curriculum.setName(Constants.toInitialCase(e1.getKey().getLongTitle() == null ? e1.getKey().getShortTitle() : e1.getKey().getLongTitle()) + " / " + Constants.toInitialCase(e2.getKey().getName())); ! if (curriculum.getName().length() > 60) curriculum.setName(curriculum.getName().substring(0, 60)); ! curriculum.setClassifications(new HashSet()); ! curriculum.setMajors(new HashSet()); ! curriculum.getMajors().add(e2.getKey()); ! ! Hashtable<CourseOffering, Set<Long>> courseStudents = new Hashtable<CourseOffering, Set<Long>>(); ! Set<Long> studentsThisCurricula = new HashSet<Long>(); ! for (Map.Entry<AcademicClassification, Hashtable<CourseOffering, Set<Long>>> e3 : e2.getValue().entrySet()) { ! for (Map.Entry<CourseOffering, Set<Long>> e4 : e3.getValue().entrySet()) { ! studentsThisCurricula.addAll(e4.getValue()); ! Set<Long> studentsThisCourse = courseStudents.get(e4.getKey()); ! if (studentsThisCourse == null) { ! studentsThisCourse = new HashSet<Long>(); ! courseStudents.put(e4.getKey(), studentsThisCourse); ! } ! studentsThisCourse.addAll(e4.getValue()); } } + for (Map.Entry<AcademicClassification, Hashtable<CourseOffering, Set<Long>>> e3 : e2.getValue().entrySet()) { ! ! Set<Long> studentsThisCurriculaClassification = new HashSet(); ! for (Set<Long> students : e3.getValue().values()) studentsThisCurriculaClassification.addAll(students); ! ! sLog.info(" "+e3.getKey().getCode()+" ("+e3.getKey().getName()+") -- "+studentsThisCurriculaClassification.size()+" students"); ! int projNrStudents = Math.round(getProjection(rules, e2.getKey().getCode(), e3.getKey().getCode()) * studentsThisCurriculaClassification.size()); ! if (projNrStudents <= 0) continue; ! ! CurriculumClassification clasf = new CurriculumClassification(); ! clasf.setCurriculum(curriculum); curriculum.getClassifications().add(clasf); ! clasf.setAcademicClassification(e3.getKey()); ! clasf.setName(e3.getKey().getCode()); ! clasf.setCourses(new HashSet()); ! clasf.setNrStudents(projNrStudents); ! for (Map.Entry<CourseOffering, Set<Long>> e4 : e3.getValue().entrySet()) { ! float share = ((float)e4.getValue().size())/studentsThisCurriculaClassification.size(); //sLog.info(" "+e3.getKey().getCourseName()+" has "+e3.getValue().size()+" students ("+new DecimalFormat("0.0").format(100.0*share)+"%)"); ! ! if (share < iShareLimit && e4.getValue().size() < iEnrlLimit) continue; ! ! float totalShare = ((float)courseStudents.get(e4.getKey()).size()) / studentsThisCurricula.size(); ! if (totalShare < iTotalShareLimit) continue; ! ! CurriculumCourse course = new CurriculumCourse(); ! course.setClassification(clasf); clasf.getCourses().add(course); ! course.setCourse(e4.getKey()); ! ! course.setPercShare(share); ! ! Integer cx = deptCounter.get(course.getCourse().getDepartment()); ! deptCounter.put(course.getCourse().getDepartment(), new Integer(courseStudents.get(e4.getKey()).size() + (cx == null ? 0 : cx.intValue()))); } } sortClassifications(curriculum.getClassifications()); + List<CurriculumCourseGroup> createdGroups = new ArrayList<CurriculumCourseGroup>(); + + Hashtable<CourseOffering, Group[]> course2group = new Hashtable<CourseOffering, Group[]>(); + int id = 0; + int totalStudents = 0; + for (Iterator i=curriculum.getClassifications().iterator();i.hasNext();) { CurriculumClassification clasf = (CurriculumClassification)i.next(); sortCourses(clasf.getCourses()); + totalStudents += clasf.getNrStudents(); + + for (Iterator j = clasf.getCourses().iterator(); j.hasNext(); ) { + CurriculumCourse course = (CurriculumCourse)j.next(); + Group[] g = course2group.get(course.getCourse()); + if (g == null) { + g = new Group[] { + new Group(id++, 0 , course, new HashSet<Long>()), + new Group(id++, 1 , course, new HashSet<Long>()) + }; + course2group.put(course.getCourse(), g); + } else { + g[0].getCourses().add(course); + g[1].getCourses().add(course); + } + } } ! ! List<Group> groups = new ArrayList<Group>(); ! for (Group[] g: course2group.values()) { ! CourseOffering course = g[0].getFistCourseOffering(); ! Set<Long> students = courseStudents.get(course); ! double share = 100.0f * students.size() / totalStudents; ! if (students.size() > 5 && share >= 5.0f) { ! g[0].getStudents().addAll(students); ! groups.add(g[0]); ! g[1].getStudents().addAll(students); ! groups.add(g[1]); ! } ! } ! ! boolean shrink; ! do { ! shrink = false; ! Group b1 = null, b2 = null; ! double best = 0.0; ! for (Group g1: groups) { ! for (Group g2: groups) { ! if (g1.getId() <= g2.getId()) continue; ! double share = g1.share(g2); ! if (share > best) { ! b1 = g1; b2 = g2; best = share; ! } ! } ! } ! if (best >= 0.9) { ! sLog.info(" -- merge " + new DecimalFormat("0.00").format(100.0 * best) + " " + b1 + " w " + b2); ! b1.mergeWith(b2); ! groups.remove(b2); ! sLog.info(" result: " + b1); ! shrink = true; ! } else { ! sLog.info(" -- best NOT merge " + new DecimalFormat("0.00").format(100.0 * best) + " " + b1 + " w " + b2); ! } ! } while (shrink); ! ! Hashtable<String, Integer> names = new Hashtable<String, Integer>(); ! for (Group g: groups) { ! if (g.countCourseOfferings() <= 1) continue; ! sLog.info(" -- " + g); ! CurriculumCourseGroup gr = new CurriculumCourseGroup(); ! String clasf = g.getLeadingClassificationName(); ! Integer cnt = names.get((g.isSameStudents() ? "R" : "O") + " " + clasf); ! if (cnt == null) ! cnt = 1; ! else ! cnt ++; ! gr.setName((g.isSameStudents() ? "R" : "O") + " " + clasf + " " + cnt); ! names.put((g.isSameStudents() ? "R" : "O") + " " + clasf, cnt); ! gr.setType(g.getType()); ! gr.setCurriculum(curriculum); ! createdGroups.add(gr); ! for (CurriculumCourse course: g.getCourses()) { ! if (course.getGroups() == null) { ! course.setGroups(new HashSet()); ! } ! course.getGroups().add(gr); ! } ! } ! ! Department dept = null; int best = 0; ! for (Map.Entry<Department,Integer> e3 : deptCounter.entrySet()) { ! if (dept==null || best<e3.getValue()) { ! dept = e3.getKey(); best = e3.getValue(); } } + curriculum.setDepartment(dept); + + if (dept == null) continue; + hibSession.saveOrUpdate(curriculum); + for (CurriculumCourseGroup g: createdGroups) + hibSession.saveOrUpdate(g); } } + hibSession.flush(); + sLog.info("All done."); } *************** *** 276,279 **** --- 416,563 ---- } + public static class Group { + private int iId = 0; + private int iType = 0; + private List<CurriculumCourse> iCourses = new ArrayList<CurriculumCourse>(); + private Set<Long> iStudents = new HashSet<Long>(); + private double iShare = 1.0; + + public Group(int id, int type, CurriculumCourse course, Set<Long> students) { + iId = id; + iType = type; + iStudents.addAll(students); + iCourses.add(course); + } + + public CourseOffering getFistCourseOffering() { + return iCourses.get(0).getCourse(); + } + + protected HashSet<CourseOffering> courses() { + HashSet<CourseOffering> courses = new HashSet<CourseOffering>(); + for (CurriculumCourse c: iCourses) + courses.add(c.getCourse()); + return courses; + } + + public int countCourseOfferings() { + HashSet<CourseOffering> courses = new HashSet<CourseOffering>(); + for (CurriculumCourse c: iCourses) + courses.add(c.getCourse()); + return courses.size(); + } + + protected Hashtable<String, int[]> getClassifications() { + Hashtable<String, int[]> cnt = new Hashtable<String, int[]>(); + for (CurriculumCourse c: iCourses) { + int[] other = cnt.get(c.getClassification().getName()); + cnt.put(c.getClassification().getName(), new int[] { + Math.round(c.getPercShare() * c.getClassification().getNrStudents()) + (other == null ? 0 : other[0]), + c.getClassification().getNrStudents() + (other == null ? 0 : other[1])}); + } + return cnt; + } + + public CurriculumClassification getClassification(String name) { + for (CurriculumCourse c: iCourses) { + if (c.getClassification().getName().equals(name)) return c.getClassification(); + } + return null; + } + + public String getLeadingClassificationName() { + Hashtable<String, int[]> cnt = getClassifications(); + String best = null; + int bestValue = 0; + for (Map.Entry<String, int[]> e: cnt.entrySet()) { + if (e.getValue()[0] > bestValue) { + bestValue = e.getValue()[0]; + best = e.getKey(); + } + } + return best; + } + + public float classificationShare(Group g) { + Hashtable<String, int[]> a = getClassifications(); + Hashtable<String, int[]> b = g.getClassifications(); + int total1 = 0, total2 = 0, share = 0; + for (Map.Entry<String, int[]> e: a.entrySet()) { + float s1 = ((float)e.getValue()[0]) / e.getValue()[1]; + int[] c = b.get(e.getKey()); + float s2 = (c == null ? 0f : ((float)c[0]) / c[1]); + int x1 = Math.round(s1 * getClassification(e.getKey()).getNrStudents()); + int x2 = Math.round(s2 * getClassification(e.getKey()).getNrStudents()); + share += Math.min(x1, x2); + total1 += x1; + } + for (Map.Entry<String, int[]> e: b.entrySet()) { + float s1 = ((float)e.getValue()[0]) / e.getValue()[1]; + int x1 = Math.round(s1 * g.getClassification(e.getKey()).getNrStudents()); + total2 += x1; + } + return ((float)share) / Math.min(total1, total2); + } + + public List<CurriculumCourse> getCourses() { + return iCourses; + } + + public int getId() { + return iId; + } + + public int getType() { + return iType; + } + + public Set<Long> getStudents() { + return iStudents; + } + + public boolean isSameStudents() { + return iType == 1; + } + + public double getShare() { return iShare; } + + public double share(Group g) { + if (g.getType() != getType()) return 0.0; + if (classificationShare(g) < 0.66) return 0.0; + int minStudents = Math.min(getStudents().size(), g.getStudents().size()); + int maxStudents = Math.max(getStudents().size(), g.getStudents().size()); + int shareStudents = 0; + for (Long s: getStudents()) + if (g.getStudents().contains(s)) shareStudents ++; + double share = ((double)shareStudents) / (isSameStudents() ? maxStudents : minStudents); + // return getShare() * g.getShare() * (isSameStudents() ? share : 1.0 - share); + return isSameStudents() ? share : 1.0 - share; + } + + public void mergeWith(Group g) { + int minStudents = Math.min(getStudents().size(), g.getStudents().size()); + int maxStudents = Math.max(getStudents().size(), g.getStudents().size()); + int shareStudents = 0; + for (Long s: getStudents()) + if (g.getStudents().contains(s)) shareStudents ++; + + double share = ((double)shareStudents) / (isSameStudents() ? maxStudents : minStudents); + if (!isSameStudents()) share = 1.0 - share; + + iStudents.addAll(g.getStudents()); + iCourses.addAll(g.getCourses()); + iShare *= share * g.getShare(); + } + + public String toString() { + String courses = ""; + for (CourseOffering c: courses()) { + if (!courses.isEmpty()) courses += " + "; + courses += c.getCourseName(); + } + return (isSameStudents() ? "Req" : "Opt")+ "{" + new DecimalFormat("0.0").format(100.0*iShare) + "/" + iStudents.size() + " " + courses + "}"; + } + } + public static void main(String args[]) { try { *************** *** 300,305 **** Session session = Session.getSessionUsingInitiativeYearTerm( ApplicationProperties.getProperty("initiative", "PWL"), ! ApplicationProperties.getProperty("year","2009"), ! ApplicationProperties.getProperty("term","Fall") ); --- 584,589 ---- Session session = Session.getSessionUsingInitiativeYearTerm( ApplicationProperties.getProperty("initiative", "PWL"), ! ApplicationProperties.getProperty("year","2010"), ! ApplicationProperties.getProperty("term","Spring") ); *************** *** 311,315 **** } ! new MakeCurriculaFromLastlikeDemands(session.getUniqueId()).update(hibSession, false); tx.commit(); --- 595,600 ---- } ! new MakeCurriculaFromLastlikeDemands(session.getUniqueId()).update(hibSession, ! "last-like".equals(ApplicationProperties.getProperty("tmtbl.curriculum.lldemands.students","last-like"))); tx.commit(); Index: ImportPreferences.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/test/ImportPreferences.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ImportPreferences.java 17 Jun 2008 21:24:55 -0000 1.4 --- ImportPreferences.java 1 Dec 2010 11:10:48 -0000 1.5 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.test; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.test; *************** *** 719,723 **** element.attributeValue("itype"), -1, element.attributeValue("suffix")); SchedulingSubpart subpart = (SchedulingSubpart)iAllSubparts.get(subpartHash); - boolean flush = false; if (subpart==null) { subpart = new SchedulingSubpart(); --- 719,722 ---- Index: StudentSectioningTest.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/test/StudentSectioningTest.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** StudentSectioningTest.java 26 Apr 2009 10:45:24 -0000 1.6 --- StudentSectioningTest.java 1 Dec 2010 11:10:48 -0000 1.7 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.test; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.test; *************** *** 26,33 **** import java.util.Comparator; import java.util.Date; ! import java.util.Enumeration; import java.util.HashSet; import java.util.Hashtable; - import java.util.Iterator; import java.util.List; import java.util.Random; --- 26,32 ---- import java.util.Comparator; import java.util.Date; ! import java.util.Iterator; import java.util.HashSet; import java.util.Hashtable; import java.util.List; import java.util.Random; *************** *** 79,82 **** --- 78,82 ---- import org.unitime.timetable.model.StudentClassEnrollment; import org.unitime.timetable.model.StudentEnrollmentMessage; + import org.unitime.timetable.model.StudentSectioningQueue; import org.unitime.timetable.model.WaitList; import org.unitime.timetable.model.comparators.SchedulingSubpartComparator; *************** *** 129,134 **** private static HashSet generateAvailableChoices(Offering offering, Random rnd, double availProb) { HashSet ret = new HashSet(); ! for (Enumeration e=offering.getConfigs().elements();e.hasMoreElements();) { ! Config config = (Config)e.nextElement(); HashSet touchedSubparts = new HashSet(); Vector subparts = new Vector(config.getSubparts()); --- 129,134 ---- private static HashSet generateAvailableChoices(Offering offering, Random rnd, double availProb) { HashSet ret = new HashSet(); ! for (Iterator e=offering.getConfigs().iterator();e.hasNext();) { ! Config config = (Config)e.next(); HashSet touchedSubparts = new HashSet(); Vector subparts = new Vector(config.getSubparts()); *************** *** 151,155 **** } if (!added && subpart.getSections().size()>0) { ! Section section = (Section)subpart.getSections().elementAt((int)rnd.nextDouble()*subpart.getSections().size()); while (section!=null) { ret.add(section.getChoice()); --- 151,155 ---- } if (!added && subpart.getSections().size()>0) { ! Section section = (Section)subpart.getSections().get((int)rnd.nextDouble()*subpart.getSections().size()); while (section!=null) { ret.add(section.getChoice()); *************** *** 173,180 **** } int startSlot = (((Integer.parseInt(startTime)/100)*60 + Integer.parseInt(startTime)%100) - Constants.FIRST_SLOT_TIME_MIN)/Constants.SLOT_LENGTH_MIN; - int breakTime = 0; int nrSlots = 0; if (length!=null) { - breakTime = Integer.parseInt(length) - ((Integer.parseInt(endTime)/100)*60 + Integer.parseInt(endTime)%100) + ((Integer.parseInt(startTime)/100)*60 + Integer.parseInt(startTime)%100); nrSlots = Integer.parseInt(length) / Constants.SLOT_LENGTH_MIN; } else { --- 173,178 ---- *************** *** 272,280 **** } Vector feasibleEnrollments = new Vector(); ! for (Enumeration g=courseRequest.values().elements();g.hasMoreElements();) { ! Enrollment enrl = (Enrollment)g.nextElement(); boolean overlaps = false; ! for (Enumeration h=courseRequest.getStudent().getRequests().elements();h.hasMoreElements();) { ! Request otherRequest = (Request)h.nextElement(); if (otherRequest instanceof CourseRequest) { CourseRequest otherCourseRequest = (CourseRequest)otherRequest; --- 270,278 ---- } Vector feasibleEnrollments = new Vector(); ! for (Iterator g=courseRequest.values().iterator();g.hasNext();) { ! Enrollment enrl = (Enrollment)g.next(); boolean overlaps = false; ! for (Iterator h=courseRequest.getStudent().getRequests().iterator();h.hasNext();) { ! Request otherRequest = (Request)h.next(); if (otherRequest instanceof CourseRequest) { CourseRequest otherCourseRequest = (CourseRequest)otherRequest; *************** *** 291,296 **** } double decrement = courseRequest.getWeight() / feasibleEnrollments.size(); ! for (Enumeration g=feasibleEnrollments.elements();g.hasMoreElements();) { ! Enrollment feasibleEnrollment = (Enrollment)g.nextElement(); for (Iterator i=feasibleEnrollment.getAssignments().iterator();i.hasNext();) { Section section = (Section)i.next(); --- 289,294 ---- } double decrement = courseRequest.getWeight() / feasibleEnrollments.size(); ! for (Iterator g=feasibleEnrollments.iterator();g.hasNext();) { ! Enrollment feasibleEnrollment = (Enrollment)g.next(); for (Iterator i=feasibleEnrollment.getAssignments().iterator();i.hasNext();) { Section section = (Section)i.next(); *************** *** 373,378 **** if (choice.getOffering().getConfigs().size()==configs.size()) return; HashSet depends = new HashSet(); ! for (Enumeration e=choice.getOffering().getConfigs().elements();e.hasMoreElements();) { ! Config config = (Config)e.nextElement(); if (!configs.contains(config)) continue; Subpart subpartThisConfig = null; --- 371,376 ---- if (choice.getOffering().getConfigs().size()==configs.size()) return; HashSet depends = new HashSet(); ! for (Iterator e=choice.getOffering().getConfigs().iterator();e.hasNext();) { ! Config config = (Config)e.next(); if (!configs.contains(config)) continue; Subpart subpartThisConfig = null; *************** *** 387,392 **** if (subpart.compareTo(subpartThisConfig)>=0) continue; if (subpart.getParent()!=null) continue; ! for (Enumeration g=subpart.getSections().elements();g.hasMoreElements();) { ! Section section = (Section)g.nextElement(); if (depends.add(section.getChoice())) { Element depEl = choiceEl.addElement("depends"); --- 385,390 ---- if (subpart.compareTo(subpartThisConfig)>=0) continue; if (subpart.getParent()!=null) continue; ! for (Iterator g=subpart.getSections().iterator();g.hasNext();) { ! Section section = (Section)g.next(); if (depends.add(section.getChoice())) { Element depEl = choiceEl.addElement("depends"); *************** *** 516,521 **** Transaction tx = hibSession.beginTransaction(); try { ! for (Enumeration e=student.getRequests().elements();e.hasMoreElements();) { ! Request request = (Request)e.nextElement(); if (request instanceof CourseRequest) updateSectioningInfos(hibSession, s, (CourseRequest)request); --- 514,519 ---- Transaction tx = hibSession.beginTransaction(); try { ! for (Iterator e=student.getRequests().iterator();e.hasNext();) { ! Request request = (Request)e.next(); if (request instanceof CourseRequest) updateSectioningInfos(hibSession, s, (CourseRequest)request); *************** *** 538,543 **** } hibSession.flush(); ! for (Enumeration e=student.getRequests().elements();e.hasMoreElements();) { ! Request request = (Request)e.nextElement(); CourseDemand cd = null; if (request instanceof FreeTimeRequest) { --- 536,541 ---- } hibSession.flush(); ! for (Iterator e=student.getRequests().iterator();e.hasNext();) { ! Request request = (Request)e.next(); CourseDemand cd = null; if (request instanceof FreeTimeRequest) { *************** *** 571,576 **** Enrollment enrollment = (Enrollment)request.getAssignment(); org.unitime.timetable.model.CourseRequest crq = null; ! for (Enumeration f=courseRequest.getCourses().elements();f.hasMoreElements();ord++) { ! Course course = (Course)f.nextElement(); org.unitime.timetable.model.CourseRequest cr = new org.unitime.timetable.model.CourseRequest(); cr.setOrder(new Integer(ord)); --- 569,574 ---- Enrollment enrollment = (Enrollment)request.getAssignment(); org.unitime.timetable.model.CourseRequest crq = null; ! for (Iterator f=courseRequest.getCourses().iterator();f.hasNext();ord++) { ! Course course = (Course)f.next(); org.unitime.timetable.model.CourseRequest cr = new org.unitime.timetable.model.CourseRequest(); cr.setOrder(new Integer(ord)); *************** *** 615,619 **** WaitList wl = new WaitList(); wl.setStudent(s); ! wl.setCourseOffering(new CourseOfferingDAO().get(new Long(((Course)courseRequest.getCourses().firstElement()).getId()))); wl.setTimestamp(new Date()); wl.setType(new Integer(0)); --- 613,617 ---- WaitList wl = new WaitList(); wl.setStudent(s); ! wl.setCourseOffering(new CourseOfferingDAO().get(new Long(((Course)courseRequest.getCourses().get(0)).getId()))); wl.setTimestamp(new Date()); wl.setType(new Integer(0)); *************** *** 639,644 **** if (cd!=null && messages!=null) { int ord = 0; ! for (Enumeration f=messages.elements();f.hasMoreElements();) { ! StudentSctBBTest.Message message = (StudentSctBBTest.Message)f.nextElement(); if (request.equals(message.getRequest())) { StudentEnrollmentMessage m = new StudentEnrollmentMessage(); --- 637,642 ---- if (cd!=null && messages!=null) { int ord = 0; ! for (Iterator f=messages.iterator();f.hasNext();) { ! StudentSctBBTest.Message message = (StudentSctBBTest.Message)f.next(); if (request.equals(message.getRequest())) { StudentEnrollmentMessage m = new StudentEnrollmentMessage(); *************** *** 655,658 **** --- 653,659 ---- } hibSession.saveOrUpdate(s); + + StudentSectioningQueue.studentChanged(hibSession, s.getSession().getUniqueId(), s.getUniqueId()); + hibSession.flush(); tx.commit(); *************** *** 681,693 **** loadStudent(session, student, messages); sbt = new StudentSctBBTest(student); ! for (Enumeration e=student.getRequests().elements();e.hasMoreElements();) { ! Request request = (Request)e.nextElement(); if (request.getInitialAssignment()!=null) request.assign(0, request.getInitialAssignment()); } ! for (Enumeration e=student.getRequests().elements();e.hasMoreElements();) { ! Request request = (Request)e.nextElement(); if (request instanceof FreeTimeRequest) { ! Enrollment enrollment = (Enrollment)request.values().firstElement(); if (sbt.conflictValues(enrollment).isEmpty()) request.assign(0, enrollment); --- 682,694 ---- loadStudent(session, student, messages); sbt = new StudentSctBBTest(student); ! for (Iterator e=student.getRequests().iterator();e.hasNext();) { ! Request request = (Request)e.next(); if (request.getInitialAssignment()!=null) request.assign(0, request.getInitialAssignment()); } ! for (Iterator e=student.getRequests().iterator();e.hasNext();) { ! Request request = (Request)e.next(); if (request instanceof FreeTimeRequest) { ! Enrollment enrollment = (Enrollment)request.values().get(0); if (sbt.conflictValues(enrollment).isEmpty()) request.assign(0, enrollment); *************** *** 766,771 **** continue; } ! for (Enumeration e=student.getRequests().elements();e.hasMoreElements();) { ! Request request = (Request)e.nextElement(); if (request instanceof CourseRequest) { CourseRequest courseRequest = (CourseRequest)request; --- 767,772 ---- continue; } ! for (Iterator e=student.getRequests().iterator();e.hasNext();) { ! Request request = (Request)e.next(); if (request instanceof CourseRequest) { CourseRequest courseRequest = (CourseRequest)request; *************** *** 819,828 **** ackResponseElement.addAttribute("result", "ok"); Element courseReqResponseElement = studentResponseElement.addElement("courseRequests"); ! for (Enumeration e=messages.elements();e.hasMoreElements();) { ! StudentSctBBTest.Message message = (StudentSctBBTest.Message)e.nextElement(); ackResponseElement.addElement("message").addAttribute("type", message.getLevelString()).setText(message.getMessage()); } ! for (Enumeration e=student.getRequests().elements();e.hasMoreElements();) { ! Request request = (Request)e.nextElement(); Element reqElement = null; if (request instanceof FreeTimeRequest) { --- 820,829 ---- ackResponseElement.addAttribute("result", "ok"); Element courseReqResponseElement = studentResponseElement.addElement("courseRequests"); ! for (Iterator e=messages.iterator();e.hasNext();) { ! StudentSctBBTest.Message message = (StudentSctBBTest.Message)e.next(); ackResponseElement.addElement("message").addAttribute("type", message.getLevelString()).setText(message.getMessage()); } ! for (Iterator e=student.getRequests().iterator();e.hasNext();) { ! Request request = (Request)e.next(); Element reqElement = null; if (request instanceof FreeTimeRequest) { *************** *** 837,842 **** CourseRequest courseRequest = (CourseRequest)request; reqElement = courseReqResponseElement.addElement("courseOffering"); ! for (Enumeration f=courseRequest.getCourses().elements();f.hasMoreElements();) { ! Course course = (Course)f.nextElement(); Element element = (reqElement.attribute("subjectArea")==null?reqElement:reqElement.addElement("alternative")); element.addAttribute("subjectArea", course.getSubjectArea()); --- 838,843 ---- CourseRequest courseRequest = (CourseRequest)request; reqElement = courseReqResponseElement.addElement("courseOffering"); ! for (Iterator f=courseRequest.getCourses().iterator();f.hasNext();) { ! Course course = (Course)f.next(); Element element = (reqElement.attribute("subjectArea")==null?reqElement:reqElement.addElement("alternative")); ... [truncated message content] |
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13954/JavaSource/org/unitime/timetable/solver Modified Files: TimetableSolver.java ClassAssignmentProxy.java EnrollmentCheck.java WebSolver.java SolutionClassAssignmentProxy.java CommitedClassAssignmentProxy.java TimetableDatabaseLoader.java TimetableDatabaseSaver.java CachedClassAssignmentProxy.java SolverProxy.java SolverPassivationThread.java Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) Index: CachedClassAssignmentProxy.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/CachedClassAssignmentProxy.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CachedClassAssignmentProxy.java 17 Jun 2008 21:24:56 -0000 1.2 --- CachedClassAssignmentProxy.java 1 Dec 2010 11:10:51 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.solver; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.solver; Index: WebSolver.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/WebSolver.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** WebSolver.java 7 Jul 2008 21:13:41 -0000 1.13 --- WebSolver.java 1 Dec 2010 11:10:51 -0000 1.14 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.solver; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.solver; *************** *** 23,31 **** import java.io.IOException; import java.text.SimpleDateFormat; ! import java.util.*; import javax.servlet.http.HttpSession; import javax.servlet.jsp.JspWriter; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; --- 23,43 ---- import java.io.IOException; import java.text.SimpleDateFormat; ! import java.util.Date; ! import java.util.HashSet; ! import java.util.Hashtable; ! import java.util.Iterator; ! import java.util.List; ! import java.util.Map; ! import java.util.Set; ! import java.util.StringTokenizer; import javax.servlet.http.HttpSession; import javax.servlet.jsp.JspWriter; + import net.sf.cpsolver.ifs.util.DataProperties; + import net.sf.cpsolver.ifs.util.DistanceMetric; + import net.sf.cpsolver.ifs.util.Progress; + import net.sf.cpsolver.ifs.util.ProgressListener; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; *************** *** 56,63 **** import org.unitime.timetable.util.Constants; - import net.sf.cpsolver.ifs.util.DataProperties; - import net.sf.cpsolver.ifs.util.Progress; - import net.sf.cpsolver.ifs.util.ProgressListener; - /** * @author Tomas Muller --- 68,71 ---- *************** *** 412,415 **** --- 420,425 ---- properties.setProperty("Exam.Type", extraParams.get("Exam.Type").toString()); } + if (properties.getProperty("Distances.Ellipsoid") == null || properties.getProperty("Distances.Ellipsoid").equals("DEFAULT")) + properties.setProperty("Distances.Ellipsoid", ApplicationProperties.getProperty("unitime.distance.ellipsoid", DistanceMetric.Ellipsoid.LEGACY.name())); properties.expand(); return properties; *************** *** 750,754 **** SolverProxy solver = getSolverNoSessionCheck(session); if (solver!=null) { ! if (solver.isRunning()) solver.stopSolver(); solver.dispose(); } --- 760,764 ---- SolverProxy solver = getSolverNoSessionCheck(session); if (solver!=null) { ! solver.interrupt(); solver.dispose(); } *************** *** 760,764 **** ExamSolverProxy solver = getExamSolverNoSessionCheck(session); if (solver!=null) { ! if (solver.isRunning()) solver.stopSolver(); solver.dispose(); } --- 770,774 ---- ExamSolverProxy solver = getExamSolverNoSessionCheck(session); if (solver!=null) { ! solver.interrupt(); solver.dispose(); } *************** *** 770,774 **** StudentSolverProxy solver = getStudentSolverNoSessionCheck(session); if (solver!=null) { ! if (solver.isRunning()) solver.stopSolver(); solver.dispose(); } --- 780,784 ---- StudentSolverProxy solver = getStudentSolverNoSessionCheck(session); if (solver!=null) { ! solver.interrupt(); solver.dispose(); } Index: TimetableDatabaseLoader.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/TimetableDatabaseLoader.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** TimetableDatabaseLoader.java 10 Sep 2010 10:34:09 -0000 1.18 --- TimetableDatabaseLoader.java 1 Dec 2010 11:10:51 -0000 1.19 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * [...3014 lines suppressed...] Calendar c = Calendar.getInstance(Locale.US); *************** *** 3054,3061 **** if (length<=0) continue; TimeLocation timeLocation = new TimeLocation(dayCode, startSlot, length, 0, 0, null, df.format(time.getStartTime()), weekCode, 0); ! Vector timeLocations = new Vector(1); timeLocations.addElement(timeLocation); RoomLocation roomLocation = new RoomLocation(room.getResourceId(), room.getName(), room.getBuildingId(), 0, room.getCapacity(), room.getPosX(), room.getPosY(), room.getIgnoreTooFar(), room); ! Vector roomLocations = new Vector(1); roomLocations.add(roomLocation); Lecture lecture = new Lecture( new Long(--id), null, null, time.getEventName(), --- 3079,3086 ---- if (length<=0) continue; TimeLocation timeLocation = new TimeLocation(dayCode, startSlot, length, 0, 0, null, df.format(time.getStartTime()), weekCode, 0); ! List<TimeLocation> timeLocations = new ArrayList<TimeLocation>(1); timeLocations.add(timeLocation); RoomLocation roomLocation = new RoomLocation(room.getResourceId(), room.getName(), room.getBuildingId(), 0, room.getCapacity(), room.getPosX(), room.getPosY(), room.getIgnoreTooFar(), room); ! List<RoomLocation> roomLocations = new ArrayList<RoomLocation>(1); roomLocations.add(roomLocation); Lecture lecture = new Lecture( new Long(--id), null, null, time.getEventName(), Index: CommitedClassAssignmentProxy.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/CommitedClassAssignmentProxy.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CommitedClassAssignmentProxy.java 17 Jun 2008 21:24:56 -0000 1.2 --- CommitedClassAssignmentProxy.java 1 Dec 2010 11:10:51 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.solver; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.solver; Index: TimetableSolver.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/TimetableSolver.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TimetableSolver.java 27 Jul 2009 14:28:57 -0000 1.6 --- TimetableSolver.java 1 Dec 2010 11:10:51 -0000 1.7 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.solver; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.solver; *************** *** 26,29 **** --- 26,30 ---- import java.io.IOException; import java.io.Serializable; + import java.util.BitSet; import java.util.Collection; import java.util.Collections; *************** *** 33,36 **** --- 34,38 ---- import java.util.Hashtable; import java.util.Iterator; + import java.util.List; import java.util.Map; import java.util.Set; *************** *** 125,133 **** private Map iProgressBeforePassivation = null; private PropertiesInfo iGlobalInfoBeforePassivation = null; ! private Hashtable iCurrentSolutionInfoBeforePassivation = null; ! private Hashtable iBestSolutionInfoBeforePassivation = null; private File iPassivationFolder = null; private String iPassivationPuid = null; ! public static long sInactiveTimeToPassivate = 1800000; public TimetableSolver(DataProperties properties) { --- 127,135 ---- private Map iProgressBeforePassivation = null; private PropertiesInfo iGlobalInfoBeforePassivation = null; ! private Map<String,String> iCurrentSolutionInfoBeforePassivation = null; ! private Map<String,String> iBestSolutionInfoBeforePassivation = null; private File iPassivationFolder = null; private String iPassivationPuid = null; ! private Thread iWorkThread = null; public TimetableSolver(DataProperties properties) { *************** *** 138,144 **** public Date getLoadedDate() { if (iLoadedDate==null && !isPassivated()) { ! Vector log = Progress.getInstance(currentSolution().getModel()).getLog(); if (log!=null && !log.isEmpty()) { ! iLoadedDate = ((Progress.Message)log.firstElement()).getDate(); } } --- 140,146 ---- public Date getLoadedDate() { if (iLoadedDate==null && !isPassivated()) { ! List<Progress.Message> log = Progress.getInstance(currentSolution().getModel()).getLog(); if (log!=null && !log.isEmpty()) { ! iLoadedDate = log.get(0).getDate(); } } *************** *** 146,150 **** } ! public net.sf.cpsolver.ifs.solution.Solution currentSolution() { activateIfNeeded(); return super.currentSolution(); --- 148,152 ---- } ! public net.sf.cpsolver.ifs.solution.Solution<Lecture, Placement> currentSolution() { activateIfNeeded(); return super.currentSolution(); *************** *** 208,212 **** public void finalSectioning() { ! (new FinalSectioning()).start(); } --- 210,215 ---- public void finalSectioning() { ! iWorkThread = new FinalSectioning(); ! iWorkThread.start(); } *************** *** 217,221 **** try { ((TimetableModel)currentSolution().getModel()).switchStudents(); ! //((TimetableModel)currentSolution().getModel()).checkStudentEnrollments(Progress.getInstance(currentSolution().getModel())); } finally { iWorking = false; --- 220,224 ---- try { ((TimetableModel)currentSolution().getModel()).switchStudents(); ! //new EnrollmentCheck((TimetableModel)currentSolution().getModel()).checkStudentEnrollments(Progress.getInstance(currentSolution().getModel())); } finally { iWorking = false; *************** *** 244,248 **** if (currentSolution().getBestInfo()!=null) currentSolution().restoreBest(); ! if (getProperties().getPropertyBoolean("General.SwitchStudents",false)) { ((TimetableModel)currentSolution().getModel()).switchStudents(); currentSolution().saveBest(); --- 247,251 ---- if (currentSolution().getBestInfo()!=null) currentSolution().restoreBest(); ! if (getProperties().getPropertyBoolean("General.SwitchStudents",true)) { ((TimetableModel)currentSolution().getModel()).switchStudents(); currentSolution().saveBest(); *************** *** 285,291 **** TimetableDatabaseSaver saver = new TimetableDatabaseSaver(this); saver.setCallback(getSavingDoneCallback()); ! Thread thread = new Thread(saver); ! thread.setPriority(THREAD_PRIORITY); ! thread.start(); } --- 288,294 ---- TimetableDatabaseSaver saver = new TimetableDatabaseSaver(this); saver.setCallback(getSavingDoneCallback()); ! iWorkThread = new Thread(saver); ! iWorkThread.setPriority(THREAD_PRIORITY); ! iWorkThread.start(); } *************** *** 303,309 **** TimetableDatabaseLoader loader = new TimetableDatabaseLoader(model); loader.setCallback(getLoadingDoneCallback()); ! Thread thread = new Thread(loader); ! thread.setPriority(THREAD_PRIORITY); ! thread.start(); } --- 306,312 ---- TimetableDatabaseLoader loader = new TimetableDatabaseLoader(model); loader.setCallback(getLoadingDoneCallback()); ! iWorkThread = new Thread(loader); ! iWorkThread.setPriority(THREAD_PRIORITY); ! iWorkThread.start(); } *************** *** 325,329 **** TimetableDatabaseLoader loader = new TimetableDatabaseLoader(model); loader.setCallback(callBack); ! (new Thread(loader)).start(); } --- 328,333 ---- TimetableDatabaseLoader loader = new TimetableDatabaseLoader(model); loader.setCallback(callBack); ! iWorkThread = new Thread(loader); ! iWorkThread.start(); } *************** *** 357,362 **** public ReloadingDoneCallback() { iSolutionId = getProperties().getProperty("General.SolutionId"); ! for (Enumeration e=currentSolution().getModel().variables().elements();e.hasMoreElements();) { ! Lecture lecture = (Lecture)e.nextElement(); if (lecture.getAssignment()!=null) iCurrentAssignmentTable.put(lecture.getClassId(),lecture.getAssignment()); --- 361,365 ---- public ReloadingDoneCallback() { iSolutionId = getProperties().getProperty("General.SolutionId"); ! for (Lecture lecture: currentSolution().getModel().variables()) { if (lecture.getAssignment()!=null) iCurrentAssignmentTable.put(lecture.getClassId(),lecture.getAssignment()); *************** *** 368,375 **** } private Lecture getLecture(Long classId) { ! for (Enumeration e=currentSolution().getModel().variables().elements();e.hasMoreElements();) { ! Lecture l = (Lecture)e.nextElement(); ! if (l.getClassId().equals(classId)) ! return l; } return null; --- 371,377 ---- } private Lecture getLecture(Long classId) { ! for (Lecture lecture: currentSolution().getModel().variables()) { ! if (lecture.getClassId().equals(classId)) ! return lecture; } return null; *************** *** 377,382 **** private Placement getPlacement(Lecture lecture, Placement placement) { TimeLocation time = null; ! for (Enumeration f=lecture.timeLocations().elements();f.hasMoreElements();) { ! TimeLocation t = (TimeLocation)f.nextElement(); if (placement.getTimeLocation().equals(t)) { time = t; break; --- 379,383 ---- private Placement getPlacement(Lecture lecture, Placement placement) { TimeLocation time = null; ! for (TimeLocation t: lecture.timeLocations()) { if (placement.getTimeLocation().equals(t)) { time = t; break; *************** *** 388,393 **** } Vector rooms = new Vector(); ! for (Enumeration f=lecture.roomLocations().elements();f.hasMoreElements();) { ! RoomLocation r = (RoomLocation)f.nextElement(); if (placement.isMultiRoom() && placement.getRoomLocations().contains(r)) { rooms.add(r); --- 389,393 ---- } Vector rooms = new Vector(); ! for (RoomLocation r: lecture.roomLocations()) { if (placement.isMultiRoom() && placement.getRoomLocations().contains(r)) { rooms.add(r); *************** *** 404,408 **** } private void assign(Placement placement) { ! Hashtable conflictConstraints = currentSolution().getModel().conflictConstraints(placement); if (conflictConstraints.isEmpty()) { placement.variable().assign(0,placement); --- 404,408 ---- } private void assign(Placement placement) { ! Map<Constraint<Lecture, Placement>, Set<Placement>> conflictConstraints = currentSolution().getModel().conflictConstraints(placement); if (conflictConstraints.isEmpty()) { placement.variable().assign(0,placement); *************** *** 410,415 **** iProgress.warn("Unable to assign "+placement.variable().getName()+" := "+placement.getName()); iProgress.warn(" Reason:"); ! for (Enumeration ex=conflictConstraints.keys();ex.hasMoreElements();) { ! Constraint c = (Constraint)ex.nextElement(); Collection vals = (Collection)conflictConstraints.get(c); for (Iterator j=vals.iterator();j.hasNext();) { --- 410,414 ---- iProgress.warn("Unable to assign "+placement.variable().getName()+" := "+placement.getName()); iProgress.warn(" Reason:"); ! for (Constraint<Lecture, Placement> c: conflictConstraints.keySet()) { Collection vals = (Collection)conflictConstraints.get(c); for (Iterator j=vals.iterator();j.hasNext();) { *************** *** 422,427 **** } private void unassignAll() { ! for (Enumeration e=currentSolution().getModel().variables().elements();e.hasMoreElements();) { ! Lecture lecture = (Lecture)e.nextElement(); if (lecture.getAssignment()!=null) lecture.unassign(0); --- 421,425 ---- } private void unassignAll() { ! for (Lecture lecture: currentSolution().getModel().variables()) { if (lecture.getAssignment()!=null) lecture.unassign(0); *************** *** 502,506 **** public PropertiesInfo getGlobalInfo() { if (isPassivated()) return iGlobalInfoBeforePassivation; ! Hashtable info = null; synchronized (super.currentSolution()) { info = super.currentSolution().getBestInfo(); --- 500,504 ---- public PropertiesInfo getGlobalInfo() { if (isPassivated()) return iGlobalInfoBeforePassivation; ! Map<String,String> info = null; synchronized (super.currentSolution()) { info = super.currentSolution().getBestInfo(); *************** *** 520,525 **** public ConflictStatisticsInfo getCbsInfo() { ConflictStatistics cbs = null; ! for (Enumeration e=getExtensions().elements();e.hasMoreElements();) { ! Extension ext = (Extension)e.nextElement(); if (ext instanceof ConflictStatistics) { cbs = (ConflictStatistics)ext; --- 518,522 ---- public ConflictStatisticsInfo getCbsInfo() { ConflictStatistics cbs = null; ! for (Extension ext: getExtensions()) { if (ext instanceof ConflictStatistics) { cbs = (ConflictStatistics)ext; *************** *** 540,545 **** public ConflictStatisticsInfo getCbsInfo(Long classId) { ConflictStatistics cbs = null; ! for (Enumeration e=getExtensions().elements();e.hasMoreElements();) { ! Extension ext = (Extension)e.nextElement(); if (ext instanceof ConflictStatistics) { cbs = (ConflictStatistics)ext; --- 537,541 ---- public ConflictStatisticsInfo getCbsInfo(Long classId) { ConflictStatistics cbs = null; ! for (Extension ext: getExtensions()) { if (ext instanceof ConflictStatistics) { cbs = (ConflictStatistics)ext; *************** *** 576,598 **** } ! public Vector getTimetableGridTables(String findString, int resourceType, int startDay, int bgMode) { Vector models = new Vector(); synchronized (currentSolution()) { TimetableModel model = (TimetableModel)currentSolution().getModel(); if (resourceType==TimetableGridModel.sResourceTypeRoom) { ! for (Enumeration e=model.getRoomConstraints().elements();e.hasMoreElements();) { ! RoomConstraint rc = (RoomConstraint)e.nextElement(); if (!match(findString, rc.getName())) continue; ! models.add(new SolverGridModel(this,rc,startDay,bgMode)); } } else if (resourceType==TimetableGridModel.sResourceTypeInstructor) { ! for (Enumeration e=model.getInstructorConstraints().elements();e.hasMoreElements();) { ! InstructorConstraint ic = (InstructorConstraint)e.nextElement(); if (!match(findString, ic.getName())) continue; models.add(new SolverGridModel(this,ic,startDay,bgMode)); } } else if (resourceType==TimetableGridModel.sResourceTypeDepartment) { ! for (Enumeration e=model.getDepartmentSpreadConstraints().elements();e.hasMoreElements();) { ! DepartmentSpreadConstraint dc = (DepartmentSpreadConstraint)e.nextElement(); if (!match(findString, dc.getName())) continue; models.add(new SolverGridModel(this,dc,startDay,bgMode)); --- 572,591 ---- } ! public Vector getTimetableGridTables(String findString, int resourceType, int startDay, int bgMode, boolean showEvents) { Vector models = new Vector(); synchronized (currentSolution()) { TimetableModel model = (TimetableModel)currentSolution().getModel(); if (resourceType==TimetableGridModel.sResourceTypeRoom) { ! for (RoomConstraint rc: model.getRoomConstraints()) { if (!match(findString, rc.getName())) continue; ! models.add(new SolverGridModel(this,rc,startDay,bgMode,showEvents)); } } else if (resourceType==TimetableGridModel.sResourceTypeInstructor) { ! for (InstructorConstraint ic: model.getInstructorConstraints()) { if (!match(findString, ic.getName())) continue; models.add(new SolverGridModel(this,ic,startDay,bgMode)); } } else if (resourceType==TimetableGridModel.sResourceTypeDepartment) { ! for (DepartmentSpreadConstraint dc: model.getDepartmentSpreadConstraints()) { if (!match(findString, dc.getName())) continue; models.add(new SolverGridModel(this,dc,startDay,bgMode)); *************** *** 606,611 **** synchronized (currentSolution()) { TimetableModel model = (TimetableModel)currentSolution().getModel(); ! for (Enumeration e=model.variables().elements();e.hasMoreElements();) { ! Lecture lecture = (Lecture)e.nextElement(); if (lecture.getClassId().equals(classId)) return new ClassAssignmentDetails(this,lecture,includeConstraints); --- 599,603 ---- synchronized (currentSolution()) { TimetableModel model = (TimetableModel)currentSolution().getModel(); ! for (Lecture lecture: model.variables()) { if (lecture.getClassId().equals(classId)) return new ClassAssignmentDetails(this,lecture,includeConstraints); *************** *** 636,641 **** synchronized (currentSolution()) { Hashtable initialAssignments = new Hashtable(); ! for (Enumeration e=currentSolution().getModel().assignedVariables().elements();e.hasMoreElements();) { ! Lecture lec = (Lecture)e.nextElement(); initialAssignments.put(lec,lec.getAssignment()); } --- 628,632 ---- synchronized (currentSolution()) { Hashtable initialAssignments = new Hashtable(); ! for (Lecture lec: currentSolution().getModel().assignedVariables()) { initialAssignments.put(lec,lec.getAssignment()); } *************** *** 656,661 **** if (p!=null) p.variable().assign(0,p); } ! for (Enumeration e=currentSolution().getModel().unassignedVariables().elements();e.hasMoreElements();) { ! Lecture lec = (Lecture)e.nextElement(); Placement p = (Placement)initialAssignments.get(lec); if (p!=null) { --- 647,651 ---- if (p!=null) p.variable().assign(0,p); } ! for (Lecture lec: currentSolution().getModel().unassignedVariables()) { Placement p = (Placement)initialAssignments.get(lec); if (p!=null) { *************** *** 677,682 **** Placement p = hint.getPlacement((TimetableModel)currentSolution().getModel()); if (p==null) continue; ! for (Enumeration c=p.variable().hardConstraints().elements(); c.hasMoreElements();) { ! Constraint constraint = (Constraint)c.nextElement(); HashSet conflicts = new HashSet(); constraint.computeConflicts(p, conflicts); --- 667,671 ---- Placement p = hint.getPlacement((TimetableModel)currentSolution().getModel()); if (p==null) continue; ! for (Constraint constraint: p.variable().hardConstraints()) { HashSet conflicts = new HashSet(); constraint.computeConflicts(p, conflicts); *************** *** 712,716 **** } ! public Hashtable currentSolutionInfo() { if (isPassivated()) return iCurrentSolutionInfoBeforePassivation; synchronized (super.currentSolution()) { --- 701,705 ---- } ! public Map<String,String> currentSolutionInfo() { if (isPassivated()) return iCurrentSolutionInfoBeforePassivation; synchronized (super.currentSolution()) { *************** *** 719,723 **** } ! public Hashtable bestSolutionInfo() { if (isPassivated()) return iBestSolutionInfoBeforePassivation; synchronized (super.currentSolution()) { --- 708,712 ---- } ! public Map<String,String> bestSolutionInfo() { if (isPassivated()) return iBestSolutionInfoBeforePassivation; synchronized (super.currentSolution()) { *************** *** 838,843 **** synchronized (currentSolution()) { Lecture lecture = null; ! for (Enumeration e=currentSolution().getModel().variables().elements();e.hasMoreElements();) { ! Lecture l = (Lecture)e.nextElement(); if (l.getClassId().equals(classId)) { lecture = l; break; --- 827,831 ---- synchronized (currentSolution()) { Lecture lecture = null; ! for (Lecture l: currentSolution().getModel().variables()) { if (l.getClassId().equals(classId)) { lecture = l; break; *************** *** 858,863 **** HashSet rooms = new HashSet(); if (placement.isMultiRoom()) { ! for (Enumeration e=placement.getRoomLocations().elements();e.hasMoreElements();) { ! RoomLocation r = (RoomLocation)e.nextElement(); Location room = (new LocationDAO()).get(r.getId()); if (room!=null) rooms.add(room); --- 846,850 ---- HashSet rooms = new HashSet(); if (placement.isMultiRoom()) { ! for (RoomLocation r: placement.getRoomLocations()) { Location room = (new LocationDAO()).get(r.getId()); if (room!=null) rooms.add(room); *************** *** 871,876 **** assignment.setTimePattern(pattern); HashSet instructors = new HashSet(); ! for (Enumeration e=lecture.getInstructorConstraints().elements();e.hasMoreElements();) { ! InstructorConstraint ic = (InstructorConstraint)e.nextElement(); DepartmentalInstructor instructor = null; if (ic.getResourceId()!=null) { --- 858,862 ---- assignment.setTimePattern(pattern); HashSet instructors = new HashSet(); ! for (InstructorConstraint ic: lecture.getInstructorConstraints()) { DepartmentalInstructor instructor = null; if (ic.getResourceId()!=null) { *************** *** 895,900 **** synchronized (currentSolution()) { Lecture lecture = null; ! for (Enumeration e=currentSolution().getModel().variables().elements();e.hasMoreElements();) { ! Lecture l = (Lecture)e.nextElement(); if (l.getClassId().equals(classId)) { lecture = l; break; --- 881,885 ---- synchronized (currentSolution()) { Lecture lecture = null; ! for (Lecture l: currentSolution().getModel().variables()) { if (l.getClassId().equals(classId)) { lecture = l; break; *************** *** 953,958 **** Vector ret = new Vector(); synchronized (currentSolution()) { ! for (Enumeration e=currentSolution().getModel().variables().elements();e.hasMoreElements();) { ! Lecture lecture = (Lecture)e.nextElement(); if (!ToolBox.equals(lecture.getInitialAssignment(),lecture.getAssignment())) { RecordedAssignment a = new RecordedAssignment(this,(Placement)lecture.getInitialAssignment(),(Placement)lecture.getAssignment()); --- 938,942 ---- Vector ret = new Vector(); synchronized (currentSolution()) { ! for (Lecture lecture: currentSolution().getModel().variables()) { if (!ToolBox.equals(lecture.getInitialAssignment(),lecture.getAssignment())) { RecordedAssignment a = new RecordedAssignment(this,(Placement)lecture.getInitialAssignment(),(Placement)lecture.getAssignment()); *************** *** 973,978 **** Vector ret = new Vector(); synchronized (currentSolution()) { ! for (Enumeration e=currentSolution().getModel().assignedVariables().elements();e.hasMoreElements();) { ! Lecture lecture = (Lecture)e.nextElement(); ret.addElement(new ClassAssignmentDetails(this,lecture,false)); } --- 957,961 ---- Vector ret = new Vector(); synchronized (currentSolution()) { ! for (Lecture lecture: currentSolution().getModel().assignedVariables()) { ret.addElement(new ClassAssignmentDetails(this,lecture,false)); } *************** *** 984,989 **** Vector ret = new Vector(); synchronized (currentSolution()) { ! for (Enumeration e=currentSolution().getModel().variables().elements();e.hasMoreElements();) { ! Lecture lecture = (Lecture)e.nextElement(); if (!ToolBox.equals(lecture.getBestAssignment(),lecture.getAssignment())) { RecordedAssignment a = new RecordedAssignment(this,(Placement)lecture.getBestAssignment(),(Placement)lecture.getAssignment()); --- 967,971 ---- Vector ret = new Vector(); synchronized (currentSolution()) { ! for (Lecture lecture: currentSolution().getModel().variables()) { if (!ToolBox.equals(lecture.getBestAssignment(),lecture.getAssignment())) { RecordedAssignment a = new RecordedAssignment(this,(Placement)lecture.getBestAssignment(),(Placement)lecture.getAssignment()); *************** *** 1026,1031 **** Assignment assignment = (Assignment)i.next(); Lecture lecture = null; ! for (Enumeration e=currentSolution().getModel().variables().elements();e.hasMoreElements();) { ! Lecture l = (Lecture)e.nextElement(); if (l.getClassId().equals(assignment.getClassId())) { lecture = l; break; --- 1008,1012 ---- Assignment assignment = (Assignment)i.next(); Lecture lecture = null; ! for (Lecture l: currentSolution().getModel().variables()) { if (l.getClassId().equals(assignment.getClassId())) { lecture = l; break; *************** *** 1046,1051 **** } } ! for (Enumeration e=currentSolution().getModel().variables().elements();e.hasMoreElements();) { ! Lecture lecture = (Lecture)e.nextElement(); if (ids.contains(lecture.getClassId()) || lecture.getAssignment()==null) continue; if (!ownerId.equals(lecture.getSolverGroupId())) continue; --- 1027,1031 ---- } } ! for (Lecture lecture: currentSolution().getModel().variables()) { if (ids.contains(lecture.getClassId()) || lecture.getAssignment()==null) continue; if (!ownerId.equals(lecture.getSolverGroupId())) continue; *************** *** 1156,1162 **** } ! public RoomReport getRoomReport(int startDay, int endDay, int nrWeeks, Long roomType) { synchronized (currentSolution()) { ! return new RoomReport((TimetableModel)currentSolution().getModel(), startDay, endDay, nrWeeks, roomType); } } --- 1136,1142 ---- } ! public RoomReport getRoomReport(BitSet sessionDays, int startDayDayOfWeek, Long roomType) { synchronized (currentSolution()) { ! return new RoomReport((TimetableModel)currentSolution().getModel(), sessionDays, startDayDayOfWeek, roomType); } } *************** *** 1349,1353 **** public synchronized boolean passivateIfNeeded(File folder, String puid) { ! if (isPassivated() || timeFromLastUsed()<sInactiveTimeToPassivate || isWorking()) return false; return passivate(folder, puid); } --- 1329,1334 ---- public synchronized boolean passivateIfNeeded(File folder, String puid) { ! long inactiveTimeToPassivate = Long.parseLong(ApplicationProperties.getProperty("unitime.solver.passivation.time", "30")) * 60000l; ! if (isPassivated() || inactiveTimeToPassivate <= 0 || timeFromLastUsed() < inactiveTimeToPassivate || isWorking()) return false; return passivate(folder, puid); } *************** *** 1378,1382 **** org.unitime.timetable.model.Session session = new SessionDAO().get(sessionId); Long[] solverGroupIds = getProperties().getPropertyLongArry("General.SolverGroupId", new Long[]{}); - //TODO: checked OK, tested OK String name = "pu-"+session.getAcademicTerm()+session.getSessionStartYear(); for (int i=0;i<solverGroupIds.length;i++) { --- 1359,1362 ---- *************** *** 1384,1387 **** --- 1364,1369 ---- name+="-"+sg.getAbbv(); } + if (name.length() > 100) + name = name.substring(0, 97) + "..."; if ("true".equals(ApplicationProperties.getProperty("tmtbl.solver.export.id-conv","true"))) { getProperties().setProperty("Xml.ConvertIds", "true"); *************** *** 1413,1418 **** getProperties().remove("Xml.SaveInitial"); getProperties().remove("Xml.SaveCurrent"); ! getProperties().remove("Xml.ExportStudentSectioning"); ! getProperties().remove("Xml.ShowNames"); getProperties().remove("Xml.IdConv"); } --- 1395,1400 ---- getProperties().remove("Xml.SaveInitial"); getProperties().remove("Xml.SaveCurrent"); ! getProperties().setProperty("Xml.ExportStudentSectioning", "true"); ! getProperties().setProperty("Xml.ShowNames", "true"); getProperties().remove("Xml.IdConv"); } *************** *** 1420,1422 **** --- 1402,1419 ---- } } + + public void interrupt() { + try { + if (iSolverThread != null) { + iStop = true; + if (iSolverThread.isAlive() && !iSolverThread.isInterrupted()) + iSolverThread.interrupt(); + } + if (iWorkThread != null && iWorkThread.isAlive() && !iWorkThread.isInterrupted()) { + iWorkThread.interrupt(); + } + } catch (Exception e) { + sLog.error("Unable to interrupt the solver, reason: " + e.getMessage(), e); + } + } } Index: TimetableDatabaseSaver.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/TimetableDatabaseSaver.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TimetableDatabaseSaver.java 7 Jul 2009 14:45:23 -0000 1.5 --- TimetableDatabaseSaver.java 1 Dec 2010 11:10:51 -0000 1.6 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,24 **** * * 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. */ package org.unitime.timetable.solver; import java.sql.Timestamp; import java.util.Date; import java.util.Enumeration; --- 15,25 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.solver; import java.sql.Timestamp; + import java.util.ArrayList; import java.util.Date; import java.util.Enumeration; *************** *** 26,31 **** import java.util.Hashtable; import java.util.Iterator; import java.util.Map; - import java.util.Vector; import org.apache.commons.logging.Log; --- 27,32 ---- import java.util.Hashtable; import java.util.Iterator; + import java.util.List; import java.util.Map; import org.apache.commons.logging.Log; *************** *** 95,100 **** private boolean iStudentSectioning = false; ! private Hashtable iAssignments = new Hashtable(); ! private Hashtable iSolutions = new Hashtable(); private Progress iProgress = null; --- 96,101 ---- private boolean iStudentSectioning = false; ! private Hashtable<Long, Assignment> iAssignments = new Hashtable<Long, Assignment>(); ! private Hashtable<Long, Solution> iSolutions = new Hashtable<Long, Solution>(); private Progress iProgress = null; *************** *** 164,172 **** for (int i=0;i<solutionIds.length;i++) { Solution solution = (new SolutionDAO()).get(solutionIds[i]); ! Vector messages = new Vector(); solution.commitSolution(messages,hibSession, getModel().getProperties().getProperty("General.OwnerPuid")); touchedSolutions.add(solution); ! for (Enumeration e=messages.elements();e.hasMoreElements();) { ! iProgress.error("Unable to commit: "+e.nextElement()); } hibSession.update(solution); --- 165,173 ---- for (int i=0;i<solutionIds.length;i++) { Solution solution = (new SolutionDAO()).get(solutionIds[i]); ! List<String> messages = new ArrayList<String>(); solution.commitSolution(messages,hibSession, getModel().getProperties().getProperty("General.OwnerPuid")); touchedSolutions.add(solution); ! for (String m: messages) { ! iProgress.error("Unable to commit: "+m); } hibSession.update(solution); *************** *** 337,344 **** iProgress.setPhase("Saving assignments ...", getModel().variables().size()); ! HashSet assignments = new HashSet(); ! for (Enumeration e1=getModel().variables().elements();e1.hasMoreElements();) { ! Lecture lecture = (Lecture)e1.nextElement(); ! Placement placement = (Placement)lecture.getAssignment(); if (placement!=null) { iProgress.trace("save "+lecture.getName()+" "+placement.getName()); --- 338,343 ---- iProgress.setPhase("Saving assignments ...", getModel().variables().size()); ! for (Lecture lecture: getModel().variables()) { ! Placement placement = lecture.getAssignment(); if (placement!=null) { iProgress.trace("save "+lecture.getName()+" "+placement.getName()); *************** *** 350,355 **** HashSet rooms = new HashSet(); if (placement.isMultiRoom()) { ! for (Enumeration e=placement.getRoomLocations().elements();e.hasMoreElements();) { ! RoomLocation r = (RoomLocation)e.nextElement(); Location room = (new LocationDAO()).get(r.getId(), hibSession); if (room==null) { --- 349,353 ---- HashSet rooms = new HashSet(); if (placement.isMultiRoom()) { ! for (RoomLocation r: placement.getRoomLocations()) { Location room = (new LocationDAO()).get(r.getId(), hibSession); if (room==null) { *************** *** 371,376 **** HashSet instructors = new HashSet(); ! for (Enumeration e=lecture.getInstructorConstraints().elements();e.hasMoreElements();) { ! InstructorConstraint ic = (InstructorConstraint)e.nextElement(); DepartmentalInstructor instructor = null; if (ic.getPuid()!=null && ic.getPuid().length()>0) { --- 369,373 ---- HashSet instructors = new HashSet(); ! for (InstructorConstraint ic: lecture.getInstructorConstraints()) { DepartmentalInstructor instructor = null; if (ic.getPuid()!=null && ic.getPuid().length()>0) { *************** *** 413,445 **** hibSession.flush(); hibSession.clear(); batchIdx = 0; ! iProgress.setPhase("Saving student enrollments ...", getModel().variables().size()); ! for (Enumeration e1=getModel().variables().elements();e1.hasMoreElements();) { ! Lecture lecture = (Lecture)e1.nextElement(); ! Class_ clazz = (new Class_DAO()).get(lecture.getClassId(),hibSession); ! if (clazz==null) continue; ! iProgress.trace("save "+lecture.getName()); ! Solution solution = getSolution(lecture, hibSession); ! if (solution==null) { ! iProgress.warn("Unable to save student enrollments for class "+lecture+" -- none or wrong solution group assigned to the class"); ! continue; ! } ! ! for (Iterator i2=lecture.students().iterator();i2.hasNext();) { ! Student student = (Student)i2.next(); ! StudentEnrollment enrl = new StudentEnrollment(); ! enrl.setStudentId(student.getId()); ! enrl.setClazz(clazz); ! enrl.setSolution(solution); ! hibSession.save(enrl); ! if (++batchIdx % BATCH_SIZE == 0) { ! hibSession.flush(); hibSession.clear(); } ! } ! ! iProgress.incProgress(); } - hibSession.flush(); hibSession.clear(); batchIdx = 0; - /** // is this needed? iProgress.setPhase("Saving joint enrollments ...", getModel().getJenrlConstraints().size()); --- 410,443 ---- hibSession.flush(); hibSession.clear(); batchIdx = 0; ! if (getModel().getProperties().getPropertyBoolean("General.SaveStudentEnrollments", true)) { ! iProgress.setPhase("Saving student enrollments ...", getModel().variables().size()); ! for (Lecture lecture: getModel().variables()) { ! Class_ clazz = (new Class_DAO()).get(lecture.getClassId(),hibSession); ! if (clazz==null) continue; ! iProgress.trace("save "+lecture.getName()); ! Solution solution = getSolution(lecture, hibSession); ! if (solution==null) { ! iProgress.warn("Unable to save student enrollments for class "+lecture+" -- none or wrong solution group assigned to the class"); ! continue; } ! ! for (Iterator i2=lecture.students().iterator();i2.hasNext();) { ! Student student = (Student)i2.next(); ! StudentEnrollment enrl = new StudentEnrollment(); ! enrl.setStudentId(student.getId()); ! enrl.setClazz(clazz); ! enrl.setSolution(solution); ! hibSession.save(enrl); ! if (++batchIdx % BATCH_SIZE == 0) { ! hibSession.flush(); hibSession.clear(); ! } ! } ! ! iProgress.incProgress(); ! } ! ! hibSession.flush(); hibSession.clear(); batchIdx = 0; } /** // is this needed? iProgress.setPhase("Saving joint enrollments ...", getModel().getJenrlConstraints().size()); *************** *** 483,497 **** iProgress.warn("Back-to-back instructor info is not registered."); ! Hashtable lectures4solution = new Hashtable(); ! for (Enumeration e=getModel().variables().elements();e.hasMoreElements();) { ! Lecture lecture = (Lecture)e.nextElement(); Solution s = getSolution(lecture, hibSession); if (s==null) continue; ! Vector lectures = (Vector)lectures4solution.get(s); if (lectures==null) { ! lectures = new Vector(); lectures4solution.put(s, lectures); } ! lectures.addElement(lecture); } --- 481,494 ---- iProgress.warn("Back-to-back instructor info is not registered."); ! Hashtable<Solution, List<Lecture>> lectures4solution = new Hashtable<Solution, List<Lecture>>(); ! for (Lecture lecture: getModel().variables()) { Solution s = getSolution(lecture, hibSession); if (s==null) continue; ! List<Lecture> lectures = lectures4solution.get(s); if (lectures==null) { ! lectures = new ArrayList<Lecture>(); lectures4solution.put(s, lectures); } ! lectures.add(lecture); } *************** *** 500,505 **** SolverGroup solverGroup = (SolverGroup)e.nextElement(); Solution solution = (Solution)iSolutions.get(solverGroup.getUniqueId()); ! Vector lectures = (Vector)lectures4solution.get(solution); ! if (lectures==null) lectures = new Vector(0); SolutionInfo solutionInfo = new SolutionInfo(); solutionInfo.setDefinition(defGlobalInfo); --- 497,502 ---- SolverGroup solverGroup = (SolverGroup)e.nextElement(); Solution solution = (Solution)iSolutions.get(solverGroup.getUniqueId()); ! List<Lecture> lectures = lectures4solution.get(solution); ! if (lectures==null) lectures = new ArrayList<Lecture>(0); SolutionInfo solutionInfo = new SolutionInfo(); solutionInfo.setDefinition(defGlobalInfo); *************** *** 515,520 **** ConflictStatistics cbs = null; ! for (Iterator i=getSolver().getExtensions().iterator();i.hasNext();) { ! Extension ext = (Extension)i.next(); if (ext instanceof ConflictStatistics) { cbs = (ConflictStatistics)ext; break; --- 512,516 ---- ConflictStatistics cbs = null; ! for (Extension ext: getSolver().getExtensions()) { if (ext instanceof ConflictStatistics) { cbs = (ConflictStatistics)ext; break; *************** *** 527,532 **** for (Enumeration e=iSolutions.elements();e.hasMoreElements();) { Solution solution = (Solution)e.nextElement(); ! Vector lectures = (Vector)lectures4solution.get(solution); ! if (lectures==null) lectures = new Vector(0); SolutionInfo cbsSolutionInfo = new SolutionInfo(); cbsSolutionInfo.setDefinition(defCbsInfo); --- 523,528 ---- for (Enumeration e=iSolutions.elements();e.hasMoreElements();) { Solution solution = (Solution)e.nextElement(); ! List<Lecture> lectures = lectures4solution.get(solution); ! if (lectures==null) lectures = new ArrayList<Lecture>(0); SolutionInfo cbsSolutionInfo = new SolutionInfo(); cbsSolutionInfo.setDefinition(defCbsInfo); *************** *** 545,551 **** iProgress.setPhase("Saving variable infos ...", getModel().variables().size()); ! for (Enumeration e1=getModel().variables().elements();e1.hasMoreElements();) { ! Lecture lecture = (Lecture)e1.nextElement(); ! Placement placement = (Placement)lecture.getAssignment(); if (placement!=null) { Assignment assignment = (Assignment)iAssignments.get(lecture.getClassId()); --- 541,546 ---- iProgress.setPhase("Saving variable infos ...", getModel().variables().size()); ! for (Lecture lecture: getModel().variables()) { ! Placement placement = lecture.getAssignment(); if (placement!=null) { Assignment assignment = (Assignment)iAssignments.get(lecture.getClassId()); *************** *** 566,577 **** iProgress.setPhase("Saving btb instructor infos ...", getModel().variables().size()); ! for (Enumeration e1=getModel().assignedVariables().elements();e1.hasMoreElements();) { ! Lecture lecture1 = (Lecture)e1.nextElement(); Placement placement1 = (Placement)lecture1.getAssignment(); iProgress.incProgress(); ! for (Enumeration e2=lecture1.getInstructorConstraints().elements();e2.hasMoreElements();) { ! InstructorConstraint ic = (InstructorConstraint)e2.nextElement(); ! for (Enumeration e3=ic.assignedVariables().elements();e3.hasMoreElements();) { ! Lecture lecture2 = (Lecture)e3.nextElement(); Placement placement2 = (Placement)lecture2.getAssignment(); if (lecture2.getClassId().compareTo(lecture1.getClassId())<=0) continue; --- 561,569 ---- iProgress.setPhase("Saving btb instructor infos ...", getModel().variables().size()); ! for (Lecture lecture1: getModel().assignedVariables()) { Placement placement1 = (Placement)lecture1.getAssignment(); iProgress.incProgress(); ! for (InstructorConstraint ic: lecture1.getInstructorConstraints()) { ! for (Lecture lecture2: ic.assignedVariables()) { Placement placement2 = (Placement)lecture2.getAssignment(); if (lecture2.getClassId().compareTo(lecture1.getClassId())<=0) continue; *************** *** 609,614 **** iProgress.setPhase("Saving group constraint infos ...", getModel().getGroupConstraints().size()); ! for (Enumeration e1=getModel().getGroupConstraints().elements();e1.hasMoreElements();) { ! GroupConstraint gc = (GroupConstraint)e1.nextElement(); GroupConstraintInfo gcInfo = new GroupConstraintInfo(gc); ConstraintInfo constraintInfo = new ConstraintInfo(); --- 601,605 ---- iProgress.setPhase("Saving group constraint infos ...", getModel().getGroupConstraints().size()); ! for (GroupConstraint gc: getModel().getGroupConstraints()) { GroupConstraintInfo gcInfo = new GroupConstraintInfo(gc); ConstraintInfo constraintInfo = new ConstraintInfo(); *************** *** 617,622 **** iProgress.trace("Distribution constraint "+gcInfo.getName()+" (p:"+gcInfo.getPreference()+", s:"+gcInfo.isSatisfied()+") between"); HashSet gcAssignments = new HashSet(); ! for (Enumeration e2=gc.variables().elements();e2.hasMoreElements();) { ! Lecture lecture = (Lecture)e2.nextElement(); Assignment assignment = (Assignment)iAssignments.get(lecture.getClassId()); iProgress.trace(" "+lecture.getAssignment()); --- 608,612 ---- iProgress.trace("Distribution constraint "+gcInfo.getName()+" (p:"+gcInfo.getPreference()+", s:"+gcInfo.isSatisfied()+") between"); HashSet gcAssignments = new HashSet(); ! for (Lecture lecture: gc.variables()) { Assignment assignment = (Assignment)iAssignments.get(lecture.getClassId()); iProgress.trace(" "+lecture.getAssignment()); *************** *** 642,647 **** iProgress.setPhase("Saving student enrollment infos ...", getModel().getJenrlConstraints().size()); ! for (Enumeration e1=getModel().getJenrlConstraints().elements();e1.hasMoreElements();) { ! JenrlConstraint jc = (JenrlConstraint)e1.nextElement(); if (!jc.isInConflict() || !jc.isOfTheSameProblem()) { iProgress.incProgress(); --- 632,636 ---- iProgress.setPhase("Saving student enrollment infos ...", getModel().getJenrlConstraints().size()); ! for (JenrlConstraint jc: getModel().getJenrlConstraints()) { if (!jc.isInConflict() || !jc.isOfTheSameProblem()) { iProgress.incProgress(); Index: ClassAssignmentProxy.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/ClassAssignmentProxy.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ClassAssignmentProxy.java 17 Jun 2008 21:24:56 -0000 1.2 --- ClassAssignmentProxy.java 1 Dec 2010 11:10:51 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.solver; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.solver; Index: SolverPassivationThread.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/SolverPassivationThread.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SolverPassivationThread.java 7 Jul 2008 21:13:41 -0000 1.6 --- SolverPassivationThread.java 1 Dec 2010 11:10:51 -0000 1.7 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Ap... [truncated message content] |
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13954/JavaSource/org/unitime/timetable/tags Modified Files: HasFinalExams.java CanSeeExams.java HasProperty.java Wiki.java MarkBack.java PropertyNotEquals.java PreferenceLegend.java PropertyEquals.java Property.java NotHasFinalExams.java LastChange.java SectionHeader.java NotHasProperty.java BackButton.java NotHasMidtermExams.java HasMidtermExams.java WikiHelp.java Confirm.java BackTree.java Exams.java HasBack.java SessionsTag.java SectionTitle.java SolverWarnings.java Added Files: Copyright.java GwtBack.java Registration.java Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) Index: SessionsTag.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags/SessionsTag.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SessionsTag.java 17 Jun 2008 21:24:57 -0000 1.2 --- SessionsTag.java 1 Dec 2010 11:10:49 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.tags; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.tags; *************** *** 43,46 **** --- 43,48 ---- public class SessionsTag extends TagSupport { + private static final long serialVersionUID = 1332135385302161770L; + /** * Default method to handle start of tag. Index: PropertyNotEquals.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags/PropertyNotEquals.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PropertyNotEquals.java 17 Jun 2008 21:24:57 -0000 1.2 --- PropertyNotEquals.java 1 Dec 2010 11:10:49 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.tags; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.tags; *************** *** 22,27 **** import net.sf.cpsolver.ifs.util.ToolBox; - import org.unitime.timetable.ApplicationProperties; - /** --- 22,25 ---- *************** *** 30,36 **** public class PropertyNotEquals extends PropertyEquals { public int doStartTag() { try { ! String value = ApplicationProperties.getProperty(getName()); if (!ToolBox.equals(value,getValue())) return EVAL_BODY_INCLUDE; } catch (Exception e) {} --- 28,36 ---- public class PropertyNotEquals extends PropertyEquals { + private static final long serialVersionUID = 9199601881914077244L; + public int doStartTag() { try { ! String value = getProperty(); if (!ToolBox.equals(value,getValue())) return EVAL_BODY_INCLUDE; } catch (Exception e) {} Index: MarkBack.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags/MarkBack.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MarkBack.java 17 Jun 2008 21:24:57 -0000 1.2 --- MarkBack.java 1 Dec 2010 11:10:49 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.tags; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.tags; *************** *** 31,34 **** --- 31,35 ---- */ public class MarkBack extends TagSupport { + private static final long serialVersionUID = 6247051046382946227L; boolean iBack = true; boolean iClear = false; Index: PreferenceLegend.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags/PreferenceLegend.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PreferenceLegend.java 17 Jun 2008 21:24:57 -0000 1.4 --- PreferenceLegend.java 1 Dec 2010 11:10:49 -0000 1.5 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.tags; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.tags; *************** *** 37,40 **** --- 37,41 ---- */ public class PreferenceLegend extends TagSupport { + private static final long serialVersionUID = -8994474921509928721L; private boolean iNotAvailable = false; private boolean iPrefs = true; *************** *** 73,77 **** if ("none".equals(iSeparator)) border = null; ! StringBuffer html = new StringBuffer(border==null?"":"<table width='99%' cellspacing='1' cellpadding='1' border='0' style='"+border+"'><tr><td align='center'>"); html.append("<table cellspacing='1' cellpadding='1' border='0'><tr>"); --- 74,78 ---- if ("none".equals(iSeparator)) border = null; ! StringBuffer html = new StringBuffer(border==null?"":"<table width='100%' cellspacing='1' cellpadding='1' border='0' style='"+border+"'><tr><td align='center'>"); html.append("<table cellspacing='1' cellpadding='1' border='0'><tr>"); *************** *** 85,91 **** for (Iterator i=prefLevels.iterator();i.hasNext();) { PreferenceLevel pl = (PreferenceLevel)i.next(); - String color = pl.prefcolor(); html.append( - //"<td width='20' height='20' style='border:rgb(0,0,0) 1px solid;background-color:" + color + "'> </td>" "<td style='font-size: 80%;'>"+ "<img border='0' align='absmiddle' src='"+imgFolder+"pref"+pl.getUniqueId()+".png'>"+ --- 86,90 ---- Index: NotHasFinalExams.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags/NotHasFinalExams.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NotHasFinalExams.java 17 Jun 2008 21:24:57 -0000 1.2 --- NotHasFinalExams.java 1 Dec 2010 11:10:49 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.tags; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.tags; *************** *** 24,29 **** */ public class NotHasFinalExams extends HasFinalExams { ! ! public boolean includeContent() { return !super.includeContent(); } --- 24,30 ---- */ public class NotHasFinalExams extends HasFinalExams { ! private static final long serialVersionUID = -2174357305005491725L; ! ! public boolean includeContent() { return !super.includeContent(); } Index: SectionTitle.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags/SectionTitle.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SectionTitle.java 17 Jun 2008 21:24:57 -0000 1.2 --- SectionTitle.java 1 Dec 2010 11:10:49 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.tags; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.tags; *************** *** 29,32 **** --- 29,34 ---- public class SectionTitle extends BodyTagSupport { + private static final long serialVersionUID = 2869346521706583988L; + public int doStartTag() throws JspException { return EVAL_BODY_BUFFERED; Index: SectionHeader.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags/SectionHeader.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SectionHeader.java 17 Jun 2008 21:24:57 -0000 1.2 --- SectionHeader.java 1 Dec 2010 11:10:49 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.tags; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.tags; *************** *** 28,33 **** */ public class SectionHeader extends BodyTagSupport { ! private int iState = 0; private String iTitle = null; public String getTitle() { return iTitle; } public void setTitle(String title) { iTitle = title; } --- 28,35 ---- */ public class SectionHeader extends BodyTagSupport { ! ! private static final long serialVersionUID = 7960410331965348148L; private String iTitle = null; + public String getTitle() { return iTitle; } public void setTitle(String title) { iTitle = title; } Index: Wiki.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags/Wiki.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Wiki.java 17 Jun 2008 21:24:57 -0000 1.2 --- Wiki.java 1 Dec 2010 11:10:49 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.tags; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.tags; *************** *** 32,36 **** */ public class Wiki extends BodyTagSupport { ! private String iWikiUrl = null; private boolean iEnabled = false; --- 32,37 ---- */ public class Wiki extends BodyTagSupport { ! private static final long serialVersionUID = 1018397983833478965L; ! private String iWikiUrl = null; private boolean iEnabled = false; *************** *** 72,76 **** html.append("<img border='0' align='top' src='"+img+"' alt='"+pageName.trim()+" Help' " + "onMouseOver=\"this.style.cursor='hand';this.style.cursor='pointer';\" " + ! "onClick=\"var w = window.open('"+url+"','wikiHelp','width=1000,height=600,resizable=yes,scrollbars=yes,toolbar=yes,location=yes,directories=no,status=yes,menubar=no,copyhistory=no'); w.focus();\" " + "title='"+pageName.trim()+" Help'>"); } --- 73,77 ---- html.append("<img border='0' align='top' src='"+img+"' alt='"+pageName.trim()+" Help' " + "onMouseOver=\"this.style.cursor='hand';this.style.cursor='pointer';\" " + ! "onClick=\"showGwtDialog('" + pageName.trim() + " Help', '" + url +"', '75%', '75%');\" " + "title='"+pageName.trim()+" Help'>"); } --- NEW FILE: Copyright.java --- /* * UniTime 3.2 (University Timetabling Application) * Copyright (C) 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 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, see <http://www.gnu.org/licenses/>. */ package org.unitime.timetable.tags; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.BodyTagSupport; import org.unitime.commons.Debug; public class Copyright extends BodyTagSupport { private static final long serialVersionUID = -4463420165596054395L; private boolean iBr = true; public void setBr(boolean br) { iBr = br; } public boolean isBr() { return iBr; } public int doStartTag() throws JspException { return EVAL_BODY_BUFFERED; } public int doEndTag() throws JspException { // WARNING: Changing or removing the following copyright notice will violate the license terms. // If you need a different licensing, please contact us at su...@un... String body = "<a class='unitime-FooterLink' href='http://www.unitime.org'>© 2008 - 2010 UniTime LLC</a>," + (isBr() ? "<br>" : " ") + "<a class='unitime-FooterLink' href='http://www.unitime.org/uct_license.php'>distributed under GNU General Public License.</a>"; try { pageContext.getOut().print(body); } catch (Exception e) { Debug.error("Could not display copyright notice: " + e.getMessage()); } return EVAL_PAGE; } } Index: BackButton.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags/BackButton.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BackButton.java 17 Jun 2008 21:24:57 -0000 1.2 --- BackButton.java 1 Dec 2010 11:10:49 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.tags; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.tags; *************** *** 32,35 **** --- 32,36 ---- */ public class BackButton extends BodyTagSupport { + private static final long serialVersionUID = 8565058511853635478L; String iTitle = "Return to %%"; String iName = "Back"; Index: BackTree.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags/BackTree.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BackTree.java 17 Jun 2008 21:24:57 -0000 1.2 --- BackTree.java 1 Dec 2010 11:10:49 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.tags; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.tags; *************** *** 32,36 **** */ public class BackTree extends TagSupport { ! public int doStartTag() throws JspException { try { --- 32,37 ---- */ public class BackTree extends TagSupport { ! private static final long serialVersionUID = 8379761508090477729L; ! public int doStartTag() throws JspException { try { Index: Confirm.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags/Confirm.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Confirm.java 17 Jun 2008 21:24:57 -0000 1.2 --- Confirm.java 1 Dec 2010 11:10:49 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.tags; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.tags; *************** *** 31,35 **** */ public class Confirm extends BodyTagSupport { ! private String iName = null; public String getName() { return iName; } --- 31,36 ---- */ public class Confirm extends BodyTagSupport { ! private static final long serialVersionUID = -7277573383061072409L; ! private String iName = null; public String getName() { return iName; } --- NEW FILE: GwtBack.java --- /* * UniTime 3.2 (University Timetabling Application) * Copyright (C) 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 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, see <http://www.gnu.org/licenses/>. * */ package org.unitime.timetable.tags; import javax.servlet.http.HttpServletRequest; import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspTagException; import javax.servlet.jsp.tagext.BodyTagSupport; import org.unitime.timetable.webutil.BackTracker; /** * @author Tomas Muller */ public class GwtBack extends BodyTagSupport { private static final long serialVersionUID = 2328664801804591253L; int iBack = 2; public int getBack() { return iBack; } public void setBack(int back) { iBack = back; } public int doStartTag() throws JspException { return EVAL_BODY_BUFFERED; } public int doEndTag() throws JspException { try { pageContext.getOut().print( BackTracker.getGwtBack((HttpServletRequest)pageContext.getRequest(),getBack()) ); } catch (Exception e) { throw new JspTagException(e.getMessage()); } return EVAL_PAGE; } } Index: WikiHelp.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags/WikiHelp.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WikiHelp.java 17 Jun 2008 21:24:57 -0000 1.2 --- WikiHelp.java 1 Dec 2010 11:10:49 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.tags; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.tags; *************** *** 31,35 **** */ public class WikiHelp extends BodyTagSupport { ! private String iWikiUrl = null; private boolean iEnabled = false; --- 31,36 ---- */ public class WikiHelp extends BodyTagSupport { ! private static final long serialVersionUID = -8159352006636444479L; ! private String iWikiUrl = null; private boolean iEnabled = false; *************** *** 70,74 **** html.append("<a "+ "onMouseOver=\"this.style.cursor='hand';this.style.cursor='pointer';\" " + ! "onClick=\"var w = window.open('"+url+"','wikiHelp','width=1000,height=600,resizable=yes,scrollbars=yes,toolbar=yes,location=yes,directories=no,status=yes,menubar=no,copyhistory=no'); w.focus();\" " + "title='"+pageName.trim()+" Help'>"); html.append("<span class='PageTitle'>"); --- 71,75 ---- html.append("<a "+ "onMouseOver=\"this.style.cursor='hand';this.style.cursor='pointer';\" " + ! "onClick=\"showGwtDialog('" + pageName.trim() + " Help', '" + url +"', '75%', '75%');\" " + "title='"+pageName.trim()+" Help'>"); html.append("<span class='PageTitle'>"); Index: NotHasMidtermExams.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags/NotHasMidtermExams.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NotHasMidtermExams.java 17 Jun 2008 21:24:57 -0000 1.2 --- NotHasMidtermExams.java 1 Dec 2010 11:10:49 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.tags; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.tags; *************** *** 24,29 **** */ public class NotHasMidtermExams extends HasMidtermExams { ! ! public boolean includeContent() { return !super.includeContent(); } --- 24,30 ---- */ public class NotHasMidtermExams extends HasMidtermExams { ! private static final long serialVersionUID = -4036131865648594129L; ! ! public boolean includeContent() { return !super.includeContent(); } Index: CanSeeExams.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags/CanSeeExams.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CanSeeExams.java 17 Jun 2008 21:24:57 -0000 1.3 --- CanSeeExams.java 1 Dec 2010 11:10:49 -0000 1.4 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.tags; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.tags; *************** *** 32,37 **** */ public class CanSeeExams extends TagSupport { ! ! public int doStartTag() { try { User user = Web.getUser(pageContext.getSession()); --- 32,38 ---- */ public class CanSeeExams extends TagSupport { ! private static final long serialVersionUID = -660964063270276723L; ! ! public int doStartTag() { try { User user = Web.getUser(pageContext.getSession()); Index: Exams.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags/Exams.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Exams.java 7 Aug 2008 02:11:53 -0000 1.9 --- Exams.java 1 Dec 2010 11:10:49 -0000 1.10 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.tags; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.tags; *************** *** 64,68 **** */ public class Exams extends BodyTagSupport { ! private String iType = null; private boolean iAdd = true; private String iId = null; --- 64,69 ---- */ public class Exams extends BodyTagSupport { ! private static final long serialVersionUID = -666904499562226756L; ! private String iType = null; private boolean iAdd = true; private String iId = null; *************** *** 340,344 **** } ! pageContext.getOut().println("<table width='99%' border='0' cellspacing='0' cellpadding='3'>"); if ("Exam".equals(pageContext.getRequest().getParameter("backType"))) { pageContext.getOut().println("<tr><td colpan='9'><A name='examHash'> </A></td></tr>"); --- 341,345 ---- } ! pageContext.getOut().println("<table width='100%' border='0' cellspacing='0' cellpadding='3'>"); if ("Exam".equals(pageContext.getRequest().getParameter("backType"))) { pageContext.getOut().println("<tr><td colpan='9'><A name='examHash'> </A></td></tr>"); Index: NotHasProperty.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags/NotHasProperty.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NotHasProperty.java 17 Jun 2008 21:24:57 -0000 1.2 --- NotHasProperty.java 1 Dec 2010 11:10:49 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.tags; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.tags; *************** *** 23,26 **** --- 23,27 ---- import org.unitime.timetable.ApplicationProperties; + import org.unitime.timetable.model.ManagerSettings; *************** *** 29,39 **** */ public class NotHasProperty extends TagSupport { private String iName; public String getName() { return iName; } public void setName(String name) { iName = name; } public int doStartTag() { try { ! String value = ApplicationProperties.getProperty(getName()); if (value==null || value.length()==0) return EVAL_BODY_INCLUDE; } catch (Exception e) {} --- 30,54 ---- */ public class NotHasProperty extends TagSupport { + private static final long serialVersionUID = -2188052467367119211L; private String iName; public String getName() { return iName; } public void setName(String name) { iName = name; } + private boolean iUser = false; + public boolean isUser() { return iUser; } + public void setUser(boolean user) { iUser = user; } + + protected String getProperty() { + if (isUser()) { + return ManagerSettings.getValue(pageContext.getSession(), getName(), + ApplicationProperties.getProperty(getName())); + } else { + return ApplicationProperties.getProperty(getName()); + } + } + public int doStartTag() { try { ! String value = getProperty(); if (value==null || value.length()==0) return EVAL_BODY_INCLUDE; } catch (Exception e) {} Index: HasProperty.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags/HasProperty.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** HasProperty.java 17 Jun 2008 21:24:57 -0000 1.3 --- HasProperty.java 1 Dec 2010 11:10:49 -0000 1.4 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.tags; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.tags; *************** *** 23,26 **** --- 23,27 ---- import org.unitime.timetable.ApplicationProperties; + import org.unitime.timetable.model.ManagerSettings; *************** *** 29,36 **** --- 30,51 ---- */ public class HasProperty extends BodyTagSupport { + private static final long serialVersionUID = 5400060812896606098L; private String iName; public String getName() { return iName; } public void setName(String name) { iName = name; } + private boolean iUser = false; + public boolean isUser() { return iUser; } + public void setUser(boolean user) { iUser = user; } + + protected String getProperty() { + if (isUser()) { + return ManagerSettings.getValue(pageContext.getSession(), getName(), + ApplicationProperties.getProperty(getName())); + } else { + return ApplicationProperties.getProperty(getName()); + } + } + public int doStartTag() { return EVAL_BODY_BUFFERED; *************** *** 40,44 **** try { String body = (getBodyContent()==null?null:getBodyContent().getString()); ! String value = ApplicationProperties.getProperty(getName()); if (value!=null && value.length()>0 && body!=null) pageContext.getOut().println(body.replaceAll("%"+getName()+"%", value)); --- 55,59 ---- try { String body = (getBodyContent()==null?null:getBodyContent().getString()); ! String value = getProperty(); if (value!=null && value.length()>0 && body!=null) pageContext.getOut().println(body.replaceAll("%"+getName()+"%", value)); Index: HasBack.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags/HasBack.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HasBack.java 17 Jun 2008 21:24:57 -0000 1.2 --- HasBack.java 1 Dec 2010 11:10:49 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.tags; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.tags; *************** *** 30,33 **** --- 30,34 ---- */ public class HasBack extends TagSupport { + private static final long serialVersionUID = -2959958703282887969L; int iBack = 2; public int getBack() { return iBack; } --- NEW FILE: Registration.java --- /* * UniTime 3.2 (University Timetabling Application) * Copyright (C) 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 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, see <http://www.gnu.org/licenses/>. * */ package org.unitime.timetable.tags; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.StringReader; import java.io.StringWriter; import java.net.URLEncoder; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Properties; import javax.servlet.http.HttpServletRequest; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.BodyTagSupport; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.dom4j.Document; import org.dom4j.DocumentHelper; import org.dom4j.Element; import org.dom4j.io.OutputFormat; import org.dom4j.io.SAXReader; import org.dom4j.io.XMLWriter; import org.restlet.resource.ClientResource; import org.unitime.commons.User; import org.unitime.commons.web.Web; import org.unitime.timetable.ApplicationProperties; import org.unitime.timetable.model.QueryLog; import org.unitime.timetable.util.Constants; public class Registration extends BodyTagSupport { private static final long serialVersionUID = 6840487122075978529L; private static Log sLog = LogFactory.getLog(Registration.class); private static String sMessage = null; private static String sKey = null; private static boolean sRegistered = false; private static String sNote = null; private static enum Method { hasMessage, message, status }; private Method iMethod = Method.status; public String getMethod() { return iMethod.toString(); } public void setMethod(String method) { iMethod = Method.valueOf(method); } private boolean iUpdate = false; public void setUpdate(boolean update) { iUpdate = update; } public boolean isUpdate() { return iUpdate; } private static long sLastRefresh = -1; private synchronized void init() { sLastRefresh = System.currentTimeMillis(); try { File regFile = new File(ApplicationProperties.getDataFolder(), "unitime.reg"); if (sKey == null && regFile.exists()) { Properties reg = new Properties(); FileInputStream in = new FileInputStream(regFile); try { reg.load(in); } finally { in.close(); } sKey = reg.getProperty("key"); } HashMap<String, String> registration = new HashMap<String, String>(); if (sKey != null) registration.put("key", sKey); else sLog.debug("No registration key found..." ); registration.put("version", Constants.VERSION + "." + Constants.BLD_NUMBER.replace("@build.number@", "?")); registration.put("sessions", String.valueOf(QueryLog.getNrSessions(31))); registration.put("users", String.valueOf(QueryLog.getNrActiveUsers(31))); registration.put("url", pageContext.getRequest().getScheme()+"://"+pageContext.getRequest().getServerName()+":"+pageContext.getRequest().getServerPort()+ ((HttpServletRequest)pageContext.getRequest()).getContextPath()); sLog.debug("Sending the following registration info: " + registration); Document input = DocumentHelper.createDocument(); Element regEl = input.addElement("registration"); for (Map.Entry<String, String> entry: registration.entrySet()) { regEl.addElement(entry.getKey()).setText(entry.getValue()); } sLog.debug("Contacting registration service..." ); ClientResource cr = new ClientResource("https://unitimereg.appspot.com/xml"); StringWriter w = new StringWriter(); new XMLWriter(w, OutputFormat.createPrettyPrint()).write(input); w.flush(); w.close(); String result = cr.post(w.toString(), String.class); sLog.debug("Registration information received." ); StringReader r = new StringReader(result); Document output = (new SAXReader()).read(r); r.close(); HashMap<String, String> ret = new HashMap<String, String>(); for (Element e: (List<Element>)output.getRootElement().elements()) { ret.put(e.getName(), e.getText()); } String newKey = ret.get("key"); if (!newKey.equals(sKey)) { sKey = newKey; sLog.debug("New registration key received..." ); Properties reg = new Properties(); reg.setProperty("key", sKey); FileOutputStream out = new FileOutputStream(regFile); try { reg.store(out, "UniTime 3.2 registration file, please do not delete or modify."); out.flush(); } finally { out.close(); } } sMessage = ret.get("message"); sNote = ret.get("note"); sRegistered = "1".equals(ret.get("registered")); } catch (Exception e) { sLog.error("Validation failed: " + e.getMessage(), e); } } private void refresh() { if ("1".equals(pageContext.getRequest().getParameter("refresh")) || System.currentTimeMillis() - sLastRefresh > 60 * 60 * 1000) init(); } public int doStartTag() throws JspException { if (sLastRefresh < 0) init(); switch (iMethod) { case hasMessage: User user = Web.getUser(pageContext.getSession()); if (user == null || !user.isAdmin()) return SKIP_BODY; try { refresh(); if (Registration.sNote != null && !Registration.sNote.isEmpty()) return EVAL_BODY_INCLUDE; } catch (Exception e) {} return SKIP_BODY; default: return EVAL_BODY_BUFFERED; } } public int doEndTag() throws JspException { switch (iMethod) { case hasMessage: return EVAL_PAGE; case message: try { User user = Web.getUser(pageContext.getSession()); if (Registration.sNote != null && user != null && user.isAdmin()) pageContext.getOut().println(Registration.sNote); } catch (Exception e) {} return EVAL_PAGE; case status: try { if (sMessage != null) { pageContext.getOut().println(sMessage); User user = Web.getUser(pageContext.getSession()); if (isUpdate() && user != null && user.isAdmin()) { String backUrl = URLEncoder.encode(((HttpServletRequest)pageContext.getRequest()).getRequestURL().toString() + "?refresh=1", "ISO-8859-1"); pageContext.getOut().println( "<br><span style=\"font-size: x-small;\">Click <a "+ "onMouseOver=\"this.style.cursor='hand';this.style.cursor='pointer';\" " + "onClick=\"showGwtDialog('UniTime 3.2 Registration', 'https://unitimereg.appspot.com?key=" + sKey + "&back=" + backUrl + "', '750px', '75%');\" " + "title='UniTime 3.2 Registration'>here</a> to " + (sRegistered ? "update the current registration" : "register") + "." + "</span>"); } } } catch (Exception e) {} return EVAL_PAGE; default: return EVAL_PAGE; } } } Index: LastChange.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags/LastChange.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LastChange.java 17 Jun 2008 21:24:57 -0000 1.2 --- LastChange.java 1 Dec 2010 11:10:49 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.tags; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.tags; *************** *** 23,26 **** --- 23,27 ---- import java.util.HashSet; import java.util.Iterator; + import java.util.List; import javax.servlet.jsp.JspException; *************** *** 34,37 **** --- 35,39 ---- import org.unitime.timetable.model.Class_; import org.unitime.timetable.model.CourseOffering; + import org.unitime.timetable.model.Curriculum; import org.unitime.timetable.model.DepartmentRoomFeature; import org.unitime.timetable.model.DepartmentalInstructor; *************** *** 54,58 **** */ public class LastChange extends BodyTagSupport { ! private String iPackage = "org.unitime.timetable.model"; private String iType = null; private String iId = null; --- 56,61 ---- */ public class LastChange extends BodyTagSupport { ! private static final long serialVersionUID = -983949265164022751L; ! private String iPackage = "org.unitime.timetable.model"; private String iType = null; private String iId = null; *************** *** 99,109 **** webTable.addLine(null, new String[] { ! lastChange.getSourceTitle(pageContext.getRequest()), lastChange.getObjectTitle(), ! lastChange.getOperationTitle(pageContext.getRequest()), lastChange.getManager().getShortName(), ChangeLog.sDF.format(lastChange.getTimeStamp())}, new Comparable[] { ! lastChange.getSourceTitle(pageContext.getRequest()), //new Integer(lastChange.getSource().ordinal()), lastChange.getObjectTitle(), new Integer(lastChange.getOperation().ordina... [truncated message content] |
|
From: Tomas M. <to...@us...> - 2010-12-01 11:11:31
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/queue In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13954/JavaSource/org/unitime/timetable/util/queue Modified Files: QueueItem.java QueueProcessor.java PdfExamReportQueueItem.java Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) Index: QueueItem.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/queue/QueueItem.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** QueueItem.java 28 May 2010 15:34:56 -0000 1.1 --- QueueItem.java 1 Dec 2010 11:10:52 -0000 1.2 *************** *** 1,4 **** /* ! * UniTime 3.1 (University Timetabling Application) * Copyright (C) 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. --- 1,4 ---- /* ! * UniTime 3.2 (University Timetabling Application) * Copyright (C) 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. *************** *** 6,10 **** * 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. * --- 6,10 ---- * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.util.queue; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.util.queue; Index: PdfExamReportQueueItem.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/queue/PdfExamReportQueueItem.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PdfExamReportQueueItem.java 28 May 2010 15:34:56 -0000 1.1 --- PdfExamReportQueueItem.java 1 Dec 2010 11:10:52 -0000 1.2 *************** *** 1,4 **** /* ! * UniTime 3.1 (University Timetabling Application) * Copyright (C) 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. --- 1,4 ---- /* ! * UniTime 3.2 (University Timetabling Application) * Copyright (C) 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. *************** *** 6,10 **** * 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. * --- 6,10 ---- * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.util.queue; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.util.queue; *************** *** 26,35 **** import java.text.SimpleDateFormat; import java.util.Collection; - import java.util.Date; import java.util.HashSet; import java.util.Hashtable; import java.util.Iterator; import java.util.Map; - import java.util.Properties; import java.util.Set; import java.util.StringTokenizer; --- 26,33 ---- *************** *** 38,56 **** import java.util.zip.ZipOutputStream; - import javax.activation.DataHandler; - import javax.activation.FileDataSource; - import javax.mail.Authenticator; - import javax.mail.BodyPart; - import javax.mail.Multipart; - import javax.mail.PasswordAuthentication; - import javax.mail.Transport; - import javax.mail.Message.RecipientType; - import javax.mail.internet.InternetAddress; - import javax.mail.internet.MimeBodyPart; - import javax.mail.internet.MimeMessage; - import javax.mail.internet.MimeMultipart; import javax.servlet.http.HttpServletRequest; ! import org.apache.log4j.Logger; import org.unitime.timetable.ApplicationProperties; import org.unitime.timetable.form.ExamPdfReportForm; --- 36,42 ---- import java.util.zip.ZipOutputStream; import javax.servlet.http.HttpServletRequest; ! import org.unitime.commons.Email; import org.unitime.timetable.ApplicationProperties; import org.unitime.timetable.form.ExamPdfReportForm; *************** *** 112,117 **** @Override public void execute() { - Logger repLog = Logger.getLogger("org.unitime.timetable.reports.exam"); /* Appender myAppender = new AppenderSkeleton() { --- 98,103 ---- @Override public void execute() { /* + Logger repLog = Logger.getLogger("org.unitime.timetable.reports.exam"); Appender myAppender = new AppenderSkeleton() { *************** *** 187,191 **** for (Iterator i= hibSession.createQuery( ! "select x.uniqueId, o.uniqueId, e.student.uniqueId, e.courseOffering.uniqueId from "+ "Exam x inner join x.owners o, "+ "StudentClassEnrollment e inner join e.clazz c "+ --- 173,177 ---- for (Iterator i= hibSession.createQuery( ! "select o.uniqueId, e.student.uniqueId, e.courseOffering.uniqueId from "+ "Exam x inner join x.owners o, "+ "StudentClassEnrollment e inner join e.clazz c "+ *************** *** 194,201 **** "o.ownerId=c.uniqueId").setLong("sessionId", iExamSolver.getSessionId()).setInteger("examType", iExamSolver.getExamType()).setCacheable(true).list().iterator();i.hasNext();) { Object[] o = (Object[])i.next(); ! Long examId = (Long)o[0]; ! Long ownerId = (Long)o[1]; ! Long studentId = (Long)o[2]; ! Long courseId = (Long)o[3]; Hashtable<Long, Set<Long>> course2students = owner2course2students.get(ownerId); if (course2students == null) { --- 180,186 ---- "o.ownerId=c.uniqueId").setLong("sessionId", iExamSolver.getSessionId()).setInteger("examType", iExamSolver.getExamType()).setCacheable(true).list().iterator();i.hasNext();) { Object[] o = (Object[])i.next(); ! Long ownerId = (Long)o[0]; ! Long studentId = (Long)o[1]; ! Long courseId = (Long)o[2]; Hashtable<Long, Set<Long>> course2students = owner2course2students.get(ownerId); if (course2students == null) { *************** *** 213,217 **** for (Iterator i= hibSession.createQuery( ! "select x.uniqueId, o.uniqueId, e.student.uniqueId, e.courseOffering.uniqueId from "+ "Exam x inner join x.owners o, "+ "StudentClassEnrollment e inner join e.clazz c " + --- 198,202 ---- for (Iterator i= hibSession.createQuery( ! "select o.uniqueId, e.student.uniqueId, e.courseOffering.uniqueId from "+ "Exam x inner join x.owners o, "+ "StudentClassEnrollment e inner join e.clazz c " + *************** *** 221,228 **** "o.ownerId=ioc.uniqueId").setLong("sessionId", iExamSolver.getSessionId()).setInteger("examType", iExamSolver.getExamType()).setCacheable(true).list().iterator();i.hasNext();) { Object[] o = (Object[])i.next(); ! Long examId = (Long)o[0]; ! Long ownerId = (Long)o[1]; ! Long studentId = (Long)o[2]; ! Long courseId = (Long)o[3]; Hashtable<Long, Set<Long>> course2students = owner2course2students.get(ownerId); if (course2students == null) { --- 206,212 ---- "o.ownerId=ioc.uniqueId").setLong("sessionId", iExamSolver.getSessionId()).setInteger("examType", iExamSolver.getExamType()).setCacheable(true).list().iterator();i.hasNext();) { Object[] o = (Object[])i.next(); ! Long ownerId = (Long)o[0]; ! Long studentId = (Long)o[1]; ! Long courseId = (Long)o[2]; Hashtable<Long, Set<Long>> course2students = owner2course2students.get(ownerId); if (course2students == null) { *************** *** 240,244 **** for (Iterator i= hibSession.createQuery( ! "select x.uniqueId, o.uniqueId, e.student.uniqueId, e.courseOffering.uniqueId from "+ "Exam x inner join x.owners o, "+ "StudentClassEnrollment e inner join e.courseOffering co " + --- 224,228 ---- for (Iterator i= hibSession.createQuery( ! "select o.uniqueId, e.student.uniqueId, e.courseOffering.uniqueId from "+ "Exam x inner join x.owners o, "+ "StudentClassEnrollment e inner join e.courseOffering co " + *************** *** 247,254 **** "o.ownerId=co.uniqueId").setLong("sessionId", iExamSolver.getSessionId()).setInteger("examType", iExamSolver.getExamType()).setCacheable(true).list().iterator();i.hasNext();) { Object[] o = (Object[])i.next(); ! Long examId = (Long)o[0]; ! Long ownerId = (Long)o[1]; ! Long studentId = (Long)o[2]; ! Long courseId = (Long)o[3]; Hashtable<Long, Set<Long>> course2students = owner2course2students.get(ownerId); if (course2students == null) { --- 231,237 ---- "o.ownerId=co.uniqueId").setLong("sessionId", iExamSolver.getSessionId()).setInteger("examType", iExamSolver.getExamType()).setCacheable(true).list().iterator();i.hasNext();) { Object[] o = (Object[])i.next(); ! Long ownerId = (Long)o[0]; ! Long studentId = (Long)o[1]; ! Long courseId = (Long)o[2]; Hashtable<Long, Set<Long>> course2students = owner2course2students.get(ownerId); if (course2students == null) { *************** *** 266,270 **** for (Iterator i= hibSession.createQuery( ! "select x.uniqueId, o.uniqueId, e.student.uniqueId, e.courseOffering.uniqueId from "+ "Exam x inner join x.owners o, "+ "StudentClassEnrollment e inner join e.courseOffering.instructionalOffering io " + --- 249,253 ---- for (Iterator i= hibSession.createQuery( ! "select o.uniqueId, e.student.uniqueId, e.courseOffering.uniqueId from "+ "Exam x inner join x.owners o, "+ "StudentClassEnrollment e inner join e.courseOffering.instructionalOffering io " + *************** *** 273,280 **** "o.ownerId=io.uniqueId").setLong("sessionId", iExamSolver.getSessionId()).setInteger("examType", iExamSolver.getExamType()).setCacheable(true).list().iterator();i.hasNext();) { Object[] o = (Object[])i.next(); ! Long examId = (Long)o[0]; ! Long ownerId = (Long)o[1]; ! Long studentId = (Long)o[2]; ! Long courseId = (Long)o[3]; Hashtable<Long, Set<Long>> course2students = owner2course2students.get(ownerId); if (course2students == null) { --- 256,262 ---- "o.ownerId=io.uniqueId").setLong("sessionId", iExamSolver.getSessionId()).setInteger("examType", iExamSolver.getExamType()).setCacheable(true).list().iterator();i.hasNext();) { Object[] o = (Object[])i.next(); ! Long ownerId = (Long)o[0]; ! Long studentId = (Long)o[1]; ! Long courseId = (Long)o[2]; Hashtable<Long, Set<Long>> course2students = owner2course2students.get(ownerId); if (course2students == null) { *************** *** 393,397 **** } iProgress = 0.9; - TimetableManager mgr = getOwner(); byte[] buffer = new byte[32*1024]; int len = 0; --- 375,378 ---- *************** *** 399,423 **** log("<font color='orange'>No report generated.</font>"); else if (iForm.getEmail()) { - InternetAddress from = - (mgr.getEmailAddress()==null? - new InternetAddress( - ApplicationProperties.getProperty("tmtbl.inquiry.sender",ApplicationProperties.getProperty("tmtbl.contact.email")), - ApplicationProperties.getProperty("tmtbl.inquiry.sender.name")): - new InternetAddress(mgr.getEmailAddress(),mgr.getName())); setStatus("Sending email(s)..."); - Properties p = ApplicationProperties.getProperties(); - if (p.getProperty("mail.smtp.host")==null && p.getProperty("tmtbl.smtp.host")!=null) - p.setProperty("mail.smtp.host", p.getProperty("tmtbl.smtp.host")); - Authenticator a = null; - if (ApplicationProperties.getProperty("tmtbl.mail.user")!=null && ApplicationProperties.getProperty("tmtbl.mail.pwd")!=null) { - a = new Authenticator() { - public PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication( - ApplicationProperties.getProperty("tmtbl.mail.user"), - ApplicationProperties.getProperty("tmtbl.mail.pwd")); - } - }; - } - javax.mail.Session mailSession = javax.mail.Session.getDefaultInstance(p, a); if (iForm.getEmailDeputies()) { Hashtable<TimetableManager,Hashtable<String,File>> files2send = new Hashtable(); --- 380,384 ---- *************** *** 455,497 **** managers.remove(manager); log("Sending email to "+manager.getName()+" ("+manager.getEmailAddress()+")..."); - MimeMessage mail = new MimeMessage(mailSession); - mail.setSubject(iForm.getSubject()==null?"Examination Report":iForm.getSubject()); - Multipart body = new MimeMultipart(); - BodyPart text = new MimeBodyPart(); - text.setText((iForm.getMessage()==null?"":iForm.getMessage()+"\r\n\r\n")+ - "For an up-to-date report, please visit "+ - iUrl+"/\r\n\r\n"+ - "This email was automatically generated by "+ - "UniTime "+Constants.VERSION+"."+Constants.BLD_NUMBER.replaceAll("@build.number@", "?")+ - " (Univesity Timetabling Application, http://www.unitime.org)."); - body.addBodyPart(text); - mail.addRecipient(RecipientType.TO, new InternetAddress(manager.getEmailAddress(),manager.getName())); - for (Iterator<TimetableManager> i=managers.iterator();i.hasNext();) { - TimetableManager m = (TimetableManager)i.next(); - if (files.equals(files2send.get(m))) { - log(" Including "+m.getName()+" ("+m.getEmailAddress()+")"); - mail.addRecipient(RecipientType.TO, new InternetAddress(m.getEmailAddress(),m.getName())); - i.remove(); - } - } - if (iForm.getAddress()!=null) for (StringTokenizer s=new StringTokenizer(iForm.getAddress(),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.TO, new InternetAddress(s.nextToken())); - if (iForm.getCc()!=null) for (StringTokenizer s=new StringTokenizer(iForm.getCc(),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.CC, new InternetAddress(s.nextToken())); - if (iForm.getBcc()!=null) for (StringTokenizer s=new StringTokenizer(iForm.getBcc(),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.BCC, new InternetAddress(s.nextToken())); - if (from!=null) - mail.setFrom(from); - for (Map.Entry<String, File> entry : files.entrySet()) { - BodyPart attachement = new MimeBodyPart(); - attachement.setDataHandler(new DataHandler(new FileDataSource(entry.getValue()))); - attachement.setFileName(session.getAcademicTerm()+session.getSessionStartYear()+(iForm.getExamType()==Exam.sExamTypeMidterm?"evn":"fin")+"_"+entry.getKey()); - body.addBodyPart(attachement); - log(" Attaching <a href='temp/"+entry.getValue().getName()+"'>"+entry.getKey()+"</a>"); - } - mail.setSentDate(new Date()); - mail.setContent(body); try { ! Transport.send(mail); log("Email sent."); } catch (Exception e) { --- 416,448 ---- managers.remove(manager); log("Sending email to "+manager.getName()+" ("+manager.getEmailAddress()+")..."); try { ! Email mail = new Email(); ! mail.setSubject(iForm.getSubject()==null?"Examination Report":iForm.getSubject()); ! mail.setText((iForm.getMessage()==null?"":iForm.getMessage()+"\r\n\r\n")+ ! "For an up-to-date report, please visit "+ ! iUrl+"/\r\n\r\n"+ ! "This email was automatically generated by "+ ! "UniTime "+Constants.VERSION+"."+Constants.BLD_NUMBER.replaceAll("@build.number@", "?")+ ! " (Univesity Timetabling Application, http://www.unitime.org)."); ! mail.addRecipient(manager.getEmailAddress(), manager.getName()); ! for (Iterator<TimetableManager> i=managers.iterator();i.hasNext();) { ! TimetableManager m = (TimetableManager)i.next(); ! if (files.equals(files2send.get(m))) { ! log(" Including "+m.getName()+" ("+m.getEmailAddress()+")"); ! mail.addRecipient(m.getEmailAddress(),m.getName()); ! i.remove(); ! } ! } ! if (iForm.getAddress()!=null) for (StringTokenizer s=new StringTokenizer(iForm.getAddress(),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipient(s.nextToken(), null); ! if (iForm.getCc()!=null) for (StringTokenizer s=new StringTokenizer(iForm.getCc(),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipientCC(s.nextToken(), null); ! if (iForm.getBcc()!=null) for (StringTokenizer s=new StringTokenizer(iForm.getBcc(),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipientBCC(s.nextToken(), null); ! for (Map.Entry<String, File> entry : files.entrySet()) { ! mail.addAttachement(entry.getValue(), session.getAcademicTerm()+session.getSessionStartYear()+(iForm.getExamType()==Exam.sExamTypeMidterm?"evn":"fin")+"_"+entry.getKey()); ! log(" Attaching <a href='temp/"+entry.getValue().getName()+"'>"+entry.getKey()+"</a>"); ! } ! mail.send(); log("Email sent."); } catch (Exception e) { *************** *** 502,534 **** } } else { - MimeMessage mail = new MimeMessage(mailSession); - mail.setSubject(iForm.getSubject()==null?"Examination Report":iForm.getSubject()); - Multipart body = new MimeMultipart(); - MimeBodyPart text = new MimeBodyPart(); - text.setText((iForm.getMessage()==null?"":iForm.getMessage()+"\r\n\r\n")+ - "For an up-to-date report, please visit "+ - iUrl+"/\r\n\r\n"+ - "This email was automatically generated by "+ - "UniTime "+Constants.VERSION+"."+Constants.BLD_NUMBER.replaceAll("@build.number@", "?")+ - " (Univesity Timetabling Application, http://www.unitime.org)."); - body.addBodyPart(text); - if (iForm.getAddress()!=null) for (StringTokenizer s=new StringTokenizer(iForm.getAddress(),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.TO, new InternetAddress(s.nextToken())); - if (iForm.getCc()!=null) for (StringTokenizer s=new StringTokenizer(iForm.getCc(),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.CC, new InternetAddress(s.nextToken())); - if (iForm.getBcc()!=null) for (StringTokenizer s=new StringTokenizer(iForm.getBcc(),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.BCC, new InternetAddress(s.nextToken())); - if (from!=null) - mail.setFrom(from); - for (Map.Entry<String, File> entry : output.entrySet()) { - BodyPart attachement = new MimeBodyPart(); - attachement.setDataHandler(new DataHandler(new FileDataSource(entry.getValue()))); - attachement.setFileName(session.getAcademicTerm()+session.getSessionStartYear()+(iForm.getExamType()==Exam.sExamTypeMidterm?"evn":"fin")+"_"+entry.getKey()); - body.addBodyPart(attachement); - } - mail.setSentDate(new Date()); - mail.setContent(body); try { ! Transport.send(mail); log("Email sent."); } catch (Exception e) { --- 453,475 ---- } } else { try { ! Email mail = new Email(); ! mail.setSubject(iForm.getSubject()==null?"Examination Report":iForm.getSubject()); ! mail.setText((iForm.getMessage()==null?"":iForm.getMessage()+"\r\n\r\n")+ ! "For an up-to-date report, please visit "+ ! iUrl+"/\r\n\r\n"+ ! "This email was automatically generated by "+ ! "UniTime "+Constants.VERSION+"."+Constants.BLD_NUMBER.replaceAll("@build.number@", "?")+ ! " (Univesity Timetabling Application, http://www.unitime.org)."); ! if (iForm.getAddress()!=null) for (StringTokenizer s=new StringTokenizer(iForm.getAddress(),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipient(s.nextToken(), null); ! if (iForm.getCc()!=null) for (StringTokenizer s=new StringTokenizer(iForm.getCc(),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipientCC(s.nextToken(), null); ! if (iForm.getBcc()!=null) for (StringTokenizer s=new StringTokenizer(iForm.getBcc(),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipientBCC(s.nextToken(), null); ! for (Map.Entry<String, File> entry : output.entrySet()) { ! mail.addAttachement(entry.getValue(), session.getAcademicTerm()+session.getSessionStartYear()+(iForm.getExamType()==Exam.sExamTypeMidterm?"evn":"fin")+"_"+entry.getKey()); ! } ! mail.send(); log("Email sent."); } catch (Exception e) { *************** *** 546,574 **** continue; } - MimeMessage mail = new MimeMessage(mailSession); - mail.setSubject(iForm.getSubject()==null?"Examination Report":iForm.getSubject()); - Multipart body = new MimeMultipart(); - MimeBodyPart text = new MimeBodyPart(); - text.setText((iForm.getMessage()==null?"":iForm.getMessage()+"\r\n\r\n")+ - "For an up-to-date report, please visit "+ - iUrl+"/exams.do\r\n\r\n"+ - "This email was automatically generated by "+ - "UniTime "+Constants.VERSION+"."+Constants.BLD_NUMBER.replaceAll("@build.number@", "?")+ - " (Univesity Timetabling Application, http://www.unitime.org)."); - body.addBodyPart(text); - mail.addRecipient(RecipientType.TO, new InternetAddress(email)); - if (iForm.getCc()!=null) for (StringTokenizer s=new StringTokenizer(iForm.getCc(),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.CC, new InternetAddress(s.nextToken())); - if (iForm.getBcc()!=null) for (StringTokenizer s=new StringTokenizer(iForm.getBcc(),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.BCC, new InternetAddress(s.nextToken())); - if (from!=null) mail.setFrom(from); - BodyPart attachement = new MimeBodyPart(); - attachement.setDataHandler(new DataHandler(new FileDataSource(report))); - attachement.setFileName(session.getAcademicTerm()+session.getSessionStartYear()+(iForm.getExamType()==Exam.sExamTypeMidterm?"evn":"fin")+(iForm.getModeIdx()==PdfLegacyExamReport.sModeText?".txt":".pdf")); - body.addBodyPart(attachement); - mail.setSentDate(new Date()); - mail.setContent(body); try { ! Transport.send(mail); log(" An email was sent to <a href='temp/"+report.getName()+"'>"+instructor.getName()+"</a>."); } catch (Exception e) { --- 487,506 ---- continue; } try { ! Email mail = new Email(); ! mail.setSubject(iForm.getSubject()==null?"Examination Report":iForm.getSubject()); ! mail.setText((iForm.getMessage()==null?"":iForm.getMessage()+"\r\n\r\n")+ ! "For an up-to-date report, please visit "+ ! iUrl+"/exams.do\r\n\r\n"+ ! "This email was automatically generated by "+ ! "UniTime "+Constants.VERSION+"."+Constants.BLD_NUMBER.replaceAll("@build.number@", "?")+ ! " (Univesity Timetabling Application, http://www.unitime.org)."); ! mail.addRecipient(email, null); ! if (iForm.getCc()!=null) for (StringTokenizer s=new StringTokenizer(iForm.getCc(),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipientCC(s.nextToken(), null); ! if (iForm.getBcc()!=null) for (StringTokenizer s=new StringTokenizer(iForm.getBcc(),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipientBCC(s.nextToken(), null); ! mail.addAttachement(report, session.getAcademicTerm()+session.getSessionStartYear()+(iForm.getExamType()==Exam.sExamTypeMidterm?"evn":"fin")+(iForm.getModeIdx()==PdfLegacyExamReport.sModeText?".txt":".pdf")); ! mail.send(); log(" An email was sent to <a href='temp/"+report.getName()+"'>"+instructor.getName()+"</a>."); } catch (Exception e) { *************** *** 588,616 **** continue; } - MimeMessage mail = new MimeMessage(mailSession); - mail.setSubject(iForm.getSubject()==null?"Examination Report":iForm.getSubject()); - Multipart body = new MimeMultipart(); - MimeBodyPart text = new MimeBodyPart(); - text.setText((iForm.getMessage()==null?"":iForm.getMessage()+"\r\n\r\n")+ - "For an up-to-date report, please visit "+ - iUrl+"/exams.do\r\n\r\n"+ - "This email was automatically generated by "+ - "UniTime "+Constants.VERSION+"."+Constants.BLD_NUMBER.replaceAll("@build.number@", "?")+ - " (Univesity Timetabling Application, http://www.unitime.org)."); - body.addBodyPart(text); - mail.addRecipient(RecipientType.TO, new InternetAddress(email)); - if (iForm.getCc()!=null) for (StringTokenizer s=new StringTokenizer(iForm.getCc(),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.CC, new InternetAddress(s.nextToken())); - if (iForm.getBcc()!=null) for (StringTokenizer s=new StringTokenizer(iForm.getBcc(),";,\n\r ");s.hasMoreTokens();) - mail.addRecipient(RecipientType.BCC, new InternetAddress(s.nextToken())); - if (from!=null) mail.setFrom(from); - BodyPart attachement = new MimeBodyPart(); - attachement.setDataHandler(new DataHandler(new FileDataSource(report))); - attachement.setFileName(session.getAcademicTerm()+session.getSessionStartYear()+(iForm.getExamType()==Exam.sExamTypeMidterm?"evn":"fin")+(iForm.getModeIdx()==PdfLegacyExamReport.sModeText?".txt":".pdf")); - body.addBodyPart(attachement); - mail.setSentDate(new Date()); - mail.setContent(body); try { ! Transport.send(mail); log(" An email was sent to <a href='temp/"+report.getName()+"'>"+student.getName(DepartmentalInstructor.sNameFormatLastFist)+"</a>."); } catch (Exception e) { --- 520,539 ---- continue; } try { ! Email mail = new Email(); ! mail.setSubject(iForm.getSubject()==null?"Examination Report":iForm.getSubject()); ! mail.setText((iForm.getMessage()==null?"":iForm.getMessage()+"\r\n\r\n")+ ! "For an up-to-date report, please visit "+ ! iUrl+"/exams.do\r\n\r\n"+ ! "This email was automatically generated by "+ ! "UniTime "+Constants.VERSION+"."+Constants.BLD_NUMBER.replaceAll("@build.number@", "?")+ ! " (Univesity Timetabling Application, http://www.unitime.org)."); ! mail.addRecipient(email, null); ! if (iForm.getCc()!=null) for (StringTokenizer s=new StringTokenizer(iForm.getCc(),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipientCC(s.nextToken(), null); ! if (iForm.getBcc()!=null) for (StringTokenizer s=new StringTokenizer(iForm.getBcc(),";,\n\r ");s.hasMoreTokens();) ! mail.addRecipientBCC(s.nextToken(), null); ! mail.addAttachement(report, session.getAcademicTerm()+session.getSessionStartYear()+(iForm.getExamType()==Exam.sExamTypeMidterm?"evn":"fin")+(iForm.getModeIdx()==PdfLegacyExamReport.sModeText?".txt":".pdf")); ! mail.send(); log(" An email was sent to <a href='temp/"+report.getName()+"'>"+student.getName(DepartmentalInstructor.sNameFormatLastFist)+"</a>."); } catch (Exception e) { Index: QueueProcessor.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/util/queue/QueueProcessor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** QueueProcessor.java 16 Aug 2010 20:00:40 -0000 1.2 --- QueueProcessor.java 1 Dec 2010 11:10:52 -0000 1.3 *************** *** 1,4 **** /* ! * UniTime 3.1 (University Timetabling Application) * Copyright (C) 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. --- 1,4 ---- /* ! * UniTime 3.2 (University Timetabling Application) * Copyright (C) 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. *************** *** 6,10 **** * 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. * --- 6,10 ---- * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.util.queue; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.util.queue; |
|
From: Tomas M. <to...@us...> - 2010-12-01 11:11:31
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/commons/hibernate/util In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13954/JavaSource/org/unitime/commons/hibernate/util Modified Files: HibernateUtil.java UniTimeCoreDatabaseUpdate.java DatabaseUpdate.java Added Files: PrettyFormatter.java Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) Index: UniTimeCoreDatabaseUpdate.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/commons/hibernate/util/UniTimeCoreDatabaseUpdate.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UniTimeCoreDatabaseUpdate.java 22 May 2010 16:00:25 -0000 1.1 --- UniTimeCoreDatabaseUpdate.java 1 Dec 2010 11:10:52 -0000 1.2 *************** *** 1,5 **** ! /** * ! */ package org.unitime.commons.hibernate.util; --- 1,21 ---- ! /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors ! * as indicated by the @authors tag. * ! * 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 3 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, see <http://www.gnu.org/licenses/>. ! * ! */ package org.unitime.commons.hibernate.util; Index: DatabaseUpdate.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/commons/hibernate/util/DatabaseUpdate.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DatabaseUpdate.java 22 May 2010 16:00:25 -0000 1.5 --- DatabaseUpdate.java 1 Dec 2010 11:10:52 -0000 1.6 *************** *** 1,4 **** /* ! * UniTime 3.1 (University Timetabling Application) * Copyright (C) 2008-2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. --- 1,4 ---- /* ! * UniTime 3.2 (University Timetabling Application) * Copyright (C) 2008-2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. *************** *** 6,10 **** * 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. * --- 6,10 ---- * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.commons.hibernate.util; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.commons.hibernate.util; --- NEW FILE: PrettyFormatter.java --- /* Taken from Hibernate 3.2 (org.hibertane.pretty.Formater) as it is no longer present in Hibernate 3.5 */ package org.unitime.commons.hibernate.util; import java.util.HashSet; import java.util.LinkedList; import java.util.Set; import java.util.StringTokenizer; import org.hibernate.util.StringHelper; public class PrettyFormatter { private static final Set BEGIN_CLAUSES = new HashSet(); private static final Set END_CLAUSES = new HashSet(); private static final Set LOGICAL = new HashSet(); private static final Set QUANTIFIERS = new HashSet(); private static final Set DML = new HashSet(); private static final Set MISC = new HashSet(); static { BEGIN_CLAUSES.add("left"); BEGIN_CLAUSES.add("right"); BEGIN_CLAUSES.add("inner"); BEGIN_CLAUSES.add("outer"); BEGIN_CLAUSES.add("group"); BEGIN_CLAUSES.add("order"); END_CLAUSES.add("where"); END_CLAUSES.add("set"); END_CLAUSES.add("having"); END_CLAUSES.add("join"); END_CLAUSES.add("from"); END_CLAUSES.add("by"); END_CLAUSES.add("join"); END_CLAUSES.add("into"); END_CLAUSES.add("union"); LOGICAL.add("and"); LOGICAL.add("or"); LOGICAL.add("when"); LOGICAL.add("else"); LOGICAL.add("end"); QUANTIFIERS.add("in"); QUANTIFIERS.add("all"); QUANTIFIERS.add("exists"); QUANTIFIERS.add("some"); QUANTIFIERS.add("any"); DML.add("insert"); DML.add("update"); DML.add("delete"); MISC.add("select"); MISC.add("on"); //MISC.add("values"); } String indentString = " "; String initial = "\n "; boolean beginLine = true; boolean afterBeginBeforeEnd = false; boolean afterByOrSetOrFromOrSelect = false; boolean afterValues = false; boolean afterOn = false; boolean afterBetween = false; boolean afterInsert = false; int inFunction = 0; int parensSinceSelect = 0; private LinkedList parenCounts = new LinkedList(); private LinkedList afterByOrFromOrSelects = new LinkedList(); int indent = 1; StringBuffer result = new StringBuffer(); StringTokenizer tokens; String lastToken; String token; String lcToken; public PrettyFormatter(String sql) { tokens = new StringTokenizer( sql, "()+*/-=<>'`\"[]," + StringHelper.WHITESPACE, true ); } public PrettyFormatter setInitialString(String initial) { this.initial = initial; return this; } public PrettyFormatter setIndentString(String indent) { this.indentString = indent; return this; } public String format() { result.append(initial); while ( tokens.hasMoreTokens() ) { token = tokens.nextToken(); lcToken = token.toLowerCase(); if ( "'".equals(token) ) { String t; do { t = tokens.nextToken(); token += t; } while ( !"'".equals(t) ); } else if ( "\"".equals(token) ) { String t; do { t = tokens.nextToken(); token += t; } while ( !"\"".equals(t) ); } if ( afterByOrSetOrFromOrSelect && ",".equals(token) ) { commaAfterByOrFromOrSelect(); } else if ( afterOn && ",".equals(token) ) { commaAfterOn(); } else if ( "(".equals(token) ) { openParen(); } else if ( ")".equals(token) ) { closeParen(); } else if ( BEGIN_CLAUSES.contains(lcToken) ) { beginNewClause(); } else if ( END_CLAUSES.contains(lcToken) ) { endNewClause(); } else if ( "select".equals(lcToken) ) { select(); } else if ( DML.contains(lcToken) ) { updateOrInsertOrDelete(); } else if ( "values".equals(lcToken) ) { values(); } else if ( "on".equals(lcToken) ) { on(); } else if ( afterBetween && lcToken.equals("and") ) { misc(); afterBetween = false; } else if ( LOGICAL.contains(lcToken) ) { logical(); } else if ( isWhitespace(token) ) { white(); } else { misc(); } if ( !isWhitespace( token ) ) lastToken = lcToken; } return result.toString(); } private void commaAfterOn() { out(); indent--; newline(); afterOn = false; afterByOrSetOrFromOrSelect = true; } private void commaAfterByOrFromOrSelect() { out(); newline(); } private void logical() { if ( "end".equals(lcToken) ) indent--; newline(); out(); beginLine = false; } private void on() { indent++; afterOn = true; newline(); out(); beginLine = false; } private void misc() { out(); if ( "between".equals(lcToken) ) { afterBetween = true; } if (afterInsert) { newline(); afterInsert = false; } else { beginLine = false; if ( "case".equals(lcToken) ) { indent++; } } } private void white() { if ( !beginLine ) { result.append(" "); } } private void updateOrInsertOrDelete() { out(); indent++; beginLine = false; if ( "update".equals(lcToken) ) newline(); if ( "insert".equals(lcToken) ) afterInsert = true; } private void select() { out(); indent++; newline(); parenCounts.addLast( new Integer(parensSinceSelect) ); afterByOrFromOrSelects.addLast( new Boolean(afterByOrSetOrFromOrSelect) ); parensSinceSelect = 0; afterByOrSetOrFromOrSelect = true; } private void out() { result.append(token); } private void endNewClause() { if (!afterBeginBeforeEnd) { indent--; if (afterOn) { indent--; afterOn=false; } newline(); } out(); if ( !"union".equals(lcToken) ) indent++; newline(); afterBeginBeforeEnd = false; afterByOrSetOrFromOrSelect = "by".equals(lcToken) || "set".equals(lcToken) || "from".equals(lcToken); } private void beginNewClause() { if (!afterBeginBeforeEnd) { if (afterOn) { indent--; afterOn=false; } indent--; newline(); } out(); beginLine = false; afterBeginBeforeEnd = true; } private void values() { indent--; newline(); out(); indent++; newline(); afterValues = true; } private void closeParen() { parensSinceSelect--; if (parensSinceSelect<0) { indent--; parensSinceSelect = ( (Integer) parenCounts.removeLast() ).intValue(); afterByOrSetOrFromOrSelect = ( (Boolean) afterByOrFromOrSelects.removeLast() ).booleanValue(); } if ( inFunction>0 ) { inFunction--; out(); } else { if (!afterByOrSetOrFromOrSelect) { indent--; newline(); } out(); } beginLine = false; } private void openParen() { if ( isFunctionName( lastToken ) || inFunction>0 ) { inFunction++; } beginLine = false; if ( inFunction>0 ) { out(); } else { out(); if (!afterByOrSetOrFromOrSelect) { indent++; newline(); beginLine = true; } } parensSinceSelect++; } private static boolean isFunctionName(String tok) { final char begin = tok.charAt(0); final boolean isIdentifier = Character.isJavaIdentifierStart( begin ) || '"'==begin; return isIdentifier && !LOGICAL.contains(tok) && !END_CLAUSES.contains(tok) && !QUANTIFIERS.contains(tok) && !DML.contains(tok) && !MISC.contains(tok); } private static boolean isWhitespace(String token) { return StringHelper.WHITESPACE.indexOf(token)>=0; } private void newline() { result.append("\n"); for ( int i=0; i<indent; i++ ) { result.append(indentString); } beginLine = true; } public static void main(String[] args) { if ( args.length>0 ) System.out.println( new PrettyFormatter( StringHelper.join(" ", args) ).format() ); System.out.println( new PrettyFormatter("insert into Address (city, state, zip, \"from\") values (?, ?, ?, 'insert value')").format() ); System.out.println( new PrettyFormatter("delete from Address where id = ? and version = ?").format() ); System.out.println( new PrettyFormatter("update Address set city = ?, state=?, zip=?, version = ? where id = ? and version = ?").format() ); System.out.println( new PrettyFormatter("update Address set city = ?, state=?, zip=?, version = ? where id in (select aid from Person)").format() ); System.out.println( new PrettyFormatter("select p.name, a.zipCode, count(*) from Person p left outer join Employee e on e.id = p.id and p.type = 'E' and (e.effective>? or e.effective<?) join Address a on a.pid = p.id where upper(p.name) like 'G%' and p.age > 100 and (p.sex = 'M' or p.sex = 'F') and coalesce( trim(a.street), a.city, (a.zip) ) is not null order by p.name asc, a.zipCode asc").format() ); System.out.println( new PrettyFormatter("select ( (m.age - p.age) * 12 ), trim(upper(p.name)) from Person p, Person m where p.mother = m.id and ( p.age = (select max(p0.age) from Person p0 where (p0.mother=m.id)) and p.name like ? )").format() ); System.out.println( new PrettyFormatter("select * from Address a join Person p on a.pid = p.id, Person m join Address b on b.pid = m.id where p.mother = m.id and p.name like ?").format() ); System.out.println( new PrettyFormatter("select case when p.age > 50 then 'old' when p.age > 18 then 'adult' else 'child' end from Person p where ( case when p.age > 50 then 'old' when p.age > 18 then 'adult' else 'child' end ) like ?").format() ); } } Index: HibernateUtil.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/commons/hibernate/util/HibernateUtil.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** HibernateUtil.java 4 May 2010 20:49:04 -0000 1.16 --- HibernateUtil.java 1 Dec 2010 11:10:52 -0000 1.17 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.commons.hibernate.util; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.commons.hibernate.util; *************** *** 34,37 **** --- 34,39 ---- import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; + import org.hibernate.dialect.MySQLDialect; + import org.hibernate.dialect.Oracle8iDialect; import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.mapping.Formula; *************** *** 97,115 **** } - private static String getProperty(org.w3c.dom.Document document, String name, String defaultValue) { - org.w3c.dom.Element hibConfiguration = (org.w3c.dom.Element)document.getElementsByTagName("hibernate-configuration").item(0); - org.w3c.dom.Element sessionFactoryConfig = (org.w3c.dom.Element)hibConfiguration.getElementsByTagName("session-factory").item(0); - NodeList properties = sessionFactoryConfig.getElementsByTagName("property"); - for (int i=0;i<properties.getLength();i++) { - org.w3c.dom.Element property = (org.w3c.dom.Element)properties.item(i); - if (name.equals(property.getAttribute("name"))) { - Text text = (Text)property.getFirstChild(); - if (text==null || text.getData()==null) return defaultValue; - return text.getData(); - } - } - return defaultValue; - } - public static void configureHibernate(String connectionUrl) throws Exception { Properties properties = ApplicationProperties.getProperties(); --- 99,102 ---- *************** *** 120,125 **** public static String getProperty(Properties properties, String name) { String value = properties.getProperty(name); ! if (value!=null) return value; ! return ApplicationProperties.getProperty(name); } --- 107,118 ---- public static String getProperty(Properties properties, String name) { String value = properties.getProperty(name); ! if (value!=null) { ! sLog.debug(" -- " + name + "=" + value); ! return value; ! } ! sLog.debug(" -- using application properties for " + name); ! value = ApplicationProperties.getProperty(name); ! sLog.debug(" -- " + name + "=" + value); ! return value; } *************** *** 243,248 **** (new _BaseRootDAO() { void setSF(SessionFactory fact, Configuration cfg) { ! _BaseRootDAO.sessionFactory = fact; ! _BaseRootDAO.configuration = cfg; } protected Class getReferenceClass() { return null; } --- 236,241 ---- (new _BaseRootDAO() { void setSF(SessionFactory fact, Configuration cfg) { ! _BaseRootDAO.sSessionFactory = fact; ! _BaseRootDAO.sConfiguration = cfg; } protected Class getReferenceClass() { return null; } *************** *** 368,376 **** ClassMetadata classMetadata = (ClassMetadata)entry.getValue(); try { ! hibSessionFactory.evict(Class.forName(className)); for (int j=0;j<classMetadata.getPropertyNames().length;j++) { if (classMetadata.getPropertyTypes()[j].isCollectionType()) { try { ! hibSessionFactory.evictCollection(className+"."+classMetadata.getPropertyNames()[j]); } catch (MappingException e) {} } --- 361,369 ---- ClassMetadata classMetadata = (ClassMetadata)entry.getValue(); try { ! hibSessionFactory.getCache().evictEntityRegion(Class.forName(className)); for (int j=0;j<classMetadata.getPropertyNames().length;j++) { if (classMetadata.getPropertyTypes()[j].isCollectionType()) { try { ! hibSessionFactory.getCache().evictCollectionRegion(className+"."+classMetadata.getPropertyNames()[j]); } catch (MappingException e) {} } *************** *** 380,389 **** } else { ClassMetadata classMetadata = hibSessionFactory.getClassMetadata(persistentClass); ! hibSessionFactory.evict(persistentClass); if (classMetadata!=null) { for (int j=0;j<classMetadata.getPropertyNames().length;j++) { if (classMetadata.getPropertyTypes()[j].isCollectionType()) { try { ! hibSessionFactory.evictCollection(persistentClass.getClass().getName()+"."+classMetadata.getPropertyNames()[j]); } catch (MappingException e) {} } --- 373,382 ---- } else { ClassMetadata classMetadata = hibSessionFactory.getClassMetadata(persistentClass); ! hibSessionFactory.getCache().evictEntityRegion(persistentClass); if (classMetadata!=null) { for (int j=0;j<classMetadata.getPropertyNames().length;j++) { if (classMetadata.getPropertyTypes()[j].isCollectionType()) { try { ! hibSessionFactory.getCache().evictCollectionRegion(persistentClass.getClass().getName()+"."+classMetadata.getPropertyNames()[j]); } catch (MappingException e) {} } *************** *** 392,400 **** } if (evictQueries) ! hibSessionFactory.evictQueries(); } public static boolean isMySQL() { ! return "org.hibernate.dialect.MySQLInnoDBDialect".equals(_RootDAO.getConfiguration().getProperty("dialect")); } --- 385,405 ---- } if (evictQueries) ! hibSessionFactory.getCache().evictQueryRegions(); ! } ! ! public static Class<?> getDialect() { ! try { ! return Class.forName(_RootDAO.getConfiguration().getProperty("dialect")); ! } catch (ClassNotFoundException e) { ! return null; ! } } public static boolean isMySQL() { ! return MySQLDialect.class.isAssignableFrom(getDialect()); ! } ! ! public static boolean isOracle() { ! return Oracle8iDialect.class.isAssignableFrom(getDialect()); } *************** *** 405,407 **** --- 410,419 ---- return dateSQL+(incrementSQL.startsWith("+")||incrementSQL.startsWith("-")?"":"+")+incrementSQL; } + + public static String dayOfWeek(String field) { + if (isOracle()) + return "to_char(" + field + ",'D')"; + else + return "dayofweek(" + field + ")"; + } } |
|
From: Tomas M. <to...@us...> - 2010-12-01 11:11:31
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/webutil/pdf In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13954/JavaSource/org/unitime/timetable/webutil/pdf Modified Files: PdfEventTableBuilder.java PdfClassAssignmentReportListTableBuilder.java PdfInstructionalOfferingTableBuilder.java PdfReservationsTableBuilder.java PdfClassListTableBuilder.java Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) Index: PdfInstructionalOfferingTableBuilder.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/webutil/pdf/PdfInstructionalOfferingTableBuilder.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PdfInstructionalOfferingTableBuilder.java 6 Mar 2010 14:34:25 -0000 1.12 --- PdfInstructionalOfferingTableBuilder.java 1 Dec 2010 11:10:52 -0000 1.13 *************** *** 1,4 **** /* ! * UniTime 3.1 (University Timetabling Application) * Copyright (C) 2008-2009, UniTime LLC, and individual contributors * as indicated by the @authors tag. --- 1,4 ---- /* ! * UniTime 3.2 (University Timetabling Application) * Copyright (C) 2008-2009, UniTime LLC, and individual contributors * as indicated by the @authors tag. *************** *** 6,10 **** * 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. * --- 6,10 ---- * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.webutil.pdf; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.webutil.pdf; *************** *** 27,30 **** --- 27,31 ---- import java.util.Collections; import java.util.Comparator; + import java.util.Enumeration; import java.util.Iterator; import java.util.Set; *************** *** 70,74 **** import org.unitime.timetable.solver.exam.ExamAssignmentProxy; import org.unitime.timetable.solver.exam.ui.ExamAssignment; - import org.unitime.timetable.solver.ui.AssignmentPreferenceInfo; import org.unitime.timetable.util.Constants; import org.unitime.timetable.util.PdfEventHandler; --- 71,74 ---- *************** *** 76,92 **** import org.unitime.timetable.webutil.WebInstructionalOfferingTableBuilder; ! import net.sf.cpsolver.coursett.model.TimeLocation.IntEnumeration; - import com.lowagie.text.Chunk; - import com.lowagie.text.Document; - import com.lowagie.text.Element; - import com.lowagie.text.Font; - import com.lowagie.text.FontFactory; - import com.lowagie.text.Image; - import com.lowagie.text.Paragraph; - import com.lowagie.text.Rectangle; - import com.lowagie.text.pdf.PdfPCell; - import com.lowagie.text.pdf.PdfPTable; - import com.lowagie.text.pdf.PdfWriter; --- 76,93 ---- import org.unitime.timetable.webutil.WebInstructionalOfferingTableBuilder; ! import com.itextpdf.text.BaseColor; ! import com.itextpdf.text.Chunk; ! import com.itextpdf.text.Document; ! import com.itextpdf.text.Element; ! import com.itextpdf.text.Font; ! import com.itextpdf.text.FontFactory; ! import com.itextpdf.text.Image; ! import com.itextpdf.text.Paragraph; ! import com.itextpdf.text.Rectangle; ! import com.itextpdf.text.pdf.PdfPCell; ! import com.itextpdf.text.pdf.PdfPTable; ! import com.itextpdf.text.pdf.PdfWriter; ! *************** *** 106,119 **** } ! protected static Color sBorderColor = Color.BLACK; ! protected static Color sBgColorClass = Color.WHITE; ! protected static Color sBgColorSubpart = new Color(225,225,225); ! protected static Color sBgColorConfig = new Color(200,200,200); ! protected static Color sBgColorOffering = new Color(200,200,200); ! protected static Color sBgColorHeader = Color.WHITE; ! protected Color iBgColor = Color.WHITE; ! protected Color sEnableColor = Color.BLACK; ! protected Color sDisableColor = Color.GRAY; public PdfPCell createCell() { --- 107,120 ---- } ! protected static BaseColor sBorderColor = BaseColor.BLACK; ! protected static BaseColor sBgColorClass = BaseColor.WHITE; ! protected static BaseColor sBgColorSubpart = new BaseColor(225,225,225); ! protected static BaseColor sBgColorConfig = new BaseColor(200,200,200); ! protected static BaseColor sBgColorOffering = new BaseColor(200,200,200); ! protected static BaseColor sBgColorHeader = BaseColor.WHITE; ! protected BaseColor iBgColor = BaseColor.WHITE; ! protected BaseColor sEnableColor = BaseColor.BLACK; ! protected BaseColor sDisableColor = BaseColor.GRAY; public PdfPCell createCell() { *************** *** 140,144 **** } ! public void addText(PdfPCell cell, String text, boolean bold, boolean italic, int orientation, Color color, boolean newLine) { if (text==null) return; if (cell.getPhrase()==null) { --- 141,145 ---- } ! public void addText(PdfPCell cell, String text, boolean bold, boolean italic, int orientation, BaseColor color, boolean newLine) { if (text==null) return; if (cell.getPhrase()==null) { *************** *** 491,495 **** protected PdfPCell pdfBuildPrefGroupLabel(PreferenceGroup prefGroup, String indentSpaces, boolean isEditable, String prevLabel){ ! Color color = (isEditable?sEnableColor:sDisableColor); String label = prefGroup.toString(); if (prefGroup instanceof Class_) { --- 492,496 ---- protected PdfPCell pdfBuildPrefGroupLabel(PreferenceGroup prefGroup, String indentSpaces, boolean isEditable, String prevLabel){ ! BaseColor color = (isEditable?sEnableColor:sDisableColor); String label = prefGroup.toString(); if (prefGroup instanceof Class_) { *************** *** 509,513 **** PdfPCell cell = createCell(); if (dp!=null) { ! Color color = (isEditable?sEnableColor:sDisableColor); addText(cell, dp.getName(), false, false, Element.ALIGN_CENTER, color, true); } --- 510,514 ---- PdfPCell cell = createCell(); if (dp!=null) { ! BaseColor color = (isEditable?sEnableColor:sDisableColor); addText(cell, dp.getName(), false, false, Element.ALIGN_CENTER, color, true); } *************** *** 516,520 **** private PdfPCell pdfBuildTimePatternCell(PreferenceGroup prefGroup, boolean isEditable){ ! Color color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); for (Iterator i=prefGroup.effectiveTimePatterns().iterator(); i.hasNext();) { --- 517,521 ---- private PdfPCell pdfBuildTimePatternCell(PreferenceGroup prefGroup, boolean isEditable){ ! BaseColor color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); for (Iterator i=prefGroup.effectiveTimePatterns().iterator(); i.hasNext();) { *************** *** 534,538 **** private PdfPCell pdfBuildTimePrefCell(ClassAssignmentProxy classAssignment, PreferenceGroup prefGroup, boolean isEditable){ ! Color color = (isEditable?sEnableColor:sDisableColor); Assignment a = null; if (getDisplayTimetable() && isShowTimetable() && classAssignment!=null && prefGroup instanceof Class_) { --- 535,539 ---- private PdfPCell pdfBuildTimePrefCell(ClassAssignmentProxy classAssignment, PreferenceGroup prefGroup, boolean isEditable){ ! BaseColor color = (isEditable?sEnableColor:sDisableColor); Assignment a = null; if (getDisplayTimetable() && isShowTimetable() && classAssignment!=null && prefGroup instanceof Class_) { *************** *** 555,559 **** rtt.getModel().setDefaultSelection(getDefaultTimeGridSize()); if (rtt.getModel().isExactTime()) { - StringBuffer sb = new StringBuffer(); addText(cell, rtt.exactTime(false), false, false, Element.ALIGN_LEFT, color, true); } else { --- 556,559 ---- *************** *** 580,584 **** private PdfPCell pdfBuildPreferenceCell(ClassAssignmentProxy classAssignment, PreferenceGroup prefGroup, Class prefType, boolean isEditable){ if (!isEditable) return createCell(); ! Color color = (isEditable?sEnableColor:sDisableColor); if (TimePref.class.equals(prefType)) { --- 580,584 ---- private PdfPCell pdfBuildPreferenceCell(ClassAssignmentProxy classAssignment, PreferenceGroup prefGroup, Class prefType, boolean isEditable){ if (!isEditable) return createCell(); ! BaseColor color = (isEditable?sEnableColor:sDisableColor); if (TimePref.class.equals(prefType)) { *************** *** 604,608 **** private PdfPCell pdfBuildPreferenceCell(ClassAssignmentProxy classAssignment, PreferenceGroup prefGroup, Class[] prefTypes, boolean isEditable){ if (!isEditable) return createCell(); ! Color color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); --- 604,608 ---- private PdfPCell pdfBuildPreferenceCell(ClassAssignmentProxy classAssignment, PreferenceGroup prefGroup, Class[] prefTypes, boolean isEditable){ if (!isEditable) return createCell(); ! BaseColor color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); *************** *** 654,658 **** private PdfPCell pdfBuildLimit(ClassAssignmentProxy classAssignment, PreferenceGroup prefGroup, boolean isEditable){ ! Color color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); --- 654,658 ---- private PdfPCell pdfBuildLimit(ClassAssignmentProxy classAssignment, PreferenceGroup prefGroup, boolean isEditable){ ! BaseColor color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); *************** *** 701,705 **** private PdfPCell pdfBuildDivisionSection(PreferenceGroup prefGroup, boolean isEditable){ ! Color color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); --- 701,705 ---- private PdfPCell pdfBuildDivisionSection(PreferenceGroup prefGroup, boolean isEditable){ ! BaseColor color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); *************** *** 715,719 **** private PdfPCell pdfBuildInstructor(PreferenceGroup prefGroup, boolean isEditable){ ! Color color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); --- 715,719 ---- private PdfPCell pdfBuildInstructor(PreferenceGroup prefGroup, boolean isEditable){ ! BaseColor color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); *************** *** 735,739 **** private PdfPCell pdfBuildCredit(PreferenceGroup prefGroup, boolean isEditable){ ! Color color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); --- 735,739 ---- private PdfPCell pdfBuildCredit(PreferenceGroup prefGroup, boolean isEditable){ ! BaseColor color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); *************** *** 749,753 **** private PdfPCell pdfBuildSchedulePrintNote(PreferenceGroup prefGroup, boolean isEditable, User user) { ! Color color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); --- 749,753 ---- private PdfPCell pdfBuildSchedulePrintNote(PreferenceGroup prefGroup, boolean isEditable, User user) { ! BaseColor color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); *************** *** 767,771 **** private PdfPCell pdfBuildSchedulePrintNote(InstructionalOffering io, boolean isEditable, User user){ ! Color color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); --- 767,771 ---- private PdfPCell pdfBuildSchedulePrintNote(InstructionalOffering io, boolean isEditable, User user){ ! BaseColor color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); *************** *** 790,794 **** private PdfPCell pdfBuildNote(PreferenceGroup prefGroup, boolean isEditable, User user){ ! Color color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); --- 790,794 ---- private PdfPCell pdfBuildNote(PreferenceGroup prefGroup, boolean isEditable, User user){ ! BaseColor color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); *************** *** 808,812 **** private PdfPCell pdfBuildManager(PreferenceGroup prefGroup, boolean isEditable){ ! Color color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); --- 808,812 ---- private PdfPCell pdfBuildManager(PreferenceGroup prefGroup, boolean isEditable){ ! BaseColor color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); *************** *** 825,829 **** private PdfPCell pdfBuildMinPerWeek(PreferenceGroup prefGroup, boolean isEditable){ ! Color color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); --- 825,829 ---- private PdfPCell pdfBuildMinPerWeek(PreferenceGroup prefGroup, boolean isEditable){ ! BaseColor color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); *************** *** 840,844 **** private PdfPCell pdfBuildRoomLimit(PreferenceGroup prefGroup, boolean isEditable, boolean classLimitDisplayed){ ! Color color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); --- 840,844 ---- private PdfPCell pdfBuildRoomLimit(PreferenceGroup prefGroup, boolean isEditable, boolean classLimitDisplayed){ ! BaseColor color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); *************** *** 878,882 **** private PdfPCell pdfBuildAssignedTime(ClassAssignmentProxy classAssignment, PreferenceGroup prefGroup, boolean isEditable){ ! Color color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); --- 878,882 ---- private PdfPCell pdfBuildAssignedTime(ClassAssignmentProxy classAssignment, PreferenceGroup prefGroup, boolean isEditable){ ! BaseColor color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); *************** *** 884,891 **** Class_ aClass = (Class_) prefGroup; Assignment a = null; - AssignmentPreferenceInfo info = null; try { a = classAssignment.getAssignment(aClass); - info = classAssignment.getAssignmentInfo(aClass); } catch (Exception e) { Debug.error(e); --- 884,889 ---- *************** *** 893,899 **** if (a!=null) { StringBuffer sb = new StringBuffer(); ! IntEnumeration e = a.getTimeLocation().getDays(); while (e.hasMoreElements()){ ! sb.append(Constants.DAY_NAMES_SHORT[(int)e.nextInt()]); } sb.append(" "); --- 891,897 ---- if (a!=null) { StringBuffer sb = new StringBuffer(); ! Enumeration<Integer> e = a.getTimeLocation().getDays(); while (e.hasMoreElements()){ ! sb.append(Constants.DAY_NAMES_SHORT[e.nextElement()]); } sb.append(" "); *************** *** 909,913 **** private PdfPCell pdfBuildAssignedRoom(ClassAssignmentProxy classAssignment, PreferenceGroup prefGroup, boolean isEditable) { ! Color color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); --- 907,911 ---- private PdfPCell pdfBuildAssignedRoom(ClassAssignmentProxy classAssignment, PreferenceGroup prefGroup, boolean isEditable) { ! BaseColor color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); *************** *** 915,922 **** Class_ aClass = (Class_) prefGroup; Assignment a = null; - AssignmentPreferenceInfo info = null; try { a= classAssignment.getAssignment(aClass); - info = classAssignment.getAssignmentInfo(aClass); } catch (Exception e) { Debug.error(e); --- 913,918 ---- *************** *** 939,943 **** } private PdfPCell pdfBuildAssignedRoomCapacity(ClassAssignmentProxy classAssignment, PreferenceGroup prefGroup, boolean isEditable) { ! Color color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); --- 935,939 ---- } private PdfPCell pdfBuildAssignedRoomCapacity(ClassAssignmentProxy classAssignment, PreferenceGroup prefGroup, boolean isEditable) { ! BaseColor color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); *************** *** 973,977 **** if (i.hasNext()) sb.append("\n"); } ! Color color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); addText(cell, sb.toString(), false, false, Element.ALIGN_LEFT, color, true); --- 969,973 ---- if (i.hasNext()) sb.append("\n"); } ! BaseColor color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); addText(cell, sb.toString(), false, false, Element.ALIGN_LEFT, color, true); *************** *** 993,997 **** if (i.hasNext()) sb.append("\n"); } ! Color color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); addText(cell, sb.toString(), false, false, Element.ALIGN_LEFT, color, true); --- 989,993 ---- if (i.hasNext()) sb.append("\n"); } ! BaseColor color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); addText(cell, sb.toString(), false, false, Element.ALIGN_LEFT, color, true); *************** *** 1017,1021 **** if (i.hasNext()) sb.append("\n"); } ! Color color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); addText(cell, sb.toString(), false, false, Element.ALIGN_LEFT, color, true); --- 1013,1017 ---- if (i.hasNext()) sb.append("\n"); } ! BaseColor color = (isEditable?sEnableColor:sDisableColor); PdfPCell cell = createCell(); addText(cell, sb.toString(), false, false, Element.ALIGN_LEFT, color, true); *************** *** 1184,1188 **** iBgColor = sBgColorConfig; boolean isEditable = ioc.isViewableBy(user); ! Color color = (isEditable?sEnableColor:sDisableColor); String configName = ioc.getName(); boolean unlimited = ioc.isUnlimitedEnrollment().booleanValue(); --- 1180,1184 ---- iBgColor = sBgColorConfig; boolean isEditable = ioc.isViewableBy(user); ! BaseColor color = (isEditable?sEnableColor:sDisableColor); String configName = ioc.getName(); boolean unlimited = ioc.isUnlimitedEnrollment().booleanValue(); *************** *** 1347,1351 **** } boolean isManagedAs = !co.isIsControl().booleanValue(); ! Color color = (isEditable?sEnableColor:sDisableColor); if (isShowLabel()){ --- 1343,1347 ---- } boolean isManagedAs = !co.isIsControl().booleanValue(); ! BaseColor color = (isEditable?sEnableColor:sDisableColor); if (isShowLabel()){ *************** *** 1655,1659 **** } else { if(displayHeader) ! iDocument.add(new Paragraph("There are no courses currently offered for this subject.", FontFactory.getFont(FontFactory.HELVETICA, 12, Font.BOLD, Color.RED))); } --- 1651,1655 ---- } else { if(displayHeader) ! iDocument.add(new Paragraph("There are no courses currently offered for this subject.", FontFactory.getFont(FontFactory.HELVETICA, 12, Font.BOLD, BaseColor.RED))); } *************** *** 1683,1687 **** } else { if(displayHeader) ! iDocument.add(new Paragraph("All courses are currently being offered for this subject.", FontFactory.getFont(FontFactory.HELVETICA, 12, Font.BOLD, Color.BLACK))); } --- 1679,1683 ---- } else { if(displayHeader) ! iDocument.add(new Paragraph("All courses are currently being offered for this subject.", FontFactory.getFont(FontFactory.HELVETICA, 12, Font.BOLD, BaseColor.BLACK))); } Index: PdfClassListTableBuilder.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/webutil/pdf/PdfClassListTableBuilder.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PdfClassListTableBuilder.java 29 Mar 2009 15:04:03 -0000 1.4 --- PdfClassListTableBuilder.java 1 Dec 2010 11:10:52 -0000 1.5 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,24 **** * * 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. */ package org.unitime.timetable.webutil.pdf; - import java.awt.Color; import java.io.File; import java.io.FileOutputStream; --- 15,23 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.webutil.pdf; import java.io.File; import java.io.FileOutputStream; *************** *** 49,59 **** import org.unitime.timetable.util.PdfEventHandler; ! import com.lowagie.text.Document; ! import com.lowagie.text.Element; ! import com.lowagie.text.FontFactory; ! import com.lowagie.text.Paragraph; ! import com.lowagie.text.Rectangle; ! import com.lowagie.text.pdf.PdfPCell; ! import com.lowagie.text.pdf.PdfPTable; --- 48,59 ---- import org.unitime.timetable.util.PdfEventHandler; ! import com.itextpdf.text.BaseColor; ! import com.itextpdf.text.Document; ! import com.itextpdf.text.Element; ! import com.itextpdf.text.FontFactory; ! import com.itextpdf.text.Paragraph; ! import com.itextpdf.text.Rectangle; ! import com.itextpdf.text.pdf.PdfPCell; ! import com.itextpdf.text.pdf.PdfPTable; *************** *** 172,176 **** protected PdfPCell pdfBuildPrefGroupLabel(PreferenceGroup prefGroup, String indentSpaces, boolean isEditable, String prevLabel) { if (prefGroup instanceof Class_) { ! Color color = (isEditable?Color.BLACK:Color.GRAY); String label = prefGroup.toString(); Class_ aClass = (Class_) prefGroup; --- 172,176 ---- protected PdfPCell pdfBuildPrefGroupLabel(PreferenceGroup prefGroup, String indentSpaces, boolean isEditable, String prevLabel) { if (prefGroup instanceof Class_) { ! BaseColor color = (isEditable?BaseColor.BLACK:BaseColor.GRAY); String label = prefGroup.toString(); Class_ aClass = (Class_) prefGroup; Index: PdfReservationsTableBuilder.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/webutil/pdf/PdfReservationsTableBuilder.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PdfReservationsTableBuilder.java 17 Jun 2008 21:24:49 -0000 1.2 --- PdfReservationsTableBuilder.java 1 Dec 2010 11:10:52 -0000 1.3 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,24 **** * * 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. */ package org.unitime.timetable.webutil.pdf; - import java.awt.Color; import java.io.File; import java.io.FileOutputStream; --- 15,23 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.webutil.pdf; import java.io.File; import java.io.FileOutputStream; *************** *** 54,65 **** import org.unitime.timetable.webutil.ReservationsTableBuilder; ! import com.lowagie.text.Chunk; ! import com.lowagie.text.Document; ! import com.lowagie.text.Font; ! import com.lowagie.text.FontFactory; ! import com.lowagie.text.Graphic; ! import com.lowagie.text.PageSize; ! import com.lowagie.text.Paragraph; ! import com.lowagie.text.pdf.PdfWriter; --- 53,63 ---- import org.unitime.timetable.webutil.ReservationsTableBuilder; ! import com.itextpdf.text.BaseColor; ! import com.itextpdf.text.Chunk; ! import com.itextpdf.text.Document; ! import com.itextpdf.text.Font; ! import com.itextpdf.text.FontFactory; ! import com.itextpdf.text.PageSize; ! import com.itextpdf.text.Paragraph; *************** *** 73,77 **** /** Pdf document objects **/ private Document pdfDoc = null; - private PdfWriter pdfWriter = null; /** Colors to indicate and increase/decrease in actual reserved from requested **/ --- 71,74 ---- *************** *** 139,143 **** // Create writer instance ! pdfWriter = PdfEventHandler.initFooter(pdfDoc, out); // Set metadata --- 136,140 ---- // Create writer instance ! PdfEventHandler.initFooter(pdfDoc, out); // Set metadata *************** *** 154,158 **** Set instrOfferings = super.getInstructionalOfferings(subjectAreaId, courseNbr); if (instrOfferings==null || instrOfferings.size()==0) { ! this.pdfDoc.add(new Paragraph("There are no reservations for this subject area / course number.", FontFactory.getFont(FontFactory.HELVETICA, 12, Font.BOLD, Color.RED))); result = true; } --- 151,155 ---- Set instrOfferings = super.getInstructionalOfferings(subjectAreaId, courseNbr); if (instrOfferings==null || instrOfferings.size()==0) { ! this.pdfDoc.add(new Paragraph("There are no reservations for this subject area / course number.", FontFactory.getFont(FontFactory.HELVETICA, 12, Font.BOLD, BaseColor.RED))); result = true; } *************** *** 367,376 **** if (found) { ! Graphic g = new Graphic(); ! g.setHorizontalLine(1, 100, new Color(200, 200, 200)); Paragraph p1 = new Paragraph(); p1.setIndentationLeft(-20); p1.add("\n"); ! p1.add(g); p1.add("\n"); pdfDoc.add(p1); --- 364,374 ---- if (found) { ! //FIXME: do not know how to do this with the new iText lib ! // Graphic g = new Graphic(); ! // g.setHorizontalLine(1, 100, new BaseColor(200, 200, 200)); Paragraph p1 = new Paragraph(); p1.setIndentationLeft(-20); p1.add("\n"); ! p1.add("-----"); p1.add("\n"); pdfDoc.add(p1); *************** *** 667,671 **** /** ! * Color format reservation total * @param oRequest * @param oReserved --- 665,669 ---- /** ! * BaseColor format reservation total * @param oRequest * @param oReserved *************** *** 711,718 **** } ! Font black = FontFactory.getFont(FontFactory.HELVETICA, Font.DEFAULTSIZE, Font.BOLD, new Color(0x00, 0x00, 0x00)); Chunk c1 = new Chunk(name, black); ! Font navyBlue = FontFactory.getFont(FontFactory.HELVETICA, Font.DEFAULTSIZE, Font.BOLD, new Color(0x00, 0x00, 0x80)); Chunk c2 = new Chunk( limitStr, navyBlue ); --- 709,716 ---- } ! Font black = FontFactory.getFont(FontFactory.HELVETICA, Font.DEFAULTSIZE, Font.BOLD, new BaseColor(0x00, 0x00, 0x00)); Chunk c1 = new Chunk(name, black); ! Font navyBlue = FontFactory.getFont(FontFactory.HELVETICA, Font.DEFAULTSIZE, Font.BOLD, new BaseColor(0x00, 0x00, 0x80)); Chunk c2 = new Chunk( limitStr, navyBlue ); Index: PdfEventTableBuilder.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/webutil/pdf/PdfEventTableBuilder.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PdfEventTableBuilder.java 29 Mar 2009 15:04:03 -0000 1.4 --- PdfEventTableBuilder.java 1 Dec 2010 11:10:52 -0000 1.5 *************** *** 1,5 **** package org.unitime.timetable.webutil.pdf; - import java.awt.Color; import java.io.File; import java.io.FileOutputStream; --- 1,23 ---- + /* + * UniTime 3.2 (University Timetabling Application) + * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors + * as indicated by the @authors tag. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + * + */ package org.unitime.timetable.webutil.pdf; import java.io.File; import java.io.FileOutputStream; *************** *** 21,42 **** import org.unitime.timetable.form.MeetingListForm; import org.unitime.timetable.model.ClassEvent; import org.unitime.timetable.model.Event; import org.unitime.timetable.model.Meeting; import org.unitime.timetable.model.Event.MultiMeeting; import org.unitime.timetable.model.dao.ClassEventDAO; import org.unitime.timetable.util.Constants; import org.unitime.timetable.util.PdfEventHandler; import org.unitime.timetable.webutil.WebEventTableBuilder; ! import com.lowagie.text.Chunk; ! import com.lowagie.text.Document; ! import com.lowagie.text.Element; ! import com.lowagie.text.Font; ! import com.lowagie.text.FontFactory; ! import com.lowagie.text.PageSize; ! import com.lowagie.text.Paragraph; ! import com.lowagie.text.pdf.PdfPCell; ! import com.lowagie.text.pdf.PdfPTable; ! import com.lowagie.text.pdf.PdfWriter; --- 39,66 ---- import org.unitime.timetable.form.MeetingListForm; import org.unitime.timetable.model.ClassEvent; + import org.unitime.timetable.model.CourseEvent; import org.unitime.timetable.model.Event; + import org.unitime.timetable.model.ExamEvent; import org.unitime.timetable.model.Meeting; + import org.unitime.timetable.model.RelatedCourseInfo; import org.unitime.timetable.model.Event.MultiMeeting; import org.unitime.timetable.model.dao.ClassEventDAO; + import org.unitime.timetable.model.dao.CourseEventDAO; + import org.unitime.timetable.model.dao.ExamEventDAO; import org.unitime.timetable.util.Constants; import org.unitime.timetable.util.PdfEventHandler; import org.unitime.timetable.webutil.WebEventTableBuilder; ! import com.itextpdf.text.BaseColor; ! import com.itextpdf.text.Chunk; ! import com.itextpdf.text.Document; ! import com.itextpdf.text.Element; ! import com.itextpdf.text.Font; ! import com.itextpdf.text.FontFactory; ! import com.itextpdf.text.PageSize; ! import com.itextpdf.text.Paragraph; ! import com.itextpdf.text.pdf.PdfPCell; ! import com.itextpdf.text.pdf.PdfPTable; ! import com.itextpdf.text.pdf.PdfWriter; *************** *** 46,54 **** protected PdfPTable iPdfTable = null; ! protected Color iBgColor = Color.WHITE; protected boolean iUnderline = false; protected boolean iOverline = false; ! protected Color iTextColor = Color.BLACK; protected boolean iTextItalic = false; --- 70,78 ---- protected PdfPTable iPdfTable = null; ! protected BaseColor iBgColor = BaseColor.WHITE; protected boolean iUnderline = false; protected boolean iOverline = false; ! protected BaseColor iTextColor = BaseColor.BLACK; protected boolean iTextItalic = false; *************** *** 57,63 **** } public PdfPCell createCell() { PdfPCell cell = new PdfPCell(); ! cell.setBorderColor(Color.BLACK); cell.setPadding(3); cell.setBorderWidth(0); --- 81,91 ---- } + public int getMaxResults() { + return 1500; + } + public PdfPCell createCell() { PdfPCell cell = new PdfPCell(); ! cell.setBorderColor(BaseColor.BLACK); cell.setPadding(3); cell.setBorderWidth(0); *************** *** 82,86 **** } ! public void addText(PdfPCell cell, String text, boolean bold, boolean italic, int orientation, Color color, boolean newLine) { if (text==null) return; if (cell.getPhrase()==null) { --- 110,114 ---- } ! public void addText(PdfPCell cell, String text, boolean bold, boolean italic, int orientation, BaseColor color, boolean newLine) { if (text==null) return; if (cell.getPhrase()==null) { *************** *** 107,117 **** if (events) { PdfPCell c; ! if (numEventsOrMeetings >= 1501) { c = createCell(); ! addText(c, "**Warning: More than 1500 events match your search criteria. Only the first 1500 events are displayed. Please, redefine the search criteria in your filter.", true, Element.ALIGN_LEFT); c.setColspan(mainContact?6:5); iPdfTable.addCell(c); } ! iBgColor = new Color(224,224,224); //first line c = createCell(); --- 135,145 ---- if (events) { PdfPCell c; ! if (numEventsOrMeetings > getMaxResults()) { c = createCell(); ! addText(c, "**Warning: More than " + getMaxResults() + " events match your search criteria. Only the first " + getMaxResults() + " events are displayed. Please, redefine the search criteria in your filter.", true, Element.ALIGN_LEFT); c.setColspan(mainContact?6:5); iPdfTable.addCell(c); } ! iBgColor = new BaseColor(224,224,224); //first line c = createCell(); *************** *** 136,140 **** } //second line ! iBgColor = new Color(244,244,244); iUnderline = true; c = createCell(); --- 164,168 ---- } //second line ! iBgColor = new BaseColor(244,244,244); iUnderline = true; c = createCell(); *************** *** 155,159 **** iPdfTable.addCell(c); } ! if (numEventsOrMeetings < 1501){ iPdfTable.setHeaderRows(2); } else { --- 183,187 ---- iPdfTable.addCell(c); } ! if (numEventsOrMeetings <= getMaxResults()){ iPdfTable.setHeaderRows(2); } else { *************** *** 162,172 **** } else { PdfPCell c; ! if (numEventsOrMeetings >= 1501){ c = createCell(); ! addText(c, "**Warning: More than 1500 meetings match your search criteria. Only the first 1500 meetings are displayed. Please, redefine the search criteria in your filter.", true, Element.ALIGN_LEFT); c.setColspan(mainContact?10:9); iPdfTable.addCell(c); } ! iBgColor = new Color(224,224,224); //first line iUnderline = true; --- 190,200 ---- } else { PdfPCell c; ! if (numEventsOrMeetings > getMaxResults()){ c = createCell(); ! addText(c, "**Warning: More than " + getMaxResults() + " meetings match your search criteria. Only the first " + getMaxResults() + " meetings are displayed. Please, redefine the search criteria in your filter.", true, Element.ALIGN_LEFT); c.setColspan(mainContact?10:9); iPdfTable.addCell(c); } ! iBgColor = new BaseColor(224,224,224); //first line iUnderline = true; *************** *** 203,207 **** iPdfTable.addCell(c); } ! if (numEventsOrMeetings < 1501){ iPdfTable.setHeaderRows(1); } else { --- 231,235 ---- iPdfTable.addCell(c); } ! if (numEventsOrMeetings <= getMaxResults()){ iPdfTable.setHeaderRows(1); } else { *************** *** 211,215 **** } ! iBgColor = Color.WHITE; iUnderline = false; } --- 239,243 ---- } ! iBgColor = BaseColor.WHITE; iUnderline = false; } *************** *** 247,250 **** --- 275,287 ---- addText(cell, "0", Element.ALIGN_RIGHT); } + } else if (Event.sEventTypeFinalExam == e.getEventType() || Event.sEventTypeMidtermExam == e.getEventType()) { + ExamEvent ee = new ExamEventDAO().get(e.getUniqueId()); + addText(cell, String.valueOf(ee.getExam().countStudents()), Element.ALIGN_RIGHT); + } else if (Event.sEventTypeCourse == e.getEventType()) { + CourseEvent ce = new CourseEventDAO().get(e.getUniqueId()); + int enrl = 0; + for (RelatedCourseInfo rci: ce.getRelatedCourses()) + enrl += rci.countStudents(); + addText(cell, String.valueOf(enrl), Element.ALIGN_RIGHT); } return (cell); *************** *** 256,265 **** return cell; } - - private PdfPCell pdfBuildEventType(Event e) { - PdfPCell cell = createCell(); - addText(cell, e.getEventTypeLabel()); - return cell; - } private PdfPCell pdfBuildEventTypeAbbv(Event e) { --- 293,296 ---- *************** *** 278,286 **** } - private PdfPCell pdfBuildEmptyEventInfo() { - PdfPCell cell = createCell(); - return cell; - } - private PdfPCell pdfBuildEmptyMeetingInfo() { PdfPCell cell = createCell(); --- 309,312 ---- *************** *** 348,354 **** } if (allPast) { ! iTextColor = Color.GRAY; iTextItalic = true; } ! iBgColor = new Color(223, 231, 242); iPdfTable.addCell(pdfBuildEventName(e)); iPdfTable.addCell(pdfBuildEventEnrollment(e)); --- 374,380 ---- } if (allPast) { ! iTextColor = BaseColor.GRAY; iTextItalic = true; } ! iBgColor = new BaseColor(223, 231, 242); iPdfTable.addCell(pdfBuildEventName(e)); iPdfTable.addCell(pdfBuildEventEnrollment(e)); *************** *** 358,362 **** if (mainContact) iPdfTable.addCell(pdfBuildMainContactName(e)); ! iTextColor = Color.BLACK; iTextItalic = false; iBgColor = Color.WHITE; } --- 384,388 ---- if (mainContact) iPdfTable.addCell(pdfBuildMainContactName(e)); ! iTextColor = BaseColor.BLACK; iTextItalic = false; iBgColor = BaseColor.WHITE; } *************** *** 364,373 **** Meeting m = mm.getMeetings().first(); if (mm.isPast()) { ! iTextColor = Color.GRAY; iTextItalic = true; } else { if (m.isApproved()) { //bgColor = "#DDFFDD"; } else { ! iBgColor = new Color(255,255,221); } } --- 390,399 ---- Meeting m = mm.getMeetings().first(); if (mm.isPast()) { ! iTextColor = BaseColor.GRAY; iTextItalic = true; } else { if (m.isApproved()) { //bgColor = "#DDFFDD"; } else { ! iBgColor = new BaseColor(255,255,221); } } *************** *** 380,384 **** if (mainContact) iPdfTable.addCell(mm.getMeetings().size()==1?pdfBuildApproved(m):pdfBuildApproved(mm)); ! iTextColor = Color.BLACK; iTextItalic = false; iBgColor = Color.WHITE; if (printOverlaps) { TreeSet<Meeting> overlaps = new TreeSet(); --- 406,410 ---- if (mainContact) iPdfTable.addCell(mm.getMeetings().size()==1?pdfBuildApproved(m):pdfBuildApproved(mm)); ! iTextColor = BaseColor.BLACK; iTextItalic = false; iBgColor = BaseColor.WHITE; if (printOverlaps) { TreeSet<Meeting> overlaps = new TreeSet(); *************** *** 396,402 **** Meeting m = mm.getMeetings().first(); if (mm.isPast()) { ! iTextColor = Color.GRAY; iTextItalic = true; } ! iBgColor = new Color(255,215,215); PdfPCell cell = createCell(); addText(cell," Conf/w "+m.getEvent().getEventName()+" ("+m.getEvent().getEventTypeAbbv()+")"); --- 422,428 ---- Meeting m = mm.getMeetings().first(); if (mm.isPast()) { ! iTextColor = BaseColor.GRAY; iTextItalic = true; } ! iBgColor = new BaseColor(255,215,215); PdfPCell cell = createCell(); addText(cell," Conf/w "+m.getEvent().getEventName()+" ("+m.getEvent().getEventTypeAbbv()+")"); *************** *** 407,424 **** iPdfTable.addCell(pdfBuildTime(m)); iPdfTable.addCell(pdfBuildLocation(m)); - String bgColor = null; if (mainContact) iPdfTable.addCell(mm.getMeetings().size()==1?pdfBuildApproved(m):pdfBuildApproved(mm)); ! iTextColor = Color.BLACK; iTextItalic = false; iBgColor = Color.WHITE; } private void pdfAddMeetingRowsToTable (Meeting m, boolean mainContact, Event lastEvent, Date now, boolean line, boolean printOverlaps) { if (m.getStartTime().before(now)) { ! iTextColor = Color.GRAY; iTextItalic = true; } else { if (m.isApproved()) { //bgColor = "#DDFFDD"; } else { ! iBgColor = new Color(255,255,221); } } --- 433,449 ---- iPdfTable.addCell(pdfBuildTime(m)); iPdfTable.addCell(pdfBuildLocation(m)); if (mainContact) iPdfTable.addCell(mm.getMeetings().size()==1?pdfBuildApproved(m):pdfBuildApproved(mm)); ! iTextColor = BaseColor.BLACK; iTextItalic = false; iBgColor = BaseColor.WHITE; } private void pdfAddMeetingRowsToTable (Meeting m, boolean mainContact, Event lastEvent, Date now, boolean line, boolean printOverlaps) { if (m.getStartTime().before(now)) { ! iTextColor = BaseColor.GRAY; iTextItalic = true; } else { if (m.isApproved()) { //bgColor = "#DDFFDD"; } else { ! iBgColor = new BaseColor(255,255,221); } } *************** *** 452,456 **** iPdfTable.addCell(pdfBuildApproved(m)); } ! iTextColor = Color.BLACK; iTextItalic = false; iBgColor = Color.WHITE; iOverline = false; if (printOverlaps) { TreeSet<Meeting> overlaps = new TreeSet(m.getTimeRoomOverlaps()); --- 477,481 ---- iPdfTable.addCell(pdfBuildApproved(m)); } ! iTextColor = BaseColor.BLACK; iTextItalic = false; iBgColor = BaseColor.WHITE; iOverline = false; if (printOverlaps) { TreeSet<Meeting> overlaps = new TreeSet(m.getTimeRoomOverlaps()); *************** *** 464,470 **** private void pdfAddOverlappingMeetingToTable(Meeting m, boolean mainContact, Date now) { if (m.getStartTime().before(now)) { ! iTextColor = Color.GRAY; iTextItalic = true; } ! iBgColor = new Color(255,215,215); PdfPCell cell = createCell(); addText(cell, " Conf/w "+(m.getEvent().getEventName()==null?"":m.getEvent().getEventName())+" ("+m.getEvent().getEventTypeAbbv()+")"); --- 489,495 ---- private void pdfAddOverlappingMeetingToTable(Meeting m, boolean mainContact, Date now) { if (m.getStartTime().before(now)) { ! iTextColor = BaseColor.GRAY; iTextItalic = true; } ! iBgColor = new BaseColor(255,215,215); PdfPCell cell = createCell(); addText(cell, " Conf/w "+(m.getEvent().getEventName()==null?"":m.getEvent().getEventName())+" ("+m.getEvent().getEventTypeAbbv()+")"); *************** *** 481,485 **** iPdfTable.addCell(pdfBuildApproved(m)); } ! iTextColor = Color.BLACK; iTextItalic = false; iBgColor = Color.WHITE; } --- 506,510 ---- iPdfTable.addCell(pdfBuildApproved(m)); } ! iTextColor = BaseColor.BLACK; iTextItalic = false; iBgColor = BaseColor.WHITE; } *************** *** 596,600 **** protected TableStream initTable(JspWriter outputStream){ TableStream table = new TableStream(outputStream); ! table.setWidth("90%"); table.setBorder(0); table.setCellSpacing(0); --- 621,625 ---- protected TableStream initTable(JspWriter outputStream){ TableStream table = new TableStream(outputStream); ! table.setWidth("100%"); table.setBorder(0); table.setCellSpacing(0); Index: PdfClassAssignmentReportListTableBuilder.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/webutil/pdf/PdfClassAssignmentReportListTableBuilder.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PdfClassAssignmentReportListTableBuilder.java 29 Mar 2009 15:04:03 -0000 1.4 --- PdfClassAssignmentReportListTableBuilder.java 1 Dec 2010 11:10:52 -0000 1.5 *************** *** 1,10 **** /* ! * UniTime 3.1 (University Timetabling Application) ! * Copyright (C) 2008, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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. * --- 1,10 ---- /* ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * 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 3 of the License, or * (at your option) any later version. * *************** *** 15,20 **** * * 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. */ package org.unitime.timetable.webutil.pdf; --- 15,20 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * */ package org.unitime.timetable.webutil.pdf; *************** *** 29,33 **** import org.unitime.commons.Debug; import org.unitime.commons.User; - import org.unitime.commons.web.htmlgen.TableStream; import org.unitime.timetable.ApplicationProperties; import org.unitime.timetable.form.ClassAssignmentsReportForm; --- 29,32 ---- *************** *** 44,52 **** import org.unitime.timetable.util.PdfEventHandler; ! import com.lowagie.text.Document; ! import com.lowagie.text.FontFactory; ! import com.lowagie.text.Paragraph; ! import com.lowagie.text.Rectangle; ! import com.lowagie.text.pdf.PdfPTable; --- 43,51 ---- import org.unitime.timetable.util.PdfEventHandler; ! import com.itextpdf.text.Document; ! import com.itextpdf.text.FontFactory; ! import com.itextpdf.text.Paragraph; ! import com.itextpdf.text.Rectangle; ! import com.itextpdf.text.pdf.PdfPTable; *************** *** 114,118 **** Class_ c = null; - TableStream table = null; int ct = 0; Iterator it = classes.iterator(); --- 113,116 ---- |
|
From: Tomas M. <to...@us...> - 2010-12-01 11:11:31
|
Update of /cvsroot/unitime/UniTime/Documentation In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13954/Documentation Modified Files: ReadMe.txt Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) Index: ReadMe.txt =================================================================== RCS file: /cvsroot/unitime/UniTime/Documentation/ReadMe.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ReadMe.txt 12 Jun 2007 19:15:33 -0000 1.2 --- ReadMe.txt 1 Dec 2010 11:10:52 -0000 1.3 *************** *** 1,2 **** ! Installation instructions are available at http://www.unitime.org/wiki/Timetabling_Installation. For more information, please visit http://www.unitime.org/. \ No newline at end of file --- 1,2 ---- ! Installation instructions are available at http://help.unitime.org/Timetabling_Installation. For more information, please visit http://www.unitime.org/. \ No newline at end of file |
|
From: Tomas M. <to...@us...> - 2010-12-01 11:11:31
|
Update of /cvsroot/unitime/UniTime/WebContent/WEB-INF/tld In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13954/WebContent/WEB-INF/tld Modified Files: timetable.tld struts-bean.tld struts-nested.tld struts-layout.tld struts-tiles.tld struts-html.tld struts-logic.tld Added Files: struts-faces.tld Log Message: UniTime 3.1 moved to branch maint_UniTime31 UniTime 3.2 merged from dev_curricula back to main branch (HEAD) Index: timetable.tld =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/WEB-INF/tld/timetable.tld,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** timetable.tld 17 Jun 2008 21:25:02 -0000 1.11 --- timetable.tld 1 Dec 2010 11:10:51 -0000 1.12 *************** *** 5,14 **** <!-- ! * 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. * --- 5,14 ---- <!-- ! * UniTime 3.2 (University Timetabling Application) ! * Copyright (C) 2008 - 2010, 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 3 of the License, or * (at your option) any later version. * *************** *** 19,24 **** * * 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. --> --- 19,24 ---- * * You should have received a copy of the GNU General Public License along ! * with this program. If not, see <http://www.gnu.org/licenses/>. ! * --> *************** *** 75,78 **** --- 75,89 ---- </tag> <tag> + <name>gwt-back</name> + <tag-class>org.unitime.timetable.tags.GwtBack</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>back</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Integer</type> + </attribute> + </tag> + <tag> <name>back-mark</name> <tag-class>org.unitime.timetable.tags.MarkBack</tag-class> *************** *** 270,273 **** --- 281,290 ---- <type>java.lang.String</type> </attribute> + <attribute> + <name>user</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.Boolean</type> + </attribute> </tag> *************** *** 282,285 **** --- 299,308 ---- <type>java.lang.String</type> </attribute> + <attribute> + <name>user</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.Boolean</type> + </attribute> </tag> *************** *** 294,297 **** --- 317,326 ---- <type>java.lang.String</type> </attribute> + <attribute> + <name>user</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.Boolean</type> + </attribute> </tag> *************** *** 312,315 **** --- 341,350 ---- <type>java.lang.String</type> </attribute> + <attribute> + <name>user</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.Boolean</type> + </attribute> </tag> *************** *** 330,333 **** --- 365,374 ---- <type>java.lang.String</type> </attribute> + <attribute> + <name>user</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.Boolean</type> + </attribute> </tag> *************** *** 398,400 **** --- 439,471 ---- <body-content>JSP</body-content> </tag> + + <tag> + <name>registration</name> + <tag-class>org.unitime.timetable.tags.Registration</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>method</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.String</type> + </attribute> + <attribute> + <name>update</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Boolean</type> + </attribute> + </tag> + + <tag> + <name>copy</name> + <tag-class>org.unitime.timetable.tags.Copyright</tag-class> + <body-content>JSP</body-content> + <attribute> + <name>br</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + <type>java.lang.Boolean</type> + </attribute> + </tag> </taglib> --- NEW FILE: struts-faces.tld --- <?xml version="1.0" encoding="UTF-8"?> <!-- $Id: struts-faces.tld,v 1.2 2010/12/01 11:10:51 tomas13 Exp $ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> <taglib> <tlib-version>1.3</tlib-version> <jsp-version>1.2</jsp-version> <short-name>Struts-Faces</short-name> <uri>http://struts.apache.org/tags-faces</uri> <description><![CDATA[ <p>This tag library provides custom action functionality that is similar to that provided by the Struts 1.1 tag libraries, but is built on top of the JavaServer Faces rendering architecture.</p> <p>This tag library includes the following tags:</p> ]]> </description> <tag> <name>base</name> <tag-class>org.apache.struts.faces.taglib.BaseTag</tag-class> <description><![CDATA[ <p>Renders an HTML <code><base></code> element with an <code>href</code> attribute pointing to the absolute location of the enclosing JSP page. This tag is valid only when nested inside an HTML <code><head></code> element. This tag is useful because it allows you to use relative URL references that are based on the URL of the page itself, rather than the URL to which the most recent submit took place.</p> ]]> </description> <attribute> <name>binding</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Value binding expression to bind this component to a backing bean property.</p> ]]> </description> </attribute> <attribute> <name>id</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description> Component id of this component. </description> </attribute> <attribute> <name>rendered</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description> Boolean attribute indicating whether this component should be rendered or not. </description> </attribute> <attribute> <name>target</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description> Target frame for this base reference. </description> </attribute> </tag> <tag> <name>commandLink</name> <tag-class>org.apache.struts.faces.taglib.CommandLinkTag</tag-class> <description><![CDATA[ <p>Renders an HTML <code><a></code> element defining a hyperlink that submits the current form. This component is required because the JSF 1.0 and 1.1 specifications require interoperability between the renderers for the form element and the command link element, without providing a portable mechanism to allow intermixed libraries.</p> ]]> </description> <attribute> <name>action</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>actionListener</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>id</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>immediate</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>rendered</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>value</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>accesskey</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>charset</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>dir</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>hreflang</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>lang</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>onblur</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>onclick</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>ondblclick</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>onfocus</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>onkeydown</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>onkeypress</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>onkeyup</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>onmousedown</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>onmousemove</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>onmouseout</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>onmouseover</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>onmouseup</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>rel</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>rev</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>style</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>styleClass</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>tabindex</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>target</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>title</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>type</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>errors</name> <tag-class>org.apache.struts.faces.taglib.ErrorsTag</tag-class> <description><![CDATA[ <p>Displays a list of error messages prepared by form bean or business logic validation processing.</p> <p>In order to use this component successfully, you must have defined an application scope <code>MessageResources</code> bean under the specified attribute name, with optinal definitions for the following message keys:</p> ]]> </description> <attribute> <name>binding</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Value binding expression to bind this component to a backing bean property.</p> ]]> </description> </attribute> <attribute> <name>bundle</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Name of the servlet context attribute under which the desired <code>MessageResources</code> bundle is stored. If not specified, the default bundle for this sub-application will be used.</p> ]]> </description> </attribute> <attribute> <name>id</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description> Component id of this component. </description> </attribute> <attribute> <name>property</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description> Component of the component for which to render errors. If not specified, all messages (regardless of property) are displayed. </description> </attribute> <attribute> <name>rendered</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description> Boolean attribute indicating whether this component should be rendered or not. </description> </attribute> </tag> <tag> <name>form</name> <tag-class>org.apache.struts.faces.taglib.FormTag</tag-class> <description><![CDATA[ <p>Render an HTML form element containing the nested components to present the appropriate label and input field elements. This tag is distinguished from the tag in the standard HTML RenderKit because it accepts a Struts <code><action></code> path as a parameter, and triggers the creation of a Struts form bean if needed.</p> ]]> </description> <attribute> <name>action</name> <required>true</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Struts <code>Action</code> to which this form should be submitted. This value must exactly match the <code>path</code> attribute of the corresponding <code><action></code> element in the <code>struts-config.xml</code> configuration file for this application module.</p> ]]> </description> </attribute> <attribute> <name>binding</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Value binding expression to bind this component to a backing bean property.</p> ]]> </description> </attribute> <attribute> <name>enctype</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>The content encoding to be used to submit this form, if the method is <code>POST</code>. This must be set to "<code>multipart/form-data</code>" if your form includes file upload field(s). If not specified, the browser default ("<code>application/x-www-form-urlencoded</code>") is used.</p> ]]> </description> </attribute> <attribute> <name>focus</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>The identifier of the form field that should receive focus when this form is rendered.</p> ]]> </description> </attribute> <attribute> <name>focusIndex</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>If the focus field is an array, such as a radio button group, you can specify the index of the array element to receive focus.</p> ]]> </description> </attribute> <attribute> <name>id</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description> Component id of this component. </description> </attribute> <attribute> <name>onreset</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>JavaScript event handler executed if this form is reset.</p> ]]> </description> </attribute> <attribute> <name>onsubmit</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>JavaScript event handler executed if this form is submitted.</p> ]]> </description> </attribute> <attribute> <name>rendered</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description> Boolean attribute indicating whether this component should be rendered or not. </description> </attribute> <attribute> <name>style</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>CSS styles to be applied to this HTML element.</p> ]]> </description> </attribute> <attribute> <name>styleClass</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description> CSS style class to use when rendering this component. </description> </attribute> <attribute> <name>target</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Window target to which this form is submitted, such as for use in framed presentations.</p> ]]> </description> </attribute> </tag> <tag> <name>html</name> <tag-class>org.apache.struts.faces.taglib.HtmlTag</tag-class> <body-content>JSP</body-content> <description><![CDATA[ <p>Renders an HTML <code><html></code> element with language attributes extracted from the user's current Locale object, if there is one.</p> ]]> </description> <attribute> <name>binding</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Value binding expression to bind this component to a backing bean property.</p> ]]> </description> </attribute> <attribute> <name>id</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description> Component id of this component. </description> </attribute> <attribute> <name>locale</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Set to <code>true</code> in order to record a <code>Locale</code> based on the current request's <code>Accept-Language</code> header (if any), if none has currently been set.</p> ]]> </description> </attribute> <attribute> <name>rendered</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description> Boolean attribute indicating whether this component should be rendered or not. </description> </attribute> <attribute> <name>xhtml</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Set to <code>true</code> to render an <code>xml:lang</code> element on the generated <code>html</code> element. It also causes nested Struts HTML tags (although not JavaServer Faces component tags) to render themselves as xhtml.</p> ]]> </description> </attribute> </tag> <tag> <name>javascript</name> <tag-class>org.apache.struts.faces.taglib.JavascriptValidatorTag </tag-class> <description><![CDATA[ <p> <strong>IMPLEMENTATION NOTE</strong> - Unlike other tags in this tag library, this does not correspond to a JavaServer Faces user interface component. It is based on the tag implementation class used in the <code>struts-html</code> tag library.</p> <p>Render JavaScript validation based on the validation rules loaded by the <code>ValidatorPlugIn</code>. The set of validation rules that should be generated is based on the formName attribute passed in, which should match the name attribute of the form element in the xml file.</p> <p>The dynamicJavascript and staticJavascript attributes default to true, but if dynamicJavascript is set to <code>true</code> and staticJavascript is set to <code>false</code> then only the dynamic JavaScript will be rendered. If dynamicJavascript is set to <code>false</code> and staticJavascript is set to <code>true</code> then only the static JavaScript will be rendered which can then be put in separate JSP page so the browser can cache the static JavaScript.</p> ]]> </description> <attribute> <name>cdata</name> <required>false</required> <rtexprvalue>true</rtexprvalue> <description><![CDATA[ <p>If set to "true" and XHTML has been enabled, the JavaScript will be wrapped in a CDATA section to prevent XML parsing. The default is "true" to comply with the W3C's recommendation.</p> ]]> </description> </attribute> <attribute> <name>dynamicJavascript</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Whether or not to render the dynamic JavaScript. Defaults to <code>true</code>.</p> ]]> </description> </attribute> <attribute> <name>formName</name> <required>false</required> <rtexprvalue>true</rtexprvalue> <description><![CDATA[ <p>The key (form name) to retrieve a specific set of validation rules.</p> ]]> </description> </attribute> <attribute> <name>htmlComment</name> <required>false</required> <rtexprvalue>true</rtexprvalue> <description><![CDATA[ <p>Whether or not to enclose the javascript with HTML comments. This attribute is ignored in XHTML mode because the script would be deleted by the XML parser. See the cdata attribute for details on hiding scripts from XML parsers. Defaults to <code>true</code>.</p> ]]> </description> </attribute> <attribute> <name>method</name> <required>false</required> <rtexprvalue>true</rtexprvalue> <description><![CDATA[ <p>The alternate JavaScript method name to be used instead of the of the default. The default is 'validate' concatenated in front of the key (form name) passed in (ex: validateRegistrationForm).</p> ]]> </description> </attribute> <attribute> <name>page</name> <required>false</required> <rtexprvalue>true</rtexprvalue> <description><![CDATA[ <p>The current page of a set of validation rules if the page attribute for the field element in the xml file is in use.</p> ]]> </description> </attribute> <attribute> <name>src</name> <required>false</required> <rtexprvalue>true</rtexprvalue> <description><![CDATA[ <p>The src attribute's value when defining the html script element.</p> ]]> </description> </attribute> <attribute> <name>staticJavascript</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Whether or not to render the static JavaScript. Defaults to <code>true</code>.</p> ]]> </description> </attribute> </tag> <tag> <name>loadMessages</name> <tag-class>org.apache.struts.faces.taglib.LoadMessagesTag</tag-class> <body-content>empty</body-content> <description><![CDATA[ <p>Create a Map wrapping the specified MessageResources instance, which will return localized messages based on the Locale stored in the view root component of the current view.</p> ]]> </description> <attribute> <name>messages</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Application scope key containing the MessageResources instance to be exposed. If not specified, the default MessageResources instance for the current application module is exposed.</p> ]]> </description> </attribute> <attribute> <name>var</name> <required>true</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Request scope key under which the Map will be stored.</p> ]]> </description> </attribute> </tag> <tag> <name>message</name> <tag-class>org.apache.struts.faces.taglib.MessageTag</tag-class> <body-content>JSP</body-content> <description><![CDATA[ <p>Render the message text looked up from a message resources bundle, based on our current locale. The message key must be specified by exactly one of the following attributes:</p> <p>The <code>MessageResources</code> bundle to be used is specified by the <code>bundle</code> attribute, as follows:</p> <p>Substitution parameters for the message may be nested inside this tag by using the <code>parameter</code> tag from the standard HTML RenderKit tag library.</p> <p>Additional control over the rendering process is specified by the following optional attributes, with default values as indicated:</p> ]]> </description> <attribute> <name>binding</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Value binding expression to bind this component to a backing bean property.</p> ]]> </description> </attribute> <attribute> <name>bundle</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Name of the servlet context attribute under which the desired <code>MessageResources</code> bundle is stored. If not specified, the default bundle for this sub-application will be used.</p> ]]> </description> </attribute> <attribute> <name>filter</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Should we filter the output for characters that are sensitive in HTML? The default value is <code>true</code>.</p> ]]> </description> </attribute> <attribute> <name>id</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Component identifier of the component corresponding to this tag.</p> ]]> </description> </attribute> <attribute> <name>key</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Literal value of the message key to look up. Exactly one of <code>key</code> and <code>value</code> must be specified. </p> ]]> </description> </attribute> <attribute> <name>rendered</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description> Boolean attribute indicating whether this component should be rendered or not. </description> </attribute> <attribute> <name>style</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>CSS styles used to render this component.</p> ]]> </description> </attribute> <attribute> <name>styleClass</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Name of the CSS style class used to render this component.</p> ]]> </description> </attribute> <attribute> <name>value</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Value reference expression used to retrieve a dynamic value for the message key to look up. Exactly one of <code>key</code> and <code>value</code> must be specified.</p> ]]> </description> </attribute> </tag> <tag> <name>stylesheet</name> <tag-class>org.apache.struts.faces.taglib.StylesheetTag</tag-class> <description><![CDATA[ <p>Renders an HTML <code><link></code> element with a relative reference to a <code>text/css</code> stylesheet at the specified context-relative path.</p> ]]> </description> <attribute> <name>binding</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Value binding expression to bind this component to a backing bean property.</p> ]]> </description> </attribute> <attribute> <name>id</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description> Component id of this component. </description> </attribute> <attribute> <name>path</name> <required>true</required> <rtexprvalue>false</rtexprvalue> <description> Context-relative path to the resource for this relative link. </description> </attribute> <attribute> <name>rendered</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description> Boolean attribute indicating whether this component should be rendered or not. </description> </attribute> </tag> <tag> <name>write</name> <tag-class>org.apache.struts.faces.taglib.WriteTag</tag-class> <body-content>empty</body-content> <description><![CDATA[ <p>Render the text associated with the specified model object or text string, optionally performing filtering and formatting tasks described by the optional attributes described below. The text to be rendered is specified in exactly one of the following attributes:</p> <p>Additional control over the rendering process is specified by the following optional attributes, with default values as indicated:</p> ]]> </description> <attribute> <name>binding</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Value binding expression to bind this component to a backing bean property.</p> ]]> </description> </attribute> <attribute> <name>filter</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Should we filter the output for characters that are sensitive in HTML? The default value is <code>true</code>.</p> ]]> </description> </attribute> <attribute> <name>id</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Component identifier of the component corresponding to this tag.</p> ]]> </description> </attribute> <attribute> <name>rendered</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description> Boolean attribute indicating whether this component should be rendered or not. </description> </attribute> <attribute> <name>style</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>CSS styles used to render this component.</p> ]]> </description> </attribute> <attribute> <name>styleClass</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Name of the CSS style class used to render this component.</p> ]]> </description> </attribute> <attribute> <name>value</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description><![CDATA[ <p>Literal text to be rendered, or value reference expression to retrieve the text to be rendered.</p> ]]> </description> </attribute> </tag> </taglib> Index: struts-layout.tld =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/WEB-INF/tld/struts-layout.tld,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** struts-layout.tld 12 Jun 2007 02:27:45 -0000 1.1 --- struts-layout.tld 1 Dec 2010 11:10:51 -0000 1.2 *************** *** 37,40 **** --- 37,60 ---- </tag> + <tag> + <name>javascriptImageTag</name> + <tagclass>fr.improve.struts.taglib.layout.JavascriptImageTag</tagclass> + <bodycontent>JSP</bodycontent> + <attribute> + <name>styleClass</name> + <required>false</required> [...1315 lines suppressed...] + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>tabindex</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>tooltip</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + <attribute> + <name>value</name> + <required>false</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> </taglib> Index: struts-nested.tld =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/WEB-INF/tld/struts-nested.tld,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** struts-nested.tld 12 Jun 2007 02:27:45 -0000 1.1 --- struts-nested.tld 1 Dec 2010 11:10:51 -0000 1.2 *************** *** 1,3171 **** ! <?xml version="1.0" encoding="UTF-8"?> ! ! ! ! ! ! ! <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> ! <taglib> ! <tlibversion>1.2</tlibversion> [...8193 lines suppressed...] ! <rtexprvalue>true</rtexprvalue> ! <description/> ! </attribute> ! <attribute> ! <name>scope</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! <description/> ! </attribute> ! <attribute> ! <name>user</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! <description/> ! </attribute> ! </tag> ! </taglib> ! ! ! Index: struts-bean.tld =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/WEB-INF/tld/struts-bean.tld,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** struts-bean.tld 12 Jun 2007 02:27:45 -0000 1.1 --- struts-bean.tld 1 Dec 2010 11:10:51 -0000 1.2 *************** *** 1,382 **** ! <?xml version="1.0" encoding="UTF-8"?> ! ! ! ! ! ! ! ! <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> ! <taglib> [...1506 lines suppressed...] ! ]]> ! </description> ! </attribute> ! <attribute> ! <name>scope</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! <description> ! <![CDATA[ ! <p>Specifies the variable scope searched to retrieve the bean specified ! by <code>name</code>. If not specified, the default rules applied by ! <code>PageContext.findAttribute()</code> are applied.</p> ! ]]> ! </description> ! </attribute> ! </tag> ! </taglib> ! ! ! Index: struts-tiles.tld =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/WEB-INF/tld/struts-tiles.tld,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** struts-tiles.tld 12 Jun 2007 02:27:45 -0000 1.1 --- struts-tiles.tld 1 Dec 2010 11:10:51 -0000 1.2 *************** *** 1,344 **** ! <?xml version="1.0" encoding="UTF-8"?> ! ! ! ! ! ! ! ! <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> ! <taglib> [...1231 lines suppressed...] ! <rtexprvalue>false</rtexprvalue> ! <description> ! <![CDATA[ ! <p>Definition file name.</p> ! ]]> ! </description> ! </attribute> ! <attribute> ! <name>classname</name> ! <required>false</required> ! <rtexprvalue>false</rtexprvalue> ! <description> ! <![CDATA[ ! <p>If specified, classname of the factory to create and initialized.</p> ! ]]> ! </description> ! </attribute> ! </tag> ! </taglib> ! Index: struts-html.tld =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/WEB-INF/tld/struts-html.tld,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** struts-html.tld 12 Jun 2007 02:27:45 -0000 1.1 --- struts-html.tld 1 Dec 2010 11:10:51 -0000 1.2 *************** *** 1,3302 **** ! <?xml version="1.0" encoding="UTF-8"?> ! ! ! ! ! ! ! ! <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> ! <taglib> [...12556 lines suppressed...] ! <![CDATA[ ! <p><strong>Render HTML tags as XHTML</strong></p> ! ! <p> ! Using this tag in a page tells all other html taglib tags ! to render themselves as XHTML 1.0. This is useful ! when composing pages with JSP includes or Tiles. ! <html:html xhtml="true"> has a similar effect. This ! tag has no attributes; you use it like this: <html:xhtml/>. ! </p> ! <p> ! <strong>Note</strong>: Included pages do not inherit the rendering ! style of the including page. Each JSP fragment or Tile must use this ! tag to render as XHTML. ! </p> ! ]]> ! </description> ! </tag> ! </taglib> ! Index: struts-logic.tld =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/WEB-INF/tld/struts-logic.tld,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** struts-logic.tld 12 Jun 2007 02:27:45 -0000 1.1 --- struts-logic.tld 1 Dec 2010 11:10:51 -0000 1.2 *************** *** 1,652 **** ! <?xml version="1.0" encoding="UTF-8"?> ! ! ! ! ! ! ! <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> ! <taglib> ! <tlibversion>1.2</tlibversion> [...2514 lines suppressed...] ! </attribute> ! <attribute> ! <name>useLocalEncoding</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! <type>boolean</type> ! <description> ! <![CDATA[ ! <p>If set to <code>true</code>, LocalCharacterEncoding will be ! used, that is, the characterEncoding set to the HttpServletResponse, ! as prefered character encoding rather than UTF-8, when ! URLEncoding is done on parameters of the URL.</p> ! ]]> ! </description> ! </attribute> ! </tag> ! </taglib> ! ! ! |