3359 Show text when author has done their parts, but the grading process is not fully done yet

This commit is contained in:
Andreas Svanberg 2024-04-03 12:43:46 +02:00
parent db84cc6c17
commit 4bdc34e307
2 changed files with 13 additions and 14 deletions

@ -15,6 +15,9 @@
<p wicket:id="final_seminar_done_no_final_thesis_done_has_reflection">
The final seminar has taken place, your final thesis has been rejected. You need to upload the new version of your final thesis to have your thesis assessed.
</p>
<p wicket:id="author_done_supervisor_not_done">
Final thesis and reflection uploaded.
</p>
<p wicket:id="all_done">
Your thesis project is completed.
</p>

@ -1,7 +1,5 @@
package se.su.dsv.scipro.project.panels;
import org.apache.wicket.Component;
import org.apache.wicket.behavior.Behavior;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.panel.GenericPanel;
import org.apache.wicket.model.IModel;
@ -60,22 +58,20 @@ public class FinalThesisReflectionInstructionsPanel extends GenericPanel<Project
setVisible(hasHadFinalSeminar.getObject() && !hasFinalThesis.getObject() && hasSubmittedReflection.getObject());
}
});
add(new WebMarkupContainer("author_done_supervisor_not_done") {
@Override
protected void onConfigure() {
super.onConfigure();
boolean projectIsCompleted = projectModel.getObject().getProjectStatus() == ProjectStatus.COMPLETED;
setVisible(hasHadFinalSeminar.getObject() && hasFinalThesis.getObject() && hasSubmittedReflection.getObject() && !projectIsCompleted);
}
});
add(new WebMarkupContainer("all_done") {
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(hasHadFinalSeminar.getObject() && hasFinalThesis.getObject() && hasSubmittedReflection.getObject());
}
});
add(new Behavior() {
@Override
public void onConfigure(Component component) {
super.onConfigure(component);
component.setVisible(
!hasHadFinalSeminar.getObject()
|| !hasFinalThesis.getObject()
|| !hasSubmittedReflection.getObject()
|| projectModel.getObject().getProjectStatus() == ProjectStatus.COMPLETED);
boolean projectIsCompleted = projectModel.getObject().getProjectStatus() == ProjectStatus.COMPLETED;
setVisible(hasHadFinalSeminar.getObject() && hasFinalThesis.getObject() && hasSubmittedReflection.getObject() && projectIsCompleted);
}
});
}