diff --git a/src/main/java/org/olat/course/nodes/MSCourseNode.java b/src/main/java/org/olat/course/nodes/MSCourseNode.java index 4d07bb2454633d48b97e9a8d06b250c4f0ba76f4..ca00f996bbbfc871006fe77e15f10619f622188a 100644 --- a/src/main/java/org/olat/course/nodes/MSCourseNode.java +++ b/src/main/java/org/olat/course/nodes/MSCourseNode.java @@ -25,11 +25,14 @@ package org.olat.course.nodes; +import static org.olat.modules.forms.EvaluationFormSessionStatus.done; + import java.io.File; import java.util.List; import java.util.Locale; import org.olat.core.CoreSpringFactory; +import org.olat.core.commons.persistence.DBFactory; import org.olat.core.commons.services.taskexecutor.TaskExecutorManager; import org.olat.core.gui.UserRequest; import org.olat.core.gui.components.stack.BreadcrumbPanel; @@ -41,6 +44,7 @@ import org.olat.core.gui.control.generic.tabbable.TabbableController; import org.olat.core.gui.translator.PackageTranslator; import org.olat.core.gui.translator.Translator; import org.olat.core.id.Identity; +import org.olat.core.id.IdentityEnvironment; import org.olat.core.id.Organisation; import org.olat.core.id.Roles; import org.olat.core.logging.OLATRuntimeException; @@ -53,6 +57,7 @@ import org.olat.course.auditing.UserNodeAuditManager; import org.olat.course.condition.ConditionEditController; import org.olat.course.editor.CourseEditorEnv; import org.olat.course.editor.NodeEditController; +import org.olat.course.editor.PublishEvents; import org.olat.course.editor.StatusDescription; import org.olat.course.nodes.ms.MSCourseNodeEditController; import org.olat.course.nodes.ms.MSCourseNodeRunController; @@ -69,6 +74,7 @@ import org.olat.course.run.scoring.AssessmentEvaluation; import org.olat.course.run.scoring.ScoreEvaluation; import org.olat.course.run.userview.NodeEvaluation; import org.olat.course.run.userview.UserCourseEnvironment; +import org.olat.course.run.userview.UserCourseEnvironmentImpl; import org.olat.group.BusinessGroup; import org.olat.modules.ModuleConfiguration; import org.olat.modules.assessment.AssessmentEntry; @@ -567,36 +573,99 @@ public class MSCourseNode extends AbstractAccessableCourseNode implements Persis Identity assessedIdentity, Role by, EvaluationFormSession session) { AssessmentManager am = assessedUserCourseEnv.getCourseEnvironment().getAssessmentManager(); MSService msService = CoreSpringFactory.getImpl(MSService.class); - ModuleConfiguration config = getModuleConfiguration(); - // Get score + Float score = getScore(am, msService, assessedIdentity, session); + Boolean passed = getPassed(am, assessedIdentity, score); + + // save + ScoreEvaluation scoreEvaluation = new ScoreEvaluation(score, passed); + am.saveScoreEvaluation(this, identity, assessedIdentity, scoreEvaluation, assessedUserCourseEnv, false, by); + } + + @Override + public void updateOnPublish(Locale locale, ICourse course, Identity publisher, PublishEvents publishEvents) { + CoursePropertyManager pm = course.getCourseEnvironment().getCoursePropertyManager(); + List<Identity> assessedUsers = pm.getAllIdentitiesWithCourseAssessmentData(null); + + int count = 0; + for(Identity assessedIdentity: assessedUsers) { + updateScorePassedOnPublish(course, assessedIdentity, publisher); + if(++count % 10 == 0) { + DBFactory.getInstance().commitAndCloseSession(); + } + } + DBFactory.getInstance().commitAndCloseSession(); + super.updateOnPublish(locale, course, publisher, publishEvents); + } + + private void updateScorePassedOnPublish(ICourse course, Identity assessedIdentity, Identity coachIdentity) { + RepositoryEntry ores = course.getCourseEnvironment().getCourseGroupManager().getCourseEntry(); + AssessmentManager am = course.getCourseEnvironment().getAssessmentManager(); + MSService msService = CoreSpringFactory.getImpl(MSService.class); + + Float currentScore = am.getNodeScore(this, assessedIdentity); + Boolean currentPassed = am.getNodePassed(this, assessedIdentity); + + EvaluationFormSession session = msService.getSession(ores, getIdent(), assessedIdentity, done); + Float updatedScore = getScore(am, msService, assessedIdentity, session); + Boolean updatedPassed = getPassed(am, assessedIdentity, updatedScore); + + boolean needUpdate = false; + if((currentScore == null && updatedScore != null) + || (currentScore != null && updatedScore == null) + || (currentScore != null && !currentScore.equals(updatedScore))) { + needUpdate = true; + } + if((currentPassed == null && updatedPassed != null && updatedScore != null) + || (currentPassed != null && updatedPassed == null) + || (currentPassed != null && !currentPassed.equals(updatedPassed))) { + needUpdate = true; + } + + if(needUpdate) { + ScoreEvaluation scoreEval = new ScoreEvaluation(updatedScore, updatedPassed); + IdentityEnvironment identityEnv = new IdentityEnvironment(assessedIdentity, null); + UserCourseEnvironment uce = new UserCourseEnvironmentImpl(identityEnv, course.getCourseEnvironment()); + am.saveScoreEvaluation(this, coachIdentity, assessedIdentity, scoreEval, uce, false, Role.coach); + } + } + + private Float getScore(AssessmentManager am, MSService msService, Identity assessedIdentity, + EvaluationFormSession session) { + Float score = null; + ModuleConfiguration config = getModuleConfiguration(); String scoreConfig = config.getStringValue(CONFIG_KEY_SCORE); String scaleConfig = config.getStringValue(CONFIG_KEY_EVAL_FORM_SCALE); float scale = Float.parseFloat(scaleConfig); - Float score = null; if (CONFIG_VALUE_SCORE_EVAL_FORM_AVG.equals(scoreConfig)) { score = msService.calculateScoreByAvg(session); score = msService.scaleScore(score, scale); } else if (CONFIG_VALUE_SCORE_EVAL_FORM_SUM.equals(scoreConfig)) { score = msService.calculateScoreBySum(session); score = msService.scaleScore(score, scale); - } else if (CONFIG_VALUE_SCORE_MANUAL.equals(scoreConfig)) { + } + if (score == null) { ScoreEvaluation currentEval = getUserScoreEvaluation(am.getAssessmentEntry(this, assessedIdentity)); score = currentEval.getScore(); } // Score has to be in configured range. MinMax minMax = getMinMax(); - if(score != null && minMax.getMax().floatValue() < score.floatValue()) { - score = minMax.getMax(); - } - if(score != null && minMax.getMin().floatValue() > score.floatValue()) { - score = minMax.getMin(); + if (score != null) { + if(minMax.getMax().floatValue() < score.floatValue()) { + score = minMax.getMax(); + } + if(minMax.getMin().floatValue() > score.floatValue()) { + score = minMax.getMin(); + } } - - // Get passed - Float cutConfig = (Float) config.get(MSCourseNode.CONFIG_KEY_PASSED_CUT_VALUE); + return score; + } + + private Boolean getPassed(AssessmentManager am, Identity assessedIdentity, Float score) { Boolean passed = null; + ModuleConfiguration config = getModuleConfiguration(); + Float cutConfig = (Float) config.get(MSCourseNode.CONFIG_KEY_PASSED_CUT_VALUE); if (cutConfig != null && score != null) { boolean aboveCutValue = score.floatValue() >= cutConfig.floatValue(); passed = Boolean.valueOf(aboveCutValue); @@ -604,10 +673,7 @@ public class MSCourseNode extends AbstractAccessableCourseNode implements Persis ScoreEvaluation currentEval = getUserScoreEvaluation(am.getAssessmentEntry(this, assessedIdentity)); passed = currentEval.getPassed(); } - - // save - ScoreEvaluation scoreEvaluation = new ScoreEvaluation(score, passed); - am.saveScoreEvaluation(this, identity, assessedIdentity, scoreEvaluation, assessedUserCourseEnv, false, by); + return passed; } } \ No newline at end of file diff --git a/src/main/java/org/olat/course/nodes/ms/MSConfigController.java b/src/main/java/org/olat/course/nodes/ms/MSConfigController.java index b8dea2cc92be2f8dbb91c58072bc5c83b4508d39..1778ce1cb045b4a5de92e13ded8b59a69a466f75 100644 --- a/src/main/java/org/olat/course/nodes/ms/MSConfigController.java +++ b/src/main/java/org/olat/course/nodes/ms/MSConfigController.java @@ -127,6 +127,9 @@ public class MSConfigController extends FormBasicController { for (String formItemName : formItems.keySet()) { formItems.get(formItemName).setEnabled(!displayOnly); } + if (!displayOnly) { + updateUI(); + } } @Override @@ -265,11 +268,11 @@ public class MSConfigController extends FormBasicController { scoreEl.select(scoreKey, true); // min / max - minEl.setEnabled(true); - maxEl.setEnabled(true); boolean minMaxVisible = !MSCourseNode.CONFIG_VALUE_SCORE_NONE.equals(scoreKey); minEl.setVisible(minMaxVisible); maxEl.setVisible(minMaxVisible); + minEl.setEnabled(true); + maxEl.setEnabled(true); if (MSCourseNode.CONFIG_VALUE_SCORE_EVAL_FORM_SUM.equals(scoreKey) || MSCourseNode.CONFIG_VALUE_SCORE_EVAL_FORM_AVG.equals(scoreKey)) { minEl.setValue(formMinMax.getMin().toString()); diff --git a/src/main/java/org/olat/course/nodes/ms/MSService.java b/src/main/java/org/olat/course/nodes/ms/MSService.java index 75f8a0df68822f7b40cf98ec6696077196ab8b17..e544f01d24b1b1e79bdc9ed16748778d04578362 100644 --- a/src/main/java/org/olat/course/nodes/ms/MSService.java +++ b/src/main/java/org/olat/course/nodes/ms/MSService.java @@ -25,6 +25,7 @@ import org.olat.core.id.Identity; import org.olat.core.id.OLATResourceable; import org.olat.modules.forms.EvaluationFormSession; import org.olat.modules.forms.EvaluationFormSessionRef; +import org.olat.modules.forms.EvaluationFormSessionStatus; import org.olat.modules.forms.RubricStatistic; import org.olat.repository.RepositoryEntry; @@ -39,6 +40,9 @@ public interface MSService { EvaluationFormSession getOrCreateSession(RepositoryEntry formEntry, RepositoryEntry ores, String nodeIdent, Identity assessedIdentity, AuditEnv auditEnv); + EvaluationFormSession getSession(RepositoryEntry ores, String nodeIdent, Identity assessedIdentity, + EvaluationFormSessionStatus status); + EvaluationFormSession getSession(EvaluationFormSessionRef sessionRef); EvaluationFormSession closeSession(EvaluationFormSession session, AuditEnv auditEnv); diff --git a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_ar.properties b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_ar.properties index 23028f165c274cb63315baa05efa8c1b5f393979..686edad3bc62b62a1a72b75348d6b3c3c97e1b94 100644 --- a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_ar.properties +++ b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_ar.properties @@ -60,6 +60,4 @@ score.noscore=\u0645\u0639\u0644\u0648\u0645\u0627\u062A \u063A\u064A\u0631 \u06 score.title=\u0645\u0644\u062E\u0635 \u0627\u0644\u062F\u0631\u062C\u0629 score.yourscore=\u062F\u0631\u062C\u062A\u0643 scoring.config.enable.button=\u062A\u063A\u064A\u064A\u0631 -scoring.overwriting=\u064A\u0648\u062C\u062F \u0628\u0627\u0644\u0641\u0639\u0644 \u0628\u0639\u0636 \u0627\u0644\u062A\u0642\u064A\u064A\u0645\u0627\u062A\u060C \u0647\u0644 \u0644\u0627 \u062A\u0632\u0627\u0644 \u062A\u0631\u064A\u062F \u062A\u0639\u062F\u064A\u0644 \u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u0644\u062A\u0642\u064A\u064A\u0645 \u0627\u0644\u062E\u0627\u0635 \u0628\u0643\u061F -scoring.overwriting.note=\u0645\u0644\u0627\u062D\u0638\u0629\: \u0623\u0646\u062A \u062A\u0642\u0648\u0645 \u0628\u062A\u0639\u062F\u064A\u0644 \u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u0644\u062A\u0642\u064A\u064A\u0645 \u0639\u0644\u0649 \u0627\u0644\u0631\u063A\u0645 \u0645\u0646 \u0648\u062C\u0648\u062F \u0628\u0639\u0636 \u0627\u0644\u062A\u0642\u064A\u064A\u0645\u0627\u062A \u0628\u0627\u0644\u0641\u0639\u0644. warn.nodedelete=\u062A\u062D\u0630\u064A\u0631\: \u0643\u0644 \u0627\u0644\u0628\u064A\u0627\u0646\u0627\u062A \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0639\u0646\u0635\u0631 \u0627\u0644\u0645\u0642\u0631\u0631 \u0633\u064A\u062A\u0645 \u062D\u0630\u0641\u0647\u0627. diff --git a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_bg.properties b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_bg.properties index 0f6a7bdac92870866d4ccb93c0bded94dd5eade1..ceefc1a438809f822ec04eccd17515dbe663d5fe 100644 --- a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_bg.properties +++ b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_bg.properties @@ -60,6 +60,4 @@ score.noscore=\u041D\u044F\u043C\u0430 \u0438\u043D\u0444\u043E\u0440\u043C\u043 score.title=\u041E\u0431\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u043D\u0430 \u0440\u0435\u0437\u0443\u043B\u0442\u0430\u0442 score.yourscore=\u0412\u0430\u0448\u0438\u044F\u0442 \u0440\u0435\u0437\u0443\u043B\u0442\u0430\u0442 scoring.config.enable.button=\u041F\u0440\u043E\u043C\u0435\u043D\u0435\u0442\u0435 -scoring.overwriting=\u0412\u0435\u0447\u0435 \u0438\u043C\u0430 \u0441\u044A\u0449\u0435\u0441\u0442\u0432\u0443\u0432\u0430\u0449\u0438 \u043E\u0446\u0435\u043D\u043A\u0438. \u0418\u0441\u043A\u0430\u0442\u0435 \u043B\u0438 \u0432\u0441\u0435 \u043E\u0449\u0435 \u0434\u0430 \u043F\u0440\u043E\u043C\u0435\u043D\u0438\u0442\u0435 \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044F\u0442\u0430 \u043D\u0430 \u043E\u0446\u0435\u043D\u043A\u0430? -scoring.overwriting.note=\u041C\u043E\u043B\u044F, \u043E\u0431\u044A\u0440\u043D\u0435\u0442\u0435 \u0432\u043D\u0438\u043C\u0430\u043D\u0438\u0435\: \u0432\u0438\u0435 \u043F\u0440\u043E\u043C\u0435\u043D\u044F\u0442\u0435 \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044F\u0442\u0430 \u043D\u0430 \u043E\u0446\u0435\u043D\u043A\u0430 \u0432\u044A\u043F\u0440\u0435\u043A\u0438, \u0447\u0435 \u0438\u043C\u0430 \u0441\u044A\u0449\u0435\u0441\u0442\u0432\u0443\u0432\u0430\u0449\u0438 \u043E\u0446\u0435\u043D\u043A\u0438. warn.nodedelete=\u041F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435\: \u0412\u0441\u0438\u0447\u043A\u0438 \u0434\u0430\u043D\u043D\u0438 \u0437\u0430 \u0442\u043E\u0437\u0438 \u043A\u0443\u0440\u0441\u043E\u0432 \u0435\u043B\u0435\u043C\u0435\u043D\u0442 \u0449\u0435 \u0431\u044A\u0434\u0430\u0442 \u0438\u0437\u0442\u0440\u0438\u0442\u0438. diff --git a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_cs.properties b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_cs.properties index 6c26439b21842468d78f5c3875f112913817da2d..8e44f42a29efd25e185e069d96968d94d66e0256 100644 --- a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_cs.properties +++ b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_cs.properties @@ -60,6 +60,4 @@ score.noscore=Informace nedostupn\u00E1 score.title=Souhrn v\u00FDsledk\u016F score.yourscore=V\u00E1\u0161 v\u00FDsledek scoring.config.enable.button=Upravit -scoring.overwriting=N\u011Bjak\u00E1 hodnocen\u00ED ji\u017E existuj\u00ED. Opravdu chcete upravit nastaven\u00ED hodnocen\u00ED? -scoring.overwriting.note=Upozorn\u011Bn\u00ED\: upravujete nastaven\u00ED hodnocen\u00ED, a\u010Dkoli ji\u017E n\u011Bjak\u00E1 existuj\u00ED. warn.nodedelete=Warning\: V\u0161echna data v tomto kurzu budou smaz\u00E1na. diff --git a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_de.properties index 17ef31e7b2deeb0b5ff7f3c646f89eedabff1669..56d1bab68b70b9fe240d5ac1687c83478afbf9c9 100644 --- a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_de.properties +++ b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_de.properties @@ -63,8 +63,8 @@ score.noscore=Information nicht verf\u00FCgbar score.title=Zusammenfassung der Punkte score.yourscore=Erreichte Punktzahl scoring.config.enable.button=\u00C4ndern -scoring.overwriting=Es wurden bereits Bewertungen vorgenommen. Wollen Sie die Bewertungskonfiguartion trotzdem \u00E4ndern ? -scoring.overwriting.note=Hinweis \: Sie \u00E4ndern die Bewertungskonfiguration obwohl bereits Bewertungen vorgenommen wurden. +scoring.overwriting=Es wurden bereits Bewertungen vorgenommen. Wollen Sie die Bewertungskonfiguartion trotzdem \u00E4ndern? Es werden alle (auch bereits abgeschlossene) berechneten Bewertungen neu durchgef\u00FCrt! +scoring.overwriting.note=Hinweis\: Sie \u00E4ndern die Bewertungskonfiguration, obwohl bereits Bewertungen vorgenommen wurden. Es werden alle (auch bereits abgeschlossene) berechneten Bewertungen neu durchgef\u00FCrt! table.header.details.ms=Rubrik tool.reset.data=Alle Daten zur\u00FCcksetzen tool.reset.data.confirm.button=Daten zur\u00FCcksetzen diff --git a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_el.properties b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_el.properties index b4e44987bb6a3152f4b976506f29f9dd4d367f74..901eff620d7d88e919836557d7cf716828fd9f46 100644 --- a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_el.properties +++ b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_el.properties @@ -60,6 +60,4 @@ score.noscore=\u039C\u03B7 \u03B4\u03B9\u03B1\u03B8\u03AD\u03C3\u03B9\u03BC\u03B score.title=\u03A0\u03B5\u03C1\u03AF\u03BB\u03B7\u03C8\u03B7 \u03B2\u03B1\u03B8\u03BC\u03BF\u03BB\u03BF\u03B3\u03AF\u03B1\u03C2 score.yourscore=\u0397 \u03B2\u03B1\u03B8\u03BC\u03BF\u03BB\u03BF\u03B3\u03AF\u03B1 \u03C3\u03B1\u03C2 scoring.config.enable.button=\u03A4\u03C1\u03BF\u03C0\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7 -scoring.overwriting=\u03A5\u03C0\u03AC\u03C1\u03C7\u03BF\u03C5\u03BD \u03AE\u03B4\u03B7 \u03BA\u03AC\u03C0\u03BF\u03B9\u03B5\u03C2 \u03B1\u03BE\u03B9\u03BF\u03BB\u03BF\u03B3\u03AE\u03C3\u03B5\u03B9\u03C2. \u0398\u03AD\u03BB\u03B5\u03C4\u03B5 \u03B1\u03BA\u03CC\u03BC\u03B7 \u03BD\u03B1 \u03C4\u03C1\u03BF\u03C0\u03BF\u03C0\u03BF\u03B9\u03AE\u03C3\u03B5\u03C4\u03B5 \u03C4\u03B7\u03BD \u03C0\u03B1\u03C1\u03B1\u03BC\u03B5\u03C4\u03C1\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7 \u03C4\u03B7\u03C2 \u03B1\u03BE\u03B9\u03BF\u03BB\u03CC\u03B3\u03B7\u03C3\u03AE\u03C2 \u03C3\u03B1\u03C2; -scoring.overwriting.note=\u03A0\u03B1\u03C1\u03B1\u03BA\u03B1\u03BB\u03CE \u03C3\u03B7\u03BC\u03B5\u03B9\u03CE\u03C3\u03C4\u03B5\: \u03C4\u03C1\u03BF\u03C0\u03BF\u03C0\u03BF\u03B9\u03B5\u03AF\u03C4\u03B5 \u03C4\u03B7\u03BD \u03C0\u03B1\u03C1\u03B1\u03BC\u03B5\u03C4\u03C1\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7 \u03C4\u03B7\u03C2 \u03B1\u03BE\u03B9\u03BF\u03BB\u03CC\u03B3\u03B7\u03C3\u03B7\u03C2 \u03B1\u03BD \u03BA\u03B1\u03B9 \u03C5\u03C0\u03AC\u03C1\u03C7\u03BF\u03C5\u03BD \u03AE\u03B4\u03B7 \u03BA\u03AC\u03C0\u03BF\u03B9\u03B5\u03C2 \u03B1\u03BE\u03B9\u03BF\u03BB\u03BF\u03B3\u03AE\u03C3\u03B5\u03B9\u03C2. warn.nodedelete=\u03A0\u03C1\u03BF\u03C3\u03BF\u03C7\u03AE\: \u038C\u03BB\u03B1 \u03C4\u03B1 \u03B4\u03B5\u03B4\u03BF\u03BC\u03AD\u03BD\u03B1 \u03C4\u03BF\u03C5 \u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03BF\u03C5 \u03C4\u03BF\u03C5 \u03BC\u03B1\u03B8\u03AE\u03BC\u03B1\u03C4\u03BF\u03C2 \u03B8\u03B1 \u03B4\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03BF\u03CD\u03BD. diff --git a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_en.properties b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_en.properties index a6ed0c8f34dcdbe78c436c12155146321c0c1898..51da3924e8c435575cc9c0a3a5c6f9c2c69dd4da 100644 --- a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_en.properties +++ b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_en.properties @@ -63,8 +63,8 @@ score.noscore=Information not available score.title=Summary of score score.yourscore=Your score scoring.config.enable.button=Modify -scoring.overwriting=There are already some assessments existing. Do you still want to modify your assessment configuration? -scoring.overwriting.note=Please note\: you are modifying the assessment configuration although there are already some assessments existing. +scoring.overwriting=There are already some assessments existing. Do you really want to modify your assessment configuration? All (even completed) calculated assessments are done again! +scoring.overwriting.note=Please note\: you are modifying the assessment configuration although there are already some assessments existing. All (even completed) calculated assessments are done again! table.header.details.ms=Rubric tool.reset.data=Reset all data tool.reset.data.confirm.button=Reset data diff --git a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_es.properties b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_es.properties index de680b31547f1adf0285b343ecfaaddd3a68e3d8..45e403e3dc44eb364fa113d7cc473b494a205be2 100644 --- a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_es.properties +++ b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_es.properties @@ -60,6 +60,4 @@ score.noscore=Informaci\u00F3n no disponible score.title=Resumen de puntuaci\u00F3n score.yourscore=Tu puntuaci\u00F3n scoring.config.enable.button=Modificar -scoring.overwriting=Ya existen evaluaci\u00F3nes. Todav\u00EDa quieres modificar la configuraci\u00F3n para la evaluaci\u00F3n? -scoring.overwriting.note=Estas modificando la configuraci\u00F3n para la evaluaci\u00F3n aunque ya existen evaluaci\u00F3nes. warn.nodedelete=Cuidado\: Todos los datos de este nodo de curso ser\u00E1n eliminados diff --git a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_fr.properties b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_fr.properties index a6bef239de2323cb6d285546381248e7406f5dca..3873c79bd7ddf9146cee87f98d9790066658d64b 100644 --- a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_fr.properties +++ b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_fr.properties @@ -42,6 +42,4 @@ score.noscore=Information non disponible score.title=R\u00E9sum\u00E9 des points score.yourscore=Points obtenus scoring.config.enable.button=Modifier -scoring.overwriting=Des \u00E9valuations ont d\u00E9j\u00E0 \u00E9t\u00E9 entreprises. Voulez-vous quand-m\u00EAme modifier la configuration de l'\u00E9valuation? -scoring.overwriting.note=Attention \: Vous modifiez la configuration de l'\u00E9valuation bien que des \u00E9valuations aient d\u00E9j\u00E0 \u00E9t\u00E9 effectu\u00E9es. warn.nodedelete=Attention\: toutes les donn\u00E9es r\u00E9sultant jusqu'\u00E0 maintenant de cet \u00E9l\u00E9ment de cours seront effac\u00E9es. diff --git a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_it.properties b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_it.properties index 006937ec2fc4cde6547ab05373a9d89e2e976aa5..1d69dd54f020af1b3a91b814d0fca62197ae02c1 100644 --- a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_it.properties +++ b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_it.properties @@ -40,6 +40,4 @@ score.noscore=Informazione non disponibile score.title=Riassunto del punteggio score.yourscore=Punteggio ottenuto scoring.config.enable.button=Modificare -scoring.overwriting=Sono gi\u00E0 state eseguite delle valutazioni. Desidera modificare comunque la configurazione delle valutazioni? -scoring.overwriting.note=Avvertenza\: sta modificando la configurazione delle valutazioni nonostante ne siano gi\u00E0 state eseguite. warn.nodedelete=Attenzione\: tutti i dati raccolti su questo elemento di corso vengono eliminati. diff --git a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_nl_NL.properties b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_nl_NL.properties index 28d61893c3bf4a590d53f2a542115db0d38be4a6..781cde572c7bf606117681271a045118dda8e471 100644 --- a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_nl_NL.properties +++ b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_nl_NL.properties @@ -60,6 +60,4 @@ score.noscore=Informatie niet beschikbaar score.title=Optelling van score score.yourscore=Uw score scoring.config.enable.button=Aanpassen -scoring.overwriting=Er bestaan al enkele beoordelingen. Wilt u nog steeds uw beoordeling configureren? -scoring.overwriting.note=Gelieve rekening te houden met het volgende\: U bent de beoordeling aan het configureren hoewel er al beoordelingen bestaan. warn.nodedelete=Waarschuwing\: Alle data van dit cursuselement zal gewist worden. diff --git a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_pl.properties b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_pl.properties index 58e9b3639c6ecb62928fd7c6465fdbc730a5db6e..46dbc0fa81ea2e4d3aa4ba59a836aaeb53405e00 100644 --- a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_pl.properties +++ b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_pl.properties @@ -60,6 +60,4 @@ score.noscore=Brak informacji score.title=Podsumowanie wyniku score.yourscore=Tw\u00F3j wynik scoring.config.enable.button=Zmie\u0144 -scoring.overwriting=Wystawiono ju\u017C oceny. Czy nadal chcesz zmieni\u0107 ustawienia oceniania? -scoring.overwriting.note=Uwaga\: zmieniasz ustawienia oceniania podczas gdy s\u0105 ju\u017C wystawione oceny... warn.nodedelete=Ostrze\u017Cenie\: Wszystkie dane w tej ga\u0142\u0119zi kursu zostan\u0105 usuni\u0119te. diff --git a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_pt_BR.properties b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_pt_BR.properties index 085bd6832355fe31fca7a66ba9830f0247d8d3ed..1ae9a1a9573a96346e888e363596c1c2405a213b 100644 --- a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_pt_BR.properties +++ b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_pt_BR.properties @@ -42,6 +42,4 @@ score.noscore=Informa\u00E7\u00E3o n\u00E3o dispon\u00EDvel score.title=Sum\u00E1rio de pontua\u00E7\u00E3o score.yourscore=Sua pontua\u00E7\u00E3o scoring.config.enable.button=Modificar -scoring.overwriting=Existem ainda algumas avalia\u00E7\u00F5es. Voc\u00EA ainda quer modificar suas configura\u00E7\u00F5es de avalia\u00E7\u00E3o? -scoring.overwriting.note=Aten\u00E7\u00E3o\: voc\u00EA est\u00E1 modificando as configura\u00E7\u00F5es de avalia\u00E7\u00E3o embora ainda existam algumas avalia\u00E7\u00F5es. warn.nodedelete=Aviso\: Todos os dados deste elemento de curso ser\u00E3o apagados. diff --git a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_pt_PT.properties b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_pt_PT.properties index c524321ec95092a2cca8b860748c5894bd48985a..443067688bbc42e911fba087592d732c1dafefc1 100644 --- a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_pt_PT.properties +++ b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_pt_PT.properties @@ -60,6 +60,4 @@ score.noscore=Informa\u00E7\u00E3o n\u00E3o dispon\u00EDvel score.title=Sum\u00E1rio de pontua\u00E7\u00E3o score.yourscore=Sua pontua\u00E7\u00E3o scoring.config.enable.button=Modificar -scoring.overwriting=Existem ainda algumas avalia\u00E7\u00F5es. Voc\u00EA ainda quer modificar suas configura\u00E7\u00F5es de avalia\u00E7\u00E3o? -scoring.overwriting.note=Aten\u00E7\u00E3o\: voc\u00EA est\u00E1 modificando as configura\u00E7\u00F5es de avalia\u00E7\u00E3o embora ainda existam algumas avalia\u00E7\u00F5es. warn.nodedelete=Aviso\: Todos os dados deste elemento de curso ser\u00E3o apagados. diff --git a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_ru.properties b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_ru.properties index 159adfe0d4ac7106a0d4617ae1db5895eca64a70..692fb4057cf38a43a699dc97b9e912cb04854e58 100644 --- a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_ru.properties +++ b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_ru.properties @@ -48,6 +48,4 @@ score.noscore=\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u043 score.title=\u0418\u0442\u043E\u0433\u043E\u0432\u044B\u0435 \u0431\u0430\u043B\u043B\u044B score.yourscore=\u041D\u0430\u0431\u0440\u0430\u043D\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E \u0431\u0430\u043B\u043B\u043E\u0432 scoring.config.enable.button=\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C -scoring.overwriting=\u041E\u0446\u0435\u043D\u043A\u0438 \u0443\u0436\u0435 \u0431\u044B\u043B\u0438 \u043F\u0440\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u044B. \u0412\u044B \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0445\u043E\u0442\u0438\u0442\u0435, \u043D\u0435\u0441\u043C\u043E\u0442\u0440\u044F \u043D\u0430 \u044D\u0442\u043E, \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044E \u043E\u0446\u0435\u043D\u043A\u0438? -scoring.overwriting.note=\u041F\u0440\u0438\u043C\u0435\u0447\u0430\u043D\u0438\u0435\: \u0412\u044B \u0438\u0437\u043C\u0435\u043D\u044F\u0435\u0442\u0435 \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044E \u043E\u0446\u0435\u043D\u043E\u043A \u043D\u0435\u0441\u043C\u043E\u0442\u0440\u044F \u043D\u0430 \u0442\u043E, \u0447\u0442\u043E \u043E\u043D\u0438 \u0443\u0436\u0435 \u0431\u044B\u043B\u0438 \u043F\u0440\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u044B. warn.nodedelete=\u0412\u043D\u0438\u043C\u0430\u043D\u0438\u0435\: \u0412\u0441\u0435, \u0434\u043E \u0441\u0438\u0445 \u043F\u043E\u0440 \u043D\u0430\u043A\u043E\u043F\u043B\u0435\u043D\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435 \u044D\u0442\u043E\u0433\u043E \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u043D\u043E\u0433\u043E \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430, \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043B\u0435\u043D\u044B. diff --git a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_sq.properties b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_sq.properties index 8a69613377f6a19bb4346a88751a50b594e039cd..eb7e359136a926d263bb0cb161ef9deb3c9272d6 100644 --- a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_sq.properties +++ b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_sq.properties @@ -60,6 +60,4 @@ score.noscore=Informata nuk \u00EBsht\u00EB e gatshme score.title=P\u00EBrmbledhje e pik\u00EBve score.yourscore=Pik\u00EBt tuaja scoring.config.enable.button=Ndrysho -scoring.overwriting=Ka disa vler\u00EBsime ekzistuese. A doni ti ndryshoni konfigurimin e vler\u00EBsimit tuaj? -scoring.overwriting.note=Ju lutemi vini re\: ju jeni duke ndryshuar configurimin e vler\u00EBsimin megjithse jan\u00EB disa vler\u00EBsime ekzistuese. warn.nodedelete=V\u00EBrejtje\: T\u00EB gjitha t\u00EB dh\u00EBnat e k\u00EBsaj nyje t\u00EB kursit do t\u00EB fshihen. diff --git a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_zh_CN.properties b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_zh_CN.properties index ab2c212dac4726f091b578f23833146a351f0138..242e52fdfddd65e059d0bb03703d7f7474f2cb83 100644 --- a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_zh_CN.properties +++ b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_zh_CN.properties @@ -60,6 +60,4 @@ score.noscore=\u65E0\u6548\u4FE1\u606F score.title=\u6210\u7EE9\u4FE1\u606F score.yourscore=\u4F60\u7684\u6210\u7EE9 scoring.config.enable.button=\u4FEE\u6539 -scoring.overwriting=\u5DF2\u7ECF\u5B58\u5728\u4E00\u4E9B\u8BC4\u4F30. \u4F60\u662F\u5426\u8981\u7EE7\u7EED\u4FEE\u6539\u8BC4\u4F30\u914D\u7F6E? -scoring.overwriting.note=\u8BF7\u6CE8\u610F\: \u867D\u7136\u5DF2\u7ECF\u5B58\u5728\u4E00\u4E9B\u8BC4\u4F30, \u4F46\u662F\u4F60\u6B63\u5728\u4FEE\u6539\u8BC4\u4F30\u914D\u7F6E. warn.nodedelete=\u8B66\u544A\uFF1A \u5C06\u5220\u9664\u8BE5\u8BFE\u7A0B\u5143\u7D20\u7684\u6240\u6709\u6570\u636E\u3002 diff --git a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_zh_TW.properties b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_zh_TW.properties index 5df0ce903cdb6678e96785f06458ebd8f889daaf..457359e61bc7a9b39d6199d7f6847c7678125a6a 100644 --- a/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_zh_TW.properties +++ b/src/main/java/org/olat/course/nodes/ms/_i18n/LocalStrings_zh_TW.properties @@ -60,6 +60,4 @@ score.noscore=\u6C92\u6709\u53EF\u7528\u7684\u8CC7\u8A0A score.title=\u5206\u6578\u6458\u8981 score.yourscore=\u60A8\u7684\u5206\u6578 scoring.config.enable.button=\u4FEE\u6539 -scoring.overwriting=\u5DF2\u7D93\u6709\u4E00\u4E9B\u8A55\u4F30\u5B58\u5728\u3002\u60A8\u4ECD\u8981\u4FEE\u6539\u60A8\u7684\u8A55\u4F30\u7D44\u614B\u55CE\uFF1F -scoring.overwriting.note=\u8ACB\u6CE8\u610F\uFF1A\u60A8\u6B63\u5728\u4FEE\u6539\u8A55\u4F30\u7D44\u614B\uFF08\u96D6\u7136\u5DF2\u7D93\u6709\u4E00\u4E9B\u5DF2\u7D93\u5B58\u5728\u7684\u8A55\u4F30\uFF09\u3002 warn.nodedelete=\u8B66\u544A\uFF1A\u6240\u6709\u9019\u500B\u8AB2\u7A0B\u5143\u7D20\u7684\u8CC7\u6599\u90FD\u5C07\u88AB\u522A\u9664\u3002 diff --git a/src/main/java/org/olat/course/nodes/ms/manager/MSServiceImpl.java b/src/main/java/org/olat/course/nodes/ms/manager/MSServiceImpl.java index 9937a9d742220dc0de0f8802628b87869b7a4820..29b379c4726da45e3217443ad44eae975d7bb9ce 100644 --- a/src/main/java/org/olat/course/nodes/ms/manager/MSServiceImpl.java +++ b/src/main/java/org/olat/course/nodes/ms/manager/MSServiceImpl.java @@ -35,6 +35,7 @@ import org.olat.modules.forms.EvaluationFormParticipation; import org.olat.modules.forms.EvaluationFormParticipationIdentifier; import org.olat.modules.forms.EvaluationFormSession; import org.olat.modules.forms.EvaluationFormSessionRef; +import org.olat.modules.forms.EvaluationFormSessionStatus; import org.olat.modules.forms.EvaluationFormSurvey; import org.olat.modules.forms.EvaluationFormSurveyIdentifier; import org.olat.modules.forms.RubricStatistic; @@ -102,6 +103,15 @@ public class MSServiceImpl implements MSService { return session; } + @Override + public EvaluationFormSession getSession(RepositoryEntry ores, String nodeIdent, Identity assessedIdentity, + EvaluationFormSessionStatus status) { + EvaluationFormSurveyIdentifier surveyIdent = getSurveyIdentitfier(ores, nodeIdent, assessedIdentity); + SessionFilter filter = SessionFilterFactory.create(surveyIdent, status); + List<EvaluationFormSession> sessions = evaluationFormManager.loadSessionsFiltered(filter, 0, -1); + return !sessions.isEmpty()? sessions.get(0): null; + } + @Override public EvaluationFormSession getSession(EvaluationFormSessionRef sessionRef) { return evaluationFormManager.loadSessionByKey(sessionRef); @@ -225,6 +235,8 @@ public class MSServiceImpl implements MSService { @Override public Float calculateScoreBySum(EvaluationFormSession session) { + if (session == null) return null; + double sum = 0.0; Form form = evaluationFormManager.loadForm(session.getSurvey().getFormEntry()); for (AbstractElement element : form.getElements()) { @@ -242,6 +254,8 @@ public class MSServiceImpl implements MSService { @Override public Float calculateScoreByAvg(EvaluationFormSession session) { + if (session == null) return null; + double sumAvgs = 0.0; int numberAvgs = 0; Form form = evaluationFormManager.loadForm(session.getSurvey().getFormEntry()); diff --git a/src/main/java/org/olat/modules/forms/SessionFilterFactory.java b/src/main/java/org/olat/modules/forms/SessionFilterFactory.java index 754296888ea42c7fbb262038e7814b22008e8a9f..f6ae46461c294e1289e5db458a167df250a07919 100644 --- a/src/main/java/org/olat/modules/forms/SessionFilterFactory.java +++ b/src/main/java/org/olat/modules/forms/SessionFilterFactory.java @@ -47,6 +47,11 @@ public class SessionFilterFactory { return new SurveysFilter(surveyIdentitfier); } + public static SessionFilter create(EvaluationFormSurveyIdentifier surveyIdentitfier, + EvaluationFormSessionStatus status) { + return new SurveysFilter(surveyIdentitfier, status); + } + public static SessionFilter createSelectDone(EvaluationFormSurveyRef survey) { return createSelectDone(Collections.singletonList(survey)); } diff --git a/src/main/java/org/olat/modules/forms/ui/RubricEditorController.java b/src/main/java/org/olat/modules/forms/ui/RubricEditorController.java index 1a176e66ed5087e10cf30307b82f1abd724fe90a..0bc3f4ded0eb4fbfa484845b8b6d6e1b66d84de5 100644 --- a/src/main/java/org/olat/modules/forms/ui/RubricEditorController.java +++ b/src/main/java/org/olat/modules/forms/ui/RubricEditorController.java @@ -96,7 +96,7 @@ public class RubricEditorController extends FormBasicController implements PageE private MultipleSelectionElement surveyConfigEl; private SingleSelection sliderTypeEl; private SingleSelection scaleTypeEl; - private TextElement scaleWeightEl; + private TextElement weightEl; private TextElement nameEl; private MultipleSelectionElement nameDisplayEl; private SingleSelection stepsEl; @@ -215,10 +215,11 @@ public class RubricEditorController extends FormBasicController implements PageE scaleTypeEl.select(ScaleType.getKeys()[0], true); } - // scale weight - String scaleWeight = rubric.getWeight() != null? rubric.getWeight().toString(): ""; - scaleWeightEl = uifactory.addTextElement("rubric.weight", 10, scaleWeight, settingsLayout); - scaleWeightEl.addActionListener(FormEvent.ONCHANGE); + // weight + String weight = rubric.getWeight() != null? rubric.getWeight().toString(): ""; + weightEl = uifactory.addTextElement("rubric.weight", 10, weight, settingsLayout); + weightEl.addActionListener(FormEvent.ONCHANGE); + weightEl.setEnabled(!restrictedEdit); // good rating side goodRatingEl = uifactory.addDropdownSingleselect("rubric.good.rating" + count.incrementAndGet(), "rubric.good.rating", @@ -353,7 +354,7 @@ public class RubricEditorController extends FormBasicController implements PageE } scaleTypeEl.setVisible(isSurveyConfig); - scaleWeightEl.setVisible(isSurveyConfig); + weightEl.setVisible(isSurveyConfig); noAnswerEl.setVisible(isSurveyConfig); noAnswerEl.select(noAnswerEl.getKey(0), rubric.isNoResponseEnabled()); insufficientCont.setVisible(isSurveyConfig); @@ -422,9 +423,9 @@ public class RubricEditorController extends FormBasicController implements PageE } private Integer getWeightOrNull() { - return StringHelper.containsNonWhitespace(scaleWeightEl.getValue()) - && isValidInteger(scaleWeightEl.getValue(), 1, 10000000) - ? Integer.parseInt(scaleWeightEl.getValue()) + return StringHelper.containsNonWhitespace(weightEl.getValue()) + && isValidInteger(weightEl.getValue(), 1, 10000000) + ? Integer.parseInt(weightEl.getValue()) : null; } @@ -613,7 +614,7 @@ public class RubricEditorController extends FormBasicController implements PageE updateSteps(); updateSliders(); updatePlaceholders(); - } else if (scaleWeightEl == source) { + } else if (weightEl == source) { updateSteps(); updateSliders(); updatePlaceholders(); @@ -712,10 +713,10 @@ public class RubricEditorController extends FormBasicController implements PageE } // scale weight - scaleWeightEl.clearError(); - if (StringHelper.containsNonWhitespace(scaleWeightEl.getValue()) - && isInvalidInteger(scaleWeightEl.getValue(), 1, 10000000)) { - scaleWeightEl.setErrorKey("error.wrong.int", null); + weightEl.clearError(); + if (StringHelper.containsNonWhitespace(weightEl.getValue()) + && isInvalidInteger(weightEl.getValue(), 1, 10000000)) { + weightEl.setErrorKey("error.wrong.int", null); surveyConfigOk &= false; } @@ -885,8 +886,8 @@ public class RubricEditorController extends FormBasicController implements PageE ScaleType scaleType = ScaleType.getEnum(selectedScaleTypeKey); rubric.setScaleType(scaleType); - Integer scaleWeight = StringHelper.containsNonWhitespace(scaleWeightEl.getValue()) - ? Integer.parseInt(scaleWeightEl.getValue()) + Integer scaleWeight = StringHelper.containsNonWhitespace(weightEl.getValue()) + ? Integer.parseInt(weightEl.getValue()) : null; rubric.setWeight(scaleWeight);