@windward/core 0.0.3 → 0.0.6
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/.vscode/settings.json +3 -0
- package/README.md +2 -1
- package/components/Content/Blocks/ClickableIcons.vue +12 -3
- package/components/Content/Blocks/Feedback.vue +19 -11
- package/components/Content/Blocks/FeedbackTemplates/FeedbackQuestionLikert.vue +6 -6
- package/components/Content/Blocks/FeedbackTemplates/FeedbackQuestionOpenResponse.vue +11 -10
- package/components/Content/Blocks/FeedbackTemplates/FeedbackQuestionTrueFalse.vue +3 -3
- package/components/Content/Blocks/Video.vue +2 -2
- package/components/Navigation/Items/AskTheExpert.vue +173 -0
- package/components/Settings/ClickableIconsSettings.vue +10 -5
- package/components/Settings/FeedbackSettings.vue +3 -3
- package/components/Settings/UserUploadSettings.vue +2 -2
- package/components/Settings/VideoSettings.vue +6 -6
- package/components/utils/ContentViewer.vue +15 -4
- package/components/utils/FillInBlank/FillInBlankInput.vue +208 -0
- package/components/utils/FillInBlank/FillInTheBlanksManager.vue +98 -0
- package/components/utils/MathExpressionEditor.vue +8 -6
- package/components/utils/TinyMCEWrapper.vue +48 -8
- package/components/utils/assets/tinymce/css/content.scss +9 -0
- package/components/utils/glossary/CourseGlossary.vue +12 -8
- package/components/utils/glossary/CourseGlossaryForm.vue +24 -5
- package/helpers/FillInBlankHelper.ts +55 -0
- package/helpers/GlossaryHelper.ts +4 -4
- package/helpers/tinymce/plugin.ts +99 -4
- package/i18n/en-US/components/content/blocks/feedback.ts +3 -0
- package/i18n/en-US/components/index.ts +0 -1
- package/i18n/en-US/components/navigation/ask_the_expert.ts +11 -0
- package/i18n/en-US/components/navigation/index.ts +2 -0
- package/i18n/en-US/components/utils/FillInBlank/FillInBlankInput.ts +13 -0
- package/i18n/en-US/components/utils/FillInBlank/FillInTheBlanksManager.ts +11 -0
- package/i18n/en-US/components/utils/FillInBlank/index.ts +6 -0
- package/i18n/en-US/components/utils/index.ts +2 -1
- package/i18n/en-US/components/utils/tiny_mce_wrapper.ts +1 -0
- package/i18n/en-US/shared/menu.ts +1 -0
- package/i18n/es-ES/components/content/blocks/feedback.ts +29 -0
- package/i18n/es-ES/components/content/blocks/image.ts +5 -0
- package/i18n/es-ES/components/content/blocks/index.ts +15 -0
- package/i18n/es-ES/components/content/blocks/tab.ts +4 -0
- package/i18n/es-ES/components/content/blocks/table.ts +4 -0
- package/i18n/es-ES/components/content/blocks/user_upload.ts +13 -0
- package/i18n/es-ES/components/content/blocks/video.ts +55 -0
- package/i18n/es-ES/components/content/index.ts +5 -0
- package/i18n/es-ES/components/index.ts +12 -0
- package/i18n/es-ES/components/navigation/ask_the_expert.ts +11 -0
- package/i18n/es-ES/components/navigation/image.ts +4 -0
- package/i18n/es-ES/components/navigation/index.ts +7 -0
- package/i18n/es-ES/components/navigation/user_upload.ts +3 -0
- package/i18n/es-ES/components/settings/clickable_icon.ts +10 -0
- package/i18n/es-ES/components/settings/image.ts +1 -0
- package/i18n/es-ES/components/settings/index.ts +13 -0
- package/i18n/es-ES/components/settings/text_editor.ts +7 -0
- package/i18n/es-ES/components/settings/user_upload.ts +11 -0
- package/i18n/es-ES/components/settings/video.ts +13 -0
- package/i18n/es-ES/components/utils/index.ts +5 -0
- package/i18n/es-ES/components/utils/tiny_mce_wrapper.ts +18 -0
- package/i18n/es-ES/index.ts +16 -0
- package/i18n/es-ES/modules/index.ts +5 -0
- package/i18n/es-ES/pages/glossary.ts +7 -0
- package/i18n/es-ES/pages/index.ts +7 -0
- package/i18n/es-ES/pages/user_upload.ts +3 -0
- package/i18n/es-ES/shared/content_blocks.ts +20 -0
- package/i18n/es-ES/shared/index.ts +11 -0
- package/i18n/es-ES/shared/menu.ts +3 -0
- package/i18n/es-ES/shared/permission.ts +15 -0
- package/i18n/es-ES/shared/settings.ts +16 -0
- package/i18n/sv-SE/components/content/blocks/feedback.ts +29 -0
- package/i18n/sv-SE/components/content/blocks/image.ts +5 -0
- package/i18n/sv-SE/components/content/blocks/index.ts +15 -0
- package/i18n/sv-SE/components/content/blocks/tab.ts +4 -0
- package/i18n/sv-SE/components/content/blocks/table.ts +4 -0
- package/i18n/sv-SE/components/content/blocks/user_upload.ts +13 -0
- package/i18n/sv-SE/components/content/blocks/video.ts +53 -0
- package/i18n/sv-SE/components/content/index.ts +5 -0
- package/i18n/sv-SE/components/index.ts +12 -0
- package/i18n/sv-SE/components/navigation/ask_the_expert.ts +11 -0
- package/i18n/sv-SE/components/navigation/image.ts +4 -0
- package/i18n/sv-SE/components/navigation/index.ts +7 -0
- package/i18n/sv-SE/components/navigation/user_upload.ts +3 -0
- package/i18n/sv-SE/components/settings/clickable_icon.ts +10 -0
- package/i18n/sv-SE/components/settings/image.ts +1 -0
- package/i18n/sv-SE/components/settings/index.ts +13 -0
- package/i18n/sv-SE/components/settings/text_editor.ts +7 -0
- package/i18n/sv-SE/components/settings/user_upload.ts +11 -0
- package/i18n/sv-SE/components/settings/video.ts +13 -0
- package/i18n/sv-SE/components/utils/index.ts +5 -0
- package/i18n/sv-SE/components/utils/tiny_mce_wrapper.ts +18 -0
- package/i18n/sv-SE/index.ts +16 -0
- package/i18n/sv-SE/modules/index.ts +5 -0
- package/i18n/sv-SE/pages/glossary.ts +7 -0
- package/i18n/sv-SE/pages/index.ts +7 -0
- package/i18n/sv-SE/pages/user_upload.ts +3 -0
- package/{lib/i18n/en-US/shared/content_blocks.js → i18n/sv-SE/shared/content_blocks.ts} +8 -9
- package/i18n/sv-SE/shared/index.ts +11 -0
- package/i18n/sv-SE/shared/menu.ts +3 -0
- package/i18n/sv-SE/shared/permission.ts +15 -0
- package/i18n/sv-SE/shared/settings.ts +15 -0
- package/package.json +1 -1
- package/pages/glossary.vue +2 -2
- package/pages/userUpload.vue +1 -1
- package/plugin.js +28 -3
- package/.idea/codeStyles/Project.xml +0 -58
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/php-docker-settings.xml +0 -24
- package/.idea/php.xml +0 -19
- package/.idea/vcs.xml +0 -6
- package/.idea/watcherTasks.xml +0 -4
- package/.idea/windward-ui-plugin-core.iml +0 -8
- package/coverage/clover.xml +0 -223
- package/coverage/coverage-final.json +0 -16
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/components/Content/Blocks/Accordion.vue.html +0 -430
- package/coverage/lcov-report/components/Content/Blocks/Image.vue.html +0 -394
- package/coverage/lcov-report/components/Content/Blocks/Math.vue.html +0 -262
- package/coverage/lcov-report/components/Content/Blocks/RichText.vue.html +0 -295
- package/coverage/lcov-report/components/Content/Blocks/Tab.vue.html +0 -415
- package/coverage/lcov-report/components/Content/Blocks/Table.vue.html +0 -667
- package/coverage/lcov-report/components/Content/Blocks/Video.vue.html +0 -2275
- package/coverage/lcov-report/components/Content/Blocks/index.html +0 -206
- package/coverage/lcov-report/components/utils/ContentViewer.vue.html +0 -199
- package/coverage/lcov-report/components/utils/MathExpressionEditor.vue.html +0 -919
- package/coverage/lcov-report/components/utils/MathLiveWrapper.vue.html +0 -343
- package/coverage/lcov-report/components/utils/TinyMCEWrapper.vue.html +0 -271
- package/coverage/lcov-report/components/utils/index.html +0 -161
- package/coverage/lcov-report/config/index.html +0 -116
- package/coverage/lcov-report/config/tinymce.config.js.html +0 -493
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/helpers/MathHelper.ts.html +0 -793
- package/coverage/lcov-report/helpers/index.html +0 -116
- package/coverage/lcov-report/helpers/tinymce/index.html +0 -116
- package/coverage/lcov-report/helpers/tinymce/plugin.ts.html +0 -334
- package/coverage/lcov-report/index.html +0 -191
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/test/index.html +0 -116
- package/coverage/lcov-report/test/mocks.js.html +0 -457
- package/coverage/lcov.info +0 -403
- package/lib/helpers/GlossaryHelper.d.ts +0 -9
- package/lib/helpers/GlossaryHelper.js +0 -118
- package/lib/helpers/GlossaryTerm.d.ts +0 -10
- package/lib/helpers/GlossaryTerm.js +0 -22
- package/lib/helpers/MathHelper.d.ts +0 -99
- package/lib/helpers/MathHelper.js +0 -194
- package/lib/helpers/tinymce/plugin.d.ts +0 -2
- package/lib/helpers/tinymce/plugin.js +0 -86
- package/lib/i18n/en-US/components/content/blocks/image.d.ts +0 -6
- package/lib/i18n/en-US/components/content/blocks/image.js +0 -7
- package/lib/i18n/en-US/components/content/blocks/index.d.ts +0 -75
- package/lib/i18n/en-US/components/content/blocks/index.js +0 -14
- package/lib/i18n/en-US/components/content/blocks/tab.d.ts +0 -5
- package/lib/i18n/en-US/components/content/blocks/tab.js +0 -6
- package/lib/i18n/en-US/components/content/blocks/table.d.ts +0 -5
- package/lib/i18n/en-US/components/content/blocks/table.js +0 -6
- package/lib/i18n/en-US/components/content/blocks/user_upload.d.ts +0 -13
- package/lib/i18n/en-US/components/content/blocks/user_upload.js +0 -14
- package/lib/i18n/en-US/components/content/blocks/video.d.ts +0 -48
- package/lib/i18n/en-US/components/content/blocks/video.js +0 -49
- package/lib/i18n/en-US/components/content/index.d.ts +0 -77
- package/lib/i18n/en-US/components/content/index.js +0 -6
- package/lib/i18n/en-US/components/index.d.ts +0 -140
- package/lib/i18n/en-US/components/index.js +0 -12
- package/lib/i18n/en-US/components/navigation/image.d.ts +0 -5
- package/lib/i18n/en-US/components/navigation/image.js +0 -6
- package/lib/i18n/en-US/components/navigation/index.d.ts +0 -10
- package/lib/i18n/en-US/components/navigation/index.js +0 -8
- package/lib/i18n/en-US/components/navigation/user_upload.d.ts +0 -4
- package/lib/i18n/en-US/components/navigation/user_upload.js +0 -5
- package/lib/i18n/en-US/components/settings/clickable_icon.d.ts +0 -6
- package/lib/i18n/en-US/components/settings/clickable_icon.js +0 -7
- package/lib/i18n/en-US/components/settings/image.d.ts +0 -2
- package/lib/i18n/en-US/components/settings/image.js +0 -3
- package/lib/i18n/en-US/components/settings/index.d.ts +0 -39
- package/lib/i18n/en-US/components/settings/index.js +0 -14
- package/lib/i18n/en-US/components/settings/text_editor.d.ts +0 -8
- package/lib/i18n/en-US/components/settings/text_editor.js +0 -9
- package/lib/i18n/en-US/components/settings/user_upload.d.ts +0 -12
- package/lib/i18n/en-US/components/settings/user_upload.js +0 -13
- package/lib/i18n/en-US/components/settings/video.d.ts +0 -13
- package/lib/i18n/en-US/components/settings/video.js +0 -14
- package/lib/i18n/en-US/components/utils/index.d.ts +0 -15
- package/lib/i18n/en-US/components/utils/index.js +0 -6
- package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.d.ts +0 -13
- package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.js +0 -14
- package/lib/i18n/en-US/index.d.ts +0 -197
- package/lib/i18n/en-US/index.js +0 -16
- package/lib/i18n/en-US/modules/index.d.ts +0 -2
- package/lib/i18n/en-US/modules/index.js +0 -6
- package/lib/i18n/en-US/pages/glossary.d.ts +0 -8
- package/lib/i18n/en-US/pages/glossary.js +0 -9
- package/lib/i18n/en-US/pages/index.d.ts +0 -13
- package/lib/i18n/en-US/pages/index.js +0 -8
- package/lib/i18n/en-US/pages/user_upload.d.ts +0 -4
- package/lib/i18n/en-US/pages/user_upload.js +0 -5
- package/lib/i18n/en-US/shared/content_blocks.d.ts +0 -20
- package/lib/i18n/en-US/shared/index.d.ts +0 -39
- package/lib/i18n/en-US/shared/index.js +0 -10
- package/lib/i18n/en-US/shared/menu.d.ts +0 -4
- package/lib/i18n/en-US/shared/menu.js +0 -5
- package/lib/i18n/en-US/shared/settings.d.ts +0 -15
- package/lib/i18n/en-US/shared/settings.js +0 -16
- package/lib/i18n/en-US.d.ts +0 -197
- package/lib/i18n/en-US.js +0 -15
- package/lib/models/UserFileAsset.d.ts +0 -5
- package/lib/models/UserFileAsset.js +0 -37
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ Link to Windward ui repo
|
|
|
24
24
|
$ cd windward-ui
|
|
25
25
|
$ npm install
|
|
26
26
|
$ cd node_modules
|
|
27
|
-
$ npm link @
|
|
27
|
+
$ npm link @windward/core
|
|
28
28
|
$ npm run dev
|
|
29
29
|
```
|
|
30
30
|
|
|
@@ -61,6 +61,7 @@ Your Repos are linked at this point and you are ready to start developing windwa
|
|
|
61
61
|
```
|
|
62
62
|
import UserUpload from '@/components/Content/Blocks/UserUpload.vue'
|
|
63
63
|
```
|
|
64
|
+
|
|
64
65
|
4. To add a page use the below format in your `pages: []` in `plugin.js`
|
|
65
66
|
```javascript
|
|
66
67
|
{
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<v-container>
|
|
4
4
|
<v-row no-gutters>
|
|
5
|
-
<
|
|
5
|
+
<h3>{{ block.metadata.config.title }}</h3>
|
|
6
6
|
</v-row>
|
|
7
7
|
<v-row no-gutters>
|
|
8
|
-
<
|
|
8
|
+
<h4>{{ block.metadata.config.description }}</h4>
|
|
9
9
|
</v-row>
|
|
10
10
|
<v-row no-gutters>
|
|
11
11
|
<p>
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
outlined
|
|
32
32
|
@click="item.active = !item.active"
|
|
33
33
|
>
|
|
34
|
-
<v-icon>{{ item.icon }}</v-icon>
|
|
34
|
+
<v-icon>{{ onHandleHtmlEntities(item.icon) }}</v-icon>
|
|
35
35
|
</v-btn>
|
|
36
36
|
</v-col>
|
|
37
37
|
<v-col cols="10" v-if="item.active">
|
|
@@ -89,6 +89,15 @@ export default {
|
|
|
89
89
|
displayText: false,
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
|
+
methods: {
|
|
93
|
+
onHandleHtmlEntities(str) {
|
|
94
|
+
let txt = document.createElement('textarea')
|
|
95
|
+
|
|
96
|
+
txt.innerHTML = str
|
|
97
|
+
|
|
98
|
+
return txt.value
|
|
99
|
+
},
|
|
100
|
+
},
|
|
92
101
|
}
|
|
93
102
|
</script>
|
|
94
103
|
<style scoped>
|
|
@@ -2,21 +2,28 @@
|
|
|
2
2
|
<v-container>
|
|
3
3
|
<v-container v-if="!doesFeedbackExist">
|
|
4
4
|
<v-row>
|
|
5
|
-
<
|
|
5
|
+
<h3>
|
|
6
6
|
{{
|
|
7
7
|
block.metadata.config.definition.name
|
|
8
8
|
? block.metadata.config.definition.name
|
|
9
9
|
: $t(
|
|
10
|
-
'
|
|
10
|
+
'windward.core.components.content.blocks.feedback.feedback'
|
|
11
11
|
)
|
|
12
12
|
}}
|
|
13
|
-
</
|
|
13
|
+
</h3>
|
|
14
14
|
</v-row>
|
|
15
15
|
<v-row class="pt-2">
|
|
16
16
|
<p>
|
|
17
17
|
{{
|
|
18
18
|
$t(
|
|
19
|
-
'
|
|
19
|
+
'windward.core.components.content.blocks.feedback.likert_directions'
|
|
20
|
+
)
|
|
21
|
+
}}
|
|
22
|
+
</p>
|
|
23
|
+
<p>
|
|
24
|
+
{{
|
|
25
|
+
$t(
|
|
26
|
+
'windward.core.components.content.blocks.feedback.description'
|
|
20
27
|
)
|
|
21
28
|
}}
|
|
22
29
|
</p>
|
|
@@ -25,14 +32,14 @@
|
|
|
25
32
|
<v-container v-if="doesFeedbackExist">
|
|
26
33
|
<v-row>
|
|
27
34
|
<h2>
|
|
28
|
-
{{
|
|
35
|
+
{{ existingFeedback.survey_type }}
|
|
29
36
|
</h2>
|
|
30
37
|
</v-row>
|
|
31
38
|
<v-row class="pt-2">
|
|
32
39
|
<p>
|
|
33
40
|
{{
|
|
34
41
|
$t(
|
|
35
|
-
'
|
|
42
|
+
'windward.core.components.content.blocks.feedback.sent_feedback'
|
|
36
43
|
)
|
|
37
44
|
}}
|
|
38
45
|
</p>
|
|
@@ -87,11 +94,11 @@
|
|
|
87
94
|
class="text-center mt-4 mr-2"
|
|
88
95
|
@click="onReset()"
|
|
89
96
|
>{{
|
|
90
|
-
$t('
|
|
97
|
+
$t('windward.core.components.content.blocks.feedback.reset')
|
|
91
98
|
}}</v-btn
|
|
92
99
|
>
|
|
93
100
|
<v-btn color="success" class="text-center mt-4" @click="validate">{{
|
|
94
|
-
$t('
|
|
101
|
+
$t('windward.core.components.content.blocks.feedback.save')
|
|
95
102
|
}}</v-btn>
|
|
96
103
|
</v-row>
|
|
97
104
|
<v-form
|
|
@@ -187,13 +194,13 @@ export default {
|
|
|
187
194
|
courseUserId: '',
|
|
188
195
|
valid: true,
|
|
189
196
|
key: '0',
|
|
190
|
-
existingFeedback: '',
|
|
191
197
|
doesFeedbackExist: false,
|
|
198
|
+
existingFeedback: '',
|
|
192
199
|
templates: '',
|
|
193
200
|
chosenPreset: '',
|
|
194
201
|
studentResponse: '',
|
|
195
202
|
noResponse: this.$t(
|
|
196
|
-
'
|
|
203
|
+
'windward.core.components.content.blocks.feedback.no_response_entered'
|
|
197
204
|
),
|
|
198
205
|
}
|
|
199
206
|
},
|
|
@@ -271,6 +278,7 @@ export default {
|
|
|
271
278
|
survey_snapshot:
|
|
272
279
|
this.block.metadata.config.definition.metadata.definition,
|
|
273
280
|
survey_question_answers: this.chosenPreset,
|
|
281
|
+
survey_type: this.block.metadata.config.definition.name,
|
|
274
282
|
version: version,
|
|
275
283
|
}
|
|
276
284
|
let feedback = new SurveyResult(feedbackData).for(
|
|
@@ -292,7 +300,7 @@ export default {
|
|
|
292
300
|
} else {
|
|
293
301
|
this.$toast.error(
|
|
294
302
|
this.$t(
|
|
295
|
-
'
|
|
303
|
+
'windward.core.components.content.blocks.feedback.fill_out'
|
|
296
304
|
)
|
|
297
305
|
)
|
|
298
306
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
(v) =>
|
|
10
10
|
!!v ||
|
|
11
11
|
$t(
|
|
12
|
-
'
|
|
12
|
+
'windward.core.components.content.blocks.feedback.required'
|
|
13
13
|
),
|
|
14
14
|
]"
|
|
15
15
|
row
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
color="green"
|
|
22
22
|
:label="
|
|
23
23
|
$t(
|
|
24
|
-
'
|
|
24
|
+
'windward.core.components.content.blocks.feedback.scale.strongly_agree'
|
|
25
25
|
)
|
|
26
26
|
"
|
|
27
27
|
value="5"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
color="light-green"
|
|
32
32
|
:label="
|
|
33
33
|
$t(
|
|
34
|
-
'
|
|
34
|
+
'windward.core.components.content.blocks.feedback.scale.agree'
|
|
35
35
|
)
|
|
36
36
|
"
|
|
37
37
|
value="4"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
color="amber"
|
|
42
42
|
:label="
|
|
43
43
|
$t(
|
|
44
|
-
'
|
|
44
|
+
'windward.core.components.content.blocks.feedback.scale.neutral'
|
|
45
45
|
)
|
|
46
46
|
"
|
|
47
47
|
value="3"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
color="orange"
|
|
52
52
|
:label="
|
|
53
53
|
$t(
|
|
54
|
-
'
|
|
54
|
+
'windward.core.components.content.blocks.feedback.scale.disagree'
|
|
55
55
|
)
|
|
56
56
|
"
|
|
57
57
|
value="2"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
color="red"
|
|
62
62
|
:label="
|
|
63
63
|
$t(
|
|
64
|
-
'
|
|
64
|
+
'windward.core.components.content.blocks.feedback.scale.strongly_disagree'
|
|
65
65
|
)
|
|
66
66
|
"
|
|
67
67
|
value="1"
|
|
@@ -4,27 +4,28 @@
|
|
|
4
4
|
{{ value.body }}
|
|
5
5
|
</p>
|
|
6
6
|
<div v-if="!feedbackExist">
|
|
7
|
-
<
|
|
7
|
+
<v-text-field
|
|
8
|
+
outlined
|
|
9
|
+
v-model="value.response"
|
|
10
|
+
:label="
|
|
11
|
+
$t('windward.core.components.content.blocks.feedback.enter')
|
|
12
|
+
"
|
|
13
|
+
></v-text-field>
|
|
8
14
|
</div>
|
|
9
15
|
<div v-else>
|
|
10
16
|
<div v-if="value.response">
|
|
11
|
-
<
|
|
17
|
+
<div>{{ value.response }}</div>
|
|
12
18
|
</div>
|
|
13
19
|
<div v-else>
|
|
14
|
-
<
|
|
20
|
+
<div>{{ noResponse }}</div>
|
|
15
21
|
</div>
|
|
16
22
|
</div>
|
|
17
23
|
</v-container>
|
|
18
24
|
</template>
|
|
19
25
|
<script>
|
|
20
|
-
import TextEditor from '~/components/Text/TextEditor.vue'
|
|
21
|
-
import TextViewer from '~/components/Text/TextViewer.vue'
|
|
22
26
|
export default {
|
|
23
27
|
name: 'FeedbackQuestionOpenResponse',
|
|
24
|
-
components: {
|
|
25
|
-
TextEditor,
|
|
26
|
-
TextViewer,
|
|
27
|
-
},
|
|
28
|
+
components: {},
|
|
28
29
|
props: {
|
|
29
30
|
value: { type: Object, required: true, default: '' },
|
|
30
31
|
feedbackExist: { type: Boolean, required: false, default: false },
|
|
@@ -32,7 +33,7 @@ export default {
|
|
|
32
33
|
data() {
|
|
33
34
|
return {
|
|
34
35
|
noResponse: this.$t(
|
|
35
|
-
'
|
|
36
|
+
'windward.core.components.content.blocks.feedback.no_response_entered'
|
|
36
37
|
),
|
|
37
38
|
}
|
|
38
39
|
},
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
(v) =>
|
|
9
9
|
!!v ||
|
|
10
10
|
$t(
|
|
11
|
-
'
|
|
11
|
+
'windward.core.components.content.blocks.feedback.required'
|
|
12
12
|
),
|
|
13
13
|
]"
|
|
14
14
|
row
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
<v-radio
|
|
19
19
|
class="likert-radio"
|
|
20
20
|
:label="
|
|
21
|
-
$t('
|
|
21
|
+
$t('windward.core.components.content.blocks.feedback.yes')
|
|
22
22
|
"
|
|
23
23
|
value="true"
|
|
24
24
|
></v-radio>
|
|
25
25
|
<v-radio
|
|
26
26
|
class="likert-radio"
|
|
27
|
-
:label="$t('
|
|
27
|
+
:label="$t('windward.core.components.content.blocks.feedback.no')"
|
|
28
28
|
value="false"
|
|
29
29
|
></v-radio>
|
|
30
30
|
</v-radio-group>
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
type="image, image, list-item-avatar"
|
|
22
22
|
class="reload-skeleton"
|
|
23
23
|
></v-skeleton-loader>
|
|
24
|
-
<
|
|
24
|
+
<h3 v-if="block.metadata.config.title" class="pl-4">
|
|
25
25
|
{{ block.metadata.config.title }}
|
|
26
|
-
</
|
|
26
|
+
</h3>
|
|
27
27
|
<VuetifyPlayer
|
|
28
28
|
v-if="hasSource"
|
|
29
29
|
:language="$i18n && $i18n.locale ? $i18n.locale : 'en-US'"
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-list-item @click="dialog = true">
|
|
3
|
+
<v-list-item-action>
|
|
4
|
+
<v-icon>{{ config.icon }}</v-icon>
|
|
5
|
+
</v-list-item-action>
|
|
6
|
+
<v-list-item-content>
|
|
7
|
+
<v-list-item-title>
|
|
8
|
+
{{ $t(config.i18n) }}
|
|
9
|
+
</v-list-item-title>
|
|
10
|
+
<Dialog v-model="dialog" color="primary" text :trigger="false">
|
|
11
|
+
<template #title>{{ $t(config.i18n) }}</template>
|
|
12
|
+
<template #form="{ on, attrs }">
|
|
13
|
+
<v-card flat v-bind="attrs" v-on="on">
|
|
14
|
+
<v-container fluid>
|
|
15
|
+
<v-row>
|
|
16
|
+
<v-col cols="12" class="pl-6">
|
|
17
|
+
<h3>
|
|
18
|
+
{{
|
|
19
|
+
$t(
|
|
20
|
+
'windward.core.components.navigation.ask_the_expert.description'
|
|
21
|
+
)
|
|
22
|
+
}}
|
|
23
|
+
</h3>
|
|
24
|
+
</v-col>
|
|
25
|
+
<v-col
|
|
26
|
+
v-if="
|
|
27
|
+
$PermissionService.userHasAccessTo(
|
|
28
|
+
'windward.global.course,windward.organization.course.contentBlock',
|
|
29
|
+
'writable'
|
|
30
|
+
)
|
|
31
|
+
"
|
|
32
|
+
cols="12"
|
|
33
|
+
>
|
|
34
|
+
<v-col cols="12">
|
|
35
|
+
<h3 class="pb-4">
|
|
36
|
+
{{
|
|
37
|
+
$t(
|
|
38
|
+
'windward.core.components.navigation.ask_the_expert.config'
|
|
39
|
+
)
|
|
40
|
+
}}
|
|
41
|
+
</h3>
|
|
42
|
+
</v-col>
|
|
43
|
+
<v-col cols="12">
|
|
44
|
+
<v-text-field
|
|
45
|
+
v-model="courseAndContentName"
|
|
46
|
+
disabled
|
|
47
|
+
outlined
|
|
48
|
+
:label="
|
|
49
|
+
$t(
|
|
50
|
+
'windward.core.components.navigation.ask_the_expert.course_info'
|
|
51
|
+
)
|
|
52
|
+
"
|
|
53
|
+
></v-text-field>
|
|
54
|
+
</v-col>
|
|
55
|
+
</v-col>
|
|
56
|
+
<v-col
|
|
57
|
+
v-if="
|
|
58
|
+
!$PermissionService.userHasAccessTo(
|
|
59
|
+
'windward.global.course,windward.organization.course.contentBlock',
|
|
60
|
+
'writable'
|
|
61
|
+
)
|
|
62
|
+
"
|
|
63
|
+
cols="12"
|
|
64
|
+
>
|
|
65
|
+
<v-col cols="12">
|
|
66
|
+
<v-text-field
|
|
67
|
+
v-model="subject"
|
|
68
|
+
outlined
|
|
69
|
+
:label="
|
|
70
|
+
$t(
|
|
71
|
+
'windward.core.components.navigation.ask_the_expert.subject'
|
|
72
|
+
)
|
|
73
|
+
"
|
|
74
|
+
></v-text-field>
|
|
75
|
+
</v-col>
|
|
76
|
+
<v-col cols="12">
|
|
77
|
+
<v-textarea v-model="body" outlined>
|
|
78
|
+
<template #label>
|
|
79
|
+
<div>
|
|
80
|
+
{{
|
|
81
|
+
$t(
|
|
82
|
+
'windward.core.components.navigation.ask_the_expert.question'
|
|
83
|
+
)
|
|
84
|
+
}}
|
|
85
|
+
</div>
|
|
86
|
+
</template>
|
|
87
|
+
</v-textarea>
|
|
88
|
+
</v-col>
|
|
89
|
+
<v-col
|
|
90
|
+
cols="12"
|
|
91
|
+
class="pt-5 pb-5 d-flex flex-row-reverse"
|
|
92
|
+
>
|
|
93
|
+
<v-btn
|
|
94
|
+
class="primary"
|
|
95
|
+
:disabled="valid"
|
|
96
|
+
@click="onSubmit"
|
|
97
|
+
>{{
|
|
98
|
+
$t('shared.forms.submit')
|
|
99
|
+
}}</v-btn
|
|
100
|
+
>
|
|
101
|
+
</v-col>
|
|
102
|
+
</v-col>
|
|
103
|
+
</v-row>
|
|
104
|
+
</v-container>
|
|
105
|
+
</v-card>
|
|
106
|
+
</template>
|
|
107
|
+
</Dialog>
|
|
108
|
+
</v-list-item-content>
|
|
109
|
+
</v-list-item>
|
|
110
|
+
</template>
|
|
111
|
+
|
|
112
|
+
<script>
|
|
113
|
+
import { mapGetters } from 'vuex'
|
|
114
|
+
import AuthUserRepository from '~/models/repositories/AuthUserRepository'
|
|
115
|
+
import AskTheExpert from '~/models/AskTheExpert'
|
|
116
|
+
|
|
117
|
+
export default {
|
|
118
|
+
name: 'NavigationItemAskTheExpert',
|
|
119
|
+
components: {},
|
|
120
|
+
props: {
|
|
121
|
+
config: { type: Object, required: true },
|
|
122
|
+
},
|
|
123
|
+
data() {
|
|
124
|
+
return {
|
|
125
|
+
currentUser: new AuthUserRepository(this.$nuxt),
|
|
126
|
+
expert: '',
|
|
127
|
+
course: this.$ContentService.getCourse(),
|
|
128
|
+
content: this.$ContentService.get().content,
|
|
129
|
+
courseAndContentName: '',
|
|
130
|
+
body: '',
|
|
131
|
+
subject: '',
|
|
132
|
+
dialog: false,
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
computed: {
|
|
136
|
+
...mapGetters({
|
|
137
|
+
enrollment: 'enrollment/get',
|
|
138
|
+
}),
|
|
139
|
+
valid() {
|
|
140
|
+
if (this.body === '' || this.subject === '') {
|
|
141
|
+
return true
|
|
142
|
+
} else {
|
|
143
|
+
return false
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
mounted() {
|
|
148
|
+
this.courseAndContentName = this.course.name + ': ' + this.content.name
|
|
149
|
+
},
|
|
150
|
+
methods: {
|
|
151
|
+
async onSubmit() {
|
|
152
|
+
const askTheExpertSubmission = new AskTheExpert({
|
|
153
|
+
body: this.body,
|
|
154
|
+
subject: this.subject,
|
|
155
|
+
currentUser: this.currentUser,
|
|
156
|
+
enrollment: this.enrollment,
|
|
157
|
+
content: this.content,
|
|
158
|
+
course: this.course,
|
|
159
|
+
courseAndContentName: this.courseAndContentName,
|
|
160
|
+
})
|
|
161
|
+
await askTheExpertSubmission.save()
|
|
162
|
+
if (askTheExpertSubmission) {
|
|
163
|
+
this.$dialog.success('Ask The Expert Email Sent Successfully')
|
|
164
|
+
this.body = ''
|
|
165
|
+
this.subject = ''
|
|
166
|
+
this.dialog = false
|
|
167
|
+
} else {
|
|
168
|
+
this.$dialog.error('Ask The Expert Email Failed')
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
}
|
|
173
|
+
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<v-container>
|
|
4
|
-
<v-col>
|
|
4
|
+
<v-col class="pa-0">
|
|
5
5
|
<v-text-field
|
|
6
6
|
v-model="block.metadata.config.title"
|
|
7
7
|
:label="
|
|
@@ -18,7 +18,11 @@
|
|
|
18
18
|
)
|
|
19
19
|
"
|
|
20
20
|
></v-text-field>
|
|
21
|
-
<v-btn
|
|
21
|
+
<v-btn
|
|
22
|
+
color="primary"
|
|
23
|
+
outlined
|
|
24
|
+
@click="onAddElement"
|
|
25
|
+
class="btn-add"
|
|
22
26
|
><v-icon>mdi-plus</v-icon
|
|
23
27
|
>{{ $t('shared.forms.add') }}</v-btn
|
|
24
28
|
>
|
|
@@ -29,7 +33,7 @@
|
|
|
29
33
|
:key="itemIndex"
|
|
30
34
|
class="elevation-0"
|
|
31
35
|
>
|
|
32
|
-
<v-expansion-panel-header class="elevation-0">{{
|
|
36
|
+
<v-expansion-panel-header class="elevation-0 pa-0">{{
|
|
33
37
|
'item ' + (itemIndex + 1)
|
|
34
38
|
}}</v-expansion-panel-header>
|
|
35
39
|
<v-expansion-panel-content
|
|
@@ -37,8 +41,6 @@
|
|
|
37
41
|
:key="expansionPanelKey"
|
|
38
42
|
>
|
|
39
43
|
<v-text-field
|
|
40
|
-
:counter="1"
|
|
41
|
-
maxlength="1"
|
|
42
44
|
v-model="
|
|
43
45
|
block.metadata.config.items[itemIndex].icon
|
|
44
46
|
"
|
|
@@ -186,4 +188,7 @@ export default {
|
|
|
186
188
|
.v-progress-circular {
|
|
187
189
|
margin: 1rem;
|
|
188
190
|
}
|
|
191
|
+
.btn-add {
|
|
192
|
+
width: 100%;
|
|
193
|
+
}
|
|
189
194
|
</style>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<
|
|
4
|
-
{{ $t('
|
|
5
|
-
</
|
|
3
|
+
<h4 class="pb-4">
|
|
4
|
+
{{ $t('windward.core.components.content.blocks.feedback.preset') }}
|
|
5
|
+
</h4>
|
|
6
6
|
<v-row>
|
|
7
7
|
<v-col v-for="preset in templates" :key="preset.id" cols="6">
|
|
8
8
|
<v-tooltip top>
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
</v-btn>
|
|
31
31
|
<v-row v-if="!block.metadata.config.expand">
|
|
32
32
|
<v-col cols="12">
|
|
33
|
-
<
|
|
33
|
+
<h4 class="pb-4 pt-4">
|
|
34
34
|
{{
|
|
35
35
|
$t(
|
|
36
36
|
'windward.core.components.content.blocks.user_upload.instructions_title'
|
|
37
37
|
)
|
|
38
38
|
}}
|
|
39
|
-
</
|
|
39
|
+
</h4>
|
|
40
40
|
<TextEditor v-model="block.metadata.config.instructions" />
|
|
41
41
|
</v-col>
|
|
42
42
|
</v-row>
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
v-model="block.metadata.config.title"
|
|
7
7
|
:label="$t('windward.core.components.settings.video.title')"
|
|
8
8
|
></v-text-field>
|
|
9
|
-
<
|
|
9
|
+
<h4 class="mb-3">
|
|
10
10
|
{{ $t('windward.core.components.settings.video.sources') }}
|
|
11
|
-
</
|
|
11
|
+
</h4>
|
|
12
12
|
<v-tabs v-model="fileTab" fixed-tabs background-color="accent">
|
|
13
13
|
<v-tab>
|
|
14
14
|
{{
|
|
@@ -211,9 +211,9 @@
|
|
|
211
211
|
</v-row>
|
|
212
212
|
<v-row>
|
|
213
213
|
<v-col cols="12">
|
|
214
|
-
<
|
|
214
|
+
<h4 class="mb-3">
|
|
215
215
|
{{ $t('windward.core.components.settings.video.playlist') }}
|
|
216
|
-
</
|
|
216
|
+
</h4>
|
|
217
217
|
<div>
|
|
218
218
|
<strong
|
|
219
219
|
v-if="
|
|
@@ -311,9 +311,9 @@
|
|
|
311
311
|
</v-row>
|
|
312
312
|
<v-row>
|
|
313
313
|
<v-col cols="12">
|
|
314
|
-
<
|
|
314
|
+
<h4 class="mb-3">
|
|
315
315
|
{{ $t('windward.core.components.settings.video.playback') }}
|
|
316
|
-
</
|
|
316
|
+
</h4>
|
|
317
317
|
<v-card elevation="0">
|
|
318
318
|
<v-card-text>
|
|
319
319
|
<v-row>
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
<script>
|
|
9
9
|
import MathHelper from '../../helpers/MathHelper'
|
|
10
10
|
import GlossaryHelper from '../../helpers/GlossaryHelper'
|
|
11
|
+
import FillInBlankHelper from '../../helpers/FillInBlankHelper'
|
|
11
12
|
import { mapGetters } from 'vuex'
|
|
12
13
|
import Vue from 'vue'
|
|
13
14
|
export default {
|
|
@@ -29,17 +30,27 @@ export default {
|
|
|
29
30
|
convertedContent() {
|
|
30
31
|
let content = ''
|
|
31
32
|
if (this.value) {
|
|
33
|
+
content = _.cloneDeep(this.value)
|
|
32
34
|
if (
|
|
33
|
-
|
|
35
|
+
MathHelper.containsMathML(content) ||
|
|
36
|
+
MathHelper.containsLatex(content)
|
|
37
|
+
) {
|
|
38
|
+
content = MathHelper.convertMathContentToHtml(content)
|
|
39
|
+
}
|
|
40
|
+
if (
|
|
41
|
+
GlossaryHelper.containsGlossaryTerms(content) &&
|
|
34
42
|
_.isObject(this.course.metadata) &&
|
|
35
43
|
_.isArray(this.course.metadata.glossary)
|
|
36
44
|
) {
|
|
37
45
|
content = GlossaryHelper.renderGlossaryWordsHtml(
|
|
38
|
-
|
|
46
|
+
content,
|
|
39
47
|
this.course.metadata.glossary
|
|
40
48
|
)
|
|
41
|
-
}
|
|
42
|
-
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (FillInBlankHelper.containsFillInBlank(content)) {
|
|
52
|
+
content =
|
|
53
|
+
FillInBlankHelper.renderFillInTHeBlankHtml(content)
|
|
43
54
|
}
|
|
44
55
|
}
|
|
45
56
|
return Vue.compile('<div>' + content + '</div>')
|