Skip to content

Commit

Permalink
adding TRAINING_URL env var for different state training locations
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSchuhmacher committed Aug 5, 2024
1 parent 4925cd3 commit 76d62e3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions apps/server/src/modules/server/api/dto/config.response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ export class ConfigResponse {
@ApiProperty()
SC_TITLE: string;

@ApiProperty()
TRAINING_URL: string;

@ApiProperty()
FEATURE_MEDIA_SHELF_ENABLED: boolean;

Expand Down Expand Up @@ -260,6 +263,7 @@ export class ConfigResponse {
this.DOCUMENT_BASE_DIR = config.DOCUMENT_BASE_DIR;
this.SC_THEME = config.SC_THEME;
this.SC_TITLE = config.SC_TITLE;
this.TRAINING_URL = config.TRAINING_URL;
this.FEATURE_NEW_SCHOOL_ADMINISTRATION_PAGE_AS_DEFAULT_ENABLED =
config.FEATURE_NEW_SCHOOL_ADMINISTRATION_PAGE_AS_DEFAULT_ENABLED;
this.MIGRATION_END_GRACE_PERIOD_MS = config.MIGRATION_END_GRACE_PERIOD_MS;
Expand Down
1 change: 1 addition & 0 deletions apps/server/src/modules/server/api/test/server.api.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ describe('Server Controller (API)', () => {
'ROCKETCHAT_SERVICE_ENABLED',
'SC_THEME',
'SC_TITLE',
'TRAINING_URL',
'TEACHER_STUDENT_VISIBILITY__IS_CONFIGURABLE',
'TEACHER_STUDENT_VISIBILITY__IS_ENABLED_BY_DEFAULT',
'TEACHER_STUDENT_VISIBILITY__IS_VISIBLE',
Expand Down
2 changes: 2 additions & 0 deletions apps/server/src/modules/server/server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export interface ServerConfig
DOCUMENT_BASE_DIR: string;
SC_THEME: SchulcloudTheme;
SC_TITLE: string;
TRAINING_URL: string;
FEATURE_SHOW_OUTDATED_USERS: boolean;
FEATURE_NEW_SCHOOL_ADMINISTRATION_PAGE_AS_DEFAULT_ENABLED: boolean;
FEATURE_ENABLE_LDAP_SYNC_DURING_MIGRATION: boolean;
Expand Down Expand Up @@ -172,6 +173,7 @@ const config: ServerConfig = {
SC_THEME: Configuration.get('SC_THEME') as SchulcloudTheme,
SC_TITLE: Configuration.get('SC_TITLE') as string,
SC_DOMAIN: Configuration.get('SC_DOMAIN') as string,
TRAINING_URL: Configuration.get('TRAINING_URL') as string,
INCOMING_REQUEST_TIMEOUT: Configuration.get('INCOMING_REQUEST_TIMEOUT_API') as number,
INCOMING_REQUEST_TIMEOUT_COPY_API: Configuration.get('INCOMING_REQUEST_TIMEOUT_COPY_API') as number,
NEST_LOG_LEVEL: Configuration.get('NEST_LOG_LEVEL') as string,
Expand Down
5 changes: 5 additions & 0 deletions config/default.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,11 @@
"type": "string",
"description": "The Schulcloud domain."
},
"TRAINING_URL": {
"type": "string",
"default": "https://lernen.dbildungscloud.de",
"description": "URL for the platform training material"
},
"FEATURE_ADMIN_TOGGLE_STUDENT_LERNSTORE_VIEW_ENABLED": {
"type": "boolean",
"default": true,
Expand Down
3 changes: 2 additions & 1 deletion config/development.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,6 @@
"BOARD_COLLABORATION_URI": "ws://localhost:4450",
"ADMIN_API": {
"ALLOWED_API_KEYS": "thisisasupersecureapikeythatisabsolutelysave"
}
},
"TRAINING_URL": "https://lernen.dbildungscloud.de"
}

0 comments on commit 76d62e3

Please sign in to comment.