@windward/core 0.14.0 → 0.16.0

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 (60) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/bitbucket-pipelines.yml +8 -0
  3. package/components/Content/Blocks/BlockQuote.vue +51 -47
  4. package/components/Content/Blocks/GenerateAIQuestionButton.vue +151 -37
  5. package/components/Content/Blocks/OpenResponse.vue +11 -3
  6. package/components/Content/Blocks/UserUpload/ManageDataTableUserFiles.vue +2 -11
  7. package/components/Content/Blocks/Video.vue +1 -1
  8. package/components/Glossary/GlossaryVerification.vue +240 -0
  9. package/components/Navigation/Items/GlossaryNav.vue +8 -2
  10. package/components/Navigation/Items/UserUploadNav.vue +32 -13
  11. package/components/Settings/AccordionSettings.vue +37 -27
  12. package/components/Settings/ClickableIconsSettings.vue +1 -0
  13. package/components/Settings/ImageSettings.vue +5 -12
  14. package/components/Settings/TabSettings.vue +33 -23
  15. package/components/Settings/TextEditorSettings.vue +16 -245
  16. package/components/Settings/VideoSettings.vue +1 -1
  17. package/components/utils/ContentViewer.vue +3 -3
  18. package/components/utils/TinyMCEWrapper.vue +24 -14
  19. package/components/utils/glossary/CourseGlossary.vue +75 -95
  20. package/components/utils/glossary/CourseGlossaryForm.vue +42 -13
  21. package/components/utils/glossary/GlossaryToolTip.vue +7 -11
  22. package/helpers/GlossaryHelper.ts +18 -16
  23. package/i18n/en-US/components/content/blocks/generate_questions.ts +26 -11
  24. package/i18n/en-US/pages/glossary.ts +3 -1
  25. package/i18n/en-US/shared/content_blocks.ts +1 -1
  26. package/i18n/en-US/shared/notification.ts +5 -0
  27. package/i18n/en-US/shared/permission.ts +4 -0
  28. package/i18n/en-US/shared/settings.ts +1 -1
  29. package/i18n/es-ES/components/content/blocks/generate_questions.ts +11 -1
  30. package/i18n/es-ES/pages/glossary.ts +3 -1
  31. package/i18n/es-ES/shared/content_blocks.ts +1 -1
  32. package/i18n/es-ES/shared/notification.ts +5 -0
  33. package/i18n/es-ES/shared/permission.ts +8 -4
  34. package/i18n/es-ES/shared/settings.ts +1 -2
  35. package/i18n/sv-SE/components/content/blocks/generate_questions.ts +11 -1
  36. package/i18n/sv-SE/pages/glossary.ts +3 -1
  37. package/i18n/sv-SE/shared/content_blocks.ts +1 -1
  38. package/i18n/sv-SE/shared/notification.ts +4 -0
  39. package/i18n/sv-SE/shared/permission.ts +8 -4
  40. package/i18n/sv-SE/shared/settings.ts +1 -1
  41. package/jest.config.js +3 -0
  42. package/models/BaseModel.ts +16 -0
  43. package/models/CourseGlossaryTerm.ts +22 -0
  44. package/models/UserFileAsset.ts +1 -0
  45. package/package.json +4 -3
  46. package/pages/glossary.vue +41 -4
  47. package/pages/userUpload.vue +70 -47
  48. package/plugin.js +34 -12
  49. package/store/glossary.js +57 -0
  50. package/test/Components/Content/Blocks/Feedback.spec.js +3 -1
  51. package/test/Components/Content/Blocks/Video.spec.js +2 -2
  52. package/test/Components/Glossary/GlossaryVerification.spec.js +19 -0
  53. package/test/Components/utils/glossary/CourseGlossary.spec.js +19 -0
  54. package/test/Components/utils/glossary/CourseGlossaryForm.spec.js +28 -0
  55. package/test/__mocks__/helpersMock.js +0 -24
  56. package/test/__mocks__/modelMock.js +5 -0
  57. package/test/helpers/GlossaryHelper.spec.js +32 -14
  58. package/test/mocks.js +11 -0
  59. package/test/setup/before.js +15 -0
  60. package/helpers/GlossaryTerm.ts +0 -31
@@ -2,7 +2,7 @@ export default {
2
2
  title: {
3
3
  assessment: 'Assessment Settings',
4
4
  open_response: 'Open Response Settings',
5
- open_response_collate: 'Open Response Collate Settings',
5
+ open_response_collate: 'Open Response Download Settings',
6
6
  image: 'Image Settings',
7
7
  user_upload: 'User Upload Settings',
8
8
  file_download: 'File Download Settings',
@@ -12,7 +12,7 @@ export default {
12
12
 
13
13
  content_mismatch: 'El contenido no coincide con el tipo de pregunta.',
14
14
  content_mismatch_support:
15
- 'El contenido actual no es adecuado para este tipo de pregunta. Considere agregar ejemplos más específicos o elementos comparables.',
15
+ 'Por favor, añada más texto, ejemplos o explicaciones a esta sección. Recomendamos al menos 50 palabras de contenido relevante para generar preguntas apropiadas.',
16
16
 
17
17
  llm_unavailable:
18
18
  'La generación de preguntas no está disponible temporalmente.',
@@ -25,4 +25,14 @@ export default {
25
25
  },
26
26
  button_label: 'Generar pregunta',
27
27
  selected_pages: 'Página seleccionada',
28
+ ai_assistance: 'Asistencia de IA',
29
+ blooms: {
30
+ blooms_taxonomy: 'Nivel de taxonomía de Bloom',
31
+ none: 'Ninguno seleccionado',
32
+ remember: 'Recordar',
33
+ understand: 'Entender',
34
+ apply: 'Aplicar',
35
+ analyze: 'Analizar',
36
+ evaluate: 'Evaluar',
37
+ },
28
38
  }
@@ -1,7 +1,9 @@
1
1
  export default {
2
2
  title: 'Glosario del curso',
3
3
  term: 'Plazo',
4
- related_term: 'Término relacionado',
4
+ add_term: 'Agregar término',
5
+ edit_term: 'Editar término',
6
+ related_terms: 'Términos relacionados',
5
7
  definition: 'definición',
6
8
  alternate_forms: 'Formas alternativas',
7
9
  }
@@ -8,7 +8,7 @@ export default {
8
8
  math: 'Matemáticas',
9
9
  accordion: 'Acordeón',
10
10
  open_response: 'Respuesta abierta',
11
- open_response_collate: 'Intercalación de respuesta abierta',
11
+ open_response_collate: 'Módulo de descarga de respuestas',
12
12
  image: 'Imagen',
13
13
  user_upload: 'Carga de usuario',
14
14
  clickable_icons: 'Iconos en los que se puede hacer clic',
@@ -10,5 +10,10 @@ export default {
10
10
  'windward-core-ask-the-expert': 'Curso Pregúntele al experto',
11
11
  'windward-core-contact-support': 'Soporte de contacto del curso',
12
12
  },
13
+ type_recipient_address: {
14
+ 'windward-core-ask-the-expert':
15
+ 'Correo electrónico del autor del curso',
16
+ 'windward-core-contact-support': '',
17
+ },
13
18
  },
14
19
  }
@@ -1,15 +1,19 @@
1
1
  export default {
2
2
  type_title: {
3
3
  'plugin->windward->core->organization->course->user->feedback':
4
- 'Feedback access for the current user',
4
+ 'Acceso a comentarios para el usuario actual',
5
5
  'plugin->windward->core->organization->course->user->userUpload':
6
- 'User upload block access for the current user',
6
+ 'Acceso bloqueado a la carga de usuarios para el usuario actual',
7
+ 'plugin->windward->core->organization->course->glossary':
8
+ 'Glosario del curso',
7
9
  },
8
10
 
9
11
  type_description: {
10
12
  'plugin->windward->core->organization->course->user->feedback':
11
- 'The current users access to the feedback block',
13
+ 'Los usuarios actuales tienen acceso al bloque de comentarios',
12
14
  'plugin->windward->core->organization->course->user->userUpload':
13
- 'The current users access to the user upload block',
15
+ 'Los usuarios actuales tienen acceso al bloque de subida de usuarios',
16
+ 'plugin->windward->core->organization->course->glossary':
17
+ 'Accede y gestiona el glosario del curso en la organización actual para tus propios cursos',
14
18
  },
15
19
  }
@@ -2,8 +2,7 @@ export default {
2
2
  title: {
3
3
  assessment: 'Configuración de evaluación',
4
4
  open_response: 'Abrir configuración de respuesta',
5
- open_response_collate:
6
- 'Abrir configuración de clasificación de respuestas',
5
+ open_response_collate: 'Abrir configuración de descarga de respuesta',
7
6
  image: 'Configuración de imagen',
8
7
  user_upload: 'Configuración de carga del usuario',
9
8
  file_download: 'Configuración de descarga de archivos',
@@ -10,7 +10,7 @@ export default {
10
10
 
11
11
  content_mismatch: 'Innehållet matchar inte frågetyp.',
12
12
  content_mismatch_support:
13
- 'Det aktuella innehållet är inte lämpligt för den här typen av frågor. Överväg att lägga till mer specifika exempel eller jämförbara objekt.',
13
+ 'Vänligen lägg till mer text, exempel eller förklaringar till detta avsnitt. Vi rekommenderar minst 50 ord av relevant innehåll för att generera lämpliga frågor.',
14
14
 
15
15
  llm_unavailable: 'Frågegenerering tillfälligt otillgänglig.',
16
16
  llm_unavailable_support:
@@ -22,4 +22,14 @@ export default {
22
22
  },
23
23
  button_label: 'Generera fråga',
24
24
  selected_pages: 'Vald sida',
25
+ ai_assistance: 'AI-hjälp',
26
+ blooms: {
27
+ blooms_taxonomy: 'Blooms taxonominivå',
28
+ none: 'Ingen vald',
29
+ remember: 'Komma ihåg',
30
+ understand: 'Förstå',
31
+ apply: 'Tillämpas',
32
+ analyze: 'Analysera',
33
+ evaluate: 'Utvärdera',
34
+ },
25
35
  }
@@ -1,7 +1,9 @@
1
1
  export default {
2
2
  title: 'Kursordlista',
3
3
  term: 'Term',
4
- related_term: 'Relaterad term',
4
+ add_term: 'Lägg till term',
5
+ edit_term: 'Redigera term',
6
+ related_terms: 'Relaterade villkor',
5
7
  definition: 'definition',
6
8
  alternate_forms: 'Alternativa formulär',
7
9
  }
@@ -8,7 +8,7 @@ export default {
8
8
  math: 'Math',
9
9
  accordion: 'Accordion',
10
10
  open_response: 'Öppet svar',
11
- open_response_collate: 'Öppna svarssortering',
11
+ open_response_collate: 'Öppna svar Ladda ner',
12
12
  image: 'Bild',
13
13
  user_upload: 'User Upload',
14
14
  clickable_icons: 'Klickbara ikoner',
@@ -9,5 +9,9 @@ export default {
9
9
  'windward-core-ask-the-expert': 'Kurs Fråga experten',
10
10
  'windward-core-contact-support': 'Course Contact Support',
11
11
  },
12
+ type_recipient_address: {
13
+ 'windward-core-ask-the-expert': 'Kursägarens e-post',
14
+ 'windward-core-contact-support': '',
15
+ },
12
16
  },
13
17
  }
@@ -1,15 +1,19 @@
1
1
  export default {
2
2
  type_title: {
3
3
  'plugin->windward->core->organization->course->user->feedback':
4
- 'Feedback access for the current user',
4
+ 'Feedback-åtkomst för den aktuella användaren',
5
5
  'plugin->windward->core->organization->course->user->userUpload':
6
- 'User upload block access for the current user',
6
+ 'Användaruppladdning blockerar åtkomst för den aktuella användaren',
7
+ 'plugin->windward->core->organization->course->glossary':
8
+ 'Kursordlista',
7
9
  },
8
10
 
9
11
  type_description: {
10
12
  'plugin->windward->core->organization->course->user->feedback':
11
- 'The current users access to the feedback block',
13
+ 'De nuvarande användarna har tillgång till feedbackblocket',
12
14
  'plugin->windward->core->organization->course->user->userUpload':
13
- 'The current users access to the user upload block',
15
+ 'De nuvarande användarna har tillgång till användaruppladdningsblocket',
16
+ 'plugin->windward->core->organization->course->glossary':
17
+ 'Få tillgång till och hantera kursordlistan i den nuvarande organisationen för dina egna kurser',
14
18
  },
15
19
  }
@@ -2,7 +2,7 @@ export default {
2
2
  title: {
3
3
  assessment: 'Bedömningsinställningar',
4
4
  open_response: 'Öppna svarsinställningar',
5
- open_response_collate: 'Öppna inställningar för svarssortering',
5
+ open_response_collate: 'Öppna inställningar för nedladdning av svar',
6
6
  image: 'Bildinställningar',
7
7
  user_upload: 'Användaruppladdningsinställningar',
8
8
  file_download: 'Filnedladdningsinställningar',
package/jest.config.js CHANGED
@@ -5,6 +5,8 @@ module.exports = {
5
5
  '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
6
6
  '<rootDir>/test/__mocks__/fileMock.js',
7
7
  '\\.(css|less)$': '<rootDir>/test/__mocks__/styleMock.js',
8
+ '^!raw-loader!sass-loader!(.*)$':
9
+ '<rootDir>/test/__mocks__/styleMock.js',
8
10
  },
9
11
  moduleFileExtensions: ['ts', 'js', 'vue', 'json'],
10
12
  transform: {
@@ -12,4 +14,5 @@ module.exports = {
12
14
  '^.+\\.js$': 'babel-jest',
13
15
  '.*\\.(vue)$': 'vue-jest',
14
16
  },
17
+ setupFiles: ['<rootDir>/test/setup/before.js'],
15
18
  }
@@ -0,0 +1,16 @@
1
+ // @ts-ignore
2
+ import Model from '~/models/Model'
3
+
4
+ export default class BaseModel extends Model {
5
+ constructor(...args: any) {
6
+ if (args.length === 0) {
7
+ super()
8
+ } else {
9
+ super(...args)
10
+
11
+ // Constructor level checks / overrides here
12
+ }
13
+
14
+ return this
15
+ }
16
+ }
@@ -0,0 +1,22 @@
1
+ // @ts-ignore
2
+ import BaseModel from './BaseModel'
3
+
4
+ export default class CourseGlossaryTerm extends BaseModel {
5
+ public id!: string
6
+ // eslint-disable-next-line camelcase
7
+ public course_id!: string
8
+ public term!: string
9
+ public definition!: string
10
+ public tags!: string
11
+ // eslint-disable-next-line camelcase
12
+ public alternate_forms!: any
13
+ // eslint-disable-next-line camelcase
14
+ public related_terms!: any
15
+
16
+ private required: string[] = ['term', 'definition']
17
+
18
+ // Set the resource route of the model
19
+ resource() {
20
+ return 'course-glossary-terms'
21
+ }
22
+ }
@@ -1,3 +1,4 @@
1
+ // @ts-ignore
1
2
  import Model from '~/models/Model'
2
3
 
3
4
  export default class UserFileAsset extends Model {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windward/core",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "description": "Windward UI Core Plugins",
5
5
  "main": "plugin.js",
6
6
  "scripts": {
@@ -21,7 +21,7 @@
21
21
  "license": "MIT",
22
22
  "homepage": "https://bitbucket.org/mindedge/windward-ui-plugin-core#readme",
23
23
  "dependencies": {
24
- "@mindedge/vuetify-player": "^0.4.7",
24
+ "@mindedge/vuetify-player": "^0.4.9",
25
25
  "@tinymce/tinymce-vue": "^3.2.8",
26
26
  "accessibility-scanner": "^0.0.1",
27
27
  "eslint": "^8.11.0",
@@ -32,7 +32,8 @@
32
32
  "prettier": "^2.6.0",
33
33
  "raw-loader": "^4.0.2",
34
34
  "speechreader": "^1.1.5",
35
- "tinymce": "^7.1.0"
35
+ "tinymce": "^7.1.0",
36
+ "vuedraggable": "^2.24.3"
36
37
  },
37
38
  "devDependencies": {
38
39
  "@babel/preset-env": "^7.16.11",
@@ -1,8 +1,16 @@
1
1
  <template>
2
2
  <v-row justify="center" align="center">
3
+ <v-col cols="12">
4
+ <Breadcrumbs :items="breadcrumbPath"></Breadcrumbs>
5
+ </v-col>
3
6
  <v-col cols="12">
4
7
  <v-alert
5
- v-if="!$ContextService.courseInSourceOrganization()"
8
+ v-if="
9
+ $PermissionService.userHasAccessTo(
10
+ 'plugin.windward.core.organization.course.glossary',
11
+ 'writable'
12
+ ) && !$ContextService.courseInSourceOrganization()
13
+ "
6
14
  type="warning"
7
15
  >
8
16
  {{ $t('shared.forms.source_organization_course_lock') }}
@@ -22,18 +30,47 @@
22
30
  </template>
23
31
 
24
32
  <script>
33
+ import { mapGetters } from 'vuex'
25
34
  import { CourseGlossary } from '../utils/index'
35
+ import Breadcrumbs from '~/components/Core/Breadcrumbs.vue'
26
36
  export default {
27
37
  name: 'Glossary',
28
- components: { CourseGlossary },
29
- layout: 'authenticated',
38
+ components: { CourseGlossary, Breadcrumbs },
39
+ layout: 'course',
30
40
  middleware: ['auth', 'privilege'],
31
41
  meta: {
32
42
  privilege: {
33
- 'windward.organization.course.contentBlock': {
43
+ 'windward.organization.course.content': {
44
+ readable: true,
45
+ },
46
+ 'plugin.windward.core.organization.course.glossary': {
34
47
  readable: true,
35
48
  },
36
49
  },
37
50
  },
51
+ computed: {
52
+ ...mapGetters({
53
+ course: 'course/get',
54
+ enrollment: 'enrollment/get',
55
+ }),
56
+ breadcrumbPath() {
57
+ return [
58
+ {
59
+ href:
60
+ '/course/' +
61
+ this.course.id +
62
+ '/section/' +
63
+ this.enrollment.course_section_id,
64
+ id: '',
65
+ text: this.course.name,
66
+ },
67
+ {
68
+ href: this.$route.path,
69
+ id: '',
70
+ text: this.$t('windward.core.pages.glossary.title'),
71
+ },
72
+ ]
73
+ },
74
+ },
38
75
  }
39
76
  </script>
@@ -1,48 +1,53 @@
1
1
  <template>
2
- <v-container>
3
- <h2>{{ $t('windward.core.pages.user_upload.title') }}</h2>
4
- <v-divider class="mt-5 mb-5" />
5
- <v-data-table
6
- :headers="headers"
7
- :items="uploadpages"
8
- :search="search"
9
- class="elevation-1"
10
- >
11
- <template #top>
12
- <v-toolbar flat>
13
- <CourseSectionSwitch
14
- @change="load($event)"
15
- ></CourseSectionSwitch>
16
- <v-spacer></v-spacer>
17
- <v-text-field
18
- v-model="search"
19
- class="ml-5 flex-grow-1"
20
- append-icon="mdi-magnify"
21
- :label="$t('shared.forms.search')"
22
- single-line
23
- hide-details
24
- ></v-text-field>
25
- </v-toolbar>
26
- </template>
27
-
28
- <template #item="{ index, item }">
29
- <tr>
30
- <td>{{ item.last_name }}</td>
31
- <td>{{ item.first_name }}</td>
32
- <td
33
- v-for="(block, blockIndex) in item.uploadBlocks"
34
- :key="blockIndex"
35
- class="grade-column"
36
- >
37
- <ManageDataTableUserFiles
38
- v-model="block.assets"
39
- :enrollment="block.enrollment"
40
- ></ManageDataTableUserFiles>
41
- </td>
42
- </tr>
43
- </template>
44
- </v-data-table>
45
- </v-container>
2
+ <v-row>
3
+ <v-col cols="12">
4
+ <Breadcrumbs :items="breadcrumbPath"></Breadcrumbs>
5
+ </v-col>
6
+ <v-col cols="12">
7
+ <h2>{{ $t('windward.core.pages.user_upload.title') }}</h2>
8
+ <v-divider class="mt-5 mb-5" />
9
+ <v-data-table
10
+ :headers="headers"
11
+ :items="uploadpages"
12
+ :search="search"
13
+ class="elevation-1"
14
+ >
15
+ <template #top>
16
+ <v-toolbar flat>
17
+ <CourseSectionSwitch
18
+ @change="load($event)"
19
+ ></CourseSectionSwitch>
20
+ <v-spacer></v-spacer>
21
+ <v-text-field
22
+ v-model="search"
23
+ class="ml-5 flex-grow-1"
24
+ append-icon="mdi-magnify"
25
+ :label="$t('shared.forms.search')"
26
+ single-line
27
+ hide-details
28
+ ></v-text-field>
29
+ </v-toolbar>
30
+ </template>
31
+
32
+ <template #item="{ index, item }">
33
+ <tr>
34
+ <td>{{ item.last_name }}</td>
35
+ <td>{{ item.first_name }}</td>
36
+ <td
37
+ v-for="(block, blockIndex) in item.uploadBlocks"
38
+ :key="blockIndex"
39
+ class="grade-column"
40
+ >
41
+ <ManageDataTableUserFiles
42
+ v-model="block.assets"
43
+ :enrollment="block.enrollment"
44
+ ></ManageDataTableUserFiles>
45
+ </td>
46
+ </tr>
47
+ </template>
48
+ </v-data-table>
49
+ </v-col>
50
+ </v-row>
46
51
  </template>
47
52
 
48
53
  <script>
@@ -51,15 +56,15 @@ import _ from 'lodash'
51
56
  import Course from '~/models/Course'
52
57
  import CourseSection from '~/models/CourseSection'
53
58
  import UserFileAsset from '../models/UserFileAsset'
54
-
59
+ import Breadcrumbs from '~/components/Core/Breadcrumbs.vue'
55
60
  import CourseSectionSwitch from '~/components/Course/CourseSectionSwitch.vue'
56
61
  import ManageDataTableUserFiles from '../components/Content/Blocks/UserUpload/ManageDataTableUserFiles.vue'
57
62
 
58
63
  export default {
59
64
  name: 'PluginUserUploadPage',
60
65
  middleware: ['auth', 'privilege'],
61
- components: { CourseSectionSwitch, ManageDataTableUserFiles },
62
- layout: 'authenticated',
66
+ components: { CourseSectionSwitch, ManageDataTableUserFiles, Breadcrumbs },
67
+ layout: 'course',
63
68
  meta: {
64
69
  privilege: {
65
70
  'windward.organization.course.section.user': {
@@ -178,6 +183,24 @@ export default {
178
183
 
179
184
  return items
180
185
  },
186
+ breadcrumbPath() {
187
+ return [
188
+ {
189
+ href:
190
+ '/course/' +
191
+ this.course.id +
192
+ '/section/' +
193
+ this.enrollment.course_section_id,
194
+ id: '',
195
+ text: this.course.name,
196
+ },
197
+ {
198
+ href: this.$route.path,
199
+ id: '',
200
+ text: this.$t('windward.core.pages.user_upload.title'),
201
+ },
202
+ ]
203
+ },
181
204
  },
182
205
  mounted() {},
183
206
  methods: {
package/plugin.js CHANGED
@@ -17,6 +17,7 @@ import UserUploadNav from './components/Navigation/Items/UserUploadNav.vue'
17
17
  import OpenResponse from './components/Content/Blocks/OpenResponse'
18
18
  import OpenResponseCollate from './components/Content/Blocks/OpenResponseCollate'
19
19
  import Image from './components/Content/Blocks/Image'
20
+ import UserUpload from './components/Content/Blocks/UserUpload'
20
21
  import FileDownload from './components/Content/Blocks/FileDownload'
21
22
 
22
23
  import GlossaryPage from './pages/glossary.vue'
@@ -48,25 +49,34 @@ import TextEditorSettings from './components/Settings/TextEditorSettings.vue'
48
49
  import FillInTheBlanks from './components/utils/FillInBlank/FillInTheBlanksManager.vue'
49
50
  import FillInBlankInput from './components/utils/FillInBlank/FillInBlankInput.vue'
50
51
 
52
+ import GlossaryStore from './store/glossary.js'
53
+
51
54
  export default {
52
55
  name: 'windward.core.name',
53
56
  version: null,
54
57
  hooks: {
55
- beforeContent: (body) => {
56
- console.log('Hello world from beforeContent hook')
57
- return body
58
+ 'clear:context': (app) => {
59
+ app.store.dispatch('glossary/clear')
60
+ },
61
+ 'load:context': (app, context) => {
62
+ // If the context switched to a course then load the glossary terms
63
+ if (
64
+ context === 'course' &&
65
+ app.store.getters['course/get'] &&
66
+ app.store.getters['course/get'].id
67
+ ) {
68
+ app.store.dispatch(
69
+ 'glossary/load',
70
+ app.store.getters['course/get']
71
+ )
72
+ }
58
73
  },
59
- beforeDestroy: () => {},
60
- beforeNavigate: () => {},
61
- onNavigate: () => {},
62
- onLoad: (page) => {},
63
- onContent: () => {},
64
74
  },
65
75
  i18n: locales.messages,
66
76
  pages: [
67
77
  {
68
78
  page: 'user-uploads',
69
- path: '/course/:course/user-uploads',
79
+ path: '/course/:course/section/:section/user-uploads',
70
80
  i18n: 'menu.user-upload',
71
81
  icon: 'mdi-cloud-upload',
72
82
  name: 'PluginUserUploadPage',
@@ -74,7 +84,7 @@ export default {
74
84
  },
75
85
  {
76
86
  page: 'glossary',
77
- path: '/course/:course/glossary',
87
+ path: '/course/:course/section/:section/glossary',
78
88
  i18n: 'windward.core.shared.menu.course_glossary',
79
89
  icon: 'mdi-comment-text-multiple',
80
90
  name: 'CourseGlossaryPage',
@@ -116,7 +126,7 @@ export default {
116
126
  display: ['menu'],
117
127
  permissions: {
118
128
  'windward.organization.course.file': {
119
- writeable: true,
129
+ writable: true,
120
130
  },
121
131
  },
122
132
  },
@@ -166,6 +176,15 @@ export default {
166
176
  grouping: 'components.content.blocks.group.multimedia',
167
177
  },
168
178
  },
179
+ {
180
+ tag: 'core-user-upload',
181
+ template: UserUpload,
182
+ metadata: {
183
+ icon: 'mdi-cloud-upload',
184
+ name: 'windward.core.shared.content_blocks.title.user_upload',
185
+ grouping: 'components.content.blocks.group.multimedia',
186
+ },
187
+ },
169
188
  {
170
189
  tag: 'core-tab',
171
190
  template: Tab,
@@ -197,7 +216,7 @@ export default {
197
216
  tag: 'core-open-response-collate',
198
217
  template: OpenResponseCollate,
199
218
  metadata: {
200
- icon: 'mdi-text-long',
219
+ icon: 'mdi-cloud-download',
201
220
  name: 'windward.core.shared.content_blocks.title.open_response_collate',
202
221
  grouping: 'components.content.blocks.group.basic',
203
222
  },
@@ -422,4 +441,7 @@ export default {
422
441
  },
423
442
  ],
424
443
  },
444
+ store: {
445
+ glossary: GlossaryStore,
446
+ },
425
447
  }