Better UX for notification about opposition report needing improvements
Now takes the opponent directly to the form where they can fill in the report and view the feedback from the seminar supervisor.
This commit is contained in:
parent
a20455df97
commit
236f6a0ad3
core/src/main/java/se/su/dsv/scipro/notifications
view/src/main/java/se/su/dsv/scipro
@ -172,13 +172,13 @@ public class Notifications {
|
|||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void oppositionReportImprovementsRequested(OppositionReportImprovementsRequestedEvent event) {
|
public void oppositionReportImprovementsRequested(OppositionReportImprovementsRequestedEvent event) {
|
||||||
Member recipient = new Member(event.opposition().getUser(), Member.Type.AUTHOR);
|
Member recipient = new Member(event.opposition().getUser(), Member.Type.OPPONENT);
|
||||||
Set<Member> recipients = Set.of(recipient);
|
Set<Member> recipients = Set.of(recipient);
|
||||||
NotificationSource source = new NotificationSource();
|
NotificationSource source = new NotificationSource();
|
||||||
source.setMessage(event.supervisorComment());
|
source.setMessage(event.supervisorComment());
|
||||||
notificationController.notifyCustomProject(
|
notificationController.notifyCustomSeminar(
|
||||||
event.opposition().getProject(),
|
event.opposition().getFinalSeminar(),
|
||||||
ProjectEvent.Event.OPPOSITION_REPORT_IMPROVEMENTS_REQUESTED,
|
SeminarEvent.Event.OPPOSITION_REPORT_IMPROVEMENTS_REQUESTED,
|
||||||
source,
|
source,
|
||||||
recipients
|
recipients
|
||||||
);
|
);
|
||||||
|
@ -51,7 +51,6 @@ public class ProjectEvent extends NotificationEvent {
|
|||||||
PARTICIPATION_FAILED,
|
PARTICIPATION_FAILED,
|
||||||
REFLECTION_IMPROVEMENTS_REQUESTED,
|
REFLECTION_IMPROVEMENTS_REQUESTED,
|
||||||
REFLECTION_IMPROVEMENTS_SUBMITTED,
|
REFLECTION_IMPROVEMENTS_SUBMITTED,
|
||||||
OPPOSITION_REPORT_IMPROVEMENTS_REQUESTED,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Basic
|
@Basic
|
||||||
|
@ -27,6 +27,7 @@ public class SeminarEvent extends NotificationEvent {
|
|||||||
THESIS_UPLOAD_REMIND,
|
THESIS_UPLOAD_REMIND,
|
||||||
CANCELLED,
|
CANCELLED,
|
||||||
OPPOSITION_REPORT_SUBMITTED,
|
OPPOSITION_REPORT_SUBMITTED,
|
||||||
|
OPPOSITION_REPORT_IMPROVEMENTS_REQUESTED,
|
||||||
}
|
}
|
||||||
|
|
||||||
@Basic
|
@Basic
|
||||||
|
@ -79,10 +79,6 @@ PROJECT.FIRST_MEETING.body = Date: {0}\n\nDescription:\n{2}
|
|||||||
PROJECT.OPPOSITION_FAILED.title = Your opposition on {1} did not meet the minimum requirements.
|
PROJECT.OPPOSITION_FAILED.title = Your opposition on {1} did not meet the minimum requirements.
|
||||||
PROJECT.OPPOSITION_FAILED.body = Your opposition did not meet the minimum requirements set, and you will have to \
|
PROJECT.OPPOSITION_FAILED.body = Your opposition did not meet the minimum requirements set, and you will have to \
|
||||||
oppose on a different final seminar to pass this step.\n\nFeedback from the seminar supervisor: {2}
|
oppose on a different final seminar to pass this step.\n\nFeedback from the seminar supervisor: {2}
|
||||||
PROJECT.OPPOSITION_REPORT_IMPROVEMENTS_REQUESTED.title = Opposition report improvements requested
|
|
||||||
PROJECT.OPPOSITION_REPORT_IMPROVEMENTS_REQUESTED.body = The supervisor has deemed that the opposition report submitted \
|
|
||||||
does not meet the minimum requirements and has requested improvements. Please log into SciPro and submit a new \
|
|
||||||
opposition report. Their comments can be seen below:\n\n{0}
|
|
||||||
PROJECT.PARTICIPATION_APPROVED.title = Active participation on {1} has been approved.
|
PROJECT.PARTICIPATION_APPROVED.title = Active participation on {1} has been approved.
|
||||||
PROJECT.PARTICIPATION_APPROVED.body = Your active participation on {0} has been approved, but you still have to complete \
|
PROJECT.PARTICIPATION_APPROVED.body = Your active participation on {0} has been approved, but you still have to complete \
|
||||||
{2} more active participation to meet the minimum requirements for your thesis project.
|
{2} more active participation to meet the minimum requirements for your thesis project.
|
||||||
@ -146,6 +142,10 @@ FINAL_SEMINAR.CANCELLED.title = Final seminar for project {1} was cancelled
|
|||||||
FINAL_SEMINAR.CANCELLED.body = The final seminar for project {0} was cancelled, supervisor must select a new date for the final seminar.
|
FINAL_SEMINAR.CANCELLED.body = The final seminar for project {0} was cancelled, supervisor must select a new date for the final seminar.
|
||||||
FINAL_SEMINAR.OPPOSITION_REPORT_SUBMITTED.title=Opposition report submitted by {1} for the seminar on project {0}
|
FINAL_SEMINAR.OPPOSITION_REPORT_SUBMITTED.title=Opposition report submitted by {1} for the seminar on project {0}
|
||||||
FINAL_SEMINAR.OPPOSITION_REPORT_SUBMITTED.body=The opposition report from {0} has been submitted.
|
FINAL_SEMINAR.OPPOSITION_REPORT_SUBMITTED.body=The opposition report from {0} has been submitted.
|
||||||
|
FINAL_SEMINAR.OPPOSITION_REPORT_IMPROVEMENTS_REQUESTED.title = Opposition report improvements requested
|
||||||
|
FINAL_SEMINAR.OPPOSITION_REPORT_IMPROVEMENTS_REQUESTED.body = The supervisor has deemed that the opposition report submitted \
|
||||||
|
does not meet the minimum requirements and has requested improvements. Please log into SciPro and submit a new \
|
||||||
|
opposition report. Their comments can be seen below:\n\n{0}
|
||||||
FINAL_SEMINAR.compilationSuffix = , project: {0}
|
FINAL_SEMINAR.compilationSuffix = , project: {0}
|
||||||
|
|
||||||
PEER.REVIEW_COMPLETED.title = Peer review completed
|
PEER.REVIEW_COMPLETED.title = Peer review completed
|
||||||
|
@ -10,6 +10,8 @@ import org.apache.wicket.util.string.StringValueConversionException;
|
|||||||
import se.su.dsv.scipro.activityplan.ProjectActivityPlanPage;
|
import se.su.dsv.scipro.activityplan.ProjectActivityPlanPage;
|
||||||
import se.su.dsv.scipro.activityplan.SupervisorActivityPlanPage;
|
import se.su.dsv.scipro.activityplan.SupervisorActivityPlanPage;
|
||||||
import se.su.dsv.scipro.finalseminar.FinalSeminar;
|
import se.su.dsv.scipro.finalseminar.FinalSeminar;
|
||||||
|
import se.su.dsv.scipro.finalseminar.FinalSeminarOpposition;
|
||||||
|
import se.su.dsv.scipro.finalseminar.OppositionReportPage;
|
||||||
import se.su.dsv.scipro.finalseminar.ProjectFinalSeminarDetailsPage;
|
import se.su.dsv.scipro.finalseminar.ProjectFinalSeminarDetailsPage;
|
||||||
import se.su.dsv.scipro.finalseminar.ProjectFinalSeminarPage;
|
import se.su.dsv.scipro.finalseminar.ProjectFinalSeminarPage;
|
||||||
import se.su.dsv.scipro.finalseminar.ProjectOppositionPage;
|
import se.su.dsv.scipro.finalseminar.ProjectOppositionPage;
|
||||||
@ -180,7 +182,7 @@ public class NotificationLandingPage extends WebPage {
|
|||||||
case FIRST_MEETING:
|
case FIRST_MEETING:
|
||||||
defaultSplit.accept(ProjectFirstMeetingPage.class, SupervisorFirstMeetingPage.class);
|
defaultSplit.accept(ProjectFirstMeetingPage.class, SupervisorFirstMeetingPage.class);
|
||||||
break;
|
break;
|
||||||
case OPPOSITION_FAILED, OPPOSITION_REPORT_IMPROVEMENTS_REQUESTED:
|
case OPPOSITION_FAILED:
|
||||||
defaultSplit.accept(ProjectOppositionPage.class, SupervisorProjectDetailsPage.class);
|
defaultSplit.accept(ProjectOppositionPage.class, SupervisorProjectDetailsPage.class);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -217,6 +219,19 @@ public class NotificationLandingPage extends WebPage {
|
|||||||
} else if (
|
} else if (
|
||||||
seminar.getActiveParticipants().contains(currentUser) || seminar.getOpponents().contains(currentUser)
|
seminar.getActiveParticipants().contains(currentUser) || seminar.getOpponents().contains(currentUser)
|
||||||
) {
|
) {
|
||||||
|
if (seminarEvent.getEvent() == SeminarEvent.Event.OPPOSITION_REPORT_IMPROVEMENTS_REQUESTED) {
|
||||||
|
Optional<FinalSeminarOpposition> opposition = seminar
|
||||||
|
.getOppositions()
|
||||||
|
.stream()
|
||||||
|
.filter(op -> op.getUser().equals(currentUser))
|
||||||
|
.findFirst();
|
||||||
|
if (opposition.isPresent()) {
|
||||||
|
final PageParameters oppPP = new PageParameters();
|
||||||
|
oppPP.set("oid", opposition.get().getId());
|
||||||
|
setResponsePage(OppositionReportPage.class, oppPP);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
setResponsePage(ProjectFinalSeminarDetailsPage.class, pp);
|
setResponsePage(ProjectFinalSeminarDetailsPage.class, pp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,6 @@ ProjectEvent.SUPERVISOR_GRADING_INITIAL_ASSESSMENT_DONE = The supervisor finishe
|
|||||||
ProjectEvent.EXPORTED_SUCCESS = Idea was successfully exported to a thesis course in Daisy and a project in SciPro.
|
ProjectEvent.EXPORTED_SUCCESS = Idea was successfully exported to a thesis course in Daisy and a project in SciPro.
|
||||||
ProjectEvent.FIRST_MEETING = First meeting created. (with date, time, place/room/communication method specified by supervisor)
|
ProjectEvent.FIRST_MEETING = First meeting created. (with date, time, place/room/communication method specified by supervisor)
|
||||||
ProjectEvent.OPPOSITION_FAILED = An author fails their opposition.
|
ProjectEvent.OPPOSITION_FAILED = An author fails their opposition.
|
||||||
ProjectEvent.OPPOSITION_REPORT_IMPROVEMENTS_REQUESTED = Opposition report improvements requested.
|
|
||||||
ProjectEvent.PARTICIPATION_APPROVED = An author's active participation is approved.
|
ProjectEvent.PARTICIPATION_APPROVED = An author's active participation is approved.
|
||||||
ProjectEvent.PARTICIPATION_FAILED = An author fails their active participation.
|
ProjectEvent.PARTICIPATION_FAILED = An author fails their active participation.
|
||||||
ProjectEvent.REFLECTION_IMPROVEMENTS_REQUESTED = Reflection improvements requested.
|
ProjectEvent.REFLECTION_IMPROVEMENTS_REQUESTED = Reflection improvements requested.
|
||||||
@ -85,6 +84,7 @@ SeminarEvent.THESIS_DELETED = Final seminar thesis deleted.
|
|||||||
SeminarEvent.THESIS_UPLOAD_REMIND = Authors reminded to upload final seminar thesis.
|
SeminarEvent.THESIS_UPLOAD_REMIND = Authors reminded to upload final seminar thesis.
|
||||||
SeminarEvent.CANCELLED = Final seminar cancelled.
|
SeminarEvent.CANCELLED = Final seminar cancelled.
|
||||||
SeminarEvent.OPPOSITION_REPORT_SUBMITTED = Opposition report submitted.
|
SeminarEvent.OPPOSITION_REPORT_SUBMITTED = Opposition report submitted.
|
||||||
|
SeminarEvent.OPPOSITION_REPORT_IMPROVEMENTS_REQUESTED = Opposition report improvements requested.
|
||||||
|
|
||||||
IdeaEvent.STATUS_CHANGE = Idea status changed.
|
IdeaEvent.STATUS_CHANGE = Idea status changed.
|
||||||
IdeaEvent.PARTNER_ACCEPT = Partner (author) accepted partnering idea.
|
IdeaEvent.PARTNER_ACCEPT = Partner (author) accepted partnering idea.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user