use of org.olat.modules.forms.ui.component.SliderPoint in project OpenOLAT by OpenOLAT.
the class CompareEvaluationsFormController method forgeSliderStats.
private SliderWrapper forgeSliderStats(Slider slider, Rubric element, List<EvaluationFormResponse> responses) {
String id = "overview_" + (count++);
SliderOverviewElement overviewEl = new SliderOverviewElement(id);
overviewEl.setMinValue(element.getStart());
overviewEl.setMaxValue(element.getEnd());
flc.add(id, overviewEl);
List<SliderPoint> values = new ArrayList<>();
if (responses != null && responses.size() > 0) {
for (EvaluationFormResponse response : responses) {
if (response.getNumericalResponse() != null) {
Identity evaluator = response.getSession().getIdentity();
String color = evaluatorToColors.get(evaluator);
double value = response.getNumericalResponse().doubleValue();
values.add(new SliderPoint(color, value));
}
}
}
overviewEl.setValues(values);
return new SliderWrapper(slider, overviewEl);
}
use of org.olat.modules.forms.ui.component.SliderPoint in project openolat by klemens.
the class CompareEvaluationsFormController method forgeSliderStats.
private SliderWrapper forgeSliderStats(Slider slider, Rubric element, List<EvaluationFormResponse> responses) {
String id = "overview_" + (count++);
SliderOverviewElement overviewEl = new SliderOverviewElement(id);
overviewEl.setMinValue(element.getStart());
overviewEl.setMaxValue(element.getEnd());
flc.add(id, overviewEl);
List<SliderPoint> values = new ArrayList<>();
if (responses != null && responses.size() > 0) {
for (EvaluationFormResponse response : responses) {
if (response.getNumericalResponse() != null) {
Identity evaluator = response.getSession().getIdentity();
String color = evaluatorToColors.get(evaluator);
double value = response.getNumericalResponse().doubleValue();
values.add(new SliderPoint(color, value));
}
}
}
overviewEl.setValues(values);
return new SliderWrapper(slider, overviewEl);
}
Aggregations