diff --git a/src/main/java/org/olat/modules/coach/ui/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/modules/coach/ui/_i18n/LocalStrings_de.properties index 87310e56f261d40245c91532d6a78ddefd014e67..ac6edd14f7b61c1ad14be545035715ba8a8cb0fa 100644 --- a/src/main/java/org/olat/modules/coach/ui/_i18n/LocalStrings_de.properties +++ b/src/main/java/org/olat/modules/coach/ui/_i18n/LocalStrings_de.properties @@ -42,7 +42,7 @@ search.menu.title=Benutzersuche search=Suchen site.title.alt=Coaching site.title=Coaching -results=Resultaten +results=Resultate student.name=Name students.details={0} {1}/{2} students.menu.title.alt=Teilnehmer diff --git a/src/main/java/org/olat/modules/lecture/ui/CloseRollCallConfirmationController.java b/src/main/java/org/olat/modules/lecture/ui/CloseRollCallConfirmationController.java index 9adadbd6c894f68e61da954544d00ca23c7b2bd1..e87a2c6561f6d937c604e4ba6d17906189d9e0b8 100644 --- a/src/main/java/org/olat/modules/lecture/ui/CloseRollCallConfirmationController.java +++ b/src/main/java/org/olat/modules/lecture/ui/CloseRollCallConfirmationController.java @@ -50,6 +50,7 @@ import org.springframework.beans.factory.annotation.Autowired; */ public class CloseRollCallConfirmationController extends FormBasicController { + private TextElement blockCommentEl; private SingleSelection effectiveLecturesEl; private SingleSelection effectiveEndReasonEl; private TextElement effectiveEndHourEl, effectiveEndMinuteEl; @@ -151,6 +152,10 @@ public class CloseRollCallConfirmationController extends FormBasicController { if(!found) { effectiveEndReasonEl.select(reasonKeyList.get(0), true); } + + String blockComment = lectureBlock.getComment(); + blockCommentEl = uifactory.addTextAreaElement("lecture.block.comment", 4, 72, blockComment, formLayout); + blockCommentEl.setEnabled(secCallback.canEdit()); FormLayoutContainer buttonsCont = FormLayoutContainer.createButtonLayout("buttons", getTranslator()); buttonsCont.setRootForm(mainForm); @@ -166,6 +171,7 @@ public class CloseRollCallConfirmationController extends FormBasicController { @Override protected void formOK(UserRequest ureq) { + lectureBlock.setComment(blockCommentEl.getValue()); lectureBlock.setEffectiveLecturesNumber(lectureBlock.getPlannedLecturesNumber());//TODO Date effectiveEndDate = getEffectiveEndDate(); if(effectiveEndDate == null) { @@ -180,7 +186,7 @@ public class CloseRollCallConfirmationController extends FormBasicController { lectureBlock.setReasonEffectiveEnd(selectedReason); } } - + lectureBlock.setStatus(LectureBlockStatus.done); lectureBlock.setRollCallStatus(LectureRollCallStatus.closed); lectureBlock = lectureService.save(lectureBlock, null); diff --git a/src/main/java/org/olat/modules/lecture/ui/TeacherRollCallController.java b/src/main/java/org/olat/modules/lecture/ui/TeacherRollCallController.java index dd4a82618ad517e7c643c1a60e2359b635236e81..b70fa563ac44c83c93a09f60822dae0170481f7f 100644 --- a/src/main/java/org/olat/modules/lecture/ui/TeacherRollCallController.java +++ b/src/main/java/org/olat/modules/lecture/ui/TeacherRollCallController.java @@ -84,7 +84,6 @@ public class TeacherRollCallController extends FormBasicController { private FlexiTableElement tableEl; private TeacherRollCallDataModel tableModel; - private TextElement blockCommentEl; private FormSubmit quickSaveButton; private FormLink reopenButton, cancelLectureBlockButton, closeLectureBlocksButton; @@ -130,32 +129,38 @@ public class TeacherRollCallController extends FormBasicController { @Override protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) { - // form for the lecture block - FormLayoutContainer blockCont = FormLayoutContainer.createDefaultFormLayout("block", getTranslator()); - blockCont.setRootForm(mainForm); - blockCont.setFormTitle(translate("lecture.block")); - formLayout.add("block", blockCont); - - uifactory.addStaticTextElement("lecture.title", lectureBlock.getTitle(), blockCont); + if(formLayout instanceof FormLayoutContainer) { + FormLayoutContainer layoutCont = (FormLayoutContainer)formLayout; + + StringBuilder sb = new StringBuilder(); + List<Identity> teachers = lectureService.getTeachers(lectureBlock); + for(Identity teacher:teachers) { + if(sb.length() > 0) sb.append(", "); + sb.append(StringHelper.escapeJavaScript(userManager.getUserDisplayName(teacher))); + } + + Formatter formatter = Formatter.getInstance(getLocale()); + String date = formatter.formatDate(lectureBlock.getStartDate()); + String startTime = formatter.formatTimeShort(lectureBlock.getStartDate()); + String endTime = formatter.formatTimeShort(lectureBlock.getEndDate()); + + String[] args = new String[] { + lectureBlock.getTitle(), // {0} + sb.toString(), // {1} + date, // {2} + startTime, // {3} + endTime // {4} + }; - StringBuilder sb = new StringBuilder(); - List<Identity> teachers = lectureService.getTeachers(lectureBlock); - for(Identity teacher:teachers) { - if(sb.length() > 0) sb.append(", "); - sb.append(userManager.getUserDisplayName(teacher)); + layoutCont.contextPut("date", date); + layoutCont.contextPut("startTime", startTime); + layoutCont.contextPut("endTime", endTime); + layoutCont.contextPut("teachers", sb.toString()); + layoutCont.contextPut("lectureBlockTitle", StringHelper.escapeJavaScript(lectureBlock.getTitle())); + layoutCont.contextPut("lectureBlockExternaalId", StringHelper.escapeJavaScript(lectureBlock.getExternalId())); + layoutCont.setFormTitle(translate("lecture.block", args)); + layoutCont.setFormDescription(translate("lecture.block.infos", args)); } - uifactory.addStaticTextElement("lecture.teacher", sb.toString(), blockCont); - - Formatter formatter = Formatter.getInstance(getLocale()); - String date = formatter.formatDate(lectureBlock.getStartDate()); - String startTime = formatter.formatTimeShort(lectureBlock.getStartDate()); - String endTime = formatter.formatTimeShort(lectureBlock.getEndDate()); - String startEndTime= translate("lecture.from.to.format", new String[]{ startTime, endTime }); - uifactory.addStaticTextElement("lecture.date", date + " " + startEndTime, blockCont); - - String blockComment = lectureBlock.getComment(); - blockCommentEl = uifactory.addTextElement("block.comment", "lecture.block.comment", 256, blockComment, blockCont); - blockCommentEl.setEnabled(secCallback.canEdit()); // table FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel(); @@ -229,7 +234,6 @@ public class TeacherRollCallController extends FormBasicController { } } - blockCommentEl.setEnabled(secCallback.canEdit()); tableEl.reset(false, false, true); } @@ -459,7 +463,6 @@ public class TeacherRollCallController extends FormBasicController { } lectureBlock = lectureService.getLectureBlock(lectureBlock); - lectureBlock.setComment(blockCommentEl.getValue()); if(lectureBlock.getRollCallStatus() == null) { lectureBlock.setRollCallStatus(LectureRollCallStatus.open); diff --git a/src/main/java/org/olat/modules/lecture/ui/_content/rollcall.html b/src/main/java/org/olat/modules/lecture/ui/_content/rollcall.html index 75170543d1b06b187dd7655be4067cce8c6595b0..a3fb9681a17df5a6ea900987b997591c645949dd 100644 --- a/src/main/java/org/olat/modules/lecture/ui/_content/rollcall.html +++ b/src/main/java/org/olat/modules/lecture/ui/_content/rollcall.html @@ -1,17 +1,20 @@ -$r.render("block") -$r.render("table") -<div class="o_button_group"> - $r.render("cancel") - #if($r.available("save")) - $r.render("save") - #end - #if($r.available("cancel.lecture.blocks")) - $r.render("cancel.lecture.blocks") - #end - #if($r.available("close.lecture.blocks")) - $r.render("close.lecture.blocks") - #end - #if($r.available("reopen.lecture.blocks")) - $r.render("reopen.lecture.blocks") - #end -</div> \ No newline at end of file +<fieldset> + <legend>$off_title</legend> + <div class="o_desc">$off_desc</div> + $r.render("table") + <div class="o_button_group"> + $r.render("cancel") + #if($r.available("save")) + $r.render("save") + #end + #if($r.available("cancel.lecture.blocks")) + $r.render("cancel.lecture.blocks") + #end + #if($r.available("close.lecture.blocks")) + $r.render("close.lecture.blocks") + #end + #if($r.available("reopen.lecture.blocks")) + $r.render("reopen.lecture.blocks") + #end + </div> +</fieldset> \ No newline at end of file diff --git a/src/main/java/org/olat/modules/lecture/ui/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/modules/lecture/ui/_i18n/LocalStrings_de.properties index e78f902f115958667bdca931d172f8466733fc60..769a86aa47f1cf75a4a8cf23d7becf0bc8e25280 100644 --- a/src/main/java/org/olat/modules/lecture/ui/_i18n/LocalStrings_de.properties +++ b/src/main/java/org/olat/modules/lecture/ui/_i18n/LocalStrings_de.properties @@ -19,12 +19,12 @@ cancel.lecture.blocks=Lektionen absagen closed=Geschlossen close.lecture.blocks=Lektionen abschliessen config.calculate.attendance.rate=Anwesenheitsquote berechnen -config.override=Standard Konfiguration \u00FCberschreiben +config.override=Standard Konfiguration zulassen config.override.no=Nein config.override.yes=Ja config.rollcall.enabled=Anwesenheitskontrolle einschalten -config.sync.participant.calendar=Teilnehmer Kalender synchronizieren -config.sync.teacher.calendar=Lehrer Kalender synchronizieren +config.sync.participant.calendar=Teilnehmer Kalender synchronisieren +config.sync.teacher.calendar=Lehrer Kalender synchronisieren confirm.delete.lectures=Wollen Sie wirklich diese Lektionenblock "{0}" l\u00F6schen? confirm.delete.reason=Wollen Sie wirklich diese Begr\u00FCndung "{0}" l\u00F6schen? copy=Kopieren @@ -56,7 +56,7 @@ error.integer.positive=Der Eingabe muss ein positives Zahl sein. error.reason.mandatory=Begr\u00FCndung ist erforderlich export.footer.lectures.hint=x = Lektion abwesend export.header.lectures=Lectures -export.header.lectureblocks=Lektionenblock: {0} vom {1} von {2} bis {2} +export.header.lectureblocks=Lektionenblock: {0} vom {1} von {2} bis {3} export.header.location=Raum: {0} export.header.teachers=Dozenten: {0} first.admission=Erstzulassung @@ -78,8 +78,9 @@ lecture.block.copy={0} (Kopie) lecture.block.effective.end=Effektives Ende lecture.block.effective.reason=Begr\u00FCndung lecture.block.status=Status +lecture.block.infos=Lehrer: {1} von {2} {3} bis {4} lecture.calculate.attendance.rate.default.enabled=Berechnung der Anwesenheitsrate -lecture.can.override.standard.configuration=Standard Konfiguration \u00FCberschreiben +lecture.can.override.standard.configuration=Standard Konfiguration zulassen lecture.compulsory=Zwingend lecture.count.authorized.absence.attendant=Entschuldigte Absenzen als anwesend z\u00E4hlen lecture.course.admin.title=Konfiguration Lektionen- und Absenzenmanagement im Kurs @@ -97,10 +98,10 @@ lecture.reminder.period=Erinnerungsfrist lecture.rollcall.default.enabled=Anwesenheitskontrolle einschalten lecture.start=Beginn lecture.status.enabled=Lektionen Status -lectures.table.current=Aktueller Lektionenenblock -lectures.table.closed=Abgeschlossene Lektionenenbl\u00F6cke -lectures.table.next=N\u00E4chste Lektionenenbl\u00F6cke -lectures.table.pending=Pendente Lektionenenbl\u00F6cke +lectures.table.current=Aktueller Lektionenblock +lectures.table.closed=Abgeschlossene Lektionenbl\u00F6cke +lectures.table.next=N\u00E4chste Lektionenbl\u00F6cke +lectures.table.pending=Pendente Lektionenbl\u00F6cke lectures.print.title=Lektionen und Absenzen von {0} lectures.repository.print.title=Lektionen und Absenzen von {1} im Kurs: {0} lecture.teacher=Lehrer @@ -135,7 +136,7 @@ repo.lectures=Lektionen repo.lectures.block=Lektionenbl\u00F6cke repo.participants=Teilnehmer repo.settings=Konfiguration -results=Resultaten +results=Resultate rollcall=Anwesenheitskontrolle rollcall.comment=Bemerkung rollcall.status=Status Lektionenblock @@ -143,8 +144,8 @@ save.next=Speichern und weiter save.temporary=Zwischen speichern search.form.login=Benutzername start.wizard=Wizard starten -sync.participants.calendar.enabled=Teilnehmer Kalender synchronizieren -sync.teachers.calendar.enabled=Lehrer Kalender synchronizieren +sync.participants.calendar.enabled=Teilnehmer Kalender synchronisieren +sync.teachers.calendar.enabled=Lehrer Kalender synchronisieren table.header.absence=Anwesenheit table.header.absent.lectures=Abwesend table.header.actions=<i class\='o_icon o_icon_actions o_icon-lg'> </i> diff --git a/src/main/java/org/olat/modules/lecture/ui/_i18n/LocalStrings_en.properties b/src/main/java/org/olat/modules/lecture/ui/_i18n/LocalStrings_en.properties index f04474f47de64c51f1f31ef19801f155d310b2c2..958a5eca9245a8c804429e592229074db3da8879 100644 --- a/src/main/java/org/olat/modules/lecture/ui/_i18n/LocalStrings_en.properties +++ b/src/main/java/org/olat/modules/lecture/ui/_i18n/LocalStrings_en.properties @@ -56,7 +56,7 @@ error.integer.positive=The number must be positive. error.reason.mandatory=Reason is mandatory export.footer.lectures.hint=x = lecture absent export.header.lectures=Lektionen -export.header.lectureblocks=Lectures block: {0} the {1} at {2} until {2} +export.header.lectureblocks=Lectures block: {0} the {1} at {2} until {3} export.header.location=Room: {0} export.header.teachers=Teachers: {0} first.admission=First admission @@ -77,6 +77,7 @@ lecture.block.copied=The lectures block was successfully copied. lecture.block.copy={0} (Copy) lecture.block.effective.end=Effective end lecture.block.effective.reason=Reason +lecture.block.infos=Teachers: {1} from {2} {3} until {4} lecture.block.status=Status lecture.calculate.attendance.rate.default.enabled=Calculate attendance rate (default) lecture.compulsory=Compulsory