Skip to content
Snippets Groups Projects
Commit 93d824e1 authored by uhensler's avatar uhensler
Browse files

OO-4676: Validate if item is selected

parent 139f8d8e
No related branches found
No related tags found
No related merge requests found
......@@ -143,9 +143,20 @@ public class EdusharingCourseNode extends AbstractAccessableCourseNode {
@Override
public StatusDescription isConfigValid() {
if (oneClickStatusCache != null) { return oneClickStatusCache[0]; }
if (oneClickStatusCache != null) {
return oneClickStatusCache[0];
}
StatusDescription sd = StatusDescription.NOERROR;
if (!getModuleConfiguration().has(CONFIG_IDENTIFIER)) {
String shortKey = "error.no.item.short";
String longKey = "error.no.item.long";
String[] params = new String[] { this.getShortTitle() };
sd = new StatusDescription(StatusDescription.ERROR, shortKey, longKey, params, TRANSLATOR_PACKAGE);
sd.setDescriptionForUnit(getIdent());
// set which pane is affected by error
sd.setActivateableViewIdentifier(EdusharingEditController.PANE_TAB_CONFIG);
}
return sd;
}
......
......@@ -11,6 +11,8 @@ edit.title=$\:pane.tab.config
edit.version=$org.olat.modules.edusharing.ui\:tiny.config.version
edit.version.current=$org.olat.modules.edusharing.ui\:tiny.config.version.current
edit.version.latest=$org.olat.modules.edusharing.ui\:tiny.config.version.latest
error.no.item.long=F\u00FCr "{0}" muss ein Inhalt im Reiter "edu-sharing" ausgew\u00E4hlt werden.
error.no.item.short=Es ist kein Inhalt ausw\u00E4hlt.
error.selection.failed=Die Auswahl konnte nicht gespeichert werden.
pane.tab.config=edu-sharing
preview=Vorschau
\ No newline at end of file
......@@ -11,6 +11,8 @@ edit.title=$\:pane.tab.config
edit.version=$org.olat.modules.edusharing.ui\:tiny.config.version
edit.version.current=$org.olat.modules.edusharing.ui\:tiny.config.version.current
edit.version.latest=$org.olat.modules.edusharing.ui\:tiny.config.version.latest
error.no.item.long=For "{0}" you have to select an item in the tab "edu-sharing".
error.no.item.short=No item selected.
error.selection.failed=The selection could not be saved.
pane.tab.config=edu-sharing
preview=Preview
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment