WIP: Allow supervisors to request improvements from final seminar opponents #78

Draft
ansv7779 wants to merge 18 commits from opponent-completion into develop
4 changed files with 33 additions and 9 deletions
Showing only changes of commit 21d7c034bf - Show all commits

View File

@ -320,7 +320,12 @@ public class GradingReportServiceImpl
.stream() .stream()
.map(GradingCriterion::getGradingCriterionPoints) .map(GradingCriterion::getGradingCriterionPoints)
.flatMap(Collection::stream) .flatMap(Collection::stream)
.map(gcp -> new OppositionCriteria.Point(gcp.getPoint(), gcp.getDescription(Language.ENGLISH))) .map(gcp ->
new OppositionCriteria.Point(
gcp.getPoint(),
Objects.requireNonNullElse(gcp.getDescription(Language.ENGLISH), "")
)
)
.toList(); .toList();
return new OppositionCriteria(oppositionGradingCriteria.get().getPointsRequiredToPass(), points); return new OppositionCriteria(oppositionGradingCriteria.get().getPointsRequiredToPass(), points);
} }

View File

@ -19,8 +19,15 @@
<div class="col-lg-5"> <div class="col-lg-5">
<form wicket:id="form"> <form wicket:id="form">
<div class="card mb-3 bg-info text-white"> <div class="card mb-3 text-bg-info">
<wicket:message key="criteria"/> <div class="card-body">
<p class="card-text">
<wicket:message key="criteria"/>
</p>
<p class="card-text" wicket:id="requirements">
<wicket:container wicket:id="requirement"/>
</p>
</div>
</div> </div>
<div class="mb-3"> <div class="mb-3">

View File

@ -237,6 +237,15 @@ public class SeminarOppositionPanel extends Panel {
finalSeminarOppositionService.getCriteriaForOpposition(finalSeminarOpposition.getObject()) finalSeminarOppositionService.getCriteriaForOpposition(finalSeminarOpposition.getObject())
); );
add(
new ListView<>("requirements", criteriaModel.map(this::getPointsWithRequirements)) {
@Override
protected void populateItem(ListItem<OppositionCriteria.Point> item) {
item.add(new Label("requirement", item.getModel().map(OppositionCriteria.Point::requirement)));
}
}
);
FormComponent<OppositionCriteria.Point> pointsField = new DropDownChoice<>( FormComponent<OppositionCriteria.Point> pointsField = new DropDownChoice<>(
POINTS, POINTS,
pointsModel, pointsModel,
@ -295,6 +304,14 @@ public class SeminarOppositionPanel extends Panel {
); );
} }
private List<OppositionCriteria.Point> getPointsWithRequirements(OppositionCriteria oppositionCriteria) {
return oppositionCriteria
.pointsAvailable()
.stream()
.filter(point -> !point.requirement().isBlank())
.toList();
}
@Override @Override
protected void onConfigure() { protected void onConfigure() {
super.onConfigure(); super.onConfigure();

View File

@ -10,12 +10,7 @@ opponents.form.points.RangeValidator.range= Points assigned must be between ${mi
feedback.opponent.updated= Opponent ${user.fullName} feedback updated. feedback.opponent.updated= Opponent ${user.fullName} feedback updated.
point.not.valid=You need to assign points from the available selection. point.not.valid=You need to assign points from the available selection.
feedback.opponent.not.updated= Opponent ${user.fullName} feedback updated. Point and motivation could not be transferred to the students final grading report since the opponents supervisor already filled it in. feedback.opponent.not.updated= Opponent ${user.fullName} feedback updated. Point and motivation could not be transferred to the students final grading report since the opponents supervisor already filled it in.
criteria= As the supervisor on this final seminar you are also required to grade the opponents opposition report.\ criteria= As the supervisor on this final seminar you are also required to grade the opponents opposition report.
<\br><\br>Requirement for 1 point: <\br>That the opposition report provides a short summary of the evaluated thesis, that it deliberates about the scientific basis, originality, \
significance, and formulation of the problem and research question, as well as that it contains clear suggestions for improvements. \
<\br><\br>For 2 points the following is also required: \
<\br>That the opposition report thoroughly and in a well-balanced way describes from numerous aspects the strengths and weaknesses of the evaluated thesis and that it \
offers clear and well- motivated suggestions for improvements.
opposition.report= Opposition report: opposition.report= Opposition report:
removed= Opponent ${user.fullName} successfully removed removed= Opponent ${user.fullName} successfully removed
opposition.report.removed= Opposition report successfully removed opposition.report.removed= Opposition report successfully removed