@windward/integrations 0.18.0 → 0.19.1
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.
- package/CHANGELOG.md +22 -0
- package/components/Content/Blocks/ExternalIntegration/LtiConsumer.vue +3 -3
- package/components/Content/Blocks/ExternalIntegration/ScormConsumer.vue +34 -0
- package/components/ExternalIntegration/Driver/Lti1p1/ManageConsumer.vue +10 -8
- package/components/ExternalIntegration/Driver/Lti1p1/ManageConsumers.vue +2 -2
- package/components/ExternalIntegration/Driver/Lti1p1/ManageProvider.vue +8 -5
- package/components/ExternalIntegration/Driver/Lti1p1/ManageProviders.vue +3 -2
- package/components/ExternalIntegration/Driver/Lti1p3/ManageConsumer.vue +8 -6
- package/components/ExternalIntegration/Driver/Lti1p3/ManageConsumers.vue +2 -2
- package/components/ExternalIntegration/Driver/Lti1p3/ManageProvider.vue +27 -5
- package/components/ExternalIntegration/Driver/Lti1p3/ManageProviders.vue +4 -3
- package/components/ExternalIntegration/Driver/Lti1p3/ViewConsumer.vue +6 -5
- package/components/ExternalIntegration/Driver/ManageScorm.vue +45 -0
- package/components/ExternalIntegration/Driver/Scorm/ManageConsumer.vue +76 -0
- package/components/ExternalIntegration/Driver/Scorm/ManageConsumers.vue +233 -0
- package/components/ExternalIntegration/Driver/Scorm/ManageProvider.vue +475 -0
- package/components/ExternalIntegration/Driver/Scorm/ManageProviders.vue +299 -0
- package/components/FileImport/FileImportMenu.vue +8 -1
- package/components/LLM/GenerateContent/BlockQuestionGenerateButton.vue +34 -3
- package/components/SecretField.vue +57 -34
- package/components/Settings/ExternalIntegration/LtiConsumerSettings.vue +2 -2
- package/components/Settings/ExternalIntegration/ManageCourseIntegrationSettings.vue +6 -6
- package/components/Settings/ExternalIntegration/ScormConsumerSettings.vue +42 -0
- package/helpers/ExternalIntegration/ScormHelper.ts +155 -0
- package/i18n/en-US/components/external_integration/driver/lti1p3.ts +4 -1
- package/i18n/en-US/components/external_integration/driver/scorm.ts +14 -0
- package/i18n/en-US/components/external_integration/index.ts +3 -1
- package/i18n/en-US/components/llm/generate_content/generate_questions.ts +7 -0
- package/i18n/en-US/pages/course/external_integration/index.ts +1 -1
- package/i18n/en-US/pages/login/index.ts +2 -0
- package/i18n/en-US/pages/login/lti.ts +2 -0
- package/i18n/en-US/pages/login/scorm.ts +28 -0
- package/i18n/en-US/shared/content_blocks.ts +1 -0
- package/i18n/en-US/shared/permission.ts +15 -3
- package/i18n/en-US/shared/settings.ts +1 -0
- package/i18n/es-ES/components/external_integration/driver/lti1p3.ts +4 -1
- package/i18n/es-ES/components/external_integration/driver/scorm.ts +15 -0
- package/i18n/es-ES/components/external_integration/index.ts +3 -1
- package/i18n/es-ES/components/llm/generate_content/generate_questions.ts +7 -0
- package/i18n/es-ES/pages/course/external_integration/index.ts +1 -1
- package/i18n/es-ES/pages/login/index.ts +2 -0
- package/i18n/es-ES/pages/login/lti.ts +2 -0
- package/i18n/es-ES/pages/login/scorm.ts +29 -0
- package/i18n/es-ES/shared/content_blocks.ts +1 -0
- package/i18n/es-ES/shared/permission.ts +15 -3
- package/i18n/es-ES/shared/settings.ts +1 -0
- package/i18n/sv-SE/components/external_integration/driver/lti1p3.ts +4 -1
- package/i18n/sv-SE/components/external_integration/driver/scorm.ts +14 -0
- package/i18n/sv-SE/components/external_integration/index.ts +3 -1
- package/i18n/sv-SE/components/llm/generate_content/generate_questions.ts +7 -0
- package/i18n/sv-SE/pages/course/external_integration/index.ts +1 -1
- package/i18n/sv-SE/pages/login/index.ts +2 -0
- package/i18n/sv-SE/pages/login/lti.ts +2 -0
- package/i18n/sv-SE/pages/login/scorm.ts +29 -0
- package/i18n/sv-SE/shared/content_blocks.ts +2 -1
- package/i18n/sv-SE/shared/permission.ts +15 -3
- package/i18n/sv-SE/shared/settings.ts +1 -0
- package/models/ExternalIntegration/{LtiConsumer.ts → Consumer.ts} +2 -2
- package/models/ExternalIntegration/{LtiProvider.ts → Provider.ts} +2 -2
- package/package.json +2 -1
- package/pages/course/externalIntegration/index.vue +4 -0
- package/pages/login/scorm/error.vue +102 -0
- package/pages/login/scorm/promptEmail.vue +180 -0
- package/plugin.js +111 -7
- package/test/Components/ExternalIntegration/ManageScorm.spec.js +19 -0
- package/test/Components/ExternalIntegration/Scorm/ManageConsumer.spec.js +19 -0
- package/test/Components/ExternalIntegration/Scorm/ManageConsumers.spec.js +19 -0
- package/test/Components/ExternalIntegration/Scorm/ManageProvider.spec.js +19 -0
- package/test/Components/ExternalIntegration/Scorm/ManageProviders.spec.js +19 -0
- package/test/mocks.js +12 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Hotfix [0.19.1] - 2025-11-07
|
|
4
|
+
|
|
5
|
+
* Merged in bugfix/LE-2197-org-admin---import-from-resource (pull request #112)
|
|
6
|
+
* Merged in bugfix/LE-2197-org-admin---import-from-resource (pull request #111)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## Release [0.19.0] - 2025-10-29
|
|
10
|
+
|
|
11
|
+
* Merged in feature/LE-2067-scorm-provider (pull request #108)
|
|
12
|
+
* Merged in feature/LE-2034/crossword-gen (pull request #102)
|
|
13
|
+
* Merge remote-tracking branch 'origin/release/0.19.0' into feature/LE-2067-scorm-provider
|
|
14
|
+
* Merge remote-tracking branch 'origin/master' into feature/LE-2067-scorm-provider
|
|
15
|
+
* Merged in feature/LE-2159-site-navigation-expanding (pull request #105)
|
|
16
|
+
* Merged release/0.19.0 into feature/LE-2159-site-navigation-expanding
|
|
17
|
+
* Merged in release/0.18.0 (pull request #101)
|
|
18
|
+
* Merge remote-tracking branch 'origin/release/0.18.0' into feature/LE-2067-scorm-provider
|
|
19
|
+
* Merged in release/0.17.0 (pull request #91)
|
|
20
|
+
* Merged in release/0.16.0 (pull request #89)
|
|
21
|
+
* Merged in release/0.15.0 (pull request #87)
|
|
22
|
+
* Merged in release/0.14.0 (pull request #82)
|
|
23
|
+
|
|
24
|
+
|
|
3
25
|
## Release [0.18.0] - 2025-10-10
|
|
4
26
|
|
|
5
27
|
* Merged in bugfix/LE-2135-saml-implementation (pull request #104)
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
<script>
|
|
161
161
|
import _ from 'lodash'
|
|
162
162
|
import { mapGetters } from 'vuex'
|
|
163
|
-
import
|
|
163
|
+
import Consumer from '../../../../models/ExternalIntegration/Consumer'
|
|
164
164
|
import Crypto from '~/helpers/Crypto'
|
|
165
165
|
import TextViewer from '~/components/Text/TextViewer.vue'
|
|
166
166
|
import BaseContentBlock from '~/components/Content/Blocks/BaseContentBlock'
|
|
@@ -270,7 +270,7 @@ export default {
|
|
|
270
270
|
async loadConsumer() {
|
|
271
271
|
try {
|
|
272
272
|
if (!_.isEmpty(this.block.metadata.config.tool_id)) {
|
|
273
|
-
this.consumer = await new
|
|
273
|
+
this.consumer = await new Consumer()
|
|
274
274
|
.for(
|
|
275
275
|
new Organization({ id: this.organization.id }),
|
|
276
276
|
new Course({ id: this.course.id })
|
|
@@ -296,7 +296,7 @@ export default {
|
|
|
296
296
|
this.openModal = true
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
this.launchData = await
|
|
299
|
+
this.launchData = await Consumer.custom(
|
|
300
300
|
new Enrollment({ id: this.enrollment.id }),
|
|
301
301
|
this.consumer,
|
|
302
302
|
'/launch'
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<h2>SCORM Consumer</h2>
|
|
4
|
+
<v-alert type="warning">Not implemented</v-alert>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
import _ from 'lodash'
|
|
10
|
+
import { mapGetters } from 'vuex'
|
|
11
|
+
import BaseContentBlock from '~/components/Content/Blocks/BaseContentBlock'
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
name: 'ContentBlockExternalIntegrationScormConsumer',
|
|
15
|
+
components: {},
|
|
16
|
+
extends: BaseContentBlock,
|
|
17
|
+
data() {
|
|
18
|
+
return {}
|
|
19
|
+
},
|
|
20
|
+
async fetch() {},
|
|
21
|
+
computed: {
|
|
22
|
+
...mapGetters({
|
|
23
|
+
organization: 'organization/get',
|
|
24
|
+
course: 'course/get',
|
|
25
|
+
enrollment: 'enrollment/get',
|
|
26
|
+
}),
|
|
27
|
+
},
|
|
28
|
+
watch: {},
|
|
29
|
+
beforeMount() {},
|
|
30
|
+
mounted() {},
|
|
31
|
+
|
|
32
|
+
methods: {},
|
|
33
|
+
}
|
|
34
|
+
</script>
|
|
@@ -92,9 +92,11 @@
|
|
|
92
92
|
:items="securityLevels"
|
|
93
93
|
item-text="name"
|
|
94
94
|
item-value="value"
|
|
95
|
-
:label="
|
|
95
|
+
:label="
|
|
96
|
+
$t(
|
|
96
97
|
'windward.integrations.components.external_integration.security_level'
|
|
97
|
-
)
|
|
98
|
+
)
|
|
99
|
+
"
|
|
98
100
|
outlined
|
|
99
101
|
:rules="$Validation.getRule('exists')"
|
|
100
102
|
></v-select>
|
|
@@ -164,7 +166,7 @@
|
|
|
164
166
|
<script>
|
|
165
167
|
import _ from 'lodash'
|
|
166
168
|
import { mapGetters } from 'vuex'
|
|
167
|
-
import
|
|
169
|
+
import Consumer from '../../../../models/ExternalIntegration/Consumer'
|
|
168
170
|
import Organization from '~/models/Organization'
|
|
169
171
|
import Course from '~/models/Course'
|
|
170
172
|
import TextEditor from '~/components/Text/TextEditor.vue'
|
|
@@ -177,7 +179,7 @@ export default {
|
|
|
177
179
|
extends: FormVue,
|
|
178
180
|
props: {
|
|
179
181
|
value: {
|
|
180
|
-
type: [
|
|
182
|
+
type: [Consumer, null],
|
|
181
183
|
required: false,
|
|
182
184
|
default: null,
|
|
183
185
|
},
|
|
@@ -238,9 +240,9 @@ export default {
|
|
|
238
240
|
},
|
|
239
241
|
created() {
|
|
240
242
|
if (_.isEmpty(this.value)) {
|
|
241
|
-
this.consumer = new
|
|
243
|
+
this.consumer = new Consumer(this.consumer)
|
|
242
244
|
} else {
|
|
243
|
-
this.consumer = new
|
|
245
|
+
this.consumer = new Consumer(_.cloneDeep(this.value))
|
|
244
246
|
}
|
|
245
247
|
},
|
|
246
248
|
mounted() {
|
|
@@ -278,7 +280,7 @@ export default {
|
|
|
278
280
|
this.consumer.metadata.custom.splice(index, 1)
|
|
279
281
|
},
|
|
280
282
|
async save() {
|
|
281
|
-
let consumer = new
|
|
283
|
+
let consumer = new Consumer(this.consumer).for(
|
|
282
284
|
new Organization({ id: this.organization.id }),
|
|
283
285
|
new Course({ id: this.course.id })
|
|
284
286
|
)
|
|
@@ -319,7 +321,7 @@ export default {
|
|
|
319
321
|
security: [],
|
|
320
322
|
},
|
|
321
323
|
}
|
|
322
|
-
this.consumer = new
|
|
324
|
+
this.consumer = new Consumer(emptyConsumer)
|
|
323
325
|
this.updateKey = Crypto.id()
|
|
324
326
|
},
|
|
325
327
|
},
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
<script>
|
|
100
100
|
import _ from 'lodash'
|
|
101
101
|
import { mapGetters } from 'vuex'
|
|
102
|
-
import
|
|
102
|
+
import Consumer from '../../../../models/ExternalIntegration/Consumer'
|
|
103
103
|
import ManageConsumer from './ManageConsumer.vue'
|
|
104
104
|
import Course from '~/models/Course'
|
|
105
105
|
import Organization from '~/models/Organization'
|
|
@@ -189,7 +189,7 @@ export default {
|
|
|
189
189
|
this.loadConsumers()
|
|
190
190
|
},
|
|
191
191
|
async loadConsumers() {
|
|
192
|
-
this.consumers = await new
|
|
192
|
+
this.consumers = await new Consumer()
|
|
193
193
|
.for(
|
|
194
194
|
new Organization({ id: this.organization.id }),
|
|
195
195
|
new Course({ id: this.course.id })
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
import _ from 'lodash'
|
|
263
263
|
import { mapGetters } from 'vuex'
|
|
264
264
|
import ProviderTargetPicker from '../../ProviderTargetPicker.vue'
|
|
265
|
-
import
|
|
265
|
+
import Provider from '../../../../models/ExternalIntegration/Provider'
|
|
266
266
|
import FormVue from '~/components/Core/Form.vue'
|
|
267
267
|
import Role from '~/models/Role'
|
|
268
268
|
import Organization from '~/models/Organization'
|
|
@@ -275,7 +275,7 @@ export default {
|
|
|
275
275
|
extends: FormVue,
|
|
276
276
|
props: {
|
|
277
277
|
value: {
|
|
278
|
-
type: [
|
|
278
|
+
type: [Provider, null],
|
|
279
279
|
required: false,
|
|
280
280
|
default: null,
|
|
281
281
|
},
|
|
@@ -294,6 +294,7 @@ export default {
|
|
|
294
294
|
provider: {
|
|
295
295
|
role_metadata: {},
|
|
296
296
|
metadata: {},
|
|
297
|
+
type: 'lti',
|
|
297
298
|
version: '1.1',
|
|
298
299
|
},
|
|
299
300
|
rolePanel: false,
|
|
@@ -323,9 +324,10 @@ export default {
|
|
|
323
324
|
},
|
|
324
325
|
created() {
|
|
325
326
|
if (_.isEmpty(this.value)) {
|
|
326
|
-
this.provider = new
|
|
327
|
+
this.provider = new Provider({
|
|
327
328
|
role_metadata: {},
|
|
328
329
|
metadata: {},
|
|
330
|
+
type: 'lti',
|
|
329
331
|
version: '1.1',
|
|
330
332
|
})
|
|
331
333
|
} else {
|
|
@@ -371,7 +373,7 @@ export default {
|
|
|
371
373
|
this.newMap.id = null
|
|
372
374
|
},
|
|
373
375
|
async save() {
|
|
374
|
-
let provider = new
|
|
376
|
+
let provider = new Provider(this.provider).for(
|
|
375
377
|
new Organization({ id: this.organization.id }),
|
|
376
378
|
new Course({ id: this.course.id })
|
|
377
379
|
)
|
|
@@ -395,9 +397,10 @@ export default {
|
|
|
395
397
|
|
|
396
398
|
// Create a new provider to clear the form if the original value is empty aka new
|
|
397
399
|
if (_.isEmpty(this.value)) {
|
|
398
|
-
this.provider = new
|
|
400
|
+
this.provider = new Provider({
|
|
399
401
|
role_metadata: {},
|
|
400
402
|
metadata: {},
|
|
403
|
+
type: 'lti',
|
|
401
404
|
version: '1.1',
|
|
402
405
|
})
|
|
403
406
|
}
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
<script>
|
|
123
123
|
import _ from 'lodash'
|
|
124
124
|
import { mapGetters } from 'vuex'
|
|
125
|
-
import
|
|
125
|
+
import Provider from '../../../../models/ExternalIntegration/Provider'
|
|
126
126
|
import SecretField from '../../../SecretField.vue'
|
|
127
127
|
import ProviderTargetViewer from '../../ProviderTargetViewer.vue'
|
|
128
128
|
import ManageProvider from './ManageProvider.vue'
|
|
@@ -236,11 +236,12 @@ export default {
|
|
|
236
236
|
this.loadProviders()
|
|
237
237
|
},
|
|
238
238
|
async loadProviders() {
|
|
239
|
-
this.providers = await new
|
|
239
|
+
this.providers = await new Provider()
|
|
240
240
|
.for(
|
|
241
241
|
new Organization({ id: this.organization.id }),
|
|
242
242
|
new Course({ id: this.course.id })
|
|
243
243
|
)
|
|
244
|
+
.where('type', 'lti')
|
|
244
245
|
.where('version', '1.1')
|
|
245
246
|
.get()
|
|
246
247
|
},
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
<script>
|
|
158
158
|
import _ from 'lodash'
|
|
159
159
|
import { mapGetters } from 'vuex'
|
|
160
|
-
import
|
|
160
|
+
import Consumer from '../../../../models/ExternalIntegration/Consumer'
|
|
161
161
|
import Organization from '~/models/Organization'
|
|
162
162
|
import Course from '~/models/Course'
|
|
163
163
|
import TextEditor from '~/components/Text/TextEditor.vue'
|
|
@@ -170,7 +170,7 @@ export default {
|
|
|
170
170
|
extends: FormVue,
|
|
171
171
|
props: {
|
|
172
172
|
value: {
|
|
173
|
-
type: [
|
|
173
|
+
type: [Consumer, null],
|
|
174
174
|
required: false,
|
|
175
175
|
default: null,
|
|
176
176
|
},
|
|
@@ -188,6 +188,7 @@ export default {
|
|
|
188
188
|
render: false,
|
|
189
189
|
consumer: {
|
|
190
190
|
version: '1.3',
|
|
191
|
+
type: 'lti',
|
|
191
192
|
metadata: {
|
|
192
193
|
custom: [],
|
|
193
194
|
security_level: '',
|
|
@@ -231,9 +232,9 @@ export default {
|
|
|
231
232
|
},
|
|
232
233
|
created() {
|
|
233
234
|
if (_.isEmpty(this.value)) {
|
|
234
|
-
this.consumer = new
|
|
235
|
+
this.consumer = new Consumer(this.consumer)
|
|
235
236
|
} else {
|
|
236
|
-
this.consumer = new
|
|
237
|
+
this.consumer = new Consumer(_.cloneDeep(this.value))
|
|
237
238
|
}
|
|
238
239
|
},
|
|
239
240
|
mounted() {
|
|
@@ -271,7 +272,7 @@ export default {
|
|
|
271
272
|
this.consumer.metadata.custom.splice(index, 1)
|
|
272
273
|
},
|
|
273
274
|
async save() {
|
|
274
|
-
let consumer = new
|
|
275
|
+
let consumer = new Consumer(this.consumer).for(
|
|
275
276
|
new Organization({ id: this.organization.id }),
|
|
276
277
|
new Course({ id: this.course.id })
|
|
277
278
|
)
|
|
@@ -307,13 +308,14 @@ export default {
|
|
|
307
308
|
resetConsumer() {
|
|
308
309
|
const emptyConsumer = {
|
|
309
310
|
version: '1.3',
|
|
311
|
+
type: 'lti',
|
|
310
312
|
metadata: {
|
|
311
313
|
custom: [],
|
|
312
314
|
security_level: '',
|
|
313
315
|
security: [],
|
|
314
316
|
},
|
|
315
317
|
}
|
|
316
|
-
this.consumer = new
|
|
318
|
+
this.consumer = new Consumer(emptyConsumer)
|
|
317
319
|
this.updateKey = Crypto.id()
|
|
318
320
|
},
|
|
319
321
|
},
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
<script>
|
|
126
126
|
import _ from 'lodash'
|
|
127
127
|
import { mapGetters } from 'vuex'
|
|
128
|
-
import
|
|
128
|
+
import Consumer from '../../../../models/ExternalIntegration/Consumer'
|
|
129
129
|
import ManageConsumer from './ManageConsumer.vue'
|
|
130
130
|
import ViewConsumer from './ViewConsumer.vue'
|
|
131
131
|
import Course from '~/models/Course'
|
|
@@ -216,7 +216,7 @@ export default {
|
|
|
216
216
|
this.loadConsumers()
|
|
217
217
|
},
|
|
218
218
|
async loadConsumers() {
|
|
219
|
-
this.consumers = await new
|
|
219
|
+
this.consumers = await new Consumer()
|
|
220
220
|
.for(
|
|
221
221
|
new Organization({ id: this.organization.id }),
|
|
222
222
|
new Course({ id: this.course.id })
|
|
@@ -48,9 +48,17 @@
|
|
|
48
48
|
"
|
|
49
49
|
/>
|
|
50
50
|
|
|
51
|
+
<v-alert v-if="isNew" type="warning">
|
|
52
|
+
{{
|
|
53
|
+
$t(
|
|
54
|
+
'windward.integrations.components.external_integration.driver.lti1p3.disabled_fields_in_new_tool'
|
|
55
|
+
)
|
|
56
|
+
}}
|
|
57
|
+
</v-alert>
|
|
51
58
|
<v-text-field
|
|
52
59
|
id="lti-pid"
|
|
53
60
|
v-model="provider.metadata.platform_name"
|
|
61
|
+
:disabled="isNew"
|
|
54
62
|
:label="
|
|
55
63
|
$t(
|
|
56
64
|
'windward.integrations.components.external_integration.driver.lti1p3.platform_name'
|
|
@@ -65,6 +73,7 @@
|
|
|
65
73
|
<v-text-field
|
|
66
74
|
id="lti-pid"
|
|
67
75
|
v-model="provider.metadata.platform_id"
|
|
76
|
+
:disabled="isNew"
|
|
68
77
|
:label="
|
|
69
78
|
$t(
|
|
70
79
|
'windward.integrations.components.external_integration.driver.lti1p3.platform_id'
|
|
@@ -82,6 +91,7 @@
|
|
|
82
91
|
v-model="
|
|
83
92
|
provider.metadata.platform_public_keyset_url
|
|
84
93
|
"
|
|
94
|
+
:disabled="isNew"
|
|
85
95
|
:label="
|
|
86
96
|
$t(
|
|
87
97
|
'windward.integrations.components.external_integration.driver.lti1p3.platform_public_keyset_url'
|
|
@@ -99,6 +109,7 @@
|
|
|
99
109
|
v-model="
|
|
100
110
|
provider.metadata.platform_oidc_auth_endpoint
|
|
101
111
|
"
|
|
112
|
+
:disabled="isNew"
|
|
102
113
|
:placeholder="
|
|
103
114
|
$t(
|
|
104
115
|
'windward.integrations.components.external_integration.driver.lti1p3.platform_oidc_auth_endpoint'
|
|
@@ -122,6 +133,7 @@
|
|
|
122
133
|
provider.metadata
|
|
123
134
|
.platform_oauth2_access_token_url
|
|
124
135
|
"
|
|
136
|
+
:disabled="isNew"
|
|
125
137
|
:label="
|
|
126
138
|
$t(
|
|
127
139
|
'windward.integrations.components.external_integration.driver.lti1p3.platform_oauth2_access_token_url'
|
|
@@ -136,6 +148,7 @@
|
|
|
136
148
|
<v-text-field
|
|
137
149
|
id="lti-oauth2-aud"
|
|
138
150
|
v-model="provider.metadata.platform_oauth2_audience"
|
|
151
|
+
:disabled="isNew"
|
|
139
152
|
:label="
|
|
140
153
|
$t(
|
|
141
154
|
'windward.integrations.components.external_integration.driver.lti1p3.platform_oauth2_audience'
|
|
@@ -150,6 +163,7 @@
|
|
|
150
163
|
<v-text-field
|
|
151
164
|
id="lti-client-id"
|
|
152
165
|
v-model="provider.metadata.tool_client_id"
|
|
166
|
+
:disabled="isNew"
|
|
153
167
|
:placeholder="
|
|
154
168
|
$t(
|
|
155
169
|
'windward.integrations.components.external_integration.driver.lti1p3.tool_client_id'
|
|
@@ -170,6 +184,7 @@
|
|
|
170
184
|
<v-text-field
|
|
171
185
|
id="lti-deployment-id"
|
|
172
186
|
v-model="provider.metadata.platform_deployment_id"
|
|
187
|
+
:disabled="isNew"
|
|
173
188
|
:placeholder="
|
|
174
189
|
$t(
|
|
175
190
|
'windward.integrations.components.external_integration.driver.lti1p3.platform_deployment_id'
|
|
@@ -362,13 +377,14 @@
|
|
|
362
377
|
import _ from 'lodash'
|
|
363
378
|
import { mapGetters } from 'vuex'
|
|
364
379
|
import ProviderTargetPicker from '../../ProviderTargetPicker.vue'
|
|
365
|
-
import
|
|
380
|
+
import Provider from '../../../../models/ExternalIntegration/Provider'
|
|
366
381
|
|
|
367
382
|
import FormVue from '~/components/Core/Form.vue'
|
|
368
383
|
import Role from '~/models/Role'
|
|
369
384
|
import Organization from '~/models/Organization'
|
|
370
385
|
import Course from '~/models/Course'
|
|
371
386
|
import Crypto from '~/helpers/Crypto'
|
|
387
|
+
import Uuid from '~/helpers/Uuid'
|
|
372
388
|
|
|
373
389
|
export default {
|
|
374
390
|
name: 'ManageLti1p3ProviderDriver',
|
|
@@ -376,7 +392,7 @@ export default {
|
|
|
376
392
|
extends: FormVue,
|
|
377
393
|
props: {
|
|
378
394
|
value: {
|
|
379
|
-
type: [
|
|
395
|
+
type: [Provider, null],
|
|
380
396
|
required: false,
|
|
381
397
|
default: null,
|
|
382
398
|
},
|
|
@@ -388,6 +404,7 @@ export default {
|
|
|
388
404
|
provider: {
|
|
389
405
|
role_metadata: {},
|
|
390
406
|
metadata: {},
|
|
407
|
+
type: 'lti',
|
|
391
408
|
version: '1.3',
|
|
392
409
|
enabled: false,
|
|
393
410
|
},
|
|
@@ -415,6 +432,9 @@ export default {
|
|
|
415
432
|
course: 'course/get',
|
|
416
433
|
contentTree: 'content/getTree',
|
|
417
434
|
}),
|
|
435
|
+
isNew() {
|
|
436
|
+
return !Uuid.test(this.provider.id)
|
|
437
|
+
},
|
|
418
438
|
canBeEnabled() {
|
|
419
439
|
if (
|
|
420
440
|
this.provider.metadata.platform_public_keyset_url &&
|
|
@@ -441,9 +461,10 @@ export default {
|
|
|
441
461
|
},
|
|
442
462
|
created() {
|
|
443
463
|
if (_.isEmpty(this.value)) {
|
|
444
|
-
this.provider = new
|
|
464
|
+
this.provider = new Provider({
|
|
445
465
|
role_metadata: {},
|
|
446
466
|
metadata: {},
|
|
467
|
+
type: 'lti',
|
|
447
468
|
version: '1.3',
|
|
448
469
|
})
|
|
449
470
|
} else {
|
|
@@ -489,7 +510,7 @@ export default {
|
|
|
489
510
|
this.newMap.id = null
|
|
490
511
|
},
|
|
491
512
|
async save() {
|
|
492
|
-
let provider = new
|
|
513
|
+
let provider = new Provider(this.provider).for(
|
|
493
514
|
new Organization({ id: this.organization.id }),
|
|
494
515
|
new Course({ id: this.course.id })
|
|
495
516
|
)
|
|
@@ -513,9 +534,10 @@ export default {
|
|
|
513
534
|
|
|
514
535
|
// Create a new provider to clear the form if the original value is empty aka new
|
|
515
536
|
if (_.isEmpty(this.value)) {
|
|
516
|
-
this.provider = new
|
|
537
|
+
this.provider = new Provider({
|
|
517
538
|
role_metadata: {},
|
|
518
539
|
metadata: {},
|
|
540
|
+
type: 'lti',
|
|
519
541
|
version: '1.3',
|
|
520
542
|
})
|
|
521
543
|
}
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
<script>
|
|
125
125
|
import _ from 'lodash'
|
|
126
126
|
import { mapGetters } from 'vuex'
|
|
127
|
-
import
|
|
127
|
+
import Provider from '../../../../models/ExternalIntegration/Provider'
|
|
128
128
|
import SecretField from '../../../SecretField.vue'
|
|
129
129
|
import ProviderTargetViewer from '../../ProviderTargetViewer.vue'
|
|
130
130
|
import ManageProvider from './ManageProvider.vue'
|
|
@@ -166,7 +166,7 @@ export default {
|
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
168
|
text: this.$t(
|
|
169
|
-
'windward.integrations.components.external_integration.launch_url'
|
|
169
|
+
'windward.integrations.components.external_integration.driver.lti1p3.launch_url'
|
|
170
170
|
),
|
|
171
171
|
value: 'url',
|
|
172
172
|
},
|
|
@@ -238,11 +238,12 @@ export default {
|
|
|
238
238
|
this.loadProviders()
|
|
239
239
|
},
|
|
240
240
|
async loadProviders() {
|
|
241
|
-
this.providers = await new
|
|
241
|
+
this.providers = await new Provider()
|
|
242
242
|
.for(
|
|
243
243
|
new Organization({ id: this.organization.id }),
|
|
244
244
|
new Course({ id: this.course.id })
|
|
245
245
|
)
|
|
246
|
+
.where('type', 'lti')
|
|
246
247
|
.where('version', '1.3')
|
|
247
248
|
.get()
|
|
248
249
|
},
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
<script>
|
|
109
109
|
import _ from 'lodash'
|
|
110
110
|
import { mapGetters } from 'vuex'
|
|
111
|
-
import
|
|
111
|
+
import Consumer from '../../../../models/ExternalIntegration/Consumer'
|
|
112
112
|
import SecretField from '../../../SecretField.vue'
|
|
113
113
|
import Organization from '~/models/Organization'
|
|
114
114
|
import Course from '~/models/Course'
|
|
@@ -119,7 +119,7 @@ export default {
|
|
|
119
119
|
extends: FormVue,
|
|
120
120
|
props: {
|
|
121
121
|
value: {
|
|
122
|
-
type: [
|
|
122
|
+
type: [Consumer, null],
|
|
123
123
|
required: false,
|
|
124
124
|
default: null,
|
|
125
125
|
},
|
|
@@ -137,6 +137,7 @@ export default {
|
|
|
137
137
|
render: false,
|
|
138
138
|
consumer: {
|
|
139
139
|
version: '1.3',
|
|
140
|
+
type: 'lti',
|
|
140
141
|
metadata: {
|
|
141
142
|
custom: [],
|
|
142
143
|
security_level: '',
|
|
@@ -153,9 +154,9 @@ export default {
|
|
|
153
154
|
},
|
|
154
155
|
created() {
|
|
155
156
|
if (_.isEmpty(this.value)) {
|
|
156
|
-
this.consumer = new
|
|
157
|
+
this.consumer = new Consumer(this.consumer)
|
|
157
158
|
} else {
|
|
158
|
-
this.consumer = new
|
|
159
|
+
this.consumer = new Consumer(_.cloneDeep(this.value))
|
|
159
160
|
}
|
|
160
161
|
},
|
|
161
162
|
mounted() {
|
|
@@ -193,7 +194,7 @@ export default {
|
|
|
193
194
|
this.consumer.metadata.custom.splice(index, 1)
|
|
194
195
|
},
|
|
195
196
|
async save() {
|
|
196
|
-
let consumer = new
|
|
197
|
+
let consumer = new Consumer(this.consumer).for(
|
|
197
198
|
new Organization({ id: this.organization.id }),
|
|
198
199
|
new Course({ id: this.course.id })
|
|
199
200
|
)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<v-expansion-panels flat accordion>
|
|
4
|
+
<v-expansion-panel>
|
|
5
|
+
<v-expansion-panel-header>
|
|
6
|
+
{{
|
|
7
|
+
$t(
|
|
8
|
+
'windward.integrations.components.external_integration.provider_panel_title'
|
|
9
|
+
)
|
|
10
|
+
}}
|
|
11
|
+
</v-expansion-panel-header>
|
|
12
|
+
<v-expansion-panel-content>
|
|
13
|
+
<ManageProviders></ManageProviders>
|
|
14
|
+
</v-expansion-panel-content>
|
|
15
|
+
</v-expansion-panel>
|
|
16
|
+
<!-- Not Implemented
|
|
17
|
+
<v-expansion-panel>
|
|
18
|
+
<v-expansion-panel-header>
|
|
19
|
+
{{
|
|
20
|
+
$t(
|
|
21
|
+
'windward.integrations.components.external_integration.consumer_panel_title'
|
|
22
|
+
)
|
|
23
|
+
}}
|
|
24
|
+
</v-expansion-panel-header>
|
|
25
|
+
<v-expansion-panel-content>
|
|
26
|
+
<ManageConsumers></ManageConsumers>
|
|
27
|
+
</v-expansion-panel-content>
|
|
28
|
+
</v-expansion-panel>
|
|
29
|
+
-->
|
|
30
|
+
</v-expansion-panels>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
import ManageProviders from './Scorm/ManageProviders.vue'
|
|
36
|
+
//import ManageConsumers from './Scorm/ManageConsumers.vue'
|
|
37
|
+
|
|
38
|
+
export default {
|
|
39
|
+
name: 'ManageScormDriver',
|
|
40
|
+
components: { ManageProviders },
|
|
41
|
+
data() {
|
|
42
|
+
return {}
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
|
+
</script>
|