@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.
- package/components/Content/Blocks/ExternalIntegration/LtiConsumer.vue +15 -0
- package/components/ExternalIntegration/Driver/Lti1p1/ManageConsumer.vue +3 -7
- package/components/ExternalIntegration/Driver/Lti1p1/ManageConsumers.vue +10 -14
- package/components/ExternalIntegration/Driver/Lti1p1/ManageProvider.vue +28 -21
- package/components/ExternalIntegration/Driver/Lti1p1/ManageProviders.vue +25 -11
- package/components/ExternalIntegration/Driver/Lti1p3/ManageProvider.vue +445 -0
- package/components/ExternalIntegration/Driver/Lti1p3/ManageProviders.vue +259 -0
- package/components/ExternalIntegration/Driver/ManageLti1p1.vue +2 -2
- package/components/ExternalIntegration/Driver/ManageLti1p3.vue +45 -0
- package/components/ExternalIntegration/ProviderTargetPicker.vue +21 -37
- package/components/Integration/Driver/ManageAtutor.vue +15 -0
- package/components/Integration/JobLog.vue +98 -0
- package/components/Integration/JobTable.vue +15 -1
- package/i18n/en-US/components/content/blocks/external_integration/lti_consumer.ts +2 -0
- package/i18n/en-US/components/external_integration/driver/lti1p1.ts +0 -21
- package/i18n/en-US/components/external_integration/driver/lti1p3.ts +13 -0
- package/i18n/en-US/components/external_integration/index.ts +26 -1
- package/i18n/en-US/components/integration/driver.ts +1 -0
- package/i18n/en-US/components/integration/job.ts +3 -0
- package/i18n/en-US/pages/login/lti.ts +1 -1
- package/models/ExternalIntegration/{Lti1p1Provider.ts → LtiProvider.ts} +2 -2
- package/package.json +1 -1
- package/pages/admin/importCourse.vue +1 -1
- package/pages/admin/vendors.vue +3 -2
- package/pages/course/externalIntegration/index.vue +4 -3
- package/plugin.js +48 -1
- package/test/Components/ExternalIntegration/Lti1p3/ManageProvider.spec.js +19 -0
- package/test/Components/ExternalIntegration/Lti1p3/ManageProviders.spec.js +19 -0
- package/test/Components/ExternalIntegration/ManageLti1p3.spec.js +19 -0
- package/test/Components/ExternalIntegration/ProviderTargetPicker.spec.js +1 -1
- package/test/Components/Integration/JobLog.spec.js +22 -0
- package/test/Components/Integration/JobTable.spec.js +23 -0
- package/test/__mocks__/componentsMock.js +12 -0
- package/test/mocks.js +12 -0
|
@@ -60,6 +60,21 @@
|
|
|
60
60
|
)
|
|
61
61
|
}}
|
|
62
62
|
</v-alert>
|
|
63
|
+
<v-alert
|
|
64
|
+
v-else-if="
|
|
65
|
+
!$PermissionService.userHasAccessTo(
|
|
66
|
+
'plugin.windward.integrations.course.externalIntegration',
|
|
67
|
+
'readable'
|
|
68
|
+
)
|
|
69
|
+
"
|
|
70
|
+
type="error"
|
|
71
|
+
>
|
|
72
|
+
{{
|
|
73
|
+
$t(
|
|
74
|
+
'windward.integrations.components.content.blocks.external_integration.lti_consumer.no_access'
|
|
75
|
+
)
|
|
76
|
+
}}
|
|
77
|
+
</v-alert>
|
|
63
78
|
<v-alert v-else-if="consumer === null" type="warning">
|
|
64
79
|
{{
|
|
65
80
|
$t(
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
v-model="consumer.target"
|
|
12
12
|
:label="
|
|
13
13
|
$t(
|
|
14
|
-
'windward.integrations.components.external_integration.
|
|
14
|
+
'windward.integrations.components.external_integration.target_url'
|
|
15
15
|
)
|
|
16
16
|
"
|
|
17
17
|
:hint="
|
|
18
18
|
$t(
|
|
19
|
-
'windward.integrations.components.external_integration.
|
|
19
|
+
'windward.integrations.components.external_integration.target_url'
|
|
20
20
|
)
|
|
21
21
|
"
|
|
22
22
|
></v-text-field>
|
|
@@ -38,11 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
<v-switch
|
|
40
40
|
v-model="consumer.enabled"
|
|
41
|
-
:label="
|
|
42
|
-
$t(
|
|
43
|
-
'windward.integrations.components.external_integration.driver.lti1p1.enabled'
|
|
44
|
-
)
|
|
45
|
-
"
|
|
41
|
+
:label="$t('shared.forms.enabled')"
|
|
46
42
|
/>
|
|
47
43
|
|
|
48
44
|
<v-text-field
|
|
@@ -11,7 +11,11 @@
|
|
|
11
11
|
'windward.integrations.components.external_integration.driver.lti1p1.new'
|
|
12
12
|
)
|
|
13
13
|
}}</template>
|
|
14
|
-
<template #trigger>{{
|
|
14
|
+
<template #trigger>{{
|
|
15
|
+
$t(
|
|
16
|
+
'windward.integrations.components.external_integration.driver.lti1p1.new'
|
|
17
|
+
)
|
|
18
|
+
}}</template>
|
|
15
19
|
<template #form="{ on, attrs }"
|
|
16
20
|
><ManageConsumer v-bind="attrs" v-on="on"></ManageConsumer
|
|
17
21
|
></template>
|
|
@@ -32,9 +36,7 @@
|
|
|
32
36
|
>{{ item.enabled ? 'mdi-check' : 'mdi-close' }}
|
|
33
37
|
</v-icon>
|
|
34
38
|
<span v-if="!item.enabled" class="sr-only">{{
|
|
35
|
-
$t(
|
|
36
|
-
'windward.integrations.components.external_integration.driver.lti1p1.enabled'
|
|
37
|
-
)
|
|
39
|
+
$t('shared.forms.enabled')
|
|
38
40
|
}}</span>
|
|
39
41
|
</template>
|
|
40
42
|
|
|
@@ -92,26 +94,20 @@ export default {
|
|
|
92
94
|
headers: [
|
|
93
95
|
{
|
|
94
96
|
text: this.$t(
|
|
95
|
-
'windward.integrations.components.external_integration.
|
|
97
|
+
'windward.integrations.components.external_integration.target_url'
|
|
96
98
|
),
|
|
97
99
|
value: 'target',
|
|
98
100
|
},
|
|
99
101
|
{
|
|
100
|
-
text: this.$t(
|
|
101
|
-
'windward.integrations.components.external_integration.driver.lti1p1.name'
|
|
102
|
-
),
|
|
102
|
+
text: this.$t('shared.forms.name'),
|
|
103
103
|
value: 'name',
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
|
-
text: this.$t(
|
|
107
|
-
'windward.integrations.components.external_integration.driver.lti1p1.description'
|
|
108
|
-
),
|
|
106
|
+
text: this.$t('shared.forms.description'),
|
|
109
107
|
value: 'description',
|
|
110
108
|
},
|
|
111
109
|
{
|
|
112
|
-
text: this.$t(
|
|
113
|
-
'windward.integrations.components.external_integration.driver.lti1p1.enabled'
|
|
114
|
-
),
|
|
110
|
+
text: this.$t('shared.forms.enabled'),
|
|
115
111
|
value: 'enabled',
|
|
116
112
|
},
|
|
117
113
|
{ text: this.$t('shared.forms.created'), value: 'created_at' },
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
<v-row justify="center" align="center">
|
|
9
9
|
<v-col cols="12">
|
|
10
10
|
<ProviderTargetPicker
|
|
11
|
-
|
|
12
|
-
:metadata.sync="provider.metadata"
|
|
11
|
+
v-model="provider"
|
|
13
12
|
></ProviderTargetPicker>
|
|
14
13
|
|
|
15
14
|
<v-text-field
|
|
@@ -18,12 +17,12 @@
|
|
|
18
17
|
disabled
|
|
19
18
|
:label="
|
|
20
19
|
$t(
|
|
21
|
-
'windward.integrations.components.external_integration.
|
|
20
|
+
'windward.integrations.components.external_integration.target_url'
|
|
22
21
|
)
|
|
23
22
|
"
|
|
24
23
|
:hint="
|
|
25
24
|
$t(
|
|
26
|
-
'windward.integrations.components.external_integration.
|
|
25
|
+
'windward.integrations.components.external_integration.target_url'
|
|
27
26
|
)
|
|
28
27
|
"
|
|
29
28
|
:rules="validation.existsRules"
|
|
@@ -31,9 +30,14 @@
|
|
|
31
30
|
|
|
32
31
|
<v-switch
|
|
33
32
|
v-model="provider.enabled"
|
|
33
|
+
:label="$t('shared.forms.enabled')"
|
|
34
|
+
/>
|
|
35
|
+
|
|
36
|
+
<v-switch
|
|
37
|
+
v-model="provider.grade_sync"
|
|
34
38
|
:label="
|
|
35
39
|
$t(
|
|
36
|
-
'windward.integrations.components.external_integration.
|
|
40
|
+
'windward.integrations.components.external_integration.send_grades'
|
|
37
41
|
)
|
|
38
42
|
"
|
|
39
43
|
/>
|
|
@@ -87,7 +91,7 @@
|
|
|
87
91
|
<v-expansion-panel-header>
|
|
88
92
|
{{
|
|
89
93
|
$t(
|
|
90
|
-
'windward.integrations.components.external_integration.
|
|
94
|
+
'windward.integrations.components.external_integration.role_map_panel'
|
|
91
95
|
)
|
|
92
96
|
}}
|
|
93
97
|
</v-expansion-panel-header>
|
|
@@ -96,7 +100,7 @@
|
|
|
96
100
|
<strong>
|
|
97
101
|
{{
|
|
98
102
|
$t(
|
|
99
|
-
'windward.integrations.components.external_integration.
|
|
103
|
+
'windward.integrations.components.external_integration.role_map_instructions'
|
|
100
104
|
)
|
|
101
105
|
}}
|
|
102
106
|
</strong>
|
|
@@ -104,7 +108,7 @@
|
|
|
104
108
|
<p>
|
|
105
109
|
{{
|
|
106
110
|
$t(
|
|
107
|
-
'windward.integrations.components.external_integration.
|
|
111
|
+
'windward.integrations.components.external_integration.role_map_warning'
|
|
108
112
|
)
|
|
109
113
|
}}
|
|
110
114
|
</p>
|
|
@@ -115,14 +119,14 @@
|
|
|
115
119
|
<th>
|
|
116
120
|
{{
|
|
117
121
|
$t(
|
|
118
|
-
'windward.integrations.components.external_integration.
|
|
122
|
+
'windward.integrations.components.external_integration.role_in_host'
|
|
119
123
|
)
|
|
120
124
|
}}
|
|
121
125
|
</th>
|
|
122
126
|
<th>
|
|
123
127
|
{{
|
|
124
128
|
$t(
|
|
125
|
-
'windward.integrations.components.external_integration.
|
|
129
|
+
'windward.integrations.components.external_integration.role_in_local'
|
|
126
130
|
)
|
|
127
131
|
}}
|
|
128
132
|
</th>
|
|
@@ -155,7 +159,7 @@
|
|
|
155
159
|
item-text="name"
|
|
156
160
|
:label="
|
|
157
161
|
$t(
|
|
158
|
-
'windward.integrations.components.external_integration.
|
|
162
|
+
'windward.integrations.components.external_integration.map_to_role'
|
|
159
163
|
)
|
|
160
164
|
"
|
|
161
165
|
></v-select>
|
|
@@ -177,7 +181,7 @@
|
|
|
177
181
|
>
|
|
178
182
|
{{
|
|
179
183
|
$t(
|
|
180
|
-
'windward.integrations.components.external_integration.
|
|
184
|
+
'windward.integrations.components.external_integration.delete_role_map_item'
|
|
181
185
|
)
|
|
182
186
|
}}
|
|
183
187
|
</span>
|
|
@@ -192,7 +196,7 @@
|
|
|
192
196
|
"
|
|
193
197
|
:label="
|
|
194
198
|
$t(
|
|
195
|
-
'windward.integrations.components.external_integration.
|
|
199
|
+
'windward.integrations.components.external_integration.remote_role'
|
|
196
200
|
)
|
|
197
201
|
"
|
|
198
202
|
></v-text-field>
|
|
@@ -203,7 +207,7 @@
|
|
|
203
207
|
:items="roles"
|
|
204
208
|
:label="
|
|
205
209
|
$t(
|
|
206
|
-
'windward.integrations.components.external_integration.
|
|
210
|
+
'windward.integrations.components.external_integration.map_to_role'
|
|
207
211
|
)
|
|
208
212
|
"
|
|
209
213
|
item-value="id"
|
|
@@ -227,7 +231,7 @@
|
|
|
227
231
|
>
|
|
228
232
|
{{
|
|
229
233
|
$t(
|
|
230
|
-
'windward.integrations.components.external_integration.
|
|
234
|
+
'windward.integrations.components.external_integration.add_role_map_item'
|
|
231
235
|
)
|
|
232
236
|
}}
|
|
233
237
|
</span>
|
|
@@ -250,12 +254,12 @@
|
|
|
250
254
|
<script>
|
|
251
255
|
import _ from 'lodash'
|
|
252
256
|
import { mapGetters } from 'vuex'
|
|
257
|
+
import ProviderTargetPicker from '../../ProviderTargetPicker.vue'
|
|
258
|
+
import LtiProvider from '../../../../models/ExternalIntegration/LtiProvider'
|
|
253
259
|
import FormVue from '~/components/Form.vue'
|
|
254
260
|
import Role from '~/models/Role'
|
|
255
261
|
import Organization from '~/models/Organization'
|
|
256
262
|
import Course from '~/models/Course'
|
|
257
|
-
import ProviderTargetPicker from '../../ProviderTargetPicker.vue'
|
|
258
|
-
import Lti1p1Provider from '../../../../models/ExternalIntegration/Lti1p1Provider'
|
|
259
263
|
|
|
260
264
|
export default {
|
|
261
265
|
name: 'ManageLti1p1ProviderDriver',
|
|
@@ -263,7 +267,7 @@ export default {
|
|
|
263
267
|
extends: FormVue,
|
|
264
268
|
props: {
|
|
265
269
|
value: {
|
|
266
|
-
type: [
|
|
270
|
+
type: [LtiProvider, null],
|
|
267
271
|
required: false,
|
|
268
272
|
default: null,
|
|
269
273
|
},
|
|
@@ -282,6 +286,7 @@ export default {
|
|
|
282
286
|
provider: {
|
|
283
287
|
role_metadata: {},
|
|
284
288
|
metadata: {},
|
|
289
|
+
version: '1.1',
|
|
285
290
|
},
|
|
286
291
|
rolePanel: false,
|
|
287
292
|
roles: [],
|
|
@@ -309,9 +314,10 @@ export default {
|
|
|
309
314
|
},
|
|
310
315
|
created() {
|
|
311
316
|
if (_.isEmpty(this.value)) {
|
|
312
|
-
this.provider = new
|
|
317
|
+
this.provider = new LtiProvider({
|
|
313
318
|
role_metadata: {},
|
|
314
319
|
metadata: {},
|
|
320
|
+
version: '1.1',
|
|
315
321
|
})
|
|
316
322
|
} else {
|
|
317
323
|
this.provider = _.cloneDeep(this.value)
|
|
@@ -356,7 +362,7 @@ export default {
|
|
|
356
362
|
this.newMap.id = null
|
|
357
363
|
},
|
|
358
364
|
async save() {
|
|
359
|
-
let provider = new
|
|
365
|
+
let provider = new LtiProvider(this.provider).for(
|
|
360
366
|
new Organization({ id: this.organization.id }),
|
|
361
367
|
new Course({ id: this.course.id })
|
|
362
368
|
)
|
|
@@ -380,9 +386,10 @@ export default {
|
|
|
380
386
|
|
|
381
387
|
// Create a new provider to clear the form if the original value is empty aka new
|
|
382
388
|
if (_.isEmpty(this.value)) {
|
|
383
|
-
this.provider = new
|
|
389
|
+
this.provider = new LtiProvider({
|
|
384
390
|
role_metadata: {},
|
|
385
391
|
metadata: {},
|
|
392
|
+
version: '1.1',
|
|
386
393
|
})
|
|
387
394
|
}
|
|
388
395
|
},
|
|
@@ -44,14 +44,23 @@
|
|
|
44
44
|
>{{ item.enabled ? 'mdi-check' : 'mdi-close' }}
|
|
45
45
|
</v-icon>
|
|
46
46
|
<span v-if="!item.enabled" class="sr-only">{{
|
|
47
|
+
$t('shared.forms.enabled')
|
|
48
|
+
}}</span>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<template #[`item.grade_sync`]="{ item }">
|
|
52
|
+
<v-icon :color="item.grade_sync ? 'success' : 'error'"
|
|
53
|
+
>{{ item.grade_sync ? 'mdi-check' : 'mdi-close' }}
|
|
54
|
+
</v-icon>
|
|
55
|
+
<span v-if="!item.grade_sync" class="sr-only">{{
|
|
47
56
|
$t(
|
|
48
|
-
'windward.integrations.components.external_integration.
|
|
57
|
+
'windward.integrations.components.external_integration.grade_sync'
|
|
49
58
|
)
|
|
50
59
|
}}</span>
|
|
51
60
|
</template>
|
|
52
61
|
|
|
53
62
|
<template #[`item.created_at`]="{ item }">
|
|
54
|
-
{{ $d(new Date(item.created_at), '
|
|
63
|
+
{{ $d(new Date(item.created_at), 'short') }}
|
|
55
64
|
</template>
|
|
56
65
|
<template #[`item.actions`]="{ index, item }">
|
|
57
66
|
<Dialog color="primary" action-save @click:save="onSaved">
|
|
@@ -89,13 +98,13 @@
|
|
|
89
98
|
<script>
|
|
90
99
|
import _ from 'lodash'
|
|
91
100
|
import { mapGetters } from 'vuex'
|
|
92
|
-
import
|
|
93
|
-
import Organization from '~/models/Organization'
|
|
94
|
-
import Dialog from '~/components/Dialog.vue'
|
|
95
|
-
import Lti1p1Provider from '../../../../models/ExternalIntegration/Lti1p1Provider'
|
|
101
|
+
import LtiProvider from '../../../../models/ExternalIntegration/LtiProvider'
|
|
96
102
|
import SecretField from '../../../SecretField.vue'
|
|
97
103
|
import ProviderTargetViewer from '../../ProviderTargetViewer.vue'
|
|
98
104
|
import ManageProvider from './ManageProvider.vue'
|
|
105
|
+
import Dialog from '~/components/Dialog.vue'
|
|
106
|
+
import Organization from '~/models/Organization'
|
|
107
|
+
import Course from '~/models/Course'
|
|
99
108
|
|
|
100
109
|
export default {
|
|
101
110
|
name: 'ManageLti1p1ProvidersDriver',
|
|
@@ -106,7 +115,7 @@ export default {
|
|
|
106
115
|
headers: [
|
|
107
116
|
{
|
|
108
117
|
text: this.$t(
|
|
109
|
-
'windward.integrations.components.external_integration.
|
|
118
|
+
'windward.integrations.components.external_integration.target'
|
|
110
119
|
),
|
|
111
120
|
value: 'target',
|
|
112
121
|
},
|
|
@@ -124,15 +133,19 @@ export default {
|
|
|
124
133
|
},
|
|
125
134
|
{
|
|
126
135
|
text: this.$t(
|
|
127
|
-
'windward.integrations.components.external_integration.
|
|
136
|
+
'windward.integrations.components.external_integration.launch_url'
|
|
128
137
|
),
|
|
129
138
|
value: 'url',
|
|
130
139
|
},
|
|
140
|
+
{
|
|
141
|
+
text: this.$t('shared.forms.enabled'),
|
|
142
|
+
value: 'enabled',
|
|
143
|
+
},
|
|
131
144
|
{
|
|
132
145
|
text: this.$t(
|
|
133
|
-
'windward.integrations.components.external_integration.
|
|
146
|
+
'windward.integrations.components.external_integration.grade_sync'
|
|
134
147
|
),
|
|
135
|
-
value: '
|
|
148
|
+
value: 'grade_sync',
|
|
136
149
|
},
|
|
137
150
|
{ text: this.$t('shared.forms.created'), value: 'created_at' },
|
|
138
151
|
{
|
|
@@ -192,11 +205,12 @@ export default {
|
|
|
192
205
|
this.loadProviders()
|
|
193
206
|
},
|
|
194
207
|
async loadProviders() {
|
|
195
|
-
this.providers = await new
|
|
208
|
+
this.providers = await new LtiProvider()
|
|
196
209
|
.for(
|
|
197
210
|
new Organization({ id: this.organization.id }),
|
|
198
211
|
new Course({ id: this.course.id })
|
|
199
212
|
)
|
|
213
|
+
.where('version', '1.1')
|
|
200
214
|
.get()
|
|
201
215
|
},
|
|
202
216
|
onConfirmDelete(provider) {
|