3228 Fixade text och visning av examinationsdatum för rapporterbara prov.

This commit is contained in:
nikos dimitrakas 2023-10-23 11:12:08 +02:00
parent a147c05ed4
commit 9debdc437c
3 changed files with 12 additions and 17 deletions
view/src/main

@ -23,13 +23,7 @@ import se.su.dsv.scipro.components.AutoHidingListView;
import se.su.dsv.scipro.components.InfoPanel;
import se.su.dsv.scipro.files.WicketFileUpload;
import se.su.dsv.scipro.forum.panels.threaded.SubmitForumReplyPanel;
import se.su.dsv.scipro.grading.Examination;
import se.su.dsv.scipro.grading.GetGradeError;
import se.su.dsv.scipro.grading.Grade;
import se.su.dsv.scipro.grading.GradingService;
import se.su.dsv.scipro.grading.Name;
import se.su.dsv.scipro.grading.ReportGradeError;
import se.su.dsv.scipro.grading.Result;
import se.su.dsv.scipro.grading.*;
import se.su.dsv.scipro.oauth.OAuth;
import se.su.dsv.scipro.oauth.OAuthService;
import se.su.dsv.scipro.profile.UserLabel;
@ -49,7 +43,10 @@ import javax.inject.Inject;
import java.time.Instant;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.function.Predicate;
public class RoughDraftApprovalDecisionPage extends ReviewerPage {
@ -169,7 +166,7 @@ public class RoughDraftApprovalDecisionPage extends ReviewerPage {
IModel<List<User>> authors = approval.map(ReviewerApproval::getProject)
.map(Project::getProjectParticipants)
.map(ArrayList::new);
add(new Label("examination_date", this::getExaminationDate));
Label examinationDate = new Label("examination_date", this::getExaminationDate);
ListView<User> listView = new ListView<>("authors", authors) {
@Override
protected void populateItem(ListItem<User> item) {
@ -181,6 +178,7 @@ public class RoughDraftApprovalDecisionPage extends ReviewerPage {
protected void populateItem(ListItem<Examination> item) {
item.add(new Label("name", item.getModel().map(Examination::name).map(Name::english)));
item.add(new Label("points", item.getModel().map(Examination::points)));
item.add(examinationDate);
}
});
item.add(new WebMarkupContainer("nothing_to_report") {

@ -5,7 +5,7 @@ interact.with.supervisor= Interact with supervisor
approve=Approve
reject=Improvements are needed
examination.Required=Examination for ${label} must be set
report_halfway_explanation=When approving a project for phase two review you are also reporting, possibly multiple, \
passing grades for all the involved authors, see below for details.
report_halfway_explanation=If you choose to approve the rough draft of this project, you will also be reporting \
the appropriate passing grade(s) for the author(s) according to the following.
failed_to_report_phase_two_grade=Could not report all the grades, please contact the supervisor and let them know \
they will have to report it themselves.

@ -29,13 +29,10 @@
<input type="file" id="attachment" class="form-control" wicket:id="attachment">
</div>
<p class="mb-3 alert alert-info"><wicket:message key="report_halfway_explanation">
[When approving a project for phase two review you should also report the halfway examination.
Please select the appropriate examination below for each author before approving.]
[If you choose to approve the rough draft of this project, you will also be reporting the
appropriate passing grade(s) for the author(s) according to the following.]
</wicket:message></p>
<dl>
<dt>Examination date</dt>
<dd wicket:id="examination_date"></dd>
<wicket:container wicket:id="authors">
<dt wicket:id="name"></dt>
<wicket:enclosure child="examinations">
@ -43,7 +40,7 @@
<ul>
<li wicket:id="examinations">
<span wicket:id="name"></span>
(<span wicket:id="points"></span> hec)
(<span wicket:id="points"></span> hec), examination date: <span wicket:id="examination_date"></span>
</li>
</ul>
</dd>