Allows admins to manage grading report templates #14
@ -65,10 +65,15 @@ class EditingGradingTemplate implements Serializable {
|
|||||||
OPPOSITION, REFLECTION
|
OPPOSITION, REFLECTION
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum Type {
|
||||||
|
PROJECT, INDIVIDUAL
|
||||||
|
}
|
||||||
|
|
||||||
private String titleSv;
|
private String titleSv;
|
||||||
private String titleEn;
|
private String titleEn;
|
||||||
private List<Point> points = new ArrayList<>();
|
private List<Point> points = new ArrayList<>();
|
||||||
private Flag flag;
|
private Flag flag;
|
||||||
|
private Type type = Type.PROJECT;
|
||||||
|
|
||||||
Criteria(GradingCriterionTemplate criteria) {
|
Criteria(GradingCriterionTemplate criteria) {
|
||||||
this.titleSv = criteria.getTitle();
|
this.titleSv = criteria.getTitle();
|
||||||
@ -82,6 +87,14 @@ class EditingGradingTemplate implements Serializable {
|
|||||||
|
|
||||||
private Criteria() {}
|
private Criteria() {}
|
||||||
|
|
||||||
|
public Type getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(Type type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
public String getTitleSv() {
|
public String getTitleSv() {
|
||||||
return titleSv;
|
return titleSv;
|
||||||
}
|
}
|
||||||
|
@ -82,6 +82,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="form-label" wicket:for="type">Type</label>
|
||||||
|
<select wicket:id="type" class="form-control"></select>
|
||||||
|
<small class="text-muted">Whether this criterion is assessed once for the thesis or per author.</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" wicket:for="flag">Special flag</label>
|
<label class="form-label" wicket:for="flag">Special flag</label>
|
||||||
<select class="form-control" wicket:id="flag"></select>
|
<select class="form-control" wicket:id="flag"></select>
|
||||||
|
@ -94,6 +94,26 @@ class EditingGradingTemplateComponentPanel extends GenericPanel<EditingGradingTe
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
AjaxDropDownChoice<EditingGradingTemplate.Criteria.Type> typeChoice = new AjaxDropDownChoice<>(
|
||||||
|
"type",
|
||||||
|
LambdaModel.of(
|
||||||
|
model,
|
||||||
|
EditingGradingTemplate.Criteria::getType,
|
||||||
|
EditingGradingTemplate.Criteria::setType),
|
||||||
|
List.of(EditingGradingTemplate.Criteria.Type.values()),
|
||||||
|
new EnumChoiceRenderer<>(this))
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void onNewSelection(
|
||||||
|
AjaxRequestTarget target,
|
||||||
|
EditingGradingTemplate.Criteria.Type objectSelected)
|
||||||
|
{
|
||||||
|
// auto save
|
||||||
|
}
|
||||||
|
};
|
||||||
|
typeChoice.setRequired(true);
|
||||||
|
add(typeChoice);
|
||||||
|
|
||||||
AjaxDropDownChoice<EditingGradingTemplate.Criteria.Flag> flagChoice = new AjaxDropDownChoice<>(
|
AjaxDropDownChoice<EditingGradingTemplate.Criteria.Flag> flagChoice = new AjaxDropDownChoice<>(
|
||||||
"flag",
|
"flag",
|
||||||
LambdaModel.of(
|
LambdaModel.of(
|
||||||
|
@ -6,3 +6,5 @@ title_sv.Required=You must set the swedish title for all criteria
|
|||||||
title_en.Required=You must set the english title for all criteria
|
title_en.Required=You must set the english title for all criteria
|
||||||
requirement_sv.Required=You must set the swedish requirement for every criteria point
|
requirement_sv.Required=You must set the swedish requirement for every criteria point
|
||||||
requirement_en.Required=You must set the english requirement for every criteria point
|
requirement_en.Required=You must set the english requirement for every criteria point
|
||||||
|
Type.PROJECT=Once per thesis
|
||||||
|
Type.INDIVIDUAL=Individually for each author
|
||||||
|
Loading…
x
Reference in New Issue
Block a user