Skip to content

Commit 2a2cc15

Browse files
authored
Merge pull request #87 from SafeExamBrowser/SEBSERV-787__exam-template-list
SEBSERV-787: exam template list (partial)
2 parents dc20654 + b993908 commit 2a2cc15

7 files changed

Lines changed: 14 additions & 279 deletions

File tree

client/src/components/views/seb-server/exam-template/wizard/CreateExamTemplateWizard.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
:title="$t('titles.createTemplateExam')"
44
:bread-crumb="[
55
{
6-
label: $t('titles.createTemplate'),
6+
label: $t('titles.examTemplateList'),
7+
link: resolveRoutePath('ExamTemplateList'),
8+
},
9+
{
10+
label: $t('titles.createTemplateExam'),
711
link: resolveRoutePath('CreateExamTemplateWizard'),
812
},
913
{ label: store.currentStep.title },

client/src/components/views/seb-server/home/HomePageMain.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
color="primary"
2727
data-testid="homePageMain-createTemplates-startNow-button"
2828
rounded="sm"
29-
:to="constants.CREATE_TEMPLATE_ROUTE"
29+
:to="resolveRoutePath('CreateExamTemplateWizard')"
3030
variant="flat"
3131
>
3232
{{ translate("homePage.startNow") }}
@@ -97,6 +97,7 @@
9797
</template>
9898

9999
<script setup lang="ts">
100+
import { resolveRoutePath } from "@/router/navigation";
100101
import * as constants from "@/utils/constants";
101102
import { translate } from "@/utils/generalUtils";
102103
</script>

client/src/components/views/seb-server/template/CreateTemplate.vue

Lines changed: 0 additions & 242 deletions
This file was deleted.

client/src/components/widgets/navigationWidgets/navigationSections.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { translate } from "@/utils/generalUtils";
44
import { GUIComponent } from "@/services/ability";
55
import { NavigationSectionItem } from "@/components/widgets/navigationWidgets/navigationTypes.ts";
66
import { getRouteName } from "@/router/routeNames";
7+
import { resolveRoutePath } from "@/router/navigation";
78

89
type AbilityLike = {
910
canView: (component: GUIComponent) => boolean;
@@ -46,8 +47,8 @@ export function buildPreparationNavigationItems(
4647
): NavigationSectionItem[] {
4748
return [
4849
{
49-
label: translate("titles.createTemplate"),
50-
to: constants.CREATE_TEMPLATE_ROUTE,
50+
label: translate("titles.createTemplateExam"),
51+
to: resolveRoutePath("CreateExamTemplateWizard"),
5152
testId: `${testIdPrefix}-createTemplate-link`,
5253
},
5354
{
@@ -60,9 +61,9 @@ export function buildPreparationNavigationItems(
6061
testId: `${testIdPrefix}-addExamWithURL-text`,
6162
},
6263
{
63-
label: translate("titles.editExamTemplate"),
64-
to: constants.CREATE_TEMPLATE_ROUTE,
65-
testId: `${testIdPrefix}-editExamTemplate-link`,
64+
label: translate("titles.examTemplateList"),
65+
to: resolveRoutePath("ExamTemplateList"),
66+
testId: `${testIdPrefix}-examTemplateList-link`,
6667
},
6768
];
6869
}

client/src/i18n/locales/en.json

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
},
133133

134134
"homePage": {
135-
"createTemplates": "Create\n Template",
135+
"createTemplates": "Create Exam Template",
136136
"prepareExam": "Prepare\n Exam",
137137

138138
"monitorExams": "Monitor\n Exam",
@@ -901,17 +901,6 @@
901901
"KEY_CERT_SIGN": "CA"
902902
}
903903
},
904-
905-
"templates": {
906-
"createTemplate": {
907-
"info": "What kind of template do you want to create?",
908-
"configurationTemplateTitle": "SEB Client Template",
909-
"configurationTemplateTeaser": "In the SEB Client Template you define the SEB Settings. These are sent to the SEB clients installed on the students' devices. The SEB clients then reconfigure using these settings. The SEB Client Template is needed to set up an Exam Template.",
910-
"examTemplateTitle": "Exam Template",
911-
"examTemplateTeaser": "In the Exam Template you define everything needed to prepare an exam in SEB Server. You define which SEB Settings will be used by selecting a SEB Client Template. You also define which Connection Configuration to be used. By choosing Exam Supervisors, you decide, who shall supervise the exam. You also define which indicators and which groups shall be used, when applying this Exam Template to an exam. If there is no SEB Client Template, nor a Connection Configuration, please create these first."
912-
}
913-
},
914-
915904
"sebSettings": {
916905
"pwdMismatch": "The password and confirm password must match",
917906
"pwdSpaces": "The value must not start or end with a space.",
@@ -1843,7 +1832,6 @@
18431832
"overview": "Overview",
18441833
"clientList": "Client List",
18451834
"quizImport": "Prepare Exam",
1846-
"createTemplate": "Create Template",
18471835
"createTemplateExam": "Create Exam Template",
18481836
"addExamWithURL": "Add Exam With URL",
18491837
"followUp": "Follow Up",

client/src/router/router.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -245,17 +245,6 @@ const routes: Array<RouteRecordRaw> = [
245245
meta: { titleKey: "titles.certificates" },
246246
},
247247

248-
// ---------- templates ----------
249-
{
250-
path: constants.CREATE_TEMPLATE_ROUTE,
251-
name: "CreateTemplate",
252-
component: () =>
253-
import(
254-
"@/components/views/seb-server/template/CreateTemplate.vue"
255-
),
256-
meta: { titleKey: "titles.createTemplate" },
257-
},
258-
// this is alain change
259248
// ---------- exam templates ----------
260249
{
261250
path: "/exam-template",

client/src/utils/constants.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,6 @@ export const CERTIFICATES_ROUTE: string = "/certificates";
5656

5757
// export const USER_ACCOUNTS_ROUTE: string = MONITORING_ROUTE + "/userAccounts";
5858

59-
// templates
60-
export const TEMPLATE_ROUTE = "/templates";
61-
export const CREATE_TEMPLATE_ROUTE = TEMPLATE_ROUTE + "/create";
62-
export const CREATE_SEB_CLIENT_TEMPLATE_ROUTE =
63-
CREATE_TEMPLATE_ROUTE + "/seb-client";
64-
6559
export const QUIZ_IMPORT_ROUTE: string = "/quiz-import";
6660

6761
type I18nLike = { t: (key: string, ...args: unknown[]) => string };

0 commit comments

Comments
 (0)