diff --git a/.github/workflows/deploytest.yml b/.github/workflows/deploytest.yml index d63794aaeb..8935b4f4c7 100644 --- a/.github/workflows/deploytest.yml +++ b/.github/workflows/deploytest.yml @@ -27,7 +27,7 @@ jobs: if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js uses: actions/setup-node@v3 with: @@ -51,7 +51,7 @@ jobs: if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python 3.9 uses: actions/setup-python@v4 with: diff --git a/.github/workflows/frontendlint.yml b/.github/workflows/frontendlint.yml index d0a3e648f2..03bcc2f474 100644 --- a/.github/workflows/frontendlint.yml +++ b/.github/workflows/frontendlint.yml @@ -27,7 +27,7 @@ jobs: if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js uses: actions/setup-node@v3 with: diff --git a/.github/workflows/frontendtest.yml b/.github/workflows/frontendtest.yml index 7489c2748a..fe5a2968a9 100644 --- a/.github/workflows/frontendtest.yml +++ b/.github/workflows/frontendtest.yml @@ -27,7 +27,7 @@ jobs: if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js uses: actions/setup-node@v3 with: diff --git a/.github/workflows/pythontest.yml b/.github/workflows/pythontest.yml index f015f7bc1e..5c7ca726ec 100644 --- a/.github/workflows/pythontest.yml +++ b/.github/workflows/pythontest.yml @@ -61,7 +61,7 @@ jobs: # Maps port 6379 on service container to the host - 6379:6379 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up minio run: | docker run -d -p 9000:9000 --name minio \ diff --git a/contentcuration/automation/__init__.py b/contentcuration/automation/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/contentcuration/automation/admin.py b/contentcuration/automation/admin.py new file mode 100644 index 0000000000..4185d360e9 --- /dev/null +++ b/contentcuration/automation/admin.py @@ -0,0 +1,3 @@ +# from django.contrib import admin + +# Register your models here. diff --git a/contentcuration/automation/apps.py b/contentcuration/automation/apps.py new file mode 100644 index 0000000000..eaa1d3d4e1 --- /dev/null +++ b/contentcuration/automation/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class AutomationConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'automation' diff --git a/contentcuration/automation/migrations/__init__.py b/contentcuration/automation/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/contentcuration/automation/models.py b/contentcuration/automation/models.py new file mode 100644 index 0000000000..0b4331b362 --- /dev/null +++ b/contentcuration/automation/models.py @@ -0,0 +1,3 @@ +# from django.db import models + +# Create your models here. diff --git a/contentcuration/automation/tests.py b/contentcuration/automation/tests.py new file mode 100644 index 0000000000..a79ca8be56 --- /dev/null +++ b/contentcuration/automation/tests.py @@ -0,0 +1,3 @@ +# from django.test import TestCase + +# Create your tests here. diff --git a/contentcuration/automation/views.py b/contentcuration/automation/views.py new file mode 100644 index 0000000000..fd0e044955 --- /dev/null +++ b/contentcuration/automation/views.py @@ -0,0 +1,3 @@ +# from django.shortcuts import render + +# Create your views here. diff --git a/contentcuration/contentcuration/dev_settings.py b/contentcuration/contentcuration/dev_settings.py index d81d23a993..439bdef8af 100644 --- a/contentcuration/contentcuration/dev_settings.py +++ b/contentcuration/contentcuration/dev_settings.py @@ -5,4 +5,4 @@ ROOT_URLCONF = "contentcuration.dev_urls" -INSTALLED_APPS += ("drf_yasg",) +INSTALLED_APPS += ("drf_yasg", "automation") diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/AssessmentEditor/AssessmentEditor.vue b/contentcuration/contentcuration/frontend/channelEdit/components/AssessmentEditor/AssessmentEditor.vue index 8e405ad9c8..5d9ff92c43 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/components/AssessmentEditor/AssessmentEditor.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/components/AssessmentEditor/AssessmentEditor.vue @@ -12,6 +12,7 @@ { + const questionCards = this.$refs['questionCardRef']; + if (questionCards?.length >= 1) { + const lastQuestionCard = questionCards[questionCards.length - 1].$el; + const editorDiv = document.getElementById('editViewId'); + editorDiv.scrollTo({ + top: lastQuestionCard.offsetTop, + behavior: 'smooth', + }); + } + }); }, async deleteItem(itemToDelete) { if (this.isItemActive(itemToDelete)) { diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/AssessmentItemEditor/AssessmentItemEditor.vue b/contentcuration/contentcuration/frontend/channelEdit/components/AssessmentItemEditor/AssessmentItemEditor.vue index c31c922508..28290e82d6 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/components/AssessmentItemEditor/AssessmentItemEditor.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/components/AssessmentItemEditor/AssessmentItemEditor.vue @@ -285,13 +285,6 @@ if (!this.question) { this.openQuestion(); } - // Assessments are nested inside of a scrolling panel. - // Instead of propagating an event all the way back to - // the scrolling panel, just use scrollIntoView - // (supported by most major browsers) - if (this.$el.scrollIntoView) { - this.$el.scrollIntoView({ behaviour: 'smooth' }); - } }, methods: { updateItem(payload) { diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/edit/EditModal.vue b/contentcuration/contentcuration/frontend/channelEdit/components/edit/EditModal.vue index e3570dbc69..995072d190 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/components/edit/EditModal.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/components/edit/EditModal.vue @@ -489,13 +489,18 @@ }, createNodesFromUploads(fileUploads) { fileUploads.forEach((file, index) => { - const title = file.original_filename - .split('.') - .slice(0, -1) - .join('.'); + let title; + if (file.metadata.title) { + title = file.metadata.title; + } else { + title = file.original_filename + .split('.') + .slice(0, -1) + .join('.'); + } this.createNode( FormatPresets.has(file.preset) && FormatPresets.get(file.preset).kind_id, - { title } + { title, ...file.metadata } ).then(newNodeId => { if (index === 0) { this.selected = [newNodeId]; diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/edit/EditView.vue b/contentcuration/contentcuration/frontend/channelEdit/components/edit/EditView.vue index f3ce855b2e..4a1e0cebb5 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/components/edit/EditView.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/components/edit/EditView.vue @@ -1,6 +1,6 @@