From 3346862694150fa88473298f2fd3225f247e9d86 Mon Sep 17 00:00:00 2001 From: Tom Zhao Date: Thu, 30 Jan 2025 09:24:56 +0100 Subject: [PATCH 1/6] 97: Short circuit authorization check so far to test --- .../se/su/dsv/scipro/grading/SupervisorGradingReportPage.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/view/src/main/java/se/su/dsv/scipro/grading/SupervisorGradingReportPage.java b/view/src/main/java/se/su/dsv/scipro/grading/SupervisorGradingReportPage.java index 9e2a5c6b97..1afdea363d 100644 --- a/view/src/main/java/se/su/dsv/scipro/grading/SupervisorGradingReportPage.java +++ b/view/src/main/java/se/su/dsv/scipro/grading/SupervisorGradingReportPage.java @@ -270,6 +270,7 @@ public class SupervisorGradingReportPage extends AbstractSupervisorProjectDetail @Override protected void onConfigure() { super.onConfigure(); + /* final Instant expiration = getSession().getMetaData(OAuth.EXPIRATION); final boolean validToken = expiration != null && expiration.isAfter(Instant.now()); if (!validToken) { @@ -280,5 +281,6 @@ public class SupervisorGradingReportPage extends AbstractSupervisorProjectDetail final String href = oAuthService.authorizeUrl(null, Set.of("grade:read", "grade:write")); throw new RedirectToUrlException(href); } + */ } } -- 2.39.5 From e84fc37cf68aab4372543e6c9c980678c6f9653e Mon Sep 17 00:00:00 2001 From: Tom Zhao Date: Thu, 30 Jan 2025 10:11:14 +0100 Subject: [PATCH 2/6] 97: Update supervisor view related code to reflect the latest grading criterions --- .../su/dsv/scipro/grading/TemplatePanel.html | 260 +++++++++++------- .../su/dsv/scipro/grading/TemplatePanel.java | 44 ++- 2 files changed, 204 insertions(+), 100 deletions(-) diff --git a/view/src/main/java/se/su/dsv/scipro/grading/TemplatePanel.html b/view/src/main/java/se/su/dsv/scipro/grading/TemplatePanel.html index 10a08fca07..06a3492e70 100644 --- a/view/src/main/java/se/su/dsv/scipro/grading/TemplatePanel.html +++ b/view/src/main/java/se/su/dsv/scipro/grading/TemplatePanel.html @@ -2,156 +2,226 @@ - -
-
-
-

- Omvandling från poäng till betyg för ett kandidatarbete görs enligt följande schema: -

+ +
+
+
+

+ Omvandling från poäng till betyg för ett kandidatarbete görs enligt följande schema: (varför svenska här?) +

-

[A] 28-26, at least 1 point on components U1-U12 and Ö1-Ö4, Ö6

+

[A] 31-29, at least 1 point on components U1-U12 and Ö1-Ö4, Ö6?

-

[B] 25-24, at least 1 point on components U1-U12 and Ö1-Ö3, Ö6

+

[B] 28-26, at least 1 point on components U1-U12 and Ö1-Ö3, Ö6?

-

[C] 23-20, at least 1 point on components U1-U12 and Ö1-Ö3, Ö6

+

[C] 25-22, at least 1 point on components U1-U12 and Ö1-Ö3, Ö6?

-

[D] 19-18, at least 1 point on components U1-U12 and Ö1-Ö3, Ö6

+

[D] 21-19, at least 1 point on components U1-U12 and Ö1-Ö3, Ö6?

-

[E] 17-16, at least 1 point on components U1-U12 and Ö1-Ö3, Ö6

+

[E] 18-16, at least 1 point on components U1-U12 and Ö1-Ö3, Ö6?

-

[Fx] at least 1 point on 8 of the components U1-U12 and at least 2 points altogether on components - Ö1-Ö3 -

+

[Fx] ???at least 1 point on 8 of the components U1-U12 and at least 2 points altogether on components + Ö1-Ö3??? +

+
-
-
-
-
-

- Conversion from points to grades is done according to the following schema: -

+
+
+
+

+ Conversion from points to grades is done according to the following schema: +

-

[A] 29-27, at least 1 point on components U1-U7, U10-U13 and Ö1-Ö4, Ö6, and at least 2 points on U8-U9

+

[A] 33-31, at least 1 point on components U1-U7, U10-U13 and Ö1-Ö4, Ö6, and at least 2 points on U8-U9?

-

[B] 26-25, at least 1 point on components U1-U7, U10-U13 and Ö1-Ö3, Ö6, and at least 2 points on U8-U9

+

[B] 30-28, at least 1 point on components U1-U7, U10-U13 and Ö1-Ö3, Ö6, and at least 2 points on U8-U9?

-

[C] 24-23, at least 1 point on components U1-U7, U10-U13 and Ö1-Ö3, Ö6, and at least 2 points on U8-U9

+

[C] 27-24, at least 1 point on components U1-U7, U10-U13 and Ö1-Ö3, Ö6, and at least 2 points on U8-U9?

-

[D] 22-21, at least 1 point on components U1-U7, U10-U13 and Ö1-Ö3, Ö6, and at least 2 points on U8-U9

+

[D] 23-21, at least 1 point on components U1-U7, U10-U13 and Ö1-Ö3, Ö6, and at least 2 points on U8-U9?

-

[E] 20-19, at least 1 point on components U1-U7, U10-U13 and Ö1-Ö3, Ö6, and at least 2 points on U8-U9

+

[E] 20-19, at least 1 point on components U1-U7, U10-U13 and Ö1-Ö3, Ö6, and at least 2 points on U8-U9?

-

[Fx] at least 1 point on 10 of the components U1-U13 and at least 2 points altogether on components Ö1-Ö3

+

[Fx] ???at least 1 point on 10 of the components U1-U13 and at least 2 points altogether on components Ö1-Ö3???

+
-
-
-
-
-

- Conversion from points to grades is done according to the following schema: - Updated 2017-02-20 -

+
+
+
+

+ Conversion from points to grades is done according to the following schema: +

-

[A] 33-31, at least 1 point on components U1-U4, U10-U12, Ö1-Ö4, Ö6, and at least 2 points on U5-U9, U13

+

[A] 37-35, at least 1 point on components U1-U4, U10-U12, Ö1-Ö4, Ö6, and at least 2 points on U5-U9, U13?

-

[B] 30-29, at least 1 point on components U1-U4, U10-U12, Ö1-Ö3, Ö6, and at least 2 points on U5-U9, U13

+

[B] 34-32, at least 1 point on components U1-U4, U10-U12, Ö1-Ö3, Ö6, and at least 2 points on U5-U9, U13?

-

[C] 28-27, at least 1 point on components U1-U4, U10-U12, Ö1-Ö3, Ö6, and at least 2 points on U5-U9, U13

+

[C] 31-28, at least 1 point on components U1-U4, U10-U12, Ö1-Ö3, Ö6, and at least 2 points on U5-U9, U13?

-

[D] 26-25, at least 1 point on components U1-U4, U10-U12, Ö1-Ö3, Ö6, and at least 2 points on U5-U9, U13

+

[D] 27-25, at least 1 point on components U1-U4, U10-U12, Ö1-Ö3, Ö6, and at least 2 points on U5-U9, U13?

-

[E] 24-23, at least 1 point on components U1-U4, U10-U12, Ö1-Ö3, Ö6, and at least 2 points on U5-U9, U13

+

[E] 25-23, at least 1 point on components U1-U4, U10-U12, Ö1-Ö3, Ö6, and at least 2 points on U5-U9, U13?

-

[Fx] at least 1 point on 12 of the components U1-U13 and at least 2 points altogether on components Ö1-Ö3

+

[Fx] ???at least 1 point on 12 of the components U1-U13 and at least 2 points altogether on components Ö1-Ö3???

+
+
+
+ + + +
+
+
+

+ Omvandling från poäng till betyg för ett kandidatarbete görs enligt följande schema: +

+ +

[A] 28-26, at least 1 point on components U1-U12 and Ö1-Ö4, Ö6

+ +

[B] 25-24, at least 1 point on components U1-U12 and Ö1-Ö3, Ö6

+ +

[C] 23-20, at least 1 point on components U1-U12 and Ö1-Ö3, Ö6

+ +

[D] 19-18, at least 1 point on components U1-U12 and Ö1-Ö3, Ö6

+ +

[E] 17-16, at least 1 point on components U1-U12 and Ö1-Ö3, Ö6

+ +

[Fx] at least 1 point on 8 of the components U1-U12 and at least 2 points altogether on components + Ö1-Ö3 +

+
+
+
+ +
+
+
+

+ Conversion from points to grades is done according to the following schema: +

+ +

[A] 29-27, at least 1 point on components U1-U7, U10-U13 and Ö1-Ö4, Ö6, and at least 2 points on U8-U9

+ +

[B] 26-25, at least 1 point on components U1-U7, U10-U13 and Ö1-Ö3, Ö6, and at least 2 points on U8-U9

+ +

[C] 24-23, at least 1 point on components U1-U7, U10-U13 and Ö1-Ö3, Ö6, and at least 2 points on U8-U9

+ +

[D] 22-21, at least 1 point on components U1-U7, U10-U13 and Ö1-Ö3, Ö6, and at least 2 points on U8-U9

+ +

[E] 20-19, at least 1 point on components U1-U7, U10-U13 and Ö1-Ö3, Ö6, and at least 2 points on U8-U9

+ +

[Fx] at least 1 point on 10 of the components U1-U13 and at least 2 points altogether on components Ö1-Ö3

+
+
+
+ +
+
+
+

+ Conversion from points to grades is done according to the following schema: + Updated 2017-02-20 +

+ +

[A] 33-31, at least 1 point on components U1-U4, U10-U12, Ö1-Ö4, Ö6, and at least 2 points on U5-U9, U13

+ +

[B] 30-29, at least 1 point on components U1-U4, U10-U12, Ö1-Ö3, Ö6, and at least 2 points on U5-U9, U13

+ +

[C] 28-27, at least 1 point on components U1-U4, U10-U12, Ö1-Ö3, Ö6, and at least 2 points on U5-U9, U13

+ +

[D] 26-25, at least 1 point on components U1-U4, U10-U12, Ö1-Ö3, Ö6, and at least 2 points on U5-U9, U13

+ +

[E] 24-23, at least 1 point on components U1-U4, U10-U12, Ö1-Ö3, Ö6, and at least 2 points on U5-U9, U13

+ +

[Fx] at least 1 point on 12 of the components U1-U13 and at least 2 points altogether on components Ö1-Ö3

+
-
-
-
-
-

- - Omvandling från poäng till betyg för ett kandidatarbete görs enligt följande - schema: - -

+
+
+
+

+ + Omvandling från poäng till betyg för ett kandidatarbete görs enligt följande + schema: + +

-

[A] 27-25, minst 1 poäng på komponenterna U1-U12 samt Ö1-Ö4

+

[A] 27-25, minst 1 poäng på komponenterna U1-U12 samt Ö1-Ö4

-

[B] 24-23, minst 1 poäng på komponenterna U1-U12 samt Ö1-Ö3

+

[B] 24-23, minst 1 poäng på komponenterna U1-U12 samt Ö1-Ö3

-

[C] 22-19, minst 1 poäng på komponenterna U1-U12 samt Ö1-Ö3

+

[C] 22-19, minst 1 poäng på komponenterna U1-U12 samt Ö1-Ö3

-

[D] 18-17, minst 1 poäng på komponenterna U1-U12 samt Ö1-Ö3

+

[D] 18-17, minst 1 poäng på komponenterna U1-U12 samt Ö1-Ö3

-

[E] 16-15, minst 1 poäng på komponenterna U1-U12 samt Ö1-Ö3

+

[E] 16-15, minst 1 poäng på komponenterna U1-U12 samt Ö1-Ö3

-

[Fx] minst 1 poäng på åtta av komponenterna U1-U12 och minst två poäng sammanlagt på - komponenterna Ö1-Ö3 -

+

[Fx] minst 1 poäng på åtta av komponenterna U1-U12 och minst två poäng sammanlagt på + komponenterna Ö1-Ö3 +

+
-
-
-
-
-

- - Omvandling från poäng till betyg för ett kandidatarbete görs enligt följande - schema: - -

+
+
+
+

+ + Omvandling från poäng till betyg för ett kandidatarbete görs enligt följande + schema: + +

-

[A] 28-26, minst 1 poäng på komponenterna U1-U7, U10-U13 samt Ö1-Ö4, minst 2 poäng på U8-U9

+

[A] 28-26, minst 1 poäng på komponenterna U1-U7, U10-U13 samt Ö1-Ö4, minst 2 poäng på U8-U9

-

[B] 25-24, minst 1 poäng på komponenterna U1-U7, U10-U13 samt Ö1-Ö3, minst 2 poäng på U8-U9

+

[B] 25-24, minst 1 poäng på komponenterna U1-U7, U10-U13 samt Ö1-Ö3, minst 2 poäng på U8-U9

-

[C] 23-22, minst 1 poäng på komponenterna U1-U7, U10-U13 samt Ö1-Ö3, minst 2 poäng på U8-U9

+

[C] 23-22, minst 1 poäng på komponenterna U1-U7, U10-U13 samt Ö1-Ö3, minst 2 poäng på U8-U9

-

[D] 21-20, minst 1 poäng på komponenterna U1-U7, U10-U13 samt Ö1-Ö3, minst 2 poäng på U8-U9

+

[D] 21-20, minst 1 poäng på komponenterna U1-U7, U10-U13 samt Ö1-Ö3, minst 2 poäng på U8-U9

-

[E] 19-18, minst 1 poäng på komponenterna U1-U7, U10-U13 samt Ö1-Ö3, minst 2 poäng på U8-U9

+

[E] 19-18, minst 1 poäng på komponenterna U1-U7, U10-U13 samt Ö1-Ö3, minst 2 poäng på U8-U9

-

[Fx] minst 1 poäng på tio av komponenterna U1-U13 och minst två poäng sammanlagt på komponenterna - Ö1-Ö3

+

[Fx] minst 1 poäng på tio av komponenterna U1-U13 och minst två poäng sammanlagt på komponenterna + Ö1-Ö3

+
-
-
-
-
-

- - Omvandling från poäng till betyg för ett kandidatarbete görs enligt följande - schema: - -

+
+
+
+

+ + Omvandling från poäng till betyg för ett kandidatarbete görs enligt följande + schema: + +

-

[A] 32-30, minst 1 poäng på komponenterna U1-U4, U10-U12, Ö1-Ö4, minst 2 poäng på U5-U9, U13

+

[A] 32-30, minst 1 poäng på komponenterna U1-U4, U10-U12, Ö1-Ö4, minst 2 poäng på U5-U9, U13

-

[B] 29-28, minst 1 poäng på komponenterna U1-U4, U10-U12, Ö1-Ö3, minst 2 poäng på U5-U9, U13

+

[B] 29-28, minst 1 poäng på komponenterna U1-U4, U10-U12, Ö1-Ö3, minst 2 poäng på U5-U9, U13

-

[C] 27-26, minst 1 poäng på komponenterna U1-U4, U10-U12, Ö1-Ö3, minst 2 poäng på U5-U9, U13

+

[C] 27-26, minst 1 poäng på komponenterna U1-U4, U10-U12, Ö1-Ö3, minst 2 poäng på U5-U9, U13

-

[D] 25-24, minst 1 poäng på komponenterna U1-U4, U10-U12, Ö1-Ö3, minst 2 poäng på U5-U9, U13

+

[D] 25-24, minst 1 poäng på komponenterna U1-U4, U10-U12, Ö1-Ö3, minst 2 poäng på U5-U9, U13

-

[E] 23-22, minst 1 poäng på komponenterna U1-U4, U10-U12, Ö1-Ö3, minst 2 poäng på U5-U9, U13

+

[E] 23-22, minst 1 poäng på komponenterna U1-U4, U10-U12, Ö1-Ö3, minst 2 poäng på U5-U9, U13

-

[Fx] minst 1 poäng på tolv av komponenterna U1-U13 och minst två poäng sammanlagt på komponenterna - Ö1-Ö3

+

[Fx] minst 1 poäng på tolv av komponenterna U1-U13 och minst två poäng sammanlagt på komponenterna + Ö1-Ö3

+
-
diff --git a/view/src/main/java/se/su/dsv/scipro/grading/TemplatePanel.java b/view/src/main/java/se/su/dsv/scipro/grading/TemplatePanel.java index d314162b13..629f8fc67c 100644 --- a/view/src/main/java/se/su/dsv/scipro/grading/TemplatePanel.java +++ b/view/src/main/java/se/su/dsv/scipro/grading/TemplatePanel.java @@ -6,12 +6,32 @@ import org.apache.wicket.model.IModel; import se.su.dsv.scipro.project.Project; import se.su.dsv.scipro.system.DegreeType; +import java.time.LocalDate; + public class TemplatePanel extends Panel { public static final String BACHELOR_CONTAINER = "bachelorContainer"; public static final String MASTER_15_CONTAINER = "master15Container"; public static final String MASTER_30_CONTAINER = "master30Container"; + private enum GradingCategory { + UP_TO_2016, + BETWEEN_2017_202410, + FROM_202411; + + public static GradingCategory fromProjectStartDate(LocalDate projectStartDate) { + int year = projectStartDate.getYear(); + int month = projectStartDate.getMonthValue(); + + if (year < 2017) { + return UP_TO_2016; + } else { + return (year <= 2024 && month < 11) ? BETWEEN_2017_202410 : FROM_202411; + } + + } + } + public TemplatePanel(String id, final IModel projectIModel) { super(id, projectIModel); final DegreeType degreeType = projectIModel.getObject().getProjectType().getDegreeType(); @@ -20,20 +40,34 @@ public class TemplatePanel extends Panel { @Override protected void onConfigure() { super.onConfigure(); - setVisibilityAllowed(getYear(projectIModel.getObject()) < 2017); + setVisibilityAllowed(GradingCategory.fromProjectStartDate(projectIModel.getObject().getStartDate()) + == GradingCategory.UP_TO_2016); } }; addTemplates(degreeType, upto16); add(upto16); - final WebMarkupContainer from2017 = new WebMarkupContainer("from2017") { + + final WebMarkupContainer between2017_202410 = new WebMarkupContainer("between2017_202410") { @Override protected void onConfigure() { super.onConfigure(); - setVisibilityAllowed(getYear(projectIModel.getObject()) >= 2017); + setVisibilityAllowed(GradingCategory.fromProjectStartDate(projectIModel.getObject().getStartDate()) + == GradingCategory.BETWEEN_2017_202410); } }; - addTemplates(degreeType, from2017); - add(from2017); + addTemplates(degreeType, between2017_202410); + add(between2017_202410); + + final WebMarkupContainer from202411 = new WebMarkupContainer("from202411") { + @Override + protected void onConfigure() { + super.onConfigure(); + setVisibilityAllowed(GradingCategory.fromProjectStartDate(projectIModel.getObject().getStartDate()) + == GradingCategory.FROM_202411); + } + }; + addTemplates(degreeType, from202411); + add(from202411); } private void addTemplates(final DegreeType degreeType, final WebMarkupContainer container) { -- 2.39.5 From 4c5e6ab961bd16ce5988dc8cb41b850ac4e939c2 Mon Sep 17 00:00:00 2001 From: Tom Zhao Date: Thu, 30 Jan 2025 10:14:06 +0100 Subject: [PATCH 3/6] 97: Reformatting code --- .../su/dsv/scipro/grading/TemplatePanel.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/view/src/main/java/se/su/dsv/scipro/grading/TemplatePanel.java b/view/src/main/java/se/su/dsv/scipro/grading/TemplatePanel.java index 629f8fc67c..43cfe95b3e 100644 --- a/view/src/main/java/se/su/dsv/scipro/grading/TemplatePanel.java +++ b/view/src/main/java/se/su/dsv/scipro/grading/TemplatePanel.java @@ -1,13 +1,12 @@ package se.su.dsv.scipro.grading; +import java.time.LocalDate; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.model.IModel; import se.su.dsv.scipro.project.Project; import se.su.dsv.scipro.system.DegreeType; -import java.time.LocalDate; - public class TemplatePanel extends Panel { public static final String BACHELOR_CONTAINER = "bachelorContainer"; @@ -28,7 +27,6 @@ public class TemplatePanel extends Panel { } else { return (year <= 2024 && month < 11) ? BETWEEN_2017_202410 : FROM_202411; } - } } @@ -40,8 +38,10 @@ public class TemplatePanel extends Panel { @Override protected void onConfigure() { super.onConfigure(); - setVisibilityAllowed(GradingCategory.fromProjectStartDate(projectIModel.getObject().getStartDate()) - == GradingCategory.UP_TO_2016); + setVisibilityAllowed( + GradingCategory.fromProjectStartDate(projectIModel.getObject().getStartDate()) == + GradingCategory.UP_TO_2016 + ); } }; addTemplates(degreeType, upto16); @@ -51,8 +51,10 @@ public class TemplatePanel extends Panel { @Override protected void onConfigure() { super.onConfigure(); - setVisibilityAllowed(GradingCategory.fromProjectStartDate(projectIModel.getObject().getStartDate()) - == GradingCategory.BETWEEN_2017_202410); + setVisibilityAllowed( + GradingCategory.fromProjectStartDate(projectIModel.getObject().getStartDate()) == + GradingCategory.BETWEEN_2017_202410 + ); } }; addTemplates(degreeType, between2017_202410); @@ -62,8 +64,10 @@ public class TemplatePanel extends Panel { @Override protected void onConfigure() { super.onConfigure(); - setVisibilityAllowed(GradingCategory.fromProjectStartDate(projectIModel.getObject().getStartDate()) - == GradingCategory.FROM_202411); + setVisibilityAllowed( + GradingCategory.fromProjectStartDate(projectIModel.getObject().getStartDate()) == + GradingCategory.FROM_202411 + ); } }; addTemplates(degreeType, from202411); @@ -99,8 +103,4 @@ public class TemplatePanel extends Panel { } ); } - - private int getYear(final Project project) { - return project.getStartDate().getYear(); - } } -- 2.39.5 From b990b65b20c5bd3b4372e497fe89a3d47746426b Mon Sep 17 00:00:00 2001 From: Tom Zhao Date: Thu, 30 Jan 2025 10:26:17 +0100 Subject: [PATCH 4/6] 97: Update test code for TempaltePanel --- .../dsv/scipro/grading/TemplatePanelTest.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/view/src/test/java/se/su/dsv/scipro/grading/TemplatePanelTest.java b/view/src/test/java/se/su/dsv/scipro/grading/TemplatePanelTest.java index cfcdb6977a..0c83b129bb 100644 --- a/view/src/test/java/se/su/dsv/scipro/grading/TemplatePanelTest.java +++ b/view/src/test/java/se/su/dsv/scipro/grading/TemplatePanelTest.java @@ -18,54 +18,56 @@ public class TemplatePanelTest extends SciProTest { public static final ProjectType BACHELOR = new ProjectType(DegreeType.BACHELOR, "Bachelor", "Bachelor"); public static final ProjectType MASTER = new ProjectType(DegreeType.MASTER, "Master", "Master"); public static final ProjectType MAGISTER = new ProjectType(DegreeType.MAGISTER, "Magister", "Magister"); + + private static final String key = "between2017_202410"; private TemplatePanel panel; @Test public void bachelor_container_visible_if_bachelor_project() { startPanel(BACHELOR, 15); - tester.assertVisible(path(panel, "from2017", BACHELOR_CONTAINER)); + tester.assertVisible(path(panel, key, BACHELOR_CONTAINER)); } @Test public void bachelor_container_invisible_if_not_bachelor_project() { startPanel(MASTER, 15); - tester.assertInvisible(path(panel, "from2017", BACHELOR_CONTAINER)); + tester.assertInvisible(path(panel, key, BACHELOR_CONTAINER)); } @Test public void magister_container_visible_if_magister_project() { startPanel(MAGISTER, 15); - tester.assertVisible(path(panel, "from2017", MASTER_15_CONTAINER)); + tester.assertVisible(path(panel, key, MASTER_15_CONTAINER)); } @Test public void magister_container_invisible_if_not_magister() { startPanel(BACHELOR, 15); - tester.assertInvisible(path(panel, "from2017", MASTER_15_CONTAINER)); + tester.assertInvisible(path(panel, key, MASTER_15_CONTAINER)); } @Test public void magister_container_invisible_if_wrong_credits() { startPanel(MASTER, 30); - tester.assertInvisible(path(panel, "from2017", MASTER_15_CONTAINER)); + tester.assertInvisible(path(panel, key, MASTER_15_CONTAINER)); } @Test public void master_30_container_visible_if_master_30_project() { startPanel(MASTER, 30); - tester.assertVisible(path(panel, "from2017", MASTER_30_CONTAINER)); + tester.assertVisible(path(panel, key, MASTER_30_CONTAINER)); } @Test public void master_30_container_invisible_if_not_master() { startPanel(BACHELOR, 30); - tester.assertInvisible(path(panel, "from2017", MASTER_30_CONTAINER)); + tester.assertInvisible(path(panel, key, MASTER_30_CONTAINER)); } @Test public void master_30_container_visible_if_master_and_0_credits() { startPanel(MASTER, 0); - tester.assertVisible(path(panel, "from2017", MASTER_30_CONTAINER)); + tester.assertVisible(path(panel, key, MASTER_30_CONTAINER)); } private void startPanel(ProjectType projectType, int credits) { -- 2.39.5 From 0355c829a10fa0784fefecac26c514ceb855dbae Mon Sep 17 00:00:00 2001 From: Tom Zhao Date: Thu, 30 Jan 2025 14:27:20 +0100 Subject: [PATCH 5/6] 97: Remove old info from previous grading creterion --- .../su/dsv/scipro/grading/TemplatePanel.html | 71 +++++++++---------- 1 file changed, 33 insertions(+), 38 deletions(-) diff --git a/view/src/main/java/se/su/dsv/scipro/grading/TemplatePanel.html b/view/src/main/java/se/su/dsv/scipro/grading/TemplatePanel.html index 06a3492e70..6d0555bf10 100644 --- a/view/src/main/java/se/su/dsv/scipro/grading/TemplatePanel.html +++ b/view/src/main/java/se/su/dsv/scipro/grading/TemplatePanel.html @@ -3,70 +3,65 @@ -
-
-
-

- Omvandling från poäng till betyg för ett kandidatarbete görs enligt följande schema: (varför svenska här?) -

- -

[A] 31-29, at least 1 point on components U1-U12 and Ö1-Ö4, Ö6?

- -

[B] 28-26, at least 1 point on components U1-U12 and Ö1-Ö3, Ö6?

- -

[C] 25-22, at least 1 point on components U1-U12 and Ö1-Ö3, Ö6?

- -

[D] 21-19, at least 1 point on components U1-U12 and Ö1-Ö3, Ö6?

- -

[E] 18-16, at least 1 point on components U1-U12 and Ö1-Ö3, Ö6?

- -

[Fx] ???at least 1 point on 8 of the components U1-U12 and at least 2 points altogether on components - Ö1-Ö3??? -

-
-
-
- -
+

Conversion from points to grades is done according to the following schema:

-

[A] 33-31, at least 1 point on components U1-U7, U10-U13 and Ö1-Ö4, Ö6, and at least 2 points on U8-U9?

+

[A] 31-29

-

[B] 30-28, at least 1 point on components U1-U7, U10-U13 and Ö1-Ö3, Ö6, and at least 2 points on U8-U9?

+

[B] 28-26

-

[C] 27-24, at least 1 point on components U1-U7, U10-U13 and Ö1-Ö3, Ö6, and at least 2 points on U8-U9?

+

[C] 25-22

-

[D] 23-21, at least 1 point on components U1-U7, U10-U13 and Ö1-Ö3, Ö6, and at least 2 points on U8-U9?

+

[D] 21-19

-

[E] 20-19, at least 1 point on components U1-U7, U10-U13 and Ö1-Ö3, Ö6, and at least 2 points on U8-U9?

+

[E] 18-16

-

[Fx] ???at least 1 point on 10 of the components U1-U13 and at least 2 points altogether on components Ö1-Ö3???

-
+

Conversion from points to grades is done according to the following schema:

-

[A] 37-35, at least 1 point on components U1-U4, U10-U12, Ö1-Ö4, Ö6, and at least 2 points on U5-U9, U13?

+

[A] 33-31

-

[B] 34-32, at least 1 point on components U1-U4, U10-U12, Ö1-Ö3, Ö6, and at least 2 points on U5-U9, U13?

+

[B] 30-28

-

[C] 31-28, at least 1 point on components U1-U4, U10-U12, Ö1-Ö3, Ö6, and at least 2 points on U5-U9, U13?

+

[C] 27-24

-

[D] 27-25, at least 1 point on components U1-U4, U10-U12, Ö1-Ö3, Ö6, and at least 2 points on U5-U9, U13?

+

[D] 23-21

-

[E] 25-23, at least 1 point on components U1-U4, U10-U12, Ö1-Ö3, Ö6, and at least 2 points on U5-U9, U13?

+

[E] 20-19

+ +
+
+
+ +
+
+
+

+ Conversion from points to grades is done according to the following schema: +

+ +

[A] 37-35

+ +

[B] 34-32

+ +

[C] 31-28

+ +

[D] 27-25

+ +

[E] 25-23

-

[Fx] ???at least 1 point on 12 of the components U1-U13 and at least 2 points altogether on components Ö1-Ö3???

-- 2.39.5 From 1b6fd8a17bd54af52e17e04056ed9b1ccafbab71 Mon Sep 17 00:00:00 2001 From: Tom Zhao Date: Thu, 30 Jan 2025 14:38:40 +0100 Subject: [PATCH 6/6] 97: Reactivate authorization --- .../se/su/dsv/scipro/grading/SupervisorGradingReportPage.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/view/src/main/java/se/su/dsv/scipro/grading/SupervisorGradingReportPage.java b/view/src/main/java/se/su/dsv/scipro/grading/SupervisorGradingReportPage.java index 1afdea363d..9e2a5c6b97 100644 --- a/view/src/main/java/se/su/dsv/scipro/grading/SupervisorGradingReportPage.java +++ b/view/src/main/java/se/su/dsv/scipro/grading/SupervisorGradingReportPage.java @@ -270,7 +270,6 @@ public class SupervisorGradingReportPage extends AbstractSupervisorProjectDetail @Override protected void onConfigure() { super.onConfigure(); - /* final Instant expiration = getSession().getMetaData(OAuth.EXPIRATION); final boolean validToken = expiration != null && expiration.isAfter(Instant.now()); if (!validToken) { @@ -281,6 +280,5 @@ public class SupervisorGradingReportPage extends AbstractSupervisorProjectDetail final String href = oAuthService.authorizeUrl(null, Set.of("grade:read", "grade:write")); throw new RedirectToUrlException(href); } - */ } } -- 2.39.5