Allow supervisors to request improvements from final seminar opponents #78
@ -21,6 +21,8 @@ services:
|
||||
- OAUTH2_RESOURCE_SERVER_ID=scipro_api_client
|
||||
- OAUTH2_RESOURCE_SERVER_SECRET=scipro_api_secret
|
||||
- OAUTH2_RESOURCE_SERVER_INTROSPECTION_URI=https://oauth2-${VHOST}/introspect
|
||||
- OAUTH2_GS_AUTHORIZATION_URI=https://oauth2-gs-${VHOST}
|
||||
- OAUTH2_GS_CLIENT_REDIRECT_URI=https://${VHOST}/oauth/callback
|
||||
networks:
|
||||
- traefik
|
||||
- internal
|
||||
@ -64,6 +66,25 @@ services:
|
||||
- "traefik.http.routers.oauth2-${COMPOSE_PROJECT_NAME}.rule=Host(`oauth2-${VHOST}`)"
|
||||
- "traefik.http.routers.oauth2-${COMPOSE_PROJECT_NAME}.tls.certresolver=letsencrypt"
|
||||
|
||||
oauth2-gs:
|
||||
build:
|
||||
context: https://github.com/dsv-su/toker.git
|
||||
dockerfile: embedded.Dockerfile
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- CLIENT_ID=scipro_client
|
||||
- CLIENT_SECRET=scipro_secret
|
||||
- CLIENT_REDIRECT_URI=https://${VHOST}/oauth/callback
|
||||
- RESOURCE_SERVER_ID=scipro_api_client
|
||||
- RESOURCE_SERVER_SECRET=scipro_api_secret
|
||||
- CLIENT_SCOPES=grade:read grade:write
|
||||
networks:
|
||||
- traefik
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.oauth2-gs-${COMPOSE_PROJECT_NAME}.rule=Host(`oauth2-gs-${VHOST}`)"
|
||||
- "traefik.http.routers.oauth2-gs-${COMPOSE_PROJECT_NAME}.tls.certresolver=letsencrypt"
|
||||
|
||||
networks:
|
||||
traefik:
|
||||
name: traefik
|
||||
|
@ -33,6 +33,8 @@ import se.su.dsv.scipro.project.Project;
|
||||
import se.su.dsv.scipro.report.AbstractGradingCriterion;
|
||||
import se.su.dsv.scipro.report.GradingCriterionPointTemplate;
|
||||
import se.su.dsv.scipro.report.GradingReportTemplate;
|
||||
import se.su.dsv.scipro.reviewing.ReviewerAssignmentService;
|
||||
import se.su.dsv.scipro.reviewing.RoughDraftApprovalService;
|
||||
import se.su.dsv.scipro.security.auth.roles.Roles;
|
||||
import se.su.dsv.scipro.system.*;
|
||||
|
||||
@ -64,6 +66,12 @@ public class DataInitializer implements Lifecycle {
|
||||
@Inject
|
||||
private ReceiverConfigurationService receiverConfigurationService;
|
||||
|
||||
@Inject
|
||||
private RoughDraftApprovalService roughDraftApprovalService;
|
||||
|
||||
@Inject
|
||||
private ReviewerAssignmentService reviewerAssignmentService;
|
||||
|
||||
private static final String MAIL = "@example.com";
|
||||
|
||||
private static final String ADMIN = "admin";
|
||||
@ -110,6 +118,7 @@ public class DataInitializer implements Lifecycle {
|
||||
createMilestonesIfNotDone();
|
||||
createUsers();
|
||||
createProjects();
|
||||
createRoughDraftApproval();
|
||||
createPastFinalSeminar();
|
||||
setUpNotifications();
|
||||
}
|
||||
@ -118,6 +127,16 @@ public class DataInitializer implements Lifecycle {
|
||||
}
|
||||
}
|
||||
|
||||
private void createRoughDraftApproval() {
|
||||
roughDraftApprovalService.requestApproval(
|
||||
project2,
|
||||
new SimpleTextFile(project2.getHeadSupervisor(), "thesis.txt", "text/plain"),
|
||||
"Please approve"
|
||||
);
|
||||
|
||||
reviewerAssignmentService.assignReviewer(project2, eric_employee);
|
||||
}
|
||||
|
||||
private void setUpNotifications() {
|
||||
receiverConfigurationService.setReceiving(
|
||||
Notification.Type.FINAL_SEMINAR,
|
||||
@ -213,7 +232,8 @@ public class DataInitializer implements Lifecycle {
|
||||
project.addProjectParticipant(student2);
|
||||
project.addProjectParticipant(student1);
|
||||
project.addReviewer(reviewer);
|
||||
return save(project);
|
||||
save(project);
|
||||
return project;
|
||||
}
|
||||
|
||||
private void createUsers() {
|
||||
|
@ -4,6 +4,7 @@
|
||||
<wicket:panel>
|
||||
<strong>Current thesis:</strong> <span wicket:id="currentThesis">[thesis.pdf (2014-08-08)]</span><br>
|
||||
<strong>Status:</strong> <span wicket:id="currentStatus">[Undecided]</span> <br>
|
||||
<strong>Deadline:</strong> <span wicket:id="deadline">[Undecided]</span> <br>
|
||||
<strong>Supervisor comment:</strong> <span wicket:id="currentDecision.comment">[Undecided]</span> <br>
|
||||
<wicket:enclosure>
|
||||
<strong>Reason:</strong> <span wicket:id="currentReason">[I need more time]</span><br>
|
||||
|
@ -28,6 +28,7 @@ public class FinalSeminarApprovalProcessPanel extends GenericPanel<ReviewerAppro
|
||||
)
|
||||
);
|
||||
add(new EnumLabel<>("currentStatus", process.map(ReviewerApproval::getCurrentStatus)));
|
||||
add(new DateLabel("deadline", process.map(ReviewerApproval::getCurrentDeadline)));
|
||||
add(
|
||||
new MultiLineLabel(
|
||||
"currentDecision.comment",
|
||||
|
@ -10,6 +10,7 @@ import org.apache.wicket.model.LoadableDetachableModel;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import se.su.dsv.scipro.SciProTest;
|
||||
import se.su.dsv.scipro.components.DateLabel;
|
||||
import se.su.dsv.scipro.file.FileDescription;
|
||||
import se.su.dsv.scipro.file.FileReference;
|
||||
import se.su.dsv.scipro.project.Project;
|
||||
@ -44,6 +45,12 @@ public class FinalSeminarApprovalProcessPanelTest extends SciProTest {
|
||||
tester.assertModelValue(path(panel, "currentStatus"), finalSeminarApproval.getCurrentStatus());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shows_deadline() {
|
||||
tester.assertComponent(path(panel, "deadline"), DateLabel.class);
|
||||
tester.assertModelValue(path(panel, "deadline"), finalSeminarApproval.getCurrentDeadline());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shows_current_reason_if_a_decision_has_been_made() {
|
||||
startPanelWithApprovedFinalSeminar();
|
||||
|
@ -7,10 +7,10 @@ profile=DEV
|
||||
# No secrets available for branch deployment to branch.dsv.su.se
|
||||
# Will have to set up some mock API for this later
|
||||
service.grading.url=
|
||||
oauth.uri=
|
||||
oauth.clientId=
|
||||
oauth.clientSecret=
|
||||
oauth.redirectUri=
|
||||
oauth.uri=${OAUTH2_GS_AUTHORIZATION_URI:http://localhost:59734/authorize}
|
||||
oauth.clientId=${OAUTH2_CLIENT_ID:scipro}
|
||||
oauth.clientSecret=${OAUTH2_CLIENT_SECRET:s3cr3t}
|
||||
oauth.redirectUri=${OAUTH2_GS_CLIENT_REDIRECT_URI}
|
||||
|
||||
# No secrets available for branch deployment to branch.dsv.su.se
|
||||
# Will have to set up some mock API for this later
|
||||
|
Loading…
x
Reference in New Issue
Block a user