diff --git a/src/main/java/org/olat/collaboration/CollaborationTools.java b/src/main/java/org/olat/collaboration/CollaborationTools.java index 8fa39d569c89418703edbfb186f3939db6ba2bb0..a0bf3b5c8900324b9d06d735e8b11a428e488072 100644 --- a/src/main/java/org/olat/collaboration/CollaborationTools.java +++ b/src/main/java/org/olat/collaboration/CollaborationTools.java @@ -52,6 +52,7 @@ import org.olat.core.gui.UserRequest; import org.olat.core.gui.components.stack.TooledStackedPanel; import org.olat.core.gui.control.Controller; import org.olat.core.gui.control.WindowControl; +import org.olat.core.gui.control.generic.messages.MessageUIFactory; import org.olat.core.gui.control.generic.title.TitleInfo; import org.olat.core.gui.translator.Translator; import org.olat.core.id.Identity; @@ -590,15 +591,26 @@ public class CollaborationTools implements Serializable { if("2".equals(version)) { PortfolioService portfolioService = CoreSpringFactory.getImpl(PortfolioService.class); Binder binder = portfolioService.getBinderByKey(key); - portfolioService.updateBinderUserInformations(binder, ureq.getIdentity()); - BinderSecurityCallback secCallback = BinderSecurityCallbackFactory.getCallbackForBusinessGroup(); - BinderController binderCtrl = new BinderController(ureq, wControl, stackPanel, secCallback, binder, BinderConfiguration.createBusinessGroupConfig()); - ctrl = binderCtrl; + if(binder == null) { + Translator trans = Util.createPackageTranslator(this.getClass(), ureq.getLocale()); + String text = trans.translate("error.missing.map"); + ctrl = MessageUIFactory.createErrorMessage(ureq, wControl, "", text); + } else { + portfolioService.updateBinderUserInformations(binder, ureq.getIdentity()); + BinderSecurityCallback secCallback = BinderSecurityCallbackFactory.getCallbackForBusinessGroup(); + ctrl = new BinderController(ureq, wControl, stackPanel, secCallback, binder, BinderConfiguration.createBusinessGroupConfig()); + } } else { PortfolioStructureMap map = (PortfolioStructureMap) CoreSpringFactory.getImpl(EPFrontendManager.class) .loadPortfolioStructureByKey(key); - EPSecurityCallback secCallback = new EPSecurityCallbackImpl(true, true); - ctrl = EPUIFactory.createMapViewController(ureq, wControl, map, secCallback); + if(map == null) { + Translator trans = Util.createPackageTranslator(this.getClass(), ureq.getLocale()); + String text = trans.translate("error.missing.map"); + ctrl = MessageUIFactory.createErrorMessage(ureq, wControl, "", text); + } else { + EPSecurityCallback secCallback = new EPSecurityCallbackImpl(true, true); + ctrl = EPUIFactory.createMapViewController(ureq, wControl, map, secCallback); + } } return ctrl; } diff --git a/src/main/java/org/olat/collaboration/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/collaboration/_i18n/LocalStrings_de.properties index 6e5aa5d73c2cdb9e341283523f77298010eeadbb..2e7258ff010652d71525bf0355dce59b58015961 100644 --- a/src/main/java/org/olat/collaboration/_i18n/LocalStrings_de.properties +++ b/src/main/java/org/olat/collaboration/_i18n/LocalStrings_de.properties @@ -12,6 +12,7 @@ collabtools.named.hasNews=Information an Mitglieder collabtools.named.hasOpenMeetings=OpenMeetings collabtools.named.hasPortfolio=Portfolio collabtools.named.hasWiki=Wiki +error.missing.map=Die Mappe wurde gelöscht. folder=Ordner folder.access=Ordner Schreibberechtigung folder.access.all=Alle Mitglieder diff --git a/src/main/java/org/olat/collaboration/_i18n/LocalStrings_en.properties b/src/main/java/org/olat/collaboration/_i18n/LocalStrings_en.properties index f824cb235b4a8ed32352182f020e56953a96c4d9..ac79946b3f9a6df7800d867e8e61ecbff9738b9d 100644 --- a/src/main/java/org/olat/collaboration/_i18n/LocalStrings_en.properties +++ b/src/main/java/org/olat/collaboration/_i18n/LocalStrings_en.properties @@ -12,6 +12,7 @@ collabtools.named.hasNews=Information for members collabtools.named.hasOpenMeetings=OpenMeetings collabtools.named.hasPortfolio=ePortfolio collabtools.named.hasWiki=Wiki +error.missing.map=The binder was deleted. folder=Folder folder.access=Folder write permission folder.access.all=All members diff --git a/src/main/java/org/olat/core/commons/services/sms/ui/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/core/commons/services/sms/ui/_i18n/LocalStrings_de.properties index ae8c6f682ae86e7d4db5a39ebc07d12a00927a24..d28faea964eb592a0c5a0d034d5365586802b028 100644 --- a/src/main/java/org/olat/core/commons/services/sms/ui/_i18n/LocalStrings_de.properties +++ b/src/main/java/org/olat/core/commons/services/sms/ui/_i18n/LocalStrings_de.properties @@ -1,5 +1,5 @@ #Tue Feb 07 13:58:37 CET 2017 -admin.configuration.description=<p>Benarchitugung per SMS ist eine optionale Komponente.</p><p>Achtung\: durch das Versenden von SMS entstehen Kosten pro SMS\!</p> +admin.configuration.description=<p>Die Benachrichtigung per SMS ist eine optionale Komponente.</p><p>Achtung\: durch das Versenden von SMS entstehen Kosten pro SMS\!</p> admin.configuration.title=SMS Konfiguration admin.enable=SMS Versand admin.menu.title=SMS diff --git a/src/main/java/org/olat/course/nodes/cl/manager/CheckboxManagerImpl.java b/src/main/java/org/olat/course/nodes/cl/manager/CheckboxManagerImpl.java index 44e3ba813cc56de5cff76970d1627763f11be830..96f7ee1de3ef6808473282def92909e1ad39c0a1 100644 --- a/src/main/java/org/olat/course/nodes/cl/manager/CheckboxManagerImpl.java +++ b/src/main/java/org/olat/course/nodes/cl/manager/CheckboxManagerImpl.java @@ -212,7 +212,7 @@ public class CheckboxManagerImpl implements CheckboxManager { @Override public void syncCheckbox(CheckboxList checkboxList, OLATResourceable ores, String resSubPath) { List<DBCheckbox> dbCheckboxList = loadCheckbox(ores, resSubPath); - Map<String,DBCheckbox> uuids = new HashMap<String,DBCheckbox>(); + Map<String,DBCheckbox> uuids = new HashMap<>(); for(DBCheckbox dbCheckbox:dbCheckboxList) { uuids.put(dbCheckbox.getCheckboxId(), dbCheckbox); } @@ -498,7 +498,7 @@ public class CheckboxManagerImpl implements CheckboxManager { } List<DBCheck> checks = query.getResultList(); - Map<Long, AssessmentData> identToBox = new HashMap<Long,AssessmentData>(); + Map<Long, AssessmentData> identToBox = new HashMap<>(); for(DBCheck check:checks) { AssessmentData data = identToBox.get(check.getIdentity().getKey()); if(data == null) { @@ -507,21 +507,19 @@ public class CheckboxManagerImpl implements CheckboxManager { } data.getChecks().add(check); } - return new ArrayList<AssessmentData>(identToBox.values()); + return new ArrayList<>(identToBox.values()); } @Override public VFSContainer getFileContainer(CourseEnvironment courseEnv, CheckListCourseNode cNode) { String path = courseEnv.getCourseBaseContainer().getRelPath() + "/" + CheckListCourseNode.FOLDER_NAME + "/" + cNode.getIdent(); - OlatRootFolderImpl rootFolder = new OlatRootFolderImpl(path, null); - return rootFolder; + return new OlatRootFolderImpl(path, null); } @Override public File getFileDirectory(CourseEnvironment courseEnv, CheckListCourseNode cNode) { String path = courseEnv.getCourseBaseContainer().getRelPath() + "/" + CheckListCourseNode.FOLDER_NAME + "/" + cNode.getIdent(); - File rootFolder = new File(FolderConfig.getCanonicalRoot(), path); - return rootFolder; + return new File(FolderConfig.getCanonicalRoot(), path); } private static class BatchComparator implements Comparator<AssessmentBatch> { diff --git a/src/main/java/org/olat/course/nodes/cl/ui/CheckListBoxListEditController.java b/src/main/java/org/olat/course/nodes/cl/ui/CheckListBoxListEditController.java index eeb89717e0a03e8273515bf90ce1d44cf965c865..287b671e1b2d3dec7d12b69c677b27b5da03e8f0 100644 --- a/src/main/java/org/olat/course/nodes/cl/ui/CheckListBoxListEditController.java +++ b/src/main/java/org/olat/course/nodes/cl/ui/CheckListBoxListEditController.java @@ -142,7 +142,7 @@ public class CheckListBoxListEditController extends FormBasicController { private void updateModel() { CheckboxList list = (CheckboxList)config.get(CheckListCourseNode.CONFIG_KEY_CHECKBOX); - List<CheckboxConfigRow> boxList = new ArrayList<CheckboxConfigRow>(); + List<CheckboxConfigRow> boxList = new ArrayList<>(); if(list != null && list.getList() != null) { for(Checkbox checkbox:list.getList()) { diff --git a/src/main/java/org/olat/course/nodes/cl/ui/CheckboxEditController.java b/src/main/java/org/olat/course/nodes/cl/ui/CheckboxEditController.java index 1da0894938d72e31ccec8931704d983f80beea0d..35e9beaf9b4abf0d544b4fba3140c5ab876ca97a 100644 --- a/src/main/java/org/olat/course/nodes/cl/ui/CheckboxEditController.java +++ b/src/main/java/org/olat/course/nodes/cl/ui/CheckboxEditController.java @@ -23,8 +23,10 @@ import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; +import java.nio.file.Files; +import java.util.ArrayList; +import java.util.List; -import org.olat.core.CoreSpringFactory; import org.olat.core.commons.modules.bc.FolderConfig; import org.olat.core.gui.UserRequest; import org.olat.core.gui.components.form.flexible.FormItem; @@ -38,6 +40,7 @@ import org.olat.core.gui.components.form.flexible.elements.TextElement; import org.olat.core.gui.components.form.flexible.impl.FormBasicController; import org.olat.core.gui.components.form.flexible.impl.FormEvent; import org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer; +import org.olat.core.gui.components.form.flexible.impl.elements.FileElementEvent; import org.olat.core.gui.components.link.Link; import org.olat.core.gui.control.Controller; import org.olat.core.gui.control.Event; @@ -59,8 +62,10 @@ import org.olat.course.ICourse; import org.olat.course.nodes.CheckListCourseNode; import org.olat.course.nodes.cl.CheckboxManager; import org.olat.course.nodes.cl.model.Checkbox; +import org.olat.course.nodes.cl.model.CheckboxList; import org.olat.course.run.environment.CourseEnvironment; import org.olat.util.logging.activity.LoggingResourceable; +import org.springframework.beans.factory.annotation.Autowired; /** * @@ -70,15 +75,15 @@ import org.olat.util.logging.activity.LoggingResourceable; */ public class CheckboxEditController extends FormBasicController { - private FormLink deleteLink, deleteFileLink, downloadFileLink; + private FormLink deleteLink; + private FormLink downloadFileLink; private TextElement titleEl, pointsEl; private SingleSelection releaseEl, labelEl; private MultipleSelectionElement awardPointEl; private RichTextElement descriptionEl; private FileElement fileEl; - private FormLayoutContainer deleteFileCont; - private Boolean deleteFile; + private List<String> filesToDelete = new ArrayList<>(); private final Checkbox checkbox; private final boolean withScore; @@ -86,7 +91,8 @@ public class CheckboxEditController extends FormBasicController { private final OLATResourceable courseOres; private final CheckListCourseNode courseNode; - private final CheckboxManager checkboxManager; + @Autowired + private CheckboxManager checkboxManager; public CheckboxEditController(UserRequest ureq, WindowControl wControl, OLATResourceable courseOres, @@ -103,7 +109,6 @@ public class CheckboxEditController extends FormBasicController { this.courseOres = courseOres; this.courseNode = courseNode; this.newCheckbox = newCheckbox; - checkboxManager = CoreSpringFactory.getImpl(CheckboxManager.class); initForm(ureq); } @@ -152,14 +157,17 @@ public class CheckboxEditController extends FormBasicController { getWindowControl()); fileEl = uifactory.addFileElement(getWindowControl(), "file", formLayout); + fileEl.setDeleteEnabled(true); fileEl.addActionListener(FormEvent.ONCHANGE); + if(courseNode != null && checkbox != null && StringHelper.containsNonWhitespace(checkbox.getFilename())) { + CourseEnvironment courseEnv = CourseFactory.loadCourse(courseOres).getCourseEnvironment(); + File directory = checkboxManager.getFileDirectory(courseEnv, courseNode); + fileEl.setInitialFile(new File(directory, checkbox.getFilename())); + } - String template = velocity_root + "/delete_file.html"; - deleteFileCont = FormLayoutContainer.createCustomFormLayout("delete", getTranslator(), template); - formLayout.add(deleteFileCont); - downloadFileLink = uifactory.addFormLink("download", checkbox.getFilename(), null, deleteFileCont, Link.NONTRANSLATED); - deleteFileLink = uifactory.addFormLink("deleteFile", "delete", null, deleteFileCont, Link.BUTTON); - deleteFileCont.setVisible(StringHelper.containsNonWhitespace(checkbox.getFilename())); + downloadFileLink = uifactory.addFormLink("download", checkbox.getFilename(), null, formLayout, Link.NONTRANSLATED); + downloadFileLink.setVisible(fileEl.getInitialFile() != null); + downloadFileLink.setIconLeftCSS("o_icon o_icon_download"); FormLayoutContainer buttonsCont = FormLayoutContainer.createButtonLayout("buttons", getTranslator()); formLayout.add(buttonsCont); @@ -208,7 +216,7 @@ public class CheckboxEditController extends FormBasicController { if(awardPointEl.isAtLeastSelected(1)) { Float points = null; try { - points = new Float(Float.parseFloat(pointsEl.getValue())); + points = Float.valueOf(Float.parseFloat(pointsEl.getValue())); } catch (NumberFormatException e) { //check in validation } @@ -218,21 +226,17 @@ public class CheckboxEditController extends FormBasicController { } checkbox.setDescription(descriptionEl.getValue()); - if(Boolean.TRUE.equals(deleteFile)) { - checkbox.setFilename(null); - VFSContainer container = getFileContainer(); - for (VFSItem chd:container.getItems()) { - chd.delete(); - } - } + deleteFiles(); - File uploadedFile = fileEl.getUploadFile(); - if(uploadedFile != null) { + if(fileEl.getUploadFile() == null && fileEl.getInitialFile() == null) { + checkbox.setFilename(null); + } else if(fileEl.getUploadFile() != null) { String filename = fileEl.getUploadFileName(); checkbox.setFilename(filename); VFSContainer container = getFileContainer(); VFSLeaf leaf = container.createChildLeaf(filename); + File uploadedFile = fileEl.getUploadFile(); try(InputStream inStream = new FileInputStream(uploadedFile)) { VFSManager.copyContent(inStream, leaf); } catch (IOException e) { @@ -248,6 +252,30 @@ public class CheckboxEditController extends FormBasicController { fireEvent(ureq, Event.CHANGED_EVENT); } + + private void deleteFiles() { + File directory = getFileDirectory(); + if(courseNode != null) { + CheckboxList list = (CheckboxList)courseNode.getModuleConfiguration().get(CheckListCourseNode.CONFIG_KEY_CHECKBOX); + if(list != null && list.getList() != null) { + for(Checkbox box:list.getList()) { + if((checkbox == null || !checkbox.getCheckboxId().equals(box.getCheckboxId())) + && StringHelper.containsNonWhitespace(box.getFilename())) { + filesToDelete.remove(box.getFilename()); + } + } + } + } + + for(String filenameToDelete: filesToDelete) { + File fileToDelete = new File(directory, filenameToDelete); + try { + Files.deleteIfExists(fileToDelete.toPath()); + } catch (IOException e) { + logError("Cannot delete file: " + fileToDelete, e); + } + } + } @Override protected void formCancelled(UserRequest ureq) { @@ -264,28 +292,32 @@ public class CheckboxEditController extends FormBasicController { } } else if(downloadFileLink == source) { doDownloadFile(ureq); - } else if(deleteFileLink == source) { - deleteFile(); } else if(awardPointEl == source) { pointsEl.setVisible(withScore && awardPointEl.isAtLeastSelected(1)); } else if(fileEl == source) { - String filename = fileEl.getUploadFileName(); - downloadFileLink.setI18nKey(filename); - downloadFileLink.setEnabled(false); + if(FileElementEvent.DELETE.equals(event.getCommand())) { + if(fileEl.getInitialFile() != null) { + filesToDelete.add(fileEl.getInitialFile().getName()); + } + + + fileEl.clearError(); + if(fileEl.getUploadFile() != null && fileEl.getUploadFile() != fileEl.getInitialFile()) { + fileEl.reset(); + } else { + fileEl.setInitialFile(null); + } + flc.setDirty(true); + } else if(fileEl.isUploadSuccess()) { + filesToDelete.remove(fileEl.getUploadFileName()); + } + + downloadFileLink.setVisible(fileEl.getInitialFile() != null); + } super.formInnerEvent(ureq, source, event); } - private void deleteFile() { - deleteFile = Boolean.TRUE; - deleteFileCont.setVisible(false); - - String filename = fileEl.getUploadFileName(); - if(filename != null && filename.equals(downloadFileLink.getI18nKey())) { - fileEl.reset(); - } - } - private void doDownloadFile(UserRequest ureq) { VFSContainer container = getFileContainer(); VFSItem item = container.resolve(checkbox.getFilename()); @@ -308,4 +340,16 @@ public class CheckboxEditController extends FormBasicController { } return container; } + + private File getFileDirectory() { + File directory; + if(courseNode == null) { + directory = new File(FolderConfig.getCanonicalTmpDir(), checkbox.getCheckboxId()); + } else { + ICourse course = CourseFactory.loadCourse(courseOres); + CourseEnvironment courseEnv = course.getCourseEnvironment(); + directory = checkboxManager.getFileDirectory(courseEnv, courseNode); + } + return directory; + } } diff --git a/src/main/java/org/olat/course/nodes/cl/ui/wizard/CheckListStepRunnerCallback.java b/src/main/java/org/olat/course/nodes/cl/ui/wizard/CheckListStepRunnerCallback.java index fcf870967d313246b0ebe3928f066fe887d6359d..c9f58fa349964c2b03ec011bc929f53fb76cb403 100644 --- a/src/main/java/org/olat/course/nodes/cl/ui/wizard/CheckListStepRunnerCallback.java +++ b/src/main/java/org/olat/course/nodes/cl/ui/wizard/CheckListStepRunnerCallback.java @@ -20,6 +20,7 @@ package org.olat.course.nodes.cl.ui.wizard; import java.io.File; +import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -32,6 +33,9 @@ import org.olat.core.gui.control.generic.wizard.StepRunnerCallback; import org.olat.core.gui.control.generic.wizard.StepsMainRunController; import org.olat.core.gui.control.generic.wizard.StepsRunContext; import org.olat.core.id.OLATResourceable; +import org.olat.core.logging.OLog; +import org.olat.core.logging.Tracing; +import org.olat.core.util.FileUtils; import org.olat.core.util.StringHelper; import org.olat.core.util.resource.OresHelper; import org.olat.core.util.vfs.LocalFolderImpl; @@ -62,6 +66,8 @@ import org.olat.modules.ModuleConfiguration; */ public class CheckListStepRunnerCallback implements StepRunnerCallback { + private static final OLog log = Tracing.createLoggerFor(CheckListStepRunnerCallback.class); + private final OLATResourceable courseOres; public CheckListStepRunnerCallback(OLATResourceable courseOres) { @@ -105,7 +111,6 @@ public class CheckListStepRunnerCallback implements StepRunnerCallback { if(item instanceof VFSLeaf) { VFSContainer container = checkboxManager.getFileContainer(courseEnv, checkNode); VFSManager.copyContent(tmpContainer, container); - tmpContainer.deleteSilently(); } } } @@ -116,11 +121,24 @@ public class CheckListStepRunnerCallback implements StepRunnerCallback { if(dueDate) { config.set(CheckListCourseNode.CONFIG_KEY_DUE_DATE, node.getDueDate()); } - config.set(CheckListCourseNode.CONFIG_KEY_CLOSE_AFTER_DUE_DATE, new Boolean(dueDate)); + config.set(CheckListCourseNode.CONFIG_KEY_CLOSE_AFTER_DUE_DATE, Boolean.valueOf(dueDate)); course.getEditorTreeModel().addCourseNode(checkNode, structureNode); } + for(Checkbox templateBox:templateCheckbox) { + if(StringHelper.containsNonWhitespace(templateBox.getFilename())) { + File path = new File(FolderConfig.getCanonicalTmpDir(), templateBox.getCheckboxId()); + if(path.exists()) { + try { + FileUtils.deleteDirsAndFiles(path.toPath()); + } catch (IOException e) { + log.error("Cannot cleanup tmp directory: " + path); + } + } + } + } + setScoreCalculation(data, (STCourseNode)structureNode, nodesIdent); return StepsMainRunController.DONE_MODIFIED; diff --git a/src/main/java/org/olat/group/BusinessGroupImpl.java b/src/main/java/org/olat/group/BusinessGroupImpl.java index 539d39663b41d126ad9fbdff4872893957c07c53..1ab9676143dbfa0bfe23313d3f60616ae894891d 100644 --- a/src/main/java/org/olat/group/BusinessGroupImpl.java +++ b/src/main/java/org/olat/group/BusinessGroupImpl.java @@ -373,26 +373,14 @@ public class BusinessGroupImpl implements Persistable, ModifiedInfo, BusinessGro } } - /** - * @see org.olat.group.BusinessGroup#getMinParticipants() - */ public Integer getMinParticipants() { return minParticipants; } - /** - * @see org.olat.group.BusinessGroup#setMinParticipants(java.lang.Integer) - */ public void setMinParticipants(Integer minParticipants) { this.minParticipants = minParticipants; } - /** - * @see java.lang.Object#toString() - */ - public String toString() { - return "name=" + name + "::" + "::" + super.toString(); - } public Boolean getAutoCloseRanksEnabled() { return autoCloseRanksEnabled; @@ -434,4 +422,13 @@ public class BusinessGroupImpl implements Persistable, ModifiedInfo, BusinessGro public int hashCode() { return getKey() == null ? 2901 : getKey().hashCode(); } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(256); + sb.append("businessGroup[key=").append(getKey() == null ? "" : getKey()) + .append(";name=").append(getName() == null ? "" : getName()).append("]") + .append(super.toString()); + return sb.toString(); + } } \ No newline at end of file diff --git a/src/main/java/org/olat/group/manager/BusinessGroupServiceImpl.java b/src/main/java/org/olat/group/manager/BusinessGroupServiceImpl.java index e65baceb53d8e2a80124f954f5d26eb41b7bc7d8..056b11285767f5180bd564bf2548558aa2c6ab99 100644 --- a/src/main/java/org/olat/group/manager/BusinessGroupServiceImpl.java +++ b/src/main/java/org/olat/group/manager/BusinessGroupServiceImpl.java @@ -747,6 +747,8 @@ public class BusinessGroupServiceImpl implements BusinessGroupService, UserDataD @Override public void deleteBusinessGroup(BusinessGroup group) { try{ + log.audit("Start deleting Business Group", group.toString()); + OLATResourceableJustBeforeDeletedEvent delEv = new OLATResourceableJustBeforeDeletedEvent(group); // notify all (currently running) BusinessGroupXXXcontrollers // about the deletion which will occur. diff --git a/src/main/java/org/olat/group/ui/run/BusinessGroupMainRunController.java b/src/main/java/org/olat/group/ui/run/BusinessGroupMainRunController.java index 80ae714a9ee5323f27cad8b7a5be711fbdbc3345..8dacae65aff6f1a4c479fc3bc72fb4e63190a31d 100644 --- a/src/main/java/org/olat/group/ui/run/BusinessGroupMainRunController.java +++ b/src/main/java/org/olat/group/ui/run/BusinessGroupMainRunController.java @@ -781,7 +781,7 @@ public class BusinessGroupMainRunController extends MainLayoutBasicController im return (Activateable2)collabToolCtr; } - private Activateable2 doPortfolio(UserRequest ureq) { + private Controller doPortfolio(UserRequest ureq) { addLoggingResourceable(LoggingResourceable.wrap(ORES_TOOLPORTFOLIO, OlatResourceableType.portfolio)); ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ORES_TOOLPORTFOLIO); @@ -796,8 +796,10 @@ public class BusinessGroupMainRunController extends MainLayoutBasicController im toolbarPanel.pushController("Portfolio", collabToolCtr); List<ContextEntry> entries = BusinessControlFactory.getInstance().createCEListFromResourceType("Toc"); - ((Activateable2)collabToolCtr).activate(ureq, entries, null); - return (Activateable2)collabToolCtr; + if(collabToolCtr instanceof Activateable2) { + ((Activateable2)collabToolCtr).activate(ureq, entries, null); + } + return collabToolCtr; } private void doOpenMeetings(UserRequest ureq) { @@ -944,7 +946,10 @@ public class BusinessGroupMainRunController extends MainLayoutBasicController im } } else if (OresHelper.equals(ores, ORES_TOOLPORTFOLIO)) { if (nodePortfolio != null) { - doPortfolio(ureq).activate(ureq, entries, ce.getTransientState()); + Controller ctrl = doPortfolio(ureq); + if(ctrl instanceof Activateable2) { + ((Activateable2)ctrl).activate(ureq, entries, ce.getTransientState()); + } bgTree.setSelectedNode(nodePortfolio); } else if(mainPanel != null) { // not enabled String text = translate("warn.portfolionotavailable"); diff --git a/src/main/java/org/olat/ims/qti21/ui/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/ims/qti21/ui/_i18n/LocalStrings_de.properties index d72ce19164af87a5f13fdfb21e47114742050e80..207555e31bab4834eaae7d98f4814a361e598a2f 100644 --- a/src/main/java/org/olat/ims/qti21/ui/_i18n/LocalStrings_de.properties +++ b/src/main/java/org/olat/ims/qti21/ui/_i18n/LocalStrings_de.properties @@ -208,7 +208,7 @@ results.session.status.initial=Nicht gestartet results.session.status.pendingResponseProcessing=$\:results.session.status.pendingSubmission results.session.status.pendingSubmission=Gesehen aber nicht geantwortet results.summary.title=$org.olat.course.nodes\:personal.title -results.title.failed=Sie haben den Test nicht bestanden\! +results.title.failed=Sie haben den Test nicht bestanden. results.title.for=f\u00FCr {0} results.title.generic=Dies sind Ihre Testresultate results.title.passed=Sie haben den Test bestanden\! diff --git a/src/main/java/org/olat/ims/qti21/ui/_i18n/LocalStrings_en.properties b/src/main/java/org/olat/ims/qti21/ui/_i18n/LocalStrings_en.properties index 0d6cc5ecb616b536d88b82f7c108040836dfd9c4..7e832cba2803de8427449d7a405541f40a94c1d0 100644 --- a/src/main/java/org/olat/ims/qti21/ui/_i18n/LocalStrings_en.properties +++ b/src/main/java/org/olat/ims/qti21/ui/_i18n/LocalStrings_en.properties @@ -208,7 +208,7 @@ results.session.status.initial=Not started results.session.status.pendingResponseProcessing=$\:results.session.status.pendingSubmission results.session.status.pendingSubmission=Seen but not answered results.summary.title=$org.olat.course.nodes\:personal.title -results.title.failed=Sorry, you have failed the test\! +results.title.failed=Sorry, you have failed the test. results.title.for=for {0} results.title.generic=This are your test results results.title.passed=You have passed the test\! diff --git a/src/main/java/org/olat/ims/qti21/ui/_i18n/LocalStrings_pt_BR.properties b/src/main/java/org/olat/ims/qti21/ui/_i18n/LocalStrings_pt_BR.properties index 040eb79015b3d91e14e1730e46b04bda4cec1922..7aa952fd52a58a3603a1584c4be007d171c17e98 100644 --- a/src/main/java/org/olat/ims/qti21/ui/_i18n/LocalStrings_pt_BR.properties +++ b/src/main/java/org/olat/ims/qti21/ui/_i18n/LocalStrings_pt_BR.properties @@ -208,7 +208,7 @@ results.session.status.initial=N\u00E3o iniciado results.session.status.pendingResponseProcessing=$\:results.session.status.pendingSubmission results.session.status.pendingSubmission=Visto mas n\u00E3o respondido results.summary.title=$org.olat.course.nodes\:personal.title -results.title.failed=Desculpe, voc\u00EA falhou no teste\! +results.title.failed=Desculpe, voc\u00EA falhou no teste. results.title.for=para {0} results.title.generic=Estes s\u00E3o os resultados do seu teste results.title.passed=Voc\u00EA passou no teste\! 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 5461cac534a6960ff6d0ee5c04671e9cd451ba1d..9e857bbeb3b023f2e1f7524167d5fa9591a60648 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 @@ -79,7 +79,7 @@ export.header.lectureblocks=Lektionenblock\: {0} vom {1} von {2} bis {3} export.header.lectures=Lektionen export.header.location=Raum\: {0} export.header.teachers=Dozenten\: {0} -filter.mandatory=Anwesehnheit obligatorisch +filter.mandatory=Anwesenheit obligatorisch filter.showAll=Alle anzeigen first.admission=Erstzulassung form.managedflags.intro=Dieser Lektionblock wurde von einem externen Werkzeug erstellt. Einige Einstellungen und Module k\u00F6nnen daher in OpenOLAT nicht ver\u00E4ndert und benutzt werden. Folgende Elemente sind in OpenOLAT gesperrt\: {0} @@ -108,7 +108,7 @@ lecture.block.effective.reason=Begr\u00FCndung lecture.block.status=Status lecture.calculate.attendance.rate.default.enabled=Berechnung der Anwesenheitsrate lecture.can.override.standard.configuration=\u00DCberschreiben der Standard-Konfiguration zulassen -lecture.compulsory=Anwesehnheit obligatorisch +lecture.compulsory=Anwesenheit obligatorisch lecture.count.authorized.absence.attendant=Entschuldigte Absenzen als anwesend z\u00E4hlen lecture.course.admin.title=Konfiguration Lektionen- und Absenzenmanagement im Kurs lecture.date=Datum diff --git a/src/main/java/org/olat/modules/portfolio/ui/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/modules/portfolio/ui/_i18n/LocalStrings_de.properties index 6c7a45d0d9dc04733e039df35ad716b9727eaeb1..8f7634c770b8c1c245a518bfddefc3a10a99ec99 100644 --- a/src/main/java/org/olat/modules/portfolio/ui/_i18n/LocalStrings_de.properties +++ b/src/main/java/org/olat/modules/portfolio/ui/_i18n/LocalStrings_de.properties @@ -357,7 +357,7 @@ summary.close=Zusammenfassung ausblenden summary.open=Zusammenfassung \u00F6ffnen summary.placeholder=Kurze Zusammenfassung \u00FCber den Inhalt table.grading.failed.points=<span class\="o_state o_failed"><i class\="o_icon o_icon_failed"> </i> {0} Punkt(e)</span> -table.grading.no=noch kein Bewertung +table.grading.no=noch keine Bewertung table.grading.passed.points=<span class\="o_state o_passed"><i class\="o_icon o_icon_passed"> </i> {0} Punkt(e), bestanden</span> table.grading.points={0} Punkt(e) table.header.mark=<i class\="o_icon o_icon_bookmark_header o_icon-lg" title\="Favorit"> </i>