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

OO-4338: Avoid RS is scale is not set in manual scoring course node

parent 394cb8d9
No related branches found
No related tags found
No related merge requests found
...@@ -380,7 +380,7 @@ public class MSCourseNode extends AbstractAccessableCourseNode implements Persis ...@@ -380,7 +380,7 @@ public class MSCourseNode extends AbstractAccessableCourseNode implements Persis
private MinMax getMinMax() { private MinMax getMinMax() {
ModuleConfiguration config = getModuleConfiguration(); ModuleConfiguration config = getModuleConfiguration();
String scoreConfig = config.getStringValue(CONFIG_KEY_SCORE); String scoreConfig = config.getStringValue(CONFIG_KEY_SCORE);
String scaleConfig = config.getStringValue(CONFIG_KEY_EVAL_FORM_SCALE); String scaleConfig = config.getStringValue(CONFIG_KEY_EVAL_FORM_SCALE, CONFIG_DEFAULT_EVAL_FORM_SCALE);
if (CONFIG_VALUE_SCORE_MANUAL.equals(scoreConfig)) { if (CONFIG_VALUE_SCORE_MANUAL.equals(scoreConfig)) {
Float min = (Float) config.get(CONFIG_KEY_SCORE_MIN); Float min = (Float) config.get(CONFIG_KEY_SCORE_MIN);
...@@ -633,7 +633,7 @@ public class MSCourseNode extends AbstractAccessableCourseNode implements Persis ...@@ -633,7 +633,7 @@ public class MSCourseNode extends AbstractAccessableCourseNode implements Persis
Float score = null; Float score = null;
ModuleConfiguration config = getModuleConfiguration(); ModuleConfiguration config = getModuleConfiguration();
String scoreConfig = config.getStringValue(CONFIG_KEY_SCORE); String scoreConfig = config.getStringValue(CONFIG_KEY_SCORE);
String scaleConfig = config.getStringValue(CONFIG_KEY_EVAL_FORM_SCALE); String scaleConfig = config.getStringValue(CONFIG_KEY_EVAL_FORM_SCALE, CONFIG_DEFAULT_EVAL_FORM_SCALE);
float scale = Float.parseFloat(scaleConfig); float scale = Float.parseFloat(scaleConfig);
if (CONFIG_VALUE_SCORE_EVAL_FORM_AVG.equals(scoreConfig)) { if (CONFIG_VALUE_SCORE_EVAL_FORM_AVG.equals(scoreConfig)) {
score = msService.calculateScoreByAvg(session); score = msService.calculateScoreByAvg(session);
......
...@@ -81,7 +81,8 @@ public class MSResultDetailsController extends BasicController { ...@@ -81,7 +81,8 @@ public class MSResultDetailsController extends BasicController {
boolean pointsFromEvaluationForm = MSCourseNode.CONFIG_VALUE_SCORE_EVAL_FORM_SUM.equals(scoreConfig) boolean pointsFromEvaluationForm = MSCourseNode.CONFIG_VALUE_SCORE_EVAL_FORM_SUM.equals(scoreConfig)
|| MSCourseNode.CONFIG_VALUE_SCORE_EVAL_FORM_AVG.equals(scoreConfig); || MSCourseNode.CONFIG_VALUE_SCORE_EVAL_FORM_AVG.equals(scoreConfig);
if (pointsFromEvaluationForm) { if (pointsFromEvaluationForm) {
String scaleConfig = config.getStringValue(MSCourseNode.CONFIG_KEY_EVAL_FORM_SCALE); String scaleConfig = config.getStringValue(MSCourseNode.CONFIG_KEY_EVAL_FORM_SCALE,
MSCourseNode.CONFIG_DEFAULT_EVAL_FORM_SCALE);
float scale = Float.parseFloat(scaleConfig); float scale = Float.parseFloat(scaleConfig);
List<RubricStatistic> statistics = msService.getRubricStatistics(session); List<RubricStatistic> statistics = msService.getRubricStatistics(session);
......
...@@ -116,7 +116,8 @@ public class MSStatisticController extends FormBasicController { ...@@ -116,7 +116,8 @@ public class MSStatisticController extends FormBasicController {
ModuleConfiguration config = courseNode.getModuleConfiguration(); ModuleConfiguration config = courseNode.getModuleConfiguration();
String scoreConfig = config.getStringValue(MSCourseNode.CONFIG_KEY_SCORE); String scoreConfig = config.getStringValue(MSCourseNode.CONFIG_KEY_SCORE);
this.sum = MSCourseNode.CONFIG_VALUE_SCORE_EVAL_FORM_SUM.equals(scoreConfig); this.sum = MSCourseNode.CONFIG_VALUE_SCORE_EVAL_FORM_SUM.equals(scoreConfig);
String scaleConfig = config.getStringValue(MSCourseNode.CONFIG_KEY_EVAL_FORM_SCALE); String scaleConfig = config.getStringValue(MSCourseNode.CONFIG_KEY_EVAL_FORM_SCALE,
MSCourseNode.CONFIG_DEFAULT_EVAL_FORM_SCALE);
this.scale = Float.parseFloat(scaleConfig); this.scale = Float.parseFloat(scaleConfig);
isAdministrativeUser = securityModule.isUserAllowedAdminProps(ureq.getUserSession().getRoles()); isAdministrativeUser = securityModule.isUserAllowedAdminProps(ureq.getUserSession().getRoles());
......
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