diff --git a/src/main/java/org/olat/core/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/core/_i18n/LocalStrings_de.properties index d6c3410951afa46db373549dd4d4f3cca1539272..c3a77774933c33868a80cc7e38b245963b45fdf6 100644 --- a/src/main/java/org/olat/core/_i18n/LocalStrings_de.properties +++ b/src/main/java/org/olat/core/_i18n/LocalStrings_de.properties @@ -110,6 +110,7 @@ toolbox.tools=Werkzeuge top=nach oben top.alt=Zum Anfang der Seite user.guest=Gast +user.fullname.separator=; warn.beta.feature=Achtung\! Diese Funktion befindet sich in einer Versuchsphase. Bitte beachten Sie, dass Fehler auftreten k\u00F6nnen wenn diese Funktion verwendet wird. warn.header=Achtung warn.notdispatched=Diese Seite wurde ver\u00E4ndert. Bitte beachten Sie allf\u00E4llige Meldungen. diff --git a/src/main/java/org/olat/core/_i18n/LocalStrings_en.properties b/src/main/java/org/olat/core/_i18n/LocalStrings_en.properties index c676e293bfcc7fd57d2749f7cb6ea9c3ac3e4b3a..5cb8f61cc9f2a346624ae884d6f3ccd4f29407a4 100644 --- a/src/main/java/org/olat/core/_i18n/LocalStrings_en.properties +++ b/src/main/java/org/olat/core/_i18n/LocalStrings_en.properties @@ -110,6 +110,7 @@ toolbox.tools=Tools top=Go to top top.alt=Go to top of page user.guest=Guest +user.fullname.separator=/ warn.beta.feature=Attention\! This is a beta feature. Be aware that using this feature might result in unexpected behavior. warn.header=Warning warn.notdispatched=This page has been modified. Please consider any new messages. diff --git a/src/main/java/org/olat/core/_i18n/LocalStrings_fr.properties b/src/main/java/org/olat/core/_i18n/LocalStrings_fr.properties index c57a60c8dcba72156d181e11b671379768fb8d8a..e5b77dc24032f9b9ccd03ff4aad47c28f862320e 100644 --- a/src/main/java/org/olat/core/_i18n/LocalStrings_fr.properties +++ b/src/main/java/org/olat/core/_i18n/LocalStrings_fr.properties @@ -110,6 +110,7 @@ toolbox.tools=Outils top=vers le haut top.alt=Vers le d\u00E9but de la page user.guest=invit\u00E9 +user.fullname.separator=/ warn.beta.feature=Attention\! Cette fonction se trouve dans la phase d'essai. Veuillez noter que des erreurs peuvent appara\u00EEtre si cette fonction est utilis\u00E9e. warn.header=Attention warn.notdispatched=Cette page a \u00E9t\u00E9 modifi\u00E9e. Veuillez tenir compte d'\u00E9ventuels messages. diff --git a/src/main/java/org/olat/core/_i18n/LocalStrings_pt_BR.properties b/src/main/java/org/olat/core/_i18n/LocalStrings_pt_BR.properties index d2fbb873ef3d2d5d2551295fe62aaf40c46919d9..9c849bf555eec0f6df915cbe737dda9ce6c4d380 100644 --- a/src/main/java/org/olat/core/_i18n/LocalStrings_pt_BR.properties +++ b/src/main/java/org/olat/core/_i18n/LocalStrings_pt_BR.properties @@ -1,4 +1,4 @@ -#Tue Sep 05 19:07:58 CEST 2017 +#Wed Feb 28 13:29:33 CET 2018 alert=Favor selecionar no m\u00EDnimo um objeto para sua a\u00E7\u00E3o. back=Voltar calendar.choose=Escolha uma data do mini calend\u00E1rio @@ -30,6 +30,7 @@ form.dirty.ignore=Ao clicar em <strong>$\:form.dirty.button.ignore</strong>, voc form.dirty.intro=Aten\u00E7\u00E3o\! Voc\u00EA ainda n\u00E3o salvou este formul\u00E1rio. form.dirty.title=Dados do formul\u00E1rio n\u00E3o salvos form.error.nointeger=N\u00FAmero inv\u00E1lido. Por favor insira um n\u00FAmero inteiro. +form.error.toolong=Sua inser\u00E7\u00E3o est\u00E1 muito longa. Um m\u00E1ximo de {0} caracteres \u00E9 permitido. form.general.error=Formul\u00E1rio de dados n\u00E3o \u00E9 v\u00E1lido. form.legende.mandatory=<i>Favor preencher este campo.</i> form.legende.wikiMarkup=\=<i>Este campo permite itens formatados usando a linguagem wiki markup.</i> </br >*<b>bold</b>*<br>_<i>it\u00E1lico</i>_<br>* Listar itens diff --git a/src/main/java/org/olat/core/gui/components/tabbedpane/TabbedPane.java b/src/main/java/org/olat/core/gui/components/tabbedpane/TabbedPane.java index edce7e128496f426040597fc188759280b4d6d0a..32a8b69ed9a9529d049b85d117ada618dffa8026 100644 --- a/src/main/java/org/olat/core/gui/components/tabbedpane/TabbedPane.java +++ b/src/main/java/org/olat/core/gui/components/tabbedpane/TabbedPane.java @@ -126,7 +126,7 @@ public class TabbedPane extends Container implements Activateable2 { } public OLATResourceable getTabResource() { - return OresHelper.createOLATResourceableInstance("tab", new Long(selectedPane)); + return OresHelper.createOLATResourceableInstance("tab", Long.valueOf(selectedPane)); } public void addToHistory(UserRequest ureq, WindowControl wControl) { @@ -199,7 +199,7 @@ public class TabbedPane extends Container implements Activateable2 { public int indexOfTab(String displayName) { for(int i=tabPanes.size(); i-->0; ) { - if(displayName.equals(tabPanes.get(i).getComponent())) { + if(displayName.equals(tabPanes.get(i).getDisplayName())) { return i; } } @@ -304,6 +304,7 @@ public class TabbedPane extends Container implements Activateable2 { * @deprecated * @param displayName */ + @Deprecated public void setSelectedPane(UserRequest ureq, String displayName) { if (displayName == null) return; int pos = indexOfTab(displayName); @@ -417,7 +418,6 @@ public class TabbedPane extends Container implements Activateable2 { public void setController(Controller controller) { if(controller == null) { - controller = null; component = null; } else { this.controller = controller; diff --git a/src/main/java/org/olat/course/db/_i18n/LocalStrings_pt_BR.properties b/src/main/java/org/olat/course/db/_i18n/LocalStrings_pt_BR.properties index a86eadc2dca9a8d5b243f6f49a4cd61212f74b38..b58e8ba42b9d8ba71d6e933d9fa79c793e3e1740 100644 --- a/src/main/java/org/olat/course/db/_i18n/LocalStrings_pt_BR.properties +++ b/src/main/java/org/olat/course/db/_i18n/LocalStrings_pt_BR.properties @@ -1,4 +1,4 @@ -#Thu Feb 08 13:42:54 CET 2018 +#Wed Feb 28 13:30:38 CET 2018 command.new_db=Criar novo banco de dados customDb.category=Nome customDb.create=Criar diff --git a/src/main/java/org/olat/course/nodes/AbstractAccessableCourseNode.java b/src/main/java/org/olat/course/nodes/AbstractAccessableCourseNode.java index 490fe21a03623737a29704c47a8835d5dcaf28dc..3fe5d4c33b011be31e005113de7d99f6e97f8570 100644 --- a/src/main/java/org/olat/course/nodes/AbstractAccessableCourseNode.java +++ b/src/main/java/org/olat/course/nodes/AbstractAccessableCourseNode.java @@ -157,9 +157,9 @@ public abstract class AbstractAccessableCourseNode extends GenericCourseNode { ArrayList<ConditionExpression> retVal; List<ConditionExpression> parentsConditions = super.getConditionExpressions(); if (parentsConditions.size() > 0) { - retVal = new ArrayList<ConditionExpression>(parentsConditions); + retVal = new ArrayList<>(parentsConditions); } else { - retVal = new ArrayList<ConditionExpression>(); + retVal = new ArrayList<>(); } // String coS = getPreConditionAccess().getConditionExpression(); diff --git a/src/main/java/org/olat/course/nodes/CheckListCourseNode.java b/src/main/java/org/olat/course/nodes/CheckListCourseNode.java index 31e66ffda92db7f4e864fa56c7fcca961a19c867..40a3cb6729094ab2fc34ad24fbf8c88516ced498 100644 --- a/src/main/java/org/olat/course/nodes/CheckListCourseNode.java +++ b/src/main/java/org/olat/course/nodes/CheckListCourseNode.java @@ -96,7 +96,7 @@ import org.olat.repository.RepositoryEntry; */ public class CheckListCourseNode extends AbstractAccessableCourseNode implements PersistentAssessableCourseNode { - private static final String translatorStr = Util.getPackageName(CheckListEditController.class); + private static final String PACKAGE_CL = Util.getPackageName(CheckListEditController.class); private static final long serialVersionUID = -7460670977531082040L; private static final String TYPE = "checklist"; @@ -206,11 +206,16 @@ public class CheckListCourseNode extends AbstractAccessableCourseNode implements */ @Override public StatusDescription isConfigValid() { - if (oneClickStatusCache != null) { + if (oneClickStatusCache != null && oneClickStatusCache.length > 0) { return oneClickStatusCache[0]; } - StatusDescription sd = StatusDescription.NOERROR; - return sd; + + List<StatusDescription> statusDescs = validateInternalConfiguration(); + if(statusDescs.isEmpty()) { + statusDescs.add(StatusDescription.NOERROR); + } + oneClickStatusCache = StatusDescriptionHelper.sort(statusDescs); + return oneClickStatusCache[0]; } /** @@ -221,18 +226,56 @@ public class CheckListCourseNode extends AbstractAccessableCourseNode implements oneClickStatusCache = null; // only here we know which translator to take for translating condition // error messages - List<StatusDescription> sds = isConfigValidWithTranslator(cev, translatorStr, getConditionExpressions()); + List<StatusDescription> sds = isConfigValidWithTranslator(cev, PACKAGE_CL, getConditionExpressions()); + if(oneClickStatusCache != null && oneClickStatusCache.length > 0) { + //isConfigValidWithTranslator add first + sds.remove(oneClickStatusCache[0]); + } + sds.addAll(validateInternalConfiguration()); oneClickStatusCache = StatusDescriptionHelper.sort(sds); return oneClickStatusCache; } + + private List<StatusDescription> validateInternalConfiguration() { + List<StatusDescription> sdList = new ArrayList<>(5); + + ModuleConfiguration config = getModuleConfiguration(); + + Boolean hasScore = (Boolean)config.get(MSCourseNode.CONFIG_KEY_HAS_SCORE_FIELD); + if ((hasScore == null || hasScore.booleanValue()) && + (config.get(MSCourseNode.CONFIG_KEY_SCORE_MIN) == null || config.get(MSCourseNode.CONFIG_KEY_SCORE_MAX) == null)) { + addStatusErrorDescription("error.missing.score.config", CheckListEditController.PANE_TAB_CLCONFIG, sdList); + } + + Boolean hasPassed = (Boolean)config.get(MSCourseNode.CONFIG_KEY_HAS_PASSED_FIELD); + if (hasPassed == null || hasPassed.booleanValue()) { + + Boolean passedSum = (Boolean)config.get(CheckListCourseNode.CONFIG_KEY_PASSED_SUM_CHECKBOX); + Boolean manualCorr = (Boolean)config.get(CheckListCourseNode.CONFIG_KEY_PASSED_MANUAL_CORRECTION); + if((manualCorr == null || !manualCorr.booleanValue()) && (passedSum == null || !passedSum.booleanValue()) + && config.get(MSCourseNode.CONFIG_KEY_PASSED_CUT_VALUE) == null) { + addStatusErrorDescription("error.missing.cutvalue.config", CheckListEditController.PANE_TAB_CLCONFIG, sdList); + } + } + + return sdList; + } + + private void addStatusErrorDescription(String key, String pane, List<StatusDescription> status) { + String[] params = new String[] { getShortTitle() }; + StatusDescription sd = new StatusDescription(StatusDescription.ERROR, key, key, params, PACKAGE_CL); + sd.setDescriptionForUnit(getIdent()); + sd.setActivateableViewIdentifier(pane); + status.add(sd); + } @Override public List<StatusDescription> publishUpdatesExplanations(CourseEditorEnv cev) { List<StatusDescription> statusDescs = new ArrayList<>(); - StatusDescription statusDesc1 = new StatusDescription(Level.INFO, "checklist.update.assessment", null, null, translatorStr); + StatusDescription statusDesc1 = new StatusDescription(Level.INFO, "checklist.update.assessment", null, null, PACKAGE_CL); statusDesc1.setDescriptionForUnit(getIdent()); statusDescs.add(statusDesc1); - StatusDescription statusDesc2 = new StatusDescription(Level.INFO, "checklist.update.efficiencystatements", null, null, translatorStr); + StatusDescription statusDesc2 = new StatusDescription(Level.INFO, "checklist.update.efficiencystatements", null, null, PACKAGE_CL); statusDesc2.setDescriptionForUnit(getIdent()); statusDescs.add(statusDesc2); return statusDescs; @@ -268,8 +311,7 @@ public class CheckListCourseNode extends AbstractAccessableCourseNode implements throw new OLATRuntimeException(MSCourseNode.class, "getCutValue not defined when hasPassed set to false", null); } ModuleConfiguration config = getModuleConfiguration(); - Float cut = (Float) config.get(MSCourseNode.CONFIG_KEY_PASSED_CUT_VALUE); - return cut; + return (Float)config.get(MSCourseNode.CONFIG_KEY_PASSED_CUT_VALUE); } /** @@ -281,8 +323,7 @@ public class CheckListCourseNode extends AbstractAccessableCourseNode implements throw new OLATRuntimeException(MSCourseNode.class, "getMaxScore not defined when hasScore set to false", null); } ModuleConfiguration config = getModuleConfiguration(); - Float max = (Float)config.get(MSCourseNode.CONFIG_KEY_SCORE_MAX); - return max; + return (Float)config.get(MSCourseNode.CONFIG_KEY_SCORE_MAX); } /** @@ -294,8 +335,7 @@ public class CheckListCourseNode extends AbstractAccessableCourseNode implements throw new OLATRuntimeException(MSCourseNode.class, "getMinScore not defined when hasScore set to false", null); } ModuleConfiguration config = getModuleConfiguration(); - Float min = (Float) config.get(MSCourseNode.CONFIG_KEY_SCORE_MIN); - return min; + return (Float)config.get(MSCourseNode.CONFIG_KEY_SCORE_MIN); } /** @@ -304,8 +344,7 @@ public class CheckListCourseNode extends AbstractAccessableCourseNode implements @Override public String getUserCoachComment(UserCourseEnvironment userCourseEnvironment) { AssessmentManager am = userCourseEnvironment.getCourseEnvironment().getAssessmentManager(); - String coachCommentValue = am.getNodeCoachComment(this, userCourseEnvironment.getIdentityEnvironment().getIdentity()); - return coachCommentValue; + return am.getNodeCoachComment(this, userCourseEnvironment.getIdentityEnvironment().getIdentity()); } /** @@ -314,8 +353,7 @@ public class CheckListCourseNode extends AbstractAccessableCourseNode implements @Override public String getUserLog(UserCourseEnvironment userCourseEnvironment) { UserNodeAuditManager am = userCourseEnvironment.getCourseEnvironment().getAuditManager(); - String logValue = am.getUserNodeLog(this, userCourseEnvironment.getIdentityEnvironment().getIdentity()); - return logValue; + return am.getUserNodeLog(this, userCourseEnvironment.getIdentityEnvironment().getIdentity()); } /** @@ -324,8 +362,7 @@ public class CheckListCourseNode extends AbstractAccessableCourseNode implements @Override public String getUserUserComment(UserCourseEnvironment userCourseEnvironment) { AssessmentManager am = userCourseEnvironment.getCourseEnvironment().getAssessmentManager(); - String userCommentValue = am.getNodeComment(this, userCourseEnvironment.getIdentityEnvironment().getIdentity()); - return userCommentValue; + return am.getNodeComment(this, userCourseEnvironment.getIdentityEnvironment().getIdentity()); } @Override diff --git a/src/main/java/org/olat/course/nodes/GTACourseNode.java b/src/main/java/org/olat/course/nodes/GTACourseNode.java index 7fdae523986ffbd1c6dfd97cc28f4c58e7d09c9e..d79c10eb3099f6205306b4cf8f7d9776282aeb6f 100644 --- a/src/main/java/org/olat/course/nodes/GTACourseNode.java +++ b/src/main/java/org/olat/course/nodes/GTACourseNode.java @@ -106,8 +106,8 @@ import org.olat.user.UserManager; */ public class GTACourseNode extends AbstractAccessableCourseNode implements PersistentAssessableCourseNode { - private final static OLog log = Tracing.createLoggerFor(GTACourseNode.class); - private final static String PACKAGE_GTA = Util.getPackageName(GTAEditController.class); + private static final OLog log = Tracing.createLoggerFor(GTACourseNode.class); + private static final String PACKAGE_GTA = Util.getPackageName(GTAEditController.class); private static final long serialVersionUID = 1L; diff --git a/src/main/java/org/olat/course/nodes/GenericCourseNode.java b/src/main/java/org/olat/course/nodes/GenericCourseNode.java index c0f0ea8e819eb01531936f9cd0359b5b9af0fa52..9d417bb3af25d71cdb647c56f9f253b2ff328980 100644 --- a/src/main/java/org/olat/course/nodes/GenericCourseNode.java +++ b/src/main/java/org/olat/course/nodes/GenericCourseNode.java @@ -614,7 +614,7 @@ public abstract class GenericCourseNode extends GenericNode implements CourseNod */ //for StatusDescription.WARNING protected List<StatusDescription> isConfigValidWithTranslator(CourseEditorEnv cev, String translatorStr, List<ConditionExpression> condExprs) { - List<StatusDescription> condExprsStatusDescs = new ArrayList<StatusDescription>(); + List<StatusDescription> condExprsStatusDescs = new ArrayList<>(); // check valid configuration without course environment StatusDescription first = isConfigValid(); // check valid configuration within the course environment diff --git a/src/main/java/org/olat/course/nodes/cl/ui/CheckListConfigurationController.java b/src/main/java/org/olat/course/nodes/cl/ui/CheckListConfigurationController.java index 34b6ad6fcc3d4d686bc8a77b2bedf0e0ee9af134..3ec5013fae2a7fa7b0c2cdb137ab64d73d8222df 100644 --- a/src/main/java/org/olat/course/nodes/cl/ui/CheckListConfigurationController.java +++ b/src/main/java/org/olat/course/nodes/cl/ui/CheckListConfigurationController.java @@ -239,7 +239,7 @@ public class CheckListConfigurationController extends FormBasicController { //due date boolean closeAfterDueDate = dueDateEl.isAtLeastSelected(1); - config.set(CheckListCourseNode.CONFIG_KEY_CLOSE_AFTER_DUE_DATE, new Boolean(closeAfterDueDate)); + config.set(CheckListCourseNode.CONFIG_KEY_CLOSE_AFTER_DUE_DATE, Boolean.valueOf(closeAfterDueDate)); Date dueDate = dueDateChooserEl.getDate(); if(dueDate != null) { config.set(CheckListCourseNode.CONFIG_KEY_DUE_DATE, dueDate); @@ -247,7 +247,7 @@ public class CheckListConfigurationController extends FormBasicController { config.remove(CheckListCourseNode.CONFIG_KEY_DUE_DATE); } //score - Boolean sf = new Boolean(scoreGrantedEl.isSelected(0)); + Boolean sf = Boolean.valueOf(scoreGrantedEl.isSelected(0)); config.set(MSCourseNode.CONFIG_KEY_HAS_SCORE_FIELD, sf); if (sf.booleanValue()) { config.set(MSCourseNode.CONFIG_KEY_SCORE_MIN, new Float(minPointsEl.getValue())); @@ -258,7 +258,7 @@ public class CheckListConfigurationController extends FormBasicController { } // mandatory passed flag - Boolean pf = new Boolean(passedEl.isSelected(0)); + Boolean pf = Boolean.valueOf(passedEl.isSelected(0)); config.set(MSCourseNode.CONFIG_KEY_HAS_PASSED_FIELD, pf); config.remove(MSCourseNode.CONFIG_KEY_PASSED_CUT_VALUE); config.remove(CheckListCourseNode.CONFIG_KEY_PASSED_SUM_CUTVALUE); @@ -271,16 +271,16 @@ public class CheckListConfigurationController extends FormBasicController { } else if("sum".equals(output)) { config.set(CheckListCourseNode.CONFIG_KEY_PASSED_SUM_CHECKBOX, Boolean.TRUE); int sumCutValue = Integer.parseInt(sumCheckboxEl.getSelectedKey()); - config.set(CheckListCourseNode.CONFIG_KEY_PASSED_SUM_CUTVALUE, new Integer(sumCutValue)); + config.set(CheckListCourseNode.CONFIG_KEY_PASSED_SUM_CUTVALUE, Integer.valueOf(sumCutValue)); } else if("coach".equals(output)) { config.set(CheckListCourseNode.CONFIG_KEY_PASSED_MANUAL_CORRECTION, Boolean.TRUE); } } // mandatory comment flag - config.set(MSCourseNode.CONFIG_KEY_HAS_COMMENT_FIELD, new Boolean(commentEl.isSelected(0))); + config.set(MSCourseNode.CONFIG_KEY_HAS_COMMENT_FIELD, Boolean.valueOf(commentEl.isSelected(0))); // individual assessment docs - config.setBooleanEntry(MSCourseNode.CONFIG_KEY_HAS_INDIVIDUAL_ASSESSMENT_DOCS, new Boolean(assessmentDocsEl.isSelected(0))); + config.setBooleanEntry(MSCourseNode.CONFIG_KEY_HAS_INDIVIDUAL_ASSESSMENT_DOCS, assessmentDocsEl.isSelected(0)); // set info text only if something is in there String iu = tipUserEl.getValue(); @@ -300,7 +300,7 @@ public class CheckListConfigurationController extends FormBasicController { @Override protected boolean validateFormLogic(UserRequest ureq) { - boolean allOk = true; + boolean allOk = super.validateFormLogic(ureq); //wizardery need title prefix and number of checklist to be defined if(wizard) { @@ -362,7 +362,7 @@ public class CheckListConfigurationController extends FormBasicController { } } - return allOk & super.validateFormLogic(ureq); + return allOk; } private float toFloat(String val) { diff --git a/src/main/java/org/olat/course/nodes/cl/ui/CheckListEditController.java b/src/main/java/org/olat/course/nodes/cl/ui/CheckListEditController.java index 76b069403ee6d6abe497f767e2cfd7943bf972fc..f0f3f6fb871520aefd7754094b9b14a7211cae80 100644 --- a/src/main/java/org/olat/course/nodes/cl/ui/CheckListEditController.java +++ b/src/main/java/org/olat/course/nodes/cl/ui/CheckListEditController.java @@ -61,7 +61,7 @@ public class CheckListEditController extends ActivateableTabbableDefaultControll private TabbedPane myTabbedPane; - private final static String[] paneKeys = { PANE_TAB_CLCONFIG, PANE_TAB_CHECKBOX }; + private static final String[] paneKeys = { PANE_TAB_CLCONFIG, PANE_TAB_CHECKBOX }; /** * @param cpNode diff --git a/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_de.properties index 7e1c9be78b55fb8cda5b0933b09cf73ce0c4c79d..4fd52b50f2474b39a55ee518bdb3c9a584557117 100644 --- a/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_de.properties +++ b/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_de.properties @@ -48,6 +48,8 @@ details=Details done.by=Erledigt von\: down=Runter edit.checkbox=Checkbox bearbeiten +error.missing.score.config=Fehlende Bewertungskonfiguration\: "$\:config.points.min" or "$\:config.points.max" +error.missing.cutvalue.config=Fehlende Bewertungskonfiguration\: "$\:config.cutvalue" file=Datei filter.all=Alle anzeigen form.individual.assessment.docs=$org.olat.course.nodes.ms\:form.individual.assessment.docs diff --git a/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_en.properties b/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_en.properties index 8a61a79d76e83e3976e52889e8437dd42f441fba..456b945f83c26b05d99dac8ab358832b9272a734 100644 --- a/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_en.properties +++ b/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_en.properties @@ -48,6 +48,8 @@ details=Details done.by=Completed by\: down=Down edit.checkbox=Edit checkbox +error.missing.score.config=Missing score configuration\: "$\:config.points.min" or "$\:config.points.max" +error.missing.cutvalue.config=Missing score configuration\: "$\:config.cutvalue" file=File filter.all=Show all form.error.date=A date must be indicated. diff --git a/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_fr.properties b/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_fr.properties index ce13b9ffb40af650a7643cf3fcb43933eacd9dbe..3b4deb5463694f8f32e60a588e37b60ebce56882 100644 --- a/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_fr.properties +++ b/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_fr.properties @@ -48,6 +48,8 @@ details=D\u00E9tails done.by=Compl\u00E9t\u00E9 par\: down=En bas edit.checkbox=Editer case \u00E0 cocher +error.missing.score.config=Configuration d'\u00E9valuation incompl\u00E8te\: "$\:config.points.min" ou "$\:config.points.max" +error.missing.cutvalue.config=Configuration d'\u00E9valuation incompl\u00E8te\: "$\:config.cutvalue" file=Fichier filter.all=Tout afficher form.error.date=La date est un champ obligatoire. diff --git a/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_it.properties b/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_it.properties index 210c111a50f9aa0bc140c4a281f1823fca4895c9..839e8b9af941ee3a82cf7de9661490a1c384051e 100644 --- a/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_it.properties +++ b/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_it.properties @@ -44,6 +44,8 @@ details=Dettagli done.by=Completato da\: down=Gi\u00F9 edit.checkbox=Modificare checkbox +error.missing.score.config=Configurazione del punteggio mancante\: "$\:config.points.min" or "$\:config.points.max" +error.missing.cutvalue.config=Configurazione del punteggio mancante\: "$\:config.cutvalue" file=File filter.all=Mostra tutto form.error.date=Indicare una data. diff --git a/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_pt_BR.properties b/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_pt_BR.properties index bad53c9536453c8d30cc1359af33160cf8622349..22c93af5becb49105c9fbe635ac23e021aa8d9e4 100644 --- a/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_pt_BR.properties +++ b/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_pt_BR.properties @@ -48,6 +48,8 @@ details=Detalhes done.by=Completado por\: down=Baixar edit.checkbox=Editar checkbox +error.missing.score.config=Configura\u00E7\u00E3o pontua\u00E7\u00E3o faltante\: "$\:config.points.min" or "$\:config.points.max" +error.missing.cutvalue.config=Configura\u00E7\u00E3o pontua\u00E7\u00E3o faltante\: "$\:config.cutvalue" file=Arquivo filter.all=Mostrar tudo form.error.date=Uma data deve ser indicada. diff --git a/src/main/java/org/olat/course/nodes/gta/ui/_i18n/LocalStrings_fr.properties b/src/main/java/org/olat/course/nodes/gta/ui/_i18n/LocalStrings_fr.properties index 2c5fd7a4cae2b388a9001ad58101b932a958c837..64bf1866692301809713b45225ea6004a5a8f16e 100644 --- a/src/main/java/org/olat/course/nodes/gta/ui/_i18n/LocalStrings_fr.properties +++ b/src/main/java/org/olat/course/nodes/gta/ui/_i18n/LocalStrings_fr.properties @@ -97,7 +97,7 @@ error.file.invalid=$org.olat.core.commons.modules.bc\:cfile.name.notvalid error.max.documents=Vous ne pouvez pas d\u00E9poser plus de <b>{0}</b> documents, mais vous pouvez encore \u00E9diter ou \u00E9changer un fichier. error.missing.file=Le fichier d'un devoir est manquant. error.missing.group=Vous n'avez pas encore choisi un groupe. -error.missing.score.config=Configuration de l'\u00E9valuation est manquante +error.missing.score.config=Configuration d'\u00E9valuation incompl\u00E8te error.missing.solutions=Vous n'avez pas encore t\u00E9l\u00E9charg\u00E9 de solution. error.missing.tasks=Vous n'avez pas encore ajouter de devoir. error.no.group=Vous n'\u00EAtes inscrit dans aucun groupe. diff --git a/src/main/java/org/olat/course/nodes/iq/_i18n/LocalStrings_pt_BR.properties b/src/main/java/org/olat/course/nodes/iq/_i18n/LocalStrings_pt_BR.properties index 3077d994582820808ede74661f8ac325cd5884d0..56bf646b949c5784b79c7cabed1ae8e0125fce7c 100644 --- a/src/main/java/org/olat/course/nodes/iq/_i18n/LocalStrings_pt_BR.properties +++ b/src/main/java/org/olat/course/nodes/iq/_i18n/LocalStrings_pt_BR.properties @@ -1,4 +1,4 @@ -#Thu Feb 08 14:04:04 CET 2018 +#Wed Feb 28 13:30:52 CET 2018 Intro.self=Clicar o bot\u00E3o "Iniciar" para executar o auto-teste. Intro.surv=Clicar o bot\u00E3o "Iniciar" para executar a pesquisa. Intro.test=Clicar o bot\u00E3o "Iniciar" para executar o teste. @@ -187,6 +187,7 @@ time.limit.test.explain=O teste leva um m\u00E1ximo de <strong>{0}</strong>. tool.delete.data=Resetar todos dados tool.extra.time=Estender o tempo de teste tool.pull=Retirar teste em andamento +validate.xml.signature=Validar recibo de teste warning.assessment.mode=Teste em processamento\: warning.assessment.mode.date={0} de {1} at\u00E9 {2} warning.test.with.essay=$org.olat.ims.qti.editor\:warning.test.with.essay diff --git a/src/main/java/org/olat/course/nodes/members/_i18n/LocalStrings_pt_BR.properties b/src/main/java/org/olat/course/nodes/members/_i18n/LocalStrings_pt_BR.properties index 14d63348008fc34e4a8260f0cf328ff4656c03de..1492700ad1af1002c3114cd0d53111d2b8e35a16 100644 --- a/src/main/java/org/olat/course/nodes/members/_i18n/LocalStrings_pt_BR.properties +++ b/src/main/java/org/olat/course/nodes/members/_i18n/LocalStrings_pt_BR.properties @@ -1,4 +1,4 @@ -#Thu Feb 08 14:04:06 CET 2018 +#Wed Feb 28 13:30:55 CET 2018 add.member=Adicionar already.all.selected=Voc\u00EA j\u00E1 escolheu todos usu\u00E1rios coaches=Treinadores do Curso diff --git a/src/main/java/org/olat/group/ui/run/_i18n/LocalStrings_pt_BR.properties b/src/main/java/org/olat/group/ui/run/_i18n/LocalStrings_pt_BR.properties index 6f0a4b7d58e4a51e8cd0e3661b325f65457c7ac7..febef551b998c94750fe352a748df22546a9f817 100644 --- a/src/main/java/org/olat/group/ui/run/_i18n/LocalStrings_pt_BR.properties +++ b/src/main/java/org/olat/group/ui/run/_i18n/LocalStrings_pt_BR.properties @@ -1,4 +1,4 @@ -#Thu Feb 08 13:32:09 CET 2018 +#Wed Feb 28 13:29:35 CET 2018 businessgroup.contact.bodytext=<p></p>---<p>Ir imediatamente para o grupo "{0}"\: {1}</p> businessgroup.contact.subject=Mensagem para grupo {0} contact.all.coaches=Todos os treinadores (coaches) de grupo diff --git a/src/main/java/org/olat/modules/lecture/LectureService.java b/src/main/java/org/olat/modules/lecture/LectureService.java index cdf7d17df82f98eb09ff8543b942d31145bc3931..14aeb0457bab194c7bb24d04b5205a50b711f597 100644 --- a/src/main/java/org/olat/modules/lecture/LectureService.java +++ b/src/main/java/org/olat/modules/lecture/LectureService.java @@ -503,9 +503,10 @@ public interface LectureService { * * @param entry * @param participant + * @param teacherSeparator The separator between the name of 2 teachers * @return */ - public List<LectureBlockAndRollCall> getParticipantLectureBlocks(RepositoryEntryRef entry, IdentityRef participant); + public List<LectureBlockAndRollCall> getParticipantLectureBlocks(RepositoryEntryRef entry, IdentityRef participant, String teacherSeparator); /** diff --git a/src/main/java/org/olat/modules/lecture/manager/LectureBlockRollCallDAO.java b/src/main/java/org/olat/modules/lecture/manager/LectureBlockRollCallDAO.java index 4680e95f3fa54dd260e2f74b0b04ec9dd85dbeba..e613473802453d47fb233392d56cc424b7e88bfe 100644 --- a/src/main/java/org/olat/modules/lecture/manager/LectureBlockRollCallDAO.java +++ b/src/main/java/org/olat/modules/lecture/manager/LectureBlockRollCallDAO.java @@ -322,7 +322,8 @@ public class LectureBlockRollCallDAO { return query.getResultList(); } - public List<LectureBlockAndRollCall> getParticipantLectureBlockAndRollCalls(RepositoryEntryRef entry, IdentityRef identity) { + public List<LectureBlockAndRollCall> getParticipantLectureBlockAndRollCalls(RepositoryEntryRef entry, IdentityRef identity, + String teacherSeaparator) { StringBuilder sb = new StringBuilder(); sb.append("select block, call, re.displayname") .append(" from lectureblock block") @@ -349,11 +350,11 @@ public class LectureBlockRollCallDAO { blockToRollCallMap.put(block.getKey(), new LectureBlockAndRollCall(displayname, block, rollCall)); } - appendCoaches(entry, blockToRollCallMap); + appendCoaches(entry, blockToRollCallMap, teacherSeaparator); return new ArrayList<>(blockToRollCallMap.values()); } - private void appendCoaches(RepositoryEntryRef entry, Map<Long,LectureBlockAndRollCall> blockToRollCallMap) { + private void appendCoaches(RepositoryEntryRef entry, Map<Long,LectureBlockAndRollCall> blockToRollCallMap, String teacherSeaparator) { // append the coaches StringBuilder sc = new StringBuilder(); sc.append("select block.key, coach") @@ -378,7 +379,7 @@ public class LectureBlockRollCallDAO { if(rollCall.getCoach() == null) { rollCall.setCoach(fullname); } else { - rollCall.setCoach(rollCall.getCoach() + ", " + fullname); + rollCall.setCoach(rollCall.getCoach() + " " + teacherSeaparator + " " + fullname); } } } diff --git a/src/main/java/org/olat/modules/lecture/manager/LectureServiceImpl.java b/src/main/java/org/olat/modules/lecture/manager/LectureServiceImpl.java index 98a8daf5b714dc0e0db3c86f921da722ab8edb0f..c996fc9edf43b9f1b328da80666435f485bba285 100644 --- a/src/main/java/org/olat/modules/lecture/manager/LectureServiceImpl.java +++ b/src/main/java/org/olat/modules/lecture/manager/LectureServiceImpl.java @@ -174,8 +174,7 @@ public class LectureServiceImpl implements LectureService, UserDataDeletable, De @Override public RepositoryEntryLectureConfiguration updateRepositoryEntryLectureConfiguration(RepositoryEntryLectureConfiguration config) { - RepositoryEntryLectureConfiguration updatedConfig = lectureConfigurationDao.update(config); - return updatedConfig; + return lectureConfigurationDao.update(config); } @Override @@ -422,6 +421,7 @@ public class LectureServiceImpl implements LectureService, UserDataDeletable, De return new ArrayList<>(participants); } + @Override public List<Identity> syncParticipantSummaries(LectureBlock lectureBlock) { RepositoryEntry entry = lectureBlock.getEntry(); Date now = new Date(); @@ -841,8 +841,9 @@ public class LectureServiceImpl implements LectureService, UserDataDeletable, De } @Override - public List<LectureBlockAndRollCall> getParticipantLectureBlocks(RepositoryEntryRef entry, IdentityRef participant) { - return lectureBlockRollCallDao.getParticipantLectureBlockAndRollCalls(entry, participant); + public List<LectureBlockAndRollCall> getParticipantLectureBlocks(RepositoryEntryRef entry, IdentityRef participant, + String teacherSeaparator) { + return lectureBlockRollCallDao.getParticipantLectureBlockAndRollCalls(entry, participant, teacherSeaparator); } @Override diff --git a/src/main/java/org/olat/modules/lecture/ui/LectureListRepositoryController.java b/src/main/java/org/olat/modules/lecture/ui/LectureListRepositoryController.java index cc7d2284b08e69ee36b9dffdd7bc375009d81f00..cc87b8ff5ffe8af9efbd1444f80667dffb49daa4 100644 --- a/src/main/java/org/olat/modules/lecture/ui/LectureListRepositoryController.java +++ b/src/main/java/org/olat/modules/lecture/ui/LectureListRepositoryController.java @@ -164,8 +164,9 @@ public class LectureListRepositoryController extends FormBasicController { for(LectureBlockWithTeachers block:blocks) { LectureBlock b = block.getLectureBlock(); StringBuilder teachers = new StringBuilder(); + String separator = translate("user.fullname.separator"); for(Identity teacher:block.getTeachers()) { - if(teachers.length() > 0) teachers.append(", "); + if(teachers.length() > 0) teachers.append(" ").append(separator).append(" "); teachers.append(userManager.getUserDisplayName(teacher)); } @@ -182,7 +183,7 @@ public class LectureListRepositoryController extends FormBasicController { tableModel.setObjects(rows); tableEl.reset(true, true, true); - deleteLecturesButton.setVisible(rows.size() > 0); + deleteLecturesButton.setVisible(!rows.isEmpty()); } @Override @@ -314,7 +315,7 @@ public class LectureListRepositoryController extends FormBasicController { } } - if(blocks.size() == 0) { + if(blocks.isEmpty()) { showWarning("error.atleastone.lecture"); } else { StringBuilder titles = new StringBuilder(); @@ -379,7 +380,9 @@ public class LectureListRepositoryController extends FormBasicController { private class ToolsController extends BasicController { - private Link deleteLink, copyLink, logLink; + private Link deleteLink; + private Link copyLink; + private Link logLink; private final LectureBlockRow row; diff --git a/src/main/java/org/olat/modules/lecture/ui/ParticipantLectureBlocksController.java b/src/main/java/org/olat/modules/lecture/ui/ParticipantLectureBlocksController.java index 886abc2b6c17fd4774df2777895c66ab6fd4dd11..3cf7745d03acb4c962dd1f072b129486141cc9a3 100644 --- a/src/main/java/org/olat/modules/lecture/ui/ParticipantLectureBlocksController.java +++ b/src/main/java/org/olat/modules/lecture/ui/ParticipantLectureBlocksController.java @@ -202,8 +202,9 @@ public class ParticipantLectureBlocksController extends FormBasicController { private void loadModel() { Date now = new Date(); Formatter formatter = Formatter.getInstance(getLocale()); - - List<LectureBlockAndRollCall> rollCalls = lectureService.getParticipantLectureBlocks(entry, assessedIdentity); + + String separator = translate("user.fullname.separator"); + List<LectureBlockAndRollCall> rollCalls = lectureService.getParticipantLectureBlocks(entry, assessedIdentity, separator); List<LectureBlockAuditLog> sendAppealLogs = lectureService.getAuditLog(entry, assessedIdentity, LectureBlockAuditLog.Action.sendAppeal); Map<Long, Date> appealDates = new HashMap<>(); for(LectureBlockAuditLog sendAppealLog:sendAppealLogs) { @@ -385,15 +386,12 @@ public class ParticipantLectureBlocksController extends FormBasicController { } private void doPrint(UserRequest ureq) { - ControllerCreator printControllerCreator = new ControllerCreator() { - @Override - public Controller createController(UserRequest lureq, WindowControl lwControl) { - lwControl.getWindowBackOffice().getChiefController().addBodyCssClass("o_lectures_print"); - Controller printCtrl = new ParticipantLectureBlocksController(lureq, lwControl, entry, assessedIdentity, false, false); - listenTo(printCtrl); - return printCtrl; - } - }; + ControllerCreator printControllerCreator = (lureq, lwControl) -> { + lwControl.getWindowBackOffice().getChiefController().addBodyCssClass("o_lectures_print"); + Controller printCtrl = new ParticipantLectureBlocksController(lureq, lwControl, entry, assessedIdentity, false, false); + listenTo(printCtrl); + return printCtrl; + }; ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createPrintPopupLayout(printControllerCreator); openInNewBrowserWindow(ureq, layoutCtrlr); } diff --git a/src/main/java/org/olat/modules/lecture/ui/TeacherOverviewController.java b/src/main/java/org/olat/modules/lecture/ui/TeacherOverviewController.java index c9878ae05e5a468d7399cf1ca82ddddeb6cc04ca..00ceeba1adaa23d600446a1012643ca068d5cdb6 100644 --- a/src/main/java/org/olat/modules/lecture/ui/TeacherOverviewController.java +++ b/src/main/java/org/olat/modules/lecture/ui/TeacherOverviewController.java @@ -89,11 +89,12 @@ public class TeacherOverviewController extends AbstractTeacherOverviewController for(LectureBlockWithTeachers blockWithTeachers:blocksWithTeachers) { LectureBlock block = blockWithTeachers.getLectureBlock(); - StringBuilder teachers = new StringBuilder(); + StringBuilder teachers = new StringBuilder(32); List<Identity> teacherList = blockWithTeachers.getTeachers(); - + + String separator = translate("user.fullname.separator"); for(Identity teacher:blockWithTeachers.getTeachers()) { - if(teachers.length() > 0) teachers.append(", "); + if(teachers.length() > 0) teachers.append(" ").append(separator).append(" "); teachers.append(userManager.getUserDisplayName(teacher)); } diff --git a/src/main/java/org/olat/modules/qpool/ui/_i18n/LocalStrings_pt_BR.properties b/src/main/java/org/olat/modules/qpool/ui/_i18n/LocalStrings_pt_BR.properties index f919eb670db1555e04dd958e8f553e9ed7345f7f..0004fd6fa41af67cd94fb1e3208d4e45eed74d00 100644 --- a/src/main/java/org/olat/modules/qpool/ui/_i18n/LocalStrings_pt_BR.properties +++ b/src/main/java/org/olat/modules/qpool/ui/_i18n/LocalStrings_pt_BR.properties @@ -1,4 +1,4 @@ -#Thu Feb 08 13:13:33 CET 2018 +#Wed Feb 28 13:29:43 CET 2018 add=+ add.to.list=Adicionar \u00E0 lista admin.configuration.title=Banco de perguntas @@ -135,6 +135,7 @@ item.type.hottext=Hottext item.type.kprim=KPrim item.type.match=Combine item.type.matchdraganddrop=Arraste e solte +item.type.matchtruefalse=Verdadeiro/Falso item.type.mc=Escolha M\u00FAltipla item.type.numerical=Entrada num\u00E9rica item.type.sc=Escolha \u00FAnica diff --git a/src/main/java/org/olat/modules/taxonomy/ui/_i18n/LocalStrings_pt_BR.properties b/src/main/java/org/olat/modules/taxonomy/ui/_i18n/LocalStrings_pt_BR.properties index e0596a515a64308a4f9dc0ade1afb32f85eb4321..3f33dd171ef386522032431ebea5ca42f857b461 100644 --- a/src/main/java/org/olat/modules/taxonomy/ui/_i18n/LocalStrings_pt_BR.properties +++ b/src/main/java/org/olat/modules/taxonomy/ui/_i18n/LocalStrings_pt_BR.properties @@ -1,4 +1,4 @@ -#Thu Feb 08 13:32:15 CET 2018 +#Wed Feb 28 13:30:37 CET 2018 QuestionItemImpl=Pergunta actions=A\u00E7\u00F5es add.competence.have=Adicionar "$\:have" @@ -133,3 +133,5 @@ warning.atleastone.level=Voc\u00EA deve selecionar pelo menos um n\u00EDvel que warning.atleastone.level.competence=Voc\u00EA deve escolher pelo menos um n\u00EDvel. warning.delete.level=O n\u00EDvel n\u00E3o pode ser exclu\u00EDdo porque ainda est\u00E1 em uso. warning.delete.level.type=O tipo de n\u00EDvel "{0}" n\u00E3o foi exclu\u00EDdo porque ainda est\u00E1 em uso. +warning.taxonomy.level.deleted=Esse n\u00EDvel de taxonomia n\u00E3o est\u00E1 mais dispon\u00EDvel +warning.taxonomy.level.type.deleted=Esse tipo de n\u00EDvel n\u00E3o est\u00E1 mais dispon\u00EDvel.