@windward/integrations 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/components/Content/Blocks/ExternalIntegration/LtiConsumer.vue +15 -0
  2. package/components/ExternalIntegration/Driver/Lti1p1/ManageConsumer.vue +3 -7
  3. package/components/ExternalIntegration/Driver/Lti1p1/ManageConsumers.vue +10 -14
  4. package/components/ExternalIntegration/Driver/Lti1p1/ManageProvider.vue +28 -21
  5. package/components/ExternalIntegration/Driver/Lti1p1/ManageProviders.vue +25 -11
  6. package/components/ExternalIntegration/Driver/Lti1p3/ManageProvider.vue +445 -0
  7. package/components/ExternalIntegration/Driver/Lti1p3/ManageProviders.vue +259 -0
  8. package/components/ExternalIntegration/Driver/ManageLti1p1.vue +2 -2
  9. package/components/ExternalIntegration/Driver/ManageLti1p3.vue +45 -0
  10. package/components/ExternalIntegration/ProviderTargetPicker.vue +21 -37
  11. package/components/Integration/Driver/ManageAtutor.vue +15 -0
  12. package/components/Integration/JobLog.vue +98 -0
  13. package/components/Integration/JobTable.vue +15 -1
  14. package/i18n/en-US/components/content/blocks/external_integration/lti_consumer.ts +2 -0
  15. package/i18n/en-US/components/external_integration/driver/lti1p1.ts +0 -21
  16. package/i18n/en-US/components/external_integration/driver/lti1p3.ts +13 -0
  17. package/i18n/en-US/components/external_integration/index.ts +26 -1
  18. package/i18n/en-US/components/integration/driver.ts +1 -0
  19. package/i18n/en-US/components/integration/job.ts +3 -0
  20. package/i18n/en-US/pages/login/lti.ts +1 -1
  21. package/models/ExternalIntegration/{Lti1p1Provider.ts → LtiProvider.ts} +2 -2
  22. package/package.json +1 -1
  23. package/pages/admin/importCourse.vue +1 -1
  24. package/pages/admin/vendors.vue +3 -2
  25. package/pages/course/externalIntegration/index.vue +4 -3
  26. package/plugin.js +48 -1
  27. package/test/Components/ExternalIntegration/Lti1p3/ManageProvider.spec.js +19 -0
  28. package/test/Components/ExternalIntegration/Lti1p3/ManageProviders.spec.js +19 -0
  29. package/test/Components/ExternalIntegration/ManageLti1p3.spec.js +19 -0
  30. package/test/Components/ExternalIntegration/ProviderTargetPicker.spec.js +1 -1
  31. package/test/Components/Integration/JobLog.spec.js +22 -0
  32. package/test/Components/Integration/JobTable.spec.js +23 -0
  33. package/test/__mocks__/componentsMock.js +12 -0
  34. package/test/mocks.js +12 -0
@@ -0,0 +1,13 @@
1
+ export default {
2
+ key: 'Key',
3
+ tool_public_keyset_url: 'Tool Keyset Url',
4
+ tool_oidc_auth_endpoint: 'Tool OpenID Connect Endpoint',
5
+ platform_public_keyset_url: 'Platform Keyset Url',
6
+ platform_oidc_auth_endpoint: 'Platform OpenID Connect Endpoint',
7
+ platform_client_id: 'Platform Client ID',
8
+ platform_deployment_id: 'Platform Deployment ID',
9
+ parameter_name: 'Custom Parameter Name',
10
+ value: 'Value',
11
+ new: 'New LTI Link',
12
+ edit: 'Edit LTI Link',
13
+ }
@@ -1,6 +1,31 @@
1
1
  import lti1p1 from './driver/lti1p1'
2
+ import lti1p3 from './driver/lti1p3'
2
3
  import providerTarget from './provider_target'
3
4
  export default {
4
- driver: { lti1p1 },
5
+ driver: { lti1p1, lti1p3 },
5
6
  provider_target: providerTarget,
7
+
8
+ provider_panel_title: 'Provider (Students incoming to Windward)',
9
+ consumer_panel_title: 'Consumer (Students outgoing from Windward)',
10
+
11
+ target: 'Target',
12
+ target_url: 'Target Url',
13
+ launch_url: 'Launch Url',
14
+
15
+ send_grades: 'Send grades to host LMS',
16
+ grade_sync: 'Grade Sync',
17
+ provider: 'Provider',
18
+ consumer: 'Consumer',
19
+
20
+ role_map_panel: 'Role map',
21
+ role_in_host: 'Role in Host LMS',
22
+ role_in_local: 'Role in Windward',
23
+ remote_role: 'Remote Role name',
24
+ map_to_role: 'Map to Windward Role',
25
+ delete_role_map_item: 'Delete role map item',
26
+ add_role_map_item: 'Add role map item',
27
+ role_map_instructions:
28
+ 'Only add roles to the below map if the host LMS uses different role names that you want to elevated permissions. Eg "Mentor" that you want to elevate to "External Instructor"',
29
+ role_map_warning:
30
+ 'Only add roles to the below map if the host LMS uses different role names that you want to elevated permissions. Eg "Mentor" that you want to elevate to "External Instructor"',
6
31
  }
@@ -8,6 +8,7 @@ export default {
8
8
  aws_secure_url: 'AWS CDN Url',
9
9
  aws_secure_url_hint: 'Eg: https://cdn-d.mindedgecollege.com',
10
10
  },
11
+ remove_slash: 'Remove / at end of url',
11
12
  atutor_wgu: {
12
13
  manage_dialog_title: 'Manage ATutor WGU Integration',
13
14
  },
@@ -8,6 +8,9 @@ export default {
8
8
  progress: 'Progress',
9
9
  created: 'Created',
10
10
  details: 'Details',
11
+ started: 'Date started',
12
+ view_log: 'View Log',
13
+ log_no_results: 'No results found',
11
14
  job_details: {
12
15
  none: 'No details available',
13
16
  import_course: "Importing Course Id {0} '{1}'",
@@ -4,7 +4,7 @@ export default {
4
4
  missing_title: 'The below fields are missing:',
5
5
  error_title: 'The below errors occurred:',
6
6
  error: {
7
- unknown: 'An unknown error occurred',
7
+ unknown: 'An unknown communication error occurred',
8
8
  organization: 'Invalid organization',
9
9
  tool: 'Invalid tool id',
10
10
  tool_organization: 'This tool does not belong to this organization',
@@ -1,13 +1,13 @@
1
1
  // @ts-ignore
2
2
  import Model from '~/models/Model'
3
3
 
4
- export default class Lti1p1Provider extends Model {
4
+ export default class LtiProvider extends Model {
5
5
  get required(): string[] {
6
6
  return []
7
7
  }
8
8
 
9
9
  // Set the resource route of the model
10
10
  resource() {
11
- return 'external-integrations/lti/1.1/providers'
11
+ return 'external-integrations/lti/providers'
12
12
  }
13
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windward/integrations",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "Windward UI Plugin Integrations for 3rd Party Systems",
5
5
  "main": "plugin.js",
6
6
  "scripts": {
@@ -164,13 +164,13 @@
164
164
  <script>
165
165
  import _ from 'lodash'
166
166
  import { mapGetters } from 'vuex'
167
- import Course from '~/models/Course'
168
167
  import Organization from '../../models/Organization'
169
168
  import OrganizationIntegration from '../../models/OrganizationIntegration'
170
169
  import RemoteOrganization from '../../models/RemoteOrganization'
171
170
  import RemoteCourse from '../../models/RemoteCourse'
172
171
  import RemoteContent from '../../models/RemoteContent'
173
172
  import IntegrationJobTable from '../../components/Integration/JobTable.vue'
173
+ import Course from '~/models/Course'
174
174
 
175
175
  export default {
176
176
  name: 'PluginIntegrationsAdminImportCoursePage',
@@ -1,5 +1,6 @@
1
1
  <template>
2
2
  <div>
3
+ <Breadcrumbs></Breadcrumbs>
3
4
  <v-row justify="center" align="center">
4
5
  <v-col cols="12">
5
6
  <div class="d-flex mb-5">
@@ -150,14 +151,14 @@
150
151
  <script>
151
152
  import _ from 'lodash'
152
153
  import { mapGetters } from 'vuex'
153
-
154
+ import Breadcrumbs from '~/components/Breadcrumbs.vue'
154
155
  import Dialog from '~/components/Dialog.vue'
155
156
  import Organization from '../../models/Organization'
156
157
  import IntegrationJobTable from '../../components/Integration/JobTable.vue'
157
158
 
158
159
  export default {
159
160
  name: 'PluginIntegrationsAdminVendorsPage',
160
- components: { Dialog, IntegrationJobTable },
161
+ components: { Dialog, IntegrationJobTable, Breadcrumbs },
161
162
  layout: 'authenticated',
162
163
  meta: {
163
164
  privilege: {
@@ -38,7 +38,8 @@
38
38
  <v-tabs-items v-model="tab">
39
39
  <v-tab-item> <ManageLti1p1></ManageLti1p1> </v-tab-item>
40
40
  <v-tab-item>
41
- <p class="ma-5">LTI 1.3 Not yet implemented</p>
41
+ <ManageLti1p3 />
42
+ <!-- <p class="ma-5">LTI 1.3 Not yet implemented</p>-->
42
43
  </v-tab-item>
43
44
  <v-tab-item>
44
45
  <p class="ma-5">SCORM 1.2 Not yet implemented</p>
@@ -49,10 +50,10 @@
49
50
 
50
51
  <script>
51
52
  import ManageLti1p1 from '../../../components/ExternalIntegration/Driver/ManageLti1p1.vue'
52
-
53
+ import ManageLti1p3 from '../../../components/ExternalIntegration/Driver/ManageLti1p3.vue'
53
54
  export default {
54
55
  name: 'PluginIntegrationsExternalIntegrationIndexPage',
55
- components: { ManageLti1p1 },
56
+ components: { ManageLti1p1, ManageLti1p3 },
56
57
  layout: 'authenticated',
57
58
  meta: {
58
59
  privilege: {
package/plugin.js CHANGED
@@ -68,7 +68,7 @@ export default {
68
68
  ref_page: 'admin',
69
69
  children: [
70
70
  {
71
- i18n: 'windward.integrations.components.navigation.integrations.manage_integrations',
71
+ i18n: 'windward.integrations.components.navigation.integrations.title',
72
72
  path: '/admin/integrations/vendors',
73
73
  context: ['home'],
74
74
  permissions: {
@@ -133,6 +133,53 @@ export default {
133
133
  */
134
134
  ],
135
135
  },
136
+ {
137
+ ref_page: 'course_settings',
138
+ children: [
139
+ {
140
+ i18n: 'windward.integrations.components.navigation.integrations.manage_integrations',
141
+ path: '/admin/integrations/vendors',
142
+ context: ['home'],
143
+ permissions: {
144
+ 'plugin.windward.integrations.organization.integration':
145
+ {
146
+ writable: true,
147
+ },
148
+ },
149
+ },
150
+ {
151
+ i18n: 'windward.integrations.components.navigation.integrations.import_course',
152
+ path: '/admin/integrations/import-course',
153
+ context: ['home'],
154
+ permissions: {
155
+ 'plugin.windward.integrations.course': {
156
+ writable: true,
157
+ },
158
+ },
159
+ },
160
+ {
161
+ i18n: 'windward.integrations.components.navigation.integrations.import_content',
162
+ path: '/course/{course.id}/integrations/import-content',
163
+ context: ['course'],
164
+ permissions: {
165
+ 'plugin.windward.integrations.course': {
166
+ writable: true,
167
+ },
168
+ },
169
+ },
170
+ {
171
+ i18n: 'windward.integrations.pages.course.external_integration.title',
172
+ path: '/course/{course.id}/integrations/external',
173
+ context: ['course'],
174
+ permissions: {
175
+ 'plugin.windward.integrations.course.externalIntegration':
176
+ {
177
+ readable: true,
178
+ },
179
+ },
180
+ },
181
+ ],
182
+ },
136
183
  ],
137
184
  contentBlock: [
138
185
  {
@@ -0,0 +1,19 @@
1
+ import { shallowMount } from '@vue/test-utils'
2
+
3
+ import Vue from 'vue'
4
+ import Vuetify from 'vuetify'
5
+ import { defaultMocks } from '@/test/mocks'
6
+
7
+ import ManageProvider from '@/components/ExternalIntegration/Driver/Lti1p3/ManageProvider.vue'
8
+
9
+ Vue.use(Vuetify)
10
+
11
+ describe('ManageProvider', () => {
12
+ test('ManageProvider is a Vue instance', () => {
13
+ const wrapper = shallowMount(ManageProvider, {
14
+ vuetify: new Vuetify(),
15
+ mocks: defaultMocks,
16
+ })
17
+ expect(wrapper.vm).toBeTruthy()
18
+ })
19
+ })
@@ -0,0 +1,19 @@
1
+ import { shallowMount } from '@vue/test-utils'
2
+
3
+ import Vue from 'vue'
4
+ import Vuetify from 'vuetify'
5
+ import { defaultMocks } from '@/test/mocks'
6
+
7
+ import ManageProviders from '@/components/ExternalIntegration/Driver/Lti1p3/ManageProviders.vue'
8
+
9
+ Vue.use(Vuetify)
10
+
11
+ describe('ManageProviders', () => {
12
+ test('ManageProviders is a Vue instance', () => {
13
+ const wrapper = shallowMount(ManageProviders, {
14
+ vuetify: new Vuetify(),
15
+ mocks: defaultMocks,
16
+ })
17
+ expect(wrapper.vm).toBeTruthy()
18
+ })
19
+ })
@@ -0,0 +1,19 @@
1
+ import { shallowMount } from '@vue/test-utils'
2
+
3
+ import Vue from 'vue'
4
+ import Vuetify from 'vuetify'
5
+ import { defaultMocks } from '@/test/mocks'
6
+
7
+ import ManageLti1p1 from '@/components/ExternalIntegration/Driver/ManageLti1p3.vue'
8
+
9
+ Vue.use(Vuetify)
10
+
11
+ describe('ManageLti1p3', () => {
12
+ test('ManageLti1p3 is a Vue instance', () => {
13
+ const wrapper = shallowMount(ManageLti1p1, {
14
+ vuetify: new Vuetify(),
15
+ mocks: defaultMocks,
16
+ })
17
+ expect(wrapper.vm).toBeTruthy()
18
+ })
19
+ })
@@ -14,7 +14,7 @@ describe('ProviderTargetPicker', () => {
14
14
  vuetify: new Vuetify(),
15
15
  mocks: defaultMocks,
16
16
  propsData: {
17
- metadata: {},
17
+ value: {},
18
18
  },
19
19
  })
20
20
  expect(wrapper.vm).toBeTruthy()
@@ -0,0 +1,22 @@
1
+ import { shallowMount } from '@vue/test-utils'
2
+
3
+ import Vue from 'vue'
4
+ import Vuetify from 'vuetify'
5
+ import { defaultMocks } from '@/test/mocks'
6
+
7
+ import JobLog from '@/components/Integration/JobLog.vue'
8
+
9
+ Vue.use(Vuetify)
10
+
11
+ describe('JobLog', () => {
12
+ test('JobLog is a Vue instance', () => {
13
+ const wrapper = shallowMount(JobLog, {
14
+ vuetify: new Vuetify(),
15
+ propsData: {
16
+ id: '',
17
+ },
18
+ mocks: defaultMocks,
19
+ })
20
+ expect(wrapper.vm).toBeTruthy()
21
+ })
22
+ })
@@ -0,0 +1,23 @@
1
+ import { shallowMount } from '@vue/test-utils'
2
+
3
+ import Vue from 'vue'
4
+ import Vuetify from 'vuetify'
5
+ import { defaultMocks } from '@/test/mocks'
6
+
7
+ import JobTable from '@/components/Integration/JobTable.vue'
8
+
9
+ Vue.use(Vuetify)
10
+
11
+ describe('JobTable', () => {
12
+ test('JobTable is a Vue instance', () => {
13
+ const wrapper = shallowMount(JobTable, {
14
+ vuetify: new Vuetify(),
15
+ propsData: {
16
+ channel: '',
17
+ event: '',
18
+ },
19
+ mocks: defaultMocks,
20
+ })
21
+ expect(wrapper.vm).toBeTruthy()
22
+ })
23
+ })
@@ -10,3 +10,15 @@ jest.mock(
10
10
  },
11
11
  { virtual: true }
12
12
  )
13
+
14
+ jest.mock(
15
+ '~/components/SearchField.vue',
16
+ () => {
17
+ return {
18
+ props: {},
19
+ computed: {},
20
+ methods: {},
21
+ }
22
+ },
23
+ { virtual: true }
24
+ )
package/test/mocks.js CHANGED
@@ -14,6 +14,18 @@ mocks.$Integration = {
14
14
  resolve([])
15
15
  })
16
16
  },
17
+ getSocket() {
18
+ return {
19
+ leave: jest.fn(),
20
+ public: () => {
21
+ return { listen: jest.fn() }
22
+ },
23
+ private: () => {
24
+ return { listen: jest.fn() }
25
+ },
26
+ connector: { pusher: { connection: { bind: jest.fn() } } },
27
+ }
28
+ },
17
29
  }
18
30
  mocks.$PermissionService = { userHasAccessTo: () => true }
19
31