@windward/integrations 0.0.11 → 0.0.12

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.
@@ -88,13 +88,13 @@
88
88
  <script>
89
89
  import _ from 'lodash'
90
90
  import { mapGetters } from 'vuex'
91
+ import Lti1p1Consumer from '../../../../models/ExternalIntegration/Lti1p1Consumer'
91
92
  import Crypto from '~/helpers/Crypto'
92
93
  import TextViewer from '~/components/Text/TextViewer.vue'
93
94
  import BaseContentBlock from '~/components/Content/Blocks/BaseContentBlock'
94
95
  import Course from '~/models/Course'
95
96
  import Organization from '~/models/Organization'
96
97
  import Enrollment from '~/models/Enrollment'
97
- import Lti1p1Consumer from '../../../../models/ExternalIntegration/Lti1p1Consumer'
98
98
 
99
99
  export default {
100
100
  name: 'ContentBlockExternalIntegrationLti1p1Consumer',
@@ -148,10 +148,10 @@
148
148
  <script>
149
149
  import _ from 'lodash'
150
150
  import { mapGetters } from 'vuex'
151
+ import Lti1p1Consumer from '../../../../models/ExternalIntegration/Lti1p1Consumer'
151
152
  import Organization from '~/models/Organization'
152
153
  import Course from '~/models/Course'
153
154
  import TextEditor from '~/components/Text/TextEditor.vue'
154
- import Lti1p1Consumer from '../../../../models/ExternalIntegration/Lti1p1Consumer'
155
155
  import FormVue from '~/components/Form'
156
156
 
157
157
  export default {
@@ -177,6 +177,7 @@ export default {
177
177
  return {
178
178
  render: false,
179
179
  consumer: {
180
+ version: '1.1',
180
181
  metadata: {
181
182
  custom: [],
182
183
  security_level: '',
@@ -79,11 +79,11 @@
79
79
  <script>
80
80
  import _ from 'lodash'
81
81
  import { mapGetters } from 'vuex'
82
+ import Lti1p1Consumer from '../../../../models/ExternalIntegration/Lti1p1Consumer'
83
+ import ManageConsumer from './ManageConsumer.vue'
82
84
  import Course from '~/models/Course'
83
85
  import Organization from '~/models/Organization'
84
86
  import Dialog from '~/components/Dialog.vue'
85
- import Lti1p1Consumer from '../../../../models/ExternalIntegration/Lti1p1Consumer'
86
- import ManageConsumer from './ManageConsumer.vue'
87
87
 
88
88
  export default {
89
89
  name: 'ManageLti1p1ConsumersDriver',
@@ -30,9 +30,9 @@
30
30
 
31
31
  <v-switch
32
32
  v-model="provider.enabled"
33
- :label="$t('shared.forms.enabled')"
33
+ :label="providerEnableLabel"
34
+ :disabled="!canBeEnabled"
34
35
  />
35
-
36
36
  <v-switch
37
37
  v-model="provider.grade_sync"
38
38
  :label="
@@ -41,6 +41,36 @@
41
41
  )
42
42
  "
43
43
  />
44
+
45
+ <v-text-field
46
+ id="lti-pid"
47
+ v-model="provider.metadata.platform_name"
48
+ :label="
49
+ $t(
50
+ 'windward.integrations.components.external_integration.driver.lti1p3.platform_name'
51
+ )
52
+ "
53
+ :hint="
54
+ $t(
55
+ 'windward.integrations.components.external_integration.driver.lti1p3.platform_name'
56
+ )
57
+ "
58
+ ></v-text-field>
59
+ <v-text-field
60
+ id="lti-pid"
61
+ v-model="provider.metadata.platform_id"
62
+ :label="
63
+ $t(
64
+ 'windward.integrations.components.external_integration.driver.lti1p3.platform_id'
65
+ )
66
+ "
67
+ :hint="
68
+ $t(
69
+ 'windward.integrations.components.external_integration.driver.lti1p3.platform_id'
70
+ )
71
+ "
72
+ ></v-text-field>
73
+
44
74
  <v-text-field
45
75
  id="lti-keyset_url"
46
76
  v-model="
@@ -56,7 +86,6 @@
56
86
  'windward.integrations.components.external_integration.driver.lti1p3.platform_public_keyset_url'
57
87
  )
58
88
  "
59
- :rules="validation.existsRules"
60
89
  ></v-text-field>
61
90
 
62
91
  <v-text-field
@@ -79,25 +108,41 @@
79
108
  'windward.integrations.components.external_integration.driver.lti1p3.platform_oidc_auth_endpoint'
80
109
  )
81
110
  "
82
- :rules="validation.existsRules"
83
111
  >
84
112
  </v-text-field>
113
+ <v-text-field
114
+ id="lti-oauth2-url"
115
+ v-model="
116
+ provider.metadata
117
+ .platform_oauth2_access_token_url
118
+ "
119
+ :label="
120
+ $t(
121
+ 'windward.integrations.components.external_integration.driver.lti1p3.platform_oauth2_access_token_url'
122
+ )
123
+ "
124
+ :hint="
125
+ $t(
126
+ 'windward.integrations.components.external_integration.driver.lti1p3.platform_oauth2_access_token_url'
127
+ )
128
+ "
129
+ ></v-text-field>
85
130
  <v-text-field
86
131
  id="lti-client-id"
87
- v-model="provider.metadata.platform_client_id"
132
+ v-model="provider.metadata.tool_client_id"
88
133
  :placeholder="
89
134
  $t(
90
- 'windward.integrations.components.external_integration.driver.lti1p3.platform_client_id'
135
+ 'windward.integrations.components.external_integration.driver.lti1p3.tool_client_id'
91
136
  )
92
137
  "
93
138
  :label="
94
139
  $t(
95
- 'windward.integrations.components.external_integration.driver.lti1p3.platform_client_id'
140
+ 'windward.integrations.components.external_integration.driver.lti1p3.tool_client_id'
96
141
  )
97
142
  "
98
143
  :hint="
99
144
  $t(
100
- 'windward.integrations.components.external_integration.driver.lti1p3.platform_client_id'
145
+ 'windward.integrations.components.external_integration.driver.lti1p3.tool_client_id'
101
146
  )
102
147
  "
103
148
  >
@@ -321,6 +366,7 @@ export default {
321
366
  role_metadata: {},
322
367
  metadata: {},
323
368
  version: '1.3',
369
+ enabled: false,
324
370
  },
325
371
  rolePanel: false,
326
372
  roles: [],
@@ -345,6 +391,29 @@ export default {
345
391
  course: 'course/get',
346
392
  contentTree: 'content/getTree',
347
393
  }),
394
+ canBeEnabled() {
395
+ if (
396
+ this.provider.metadata.platform_public_keyset_url &&
397
+ this.provider.metadata.platform_oidc_auth_endpoint
398
+ ) {
399
+ return true
400
+ }
401
+ return false
402
+ },
403
+ providerEnableLabel() {
404
+ if (this.canBeEnabled) {
405
+ return this.$t('shared.forms.enabled')
406
+ } else {
407
+ return (
408
+ this.$t('shared.forms.disabled') +
409
+ ' (' +
410
+ this.$t(
411
+ 'windward.integrations.components.external_integration.driver.lti1p3.enable_button_feedback'
412
+ ) +
413
+ ')'
414
+ )
415
+ }
416
+ },
348
417
  },
349
418
  created() {
350
419
  if (_.isEmpty(this.value)) {
@@ -2,10 +2,15 @@ export default {
2
2
  key: 'Key',
3
3
  tool_public_keyset_url: 'Tool Keyset Url',
4
4
  tool_oidc_auth_endpoint: 'Tool OpenID Connect Endpoint',
5
+ platform_id: 'Platform Identifier',
6
+ platform_name: 'Platform Name',
5
7
  platform_public_keyset_url: 'Platform Keyset Url',
6
8
  platform_oidc_auth_endpoint: 'Platform OpenID Connect Endpoint',
7
- platform_client_id: 'Platform Client ID',
8
- platform_deployment_id: 'Platform Deployment ID',
9
+ platform_oauth2_access_token_url: 'Platform OAuth2 Access Token URL',
10
+ tool_client_id: 'Tool Client ID',
11
+ platform_deployment_id: 'Deployment ID',
12
+ enable_button_feedback:
13
+ 'Link can only be enabled once plateform client identifier and and keyset urls are set !',
9
14
  parameter_name: 'Custom Parameter Name',
10
15
  value: 'Value',
11
16
  new: 'New LTI Link',
@@ -8,6 +8,6 @@ export default class Lti1p1Consumer extends Model {
8
8
 
9
9
  // Set the resource route of the model
10
10
  resource() {
11
- return 'external-integrations/lti/1.1/consumers'
11
+ return 'external-integrations/lti/consumers'
12
12
  }
13
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windward/integrations",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "description": "Windward UI Plugin Integrations for 3rd Party Systems",
5
5
  "main": "plugin.js",
6
6
  "scripts": {
package/plugin.js CHANGED
@@ -216,7 +216,7 @@ export default {
216
216
  {
217
217
  tag: 'windward-integrations-lti-consumer-settings',
218
218
  template: LtiConsumerBlockSettings,
219
- context: ['block.windward-integrations-lti-consumer'],
219
+ context: ['block'],
220
220
  metadata: {
221
221
  icon: 'mdi-cog',
222
222
  name: 'windward.integrations.shared.settings.title.lti_consumer',