Files
frontend-app-authoring/plugins/course-apps/live/factories/mockApiResponses.jsx
Braden MacDonald 3c661e15cb Convert "Pages & Resources" page to a plugin system (#638)
* feat: Make "Pages & Resources" course apps into plugins

* feat: move ora_settings

* feat: move proctoring

* feat: move progress

* feat: move teams

* feat: move wiki

* feat: move Xpert settings

* fix: add webpack.prod.config.js

* fix: clean up unused parts of package.json files

* feat: Add an error message when displaying a Course App Plugin fails

* chore: fix various eslint warnings

* chore: fix jest tests

* fix: error preventing "npm ci" from working

* feat: better tests for <SettingsComponent>

* chore: move xpert_unit_summary into same dir as other plugins

* fix: eslint-import-resolver-webpack is a dev dependency

* chore: move learning_assistant to be a plugin too

* feat: for compatibility, install 2U plugins by default

* fix: bug with learning_assistant package.json
2024-02-28 11:50:54 -05:00

87 lines
1.8 KiB
JavaScript

export const courseId = 'course-v1:edX+DemoX+Demo_Course';
export const initialState = {
courseDetail: {
courseId,
status: 'LOADED',
},
pagesAndResources: {
courseAppIds: [
'live',
],
loadingStatus: 'successful',
savingStatus: '',
courseAppsApiStatus: {},
courseAppSettings: {},
},
models: {
courseApps: {
live: {
id: 'live',
enabled: true,
name: 'Live',
description: 'Enable in-platform video conferencing by configuring live',
allowedOperations: {
enable: true,
configure: true,
},
documentationLinks: {
learnMoreConfiguration: '',
},
},
},
},
};
export const configurationProviders = (
emailSharing,
usernameSharing,
activeProvider,
hasFreeTier,
) => ({
providers: {
active: activeProvider || 'zoom',
available: {
zoom: {
features: [],
name: 'Zoom LTI PRO',
pii_sharing: {
email: emailSharing,
username: usernameSharing,
},
},
big_blue_button: {
additional_parameters: [],
features: [],
has_free_tier: hasFreeTier,
name: 'Big Blue Button',
},
},
},
});
export const generateLiveConfigurationApiResponse = (
enabled,
piiSharingAllowed,
providerType = 'zoom',
isFreeTier = undefined,
) => ({
course_key: courseId,
enabled,
lti_configuration: {
lti_1p1_client_key: 'consumer_key',
lti_1p1_client_secret: 'secret_key',
lti_1p1_launch_url: 'https://launch-url.com',
version: 'lti_1p1',
lti_config: {
additional_parameters: {
custom_instructor_email: 'launch@email.com',
},
},
},
pii_sharing_allowed: piiSharingAllowed,
provider_type: providerType,
free_tier: providerType === 'bigBlueButton' ? isFreeTier : undefined,
});