Changeset 15 for trunk/de.ugoe.cs.swe.exercises/src/de
- Timestamp:
- 10/19/09 17:28:16 (15 years ago)
- Location:
- trunk/de.ugoe.cs.swe.exercises/src/de/ugoe/cs/swe/exercises
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/de.ugoe.cs.swe.exercises/src/de/ugoe/cs/swe/exercises/exercisesheet/PdfGenerator.java
r14 r15 61 61 filename += ".tex"; 62 62 63 // read template file 63 64 File templateFile = new File(filename); 64 65 String template = ""; … … 72 73 dstream.close(); 73 74 75 // initialize strings 74 76 LectureEvent event = exercisesheet.getLectureEvent(); 75 77 ArrayList<Lecturer> lecturers = event.getLecturers(); … … 120 122 dueDate.setTimeInMillis(dueDateTimeStamp); 121 123 DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.GERMANY); 122 String d eliveryDate= dateFormat.format(dueDate.getTime());124 String dueDateString = dateFormat.format(dueDate.getTime()); 123 125 124 126 template = template.replaceAll("(\\W)LECTURE(\\W)", "$1" … … 135 137 template = template.replaceAll("(\\W)TEMPLATEPATH(\\W)", "$1" 136 138 + Matcher.quoteReplacement(templatePath) + "$2"); 137 template = template.replaceAll("(\\W)D ELIVERYDATE(\\W)", "$1"138 + Matcher.quoteReplacement(d eliveryDate) + "$2");139 template = template.replaceAll("(\\W)DUEDATE(\\W)", "$1" 140 + Matcher.quoteReplacement(dueDateString) + "$2"); 139 141 140 142 // write temporary .tex file to temp directory -
trunk/de.ugoe.cs.swe.exercises/src/de/ugoe/cs/swe/exercises/lectureevent/LectureEvent.java
r3 r15 46 46 @Override 47 47 public String toString() { 48 return (getLecture().getName() + " " + getSemesterString() + getSemester()); 48 if (!isSummerSemester) { 49 int nextYear = getSemester()+1; 50 return (getLecture().getName() + " (" + getSemesterString() + " " + getSemester() + "/" + nextYear + ")"); 51 } else { 52 return (getLecture().getName() + " (" + getSemesterString() + " " + getSemester() + ")"); 53 } 49 54 } 50 55
Note: See TracChangeset
for help on using the changeset viewer.