2984 PO 3) Remove button for final thesis removes the approval rather than flat out rejecting (without reason) the document.

This commit is contained in:
Andreas Svanberg 2023-10-19 12:50:53 +02:00
parent ef301dec4c
commit 88bbf06514
5 changed files with 10 additions and 3 deletions
core/src/main/java/se/su/dsv/scipro/finalthesis
view/src/main/java/se/su/dsv/scipro/grading

@ -27,6 +27,8 @@ public interface FinalThesisService extends GenericService<FinalThesis, Long>,
boolean canReject(Project project);
void removeApproval(Project project);
class Filter implements Serializable {
private FinalThesis.Status status;

@ -130,6 +130,11 @@ public class FinalThesisServiceImpl extends AbstractServiceImpl<FinalThesis, Lon
.noneMatch(SupervisorGradingReport::isSubmitted);
}
@Override
public void removeApproval(Project project) {
setStatus(project, FinalThesis.Status.NO_DECISION);
}
@Override
@Transactional
public void approve(Project project, final String englishTitle, final String swedishTitle) {

@ -5,7 +5,7 @@
<strong>Thesis file:</strong>
<div wicket:id="filePanel"></div>
<wicket:container wicket:id="plagiarismReport">[placeholder]</wicket:container>
<a class="btn btn-danger float-end" wicket:id="reject">Remove</a>
<a class="btn btn-danger float-end" wicket:id="reject">Remove approval</a>
<div class="clearfix"></div>
</wicket:panel>
</body>

@ -36,7 +36,7 @@ public class ThesisApprovedPanel extends GenericPanel<Project> {
@Override
public void onClick() {
finalThesisService.reject(getModelObject());
finalThesisService.removeApproval(getModelObject());
}
@Override

@ -3,4 +3,4 @@ reviewer.approved= Supervisor approved the final thesis.
status= Status:
status.text.approved= Final thesis approved. Fill in the grade reports and upload it/them to Daisy.
status.text.finished= Grading reports submitted. Don't forget to upload to Daisy.
remove.approved= This will remove the approved version and a new one will have to be uploaded.
remove.approved= This will remove your approval of the final thesis, and you will have to make a new decision.