Allow supervisors to request improvements from final seminar opponents #78
@ -172,13 +172,13 @@ public class Notifications {
|
||||
|
||||
@Subscribe
|
||||
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);
|
||||
NotificationSource source = new NotificationSource();
|
||||
source.setMessage(event.supervisorComment());
|
||||
notificationController.notifyCustomProject(
|
||||
event.opposition().getProject(),
|
||||
ProjectEvent.Event.OPPOSITION_REPORT_IMPROVEMENTS_REQUESTED,
|
||||
notificationController.notifyCustomSeminar(
|
||||
event.opposition().getFinalSeminar(),
|
||||
SeminarEvent.Event.OPPOSITION_REPORT_IMPROVEMENTS_REQUESTED,
|
||||
source,
|
||||
recipients
|
||||
);
|
||||
|
@ -51,7 +51,6 @@ public class ProjectEvent extends NotificationEvent {
|
||||
PARTICIPATION_FAILED,
|
||||
REFLECTION_IMPROVEMENTS_REQUESTED,
|
||||
REFLECTION_IMPROVEMENTS_SUBMITTED,
|
||||
OPPOSITION_REPORT_IMPROVEMENTS_REQUESTED,
|
||||
}
|
||||
|
||||
@Basic
|
||||
|
@ -27,6 +27,7 @@ public class SeminarEvent extends NotificationEvent {
|
||||
THESIS_UPLOAD_REMIND,
|
||||
CANCELLED,
|
||||
OPPOSITION_REPORT_SUBMITTED,
|
||||
OPPOSITION_REPORT_IMPROVEMENTS_REQUESTED,
|
||||
}
|
||||
|
||||
@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.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}
|
||||
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.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.
|
||||
@ -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.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_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}
|
||||
|
||||
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.SupervisorActivityPlanPage;
|
||||
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.ProjectFinalSeminarPage;
|
||||
import se.su.dsv.scipro.finalseminar.ProjectOppositionPage;
|
||||
@ -180,7 +182,7 @@ public class NotificationLandingPage extends WebPage {
|
||||
case FIRST_MEETING:
|
||||
defaultSplit.accept(ProjectFirstMeetingPage.class, SupervisorFirstMeetingPage.class);
|
||||
break;
|
||||
case OPPOSITION_FAILED, OPPOSITION_REPORT_IMPROVEMENTS_REQUESTED:
|
||||
case OPPOSITION_FAILED:
|
||||
defaultSplit.accept(ProjectOppositionPage.class, SupervisorProjectDetailsPage.class);
|
||||
break;
|
||||
default:
|
||||
@ -217,6 +219,19 @@ public class NotificationLandingPage extends WebPage {
|
||||
} else if (
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -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.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_REPORT_IMPROVEMENTS_REQUESTED = Opposition report improvements requested.
|
||||
ProjectEvent.PARTICIPATION_APPROVED = An author's active participation is approved.
|
||||
ProjectEvent.PARTICIPATION_FAILED = An author fails their active participation.
|
||||
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.CANCELLED = Final seminar cancelled.
|
||||
SeminarEvent.OPPOSITION_REPORT_SUBMITTED = Opposition report submitted.
|
||||
SeminarEvent.OPPOSITION_REPORT_IMPROVEMENTS_REQUESTED = Opposition report improvements requested.
|
||||
|
||||
IdeaEvent.STATUS_CHANGE = Idea status changed.
|
||||
IdeaEvent.PARTNER_ACCEPT = Partner (author) accepted partnering idea.
|
||||
|
Loading…
x
Reference in New Issue
Block a user