Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PoC of using Ladok mellanlager #370

Closed
Closed
6 changes: 5 additions & 1 deletion .env.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@ UG_REST_AUTH_API_TOKEN_URI=https://<LOGIN_HOST>/adfs/
UG_REST_AUTH_CLIENT_ID=[Available in Azure KeyVault]
UG_REST_AUTH_CLIENT_SECRET=[Available in Azure KeyVault]
UG_REST_API_URI=https://<UG_URL>
UG_REST_API_SUBSCRIPTION_KEY=[Available in Azure Integral or KeyVault]
UG_REST_API_SUBSCRIPTION_KEY=[Available in Azure Integral or KeyVault]

# Ladok Mellanlager connection
LADOK_AUTH_CLIENT_SECRET=
LADOK_OCP_APIM_SUBSCRIPTION_KEY=
13 changes: 13 additions & 0 deletions config/serverSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,19 @@ module.exports = {
kursutvecklingApi: unpackNodeApiConfig('KURSUTVECKLING_API_URI', devKursutvecklingApi),
},

// TODO(Ladok-POC): Replace devDefaults and add values to ref/prod.parameters.json when final mellanlager is deployed
ladokMellanlagerApi: {
clientId: getEnv('LADOK_AUTH_CLIENT_ID', devDefaults('fc1c0e6e-c17b-4b1c-9e34-003ca528740f')),
clientSecret: getEnv('LADOK_AUTH_CLIENT_SECRET', null),
tokenUrl: getEnv(
'LADOK_AUTH_TOKEN_URL',
devDefaults('https://login.microsoftonline.com/acd7f330-d613-48d9-85f2-258b1ac4a015/oauth2/v2.0/token')
),
scope: getEnv('LADOK_AUTH_SCOPE', devDefaults('api://97fe6696-a7b2-4f7f-adce-726426e35c1c/.default')),
baseUrl: getEnv('LADOK_BASE_URL', devDefaults('https://apim-mellanlagring2.azure-api.net')),
ocpApimSupscriptionKey: getEnv('LADOK_OCP_APIM_SUBSCRIPTION_KEY', null),
},

koppsApi: unpackKOPPSConfig('KOPPS_URI', devKoppsApi),

// TimeTableApi is not Kopps, but the unpacking works nevertheless
Expand Down
14 changes: 10 additions & 4 deletions i18n/messages.en.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,17 @@ module.exports = {
1: 'Spring ',
2: 'Autumn ',
},
// course_level_code_label: {
// PREPARATORY: 'Pre-university level',
// BASIC: 'First cycle',
// ADVANCED: 'Second cycle',
// RESEARCH: 'Third cycle',
// },
course_level_code_label: {
PREPARATORY: 'Pre-university level',
BASIC: 'First cycle',
ADVANCED: 'Second cycle',
RESEARCH: 'Third cycle',
// PREPARATORY: 'Pre-university level',
1: 'First cycle',
2: 'Second cycle',
3: 'Third cycle',
},
course_department: 'Offered by',
course_contact_name: 'Contact ',
Expand Down
16 changes: 12 additions & 4 deletions i18n/messages.se.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,19 @@ module.exports = {
1: 'VT ',
2: 'HT ',
},
// course_level_code_label: {
// PREPARATORY: 'Förberedande nivå',
// BASIC: 'Grundnivå',
// ADVANCED: 'Avancerad nivå',
// RESEARCH: 'Forskarnivå',
// },
// TODO(Ladok-POC): Use nameSv/nameEn from utbildningstyp.niva.inom.studieordning instead?
// TODO(Ladok-POC): level code doesn't work for PREPARATORY, look into ladok data more
course_level_code_label: {
PREPARATORY: 'Förberedande nivå',
BASIC: 'Grundnivå',
ADVANCED: 'Avancerad nivå',
RESEARCH: 'Forskarnivå',
// PREPARATORY: 'Förberedande nivå',
1: 'Grundnivå',
2: 'Avancerad nivå',
3: 'Forskarnivå',
},
course_department: 'Ges av',
course_contact_name: 'Kontaktperson',
Expand Down
52 changes: 27 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"kth-node-i18n": "^1.0.18",
"kth-node-redis": "^3.3.0",
"kth-style": "^10.3.3",
"om-kursen-ladok-client": "file:../studadm-om-kursen-packages/packages/om-kursen-ladok-client",
"react": "^18.3.1",
"react-data-table-component": "^7.6.2",
"react-dom": "^18.3.1",
Expand Down
Loading
Loading