Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge unstable to hotfixes #4270

Merged
merged 57 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
e3754ba
Bump stylus-loader from 7.1.2 to 7.1.3
dependabot[bot] Jun 12, 2023
7b4608c
- add jszip yarn package;
Jun 12, 2023
ccf5f9e
Bump fonttools from 4.27.1 to 4.40.0
dependabot[bot] Jun 13, 2023
3a2b734
- [add] the extracted metadata from .h5p CP to contentNode
Jun 22, 2023
140490f
removed scroll on adding new question
Jaspreet-singh-1032 Jul 2, 2023
e5d1a25
added text truncate in import channel dropdown
Jaspreet-singh-1032 Jul 5, 2023
cef06b0
- [refactor] code
Jul 7, 2023
4442529
Bump semver from 5.7.1 to 5.7.2
dependabot[bot] Jul 10, 2023
4ccbf35
Merge pull request #4129 from learningequality/dependabot/npm_and_yar…
rtibbles Jul 12, 2023
aaea8e5
Merge pull request #4213 from learningequality/dependabot/npm_and_yar…
rtibbles Jul 12, 2023
9557200
Merge pull request #4132 from learningequality/dependabot/pip/fonttoo…
rtibbles Jul 12, 2023
64a1368
Bump google-cloud-kms from 1.4.0 to 2.10.0
dependabot[bot] Jul 12, 2023
daee90b
Bump workbox-precaching from 6.5.4 to 7.0.0
dependabot[bot] Jul 13, 2023
c9248aa
Merge pull request #4217 from learningequality/dependabot/npm_and_yar…
rtibbles Jul 13, 2023
c4fc395
Bump jest-serializer-vue from 2.0.2 to 3.1.0
dependabot[bot] Jul 14, 2023
7b9fa05
apply ellipsis based on props
Jaspreet-singh-1032 Jul 18, 2023
abfa1d3
Merge pull request #4218 from learningequality/dependabot/npm_and_yar…
rtibbles Jul 18, 2023
a20e659
Merge pull request #3887 from learningequality/dependabot/pip/google-…
rtibbles Jul 18, 2023
7914232
Bump django-s3-storage from 0.13.11 to 0.14.0
dependabot[bot] Jul 19, 2023
98d377f
Bump locust from 2.8.6 to 2.15.1
dependabot[bot] Jul 19, 2023
ad2ea8c
Bump workbox-webpack-plugin from 6.5.4 to 7.0.0
dependabot[bot] Jul 19, 2023
f63fd2f
Merge pull request #4225 from learningequality/dependabot/npm_and_yar…
rtibbles Jul 19, 2023
6f28883
Bump word-wrap from 1.2.3 to 1.2.4
dependabot[bot] Jul 19, 2023
67c6966
Merge pull request #4224 from learningequality/dependabot/pip/locust-…
rtibbles Jul 19, 2023
36e3dfb
Merge pull request #4223 from learningequality/dependabot/pip/django-…
rtibbles Jul 19, 2023
f6669ad
Bump attrs from 19.3.0 to 23.1.0
dependabot[bot] Jul 19, 2023
d379eb1
Bump workbox-window from 6.5.4 to 7.0.0
dependabot[bot] Jul 19, 2023
73cb9cf
Merge pull request #4227 from learningequality/dependabot/npm_and_yar…
rtibbles Jul 19, 2023
de70b3f
Merge pull request #4228 from learningequality/dependabot/npm_and_yar…
rtibbles Jul 19, 2023
a9049f2
Remove direct dependency on unused attrs
rtibbles Jul 19, 2023
5902425
Merge pull request #4230 from learningequality/dependabot/pip/attrs-2…
rtibbles Jul 19, 2023
59fdf45
Bump dexie from 3.2.2 to 3.2.4
dependabot[bot] Jul 20, 2023
bb3be23
Bump less-loader from 11.0.0 to 11.1.3
dependabot[bot] Jul 20, 2023
ba1c873
Merge pull request #4234 from learningequality/dependabot/npm_and_yar…
rtibbles Jul 20, 2023
e157980
Merge pull request #4235 from learningequality/dependabot/npm_and_yar…
rtibbles Jul 20, 2023
81283df
scrollintoview with block end
Jaspreet-singh-1032 Jul 20, 2023
5ab69cb
Merge pull request #4186 from Jaspreet-singh-1032/fixes-4166-overlapp…
LianaHarris360 Jul 20, 2023
a0d657a
Resolve merge conflicts in package.json
bjester Jul 25, 2023
212b46b
Merge pull request #4245 from bjester/merge-down-abc
bjester Jul 27, 2023
e047184
scroll to the question card
Jaspreet-singh-1032 Jul 27, 2023
68dbb7f
final cleanup
Jaspreet-singh-1032 Aug 1, 2023
d401e85
Merge pull request #4181 from Jaspreet-singh-1032/fixes-4079-add-new-…
vkWeb Aug 1, 2023
04c749b
- [remove] unwanted logs
Aug 6, 2023
a71a320
Bump le-utils from 0.1.42 to 0.2.1
dependabot[bot] Aug 10, 2023
3f68c51
- [add] test case for H5P content file extract metadata
Aug 6, 2023
63041b6
Merge pull request #4131 from manavagr1108/extract-metadata-for-h5p-cp
rtibbles Aug 14, 2023
089f088
Merge pull request #4252 from learningequality/dependabot/pip/le-util…
rtibbles Aug 14, 2023
36bbe24
Update JS constants for latest leutils.
rtibbles Aug 15, 2023
a82e78b
Final tweaks and tests for H5P upload.
rtibbles Aug 15, 2023
3625f6f
Add missing mappings for h5p kind.
rtibbles Aug 15, 2023
d76efcf
Merge pull request #4255 from rtibbles/h5p_finalization
rtibbles Aug 15, 2023
dc4608f
Fixes incorrect value for Practice quiz
akolson Aug 22, 2023
2a70ad2
Adds new automation django app for future AI features
akash5100 Aug 24, 2023
2f0ac11
Merge pull request #4262 from akash5100/automation-app
bjester Aug 24, 2023
dc357cc
Merge pull request #4260 from akolson/quiz-incorrect-completion-value
marcellamaki Aug 29, 2023
16787d9
Bump actions/checkout from 3 to 4
dependabot[bot] Sep 5, 2023
1a62ea9
Merge pull request #4271 from learningequality/dependabot/github_acti…
rtibbles Sep 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/deploytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frontendlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frontendtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pythontest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
Empty file.
3 changes: 3 additions & 0 deletions contentcuration/automation/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# from django.contrib import admin

# Register your models here.
6 changes: 6 additions & 0 deletions contentcuration/automation/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class AutomationConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'automation'
Empty file.
3 changes: 3 additions & 0 deletions contentcuration/automation/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# from django.db import models

# Create your models here.
3 changes: 3 additions & 0 deletions contentcuration/automation/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# from django.test import TestCase

# Create your tests here.
3 changes: 3 additions & 0 deletions contentcuration/automation/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# from django.shortcuts import render

# Create your views here.
2 changes: 1 addition & 1 deletion contentcuration/contentcuration/dev_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

ROOT_URLCONF = "contentcuration.dev_urls"

INSTALLED_APPS += ("drf_yasg",)
INSTALLED_APPS += ("drf_yasg", "automation")
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<transition-group name="list-complete" tag="div">
<VCard
v-for="(item, idx) in sortedItems"
ref="questionCardRef"
:key="`question-${item.assessment_id}`"
pa-1
class="elevation-4 list-complete-item"
Expand Down Expand Up @@ -333,6 +334,17 @@
this.$analytics.trackAction('exercise_editor', 'Add', {
eventLabel: 'Question',
});
this.$nextTick(() => {
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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>

<VContainer ref="editview" fluid class="pa-0 wrapper" @scroll="scroll">
<VContainer id="editViewId" ref="editview" fluid class="pa-0 wrapper" @scroll="scroll">
<VContainer v-if="!nodeIds.length" fluid>
<VLayout justify-center align-center fill-height>
<VFlex grow class="grey--text text-xs-center title">
Expand Down
18 changes: 13 additions & 5 deletions contentcuration/contentcuration/frontend/channelEdit/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { metadataStrings, constantStrings } from 'shared/mixins';
import {
AssessmentItemTypes,
CompletionCriteriaModels,
ContentModalities,
SHORT_LONG_ACTIVITY_MIDPOINT,
CompletionDropdownMap,
} from 'shared/constants';
Expand Down Expand Up @@ -280,18 +281,20 @@ export function getCompletionDataFromNode(node) {
return;
}

const completionCriteria = node.extra_fields?.options?.completion_criteria
? JSON.parse(JSON.stringify(node.extra_fields?.options?.completion_criteria))
: null;
const extraFields = node?.extra_fields || {};
const options = extraFields?.options || {};
const completionCriteria = options?.completion_criteria || null;
const threshold = completionCriteria?.threshold || generateDefaultThreshold(node);
const model = completionCriteria?.model || defaultCompletionCriteriaModels[node.kind];
const suggestedDurationType = node.extra_fields?.suggested_duration_type;
const modality = options?.modality || null;
const suggestedDurationType = extraFields?.suggested_duration_type;
const suggestedDuration = node.suggested_duration;

return {
completionModel: model,
completionThreshold: threshold,
masteryModel: threshold?.mastery_model,
modality,
suggestedDurationType,
suggestedDuration,
};
Expand Down Expand Up @@ -323,11 +326,11 @@ export function getCompletionCriteriaLabels(node = {}, files = []) {
if (!node && !files) {
return;
}

const {
completionModel,
completionThreshold,
masteryModel,
modality,
suggestedDuration,
} = getCompletionDataFromNode(node);

Expand Down Expand Up @@ -374,6 +377,11 @@ export function getCompletionCriteriaLabels(node = {}, files = []) {
m: completionThreshold.m,
n: completionThreshold.n,
});
} else if (
masteryModel === MasteryModelsNames.DO_ALL &&
modality === ContentModalities.QUIZ
) {
labels.completion = metadataStrings.$tr('practiceQuiz');
} else {
labels.completion = constantStrings.$tr(masteryModel);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
item-value="id"
:disabled="loadingChannels"
notranslate
useEllipsis
/>

<p class="font-weight-bold grey--text mb-1">
Expand Down
2 changes: 2 additions & 0 deletions contentcuration/contentcuration/frontend/shared/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const kindToIconMap = {
channel: 'apps',
document: 'description',
exercise: 'star',
h5p: 'widgets',
html5: 'widgets',
image: 'image',
slideshow: 'photo_library',
Expand Down Expand Up @@ -205,6 +206,7 @@ export const AccessibilityCategoriesMap = {
video: ['CAPTIONS_SUBTITLES', 'AUDIO_DESCRIPTION', 'SIGN_LANGUAGE'],
exercise: ['ALT_TEXT'],
html5: ['ALT_TEXT', 'HIGH_CONTRAST'],
h5p: ['ALT_TEXT', 'HIGH_CONTRAST'],
audio: ['CAPTIONS_SUBTITLES'],
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ const FormatPresetsMap = new Map([
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
display: true,
order: 1,
kind_id: 'h5p',
allowed_formats: ['h5p'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ const LanguagesMap = new Map([
lang_direction: 'ltr',
},
],
[
'rsn',
{
id: 'rsn',
lang_code: 'rsn',
lang_subcode: null,
readable_name: 'Rwandan Sign Language',
native_name: "Amarenga y'Ikinyarwanda",
lang_direction: 'ltr',
},
],
[
'an',
{
Expand Down Expand Up @@ -198,6 +209,17 @@ const LanguagesMap = new Map([
lang_direction: 'ltr',
},
],
[
'csx',
{
id: 'csx',
lang_code: 'csx',
lang_subcode: null,
readable_name: 'Cambodian Sign Language',
native_name: 'Cambodian Sign Language',
lang_direction: 'ltr',
},
],
[
'ca',
{
Expand Down Expand Up @@ -1430,6 +1452,17 @@ const LanguagesMap = new Map([
lang_direction: 'ltr',
},
],
[
'xki',
{
id: 'xki',
lang_code: 'xki',
lang_subcode: null,
readable_name: 'Kenyan Sign Language',
native_name: 'Swahili Lugha ya ishara',
lang_direction: 'ltr',
},
],
[
'be-tara',
{
Expand Down Expand Up @@ -2564,6 +2597,18 @@ const LanguagesMap = new Map([
lang_direction: 'ltr',
},
],
[
'nsp',
{
id: 'nsp',
lang_code: 'nsp',
lang_subcode: null,
readable_name: 'Nepalese Sign Language',
native_name:
'\u0928\u0947\u092a\u093e\u0932\u0940 \u0938\u093e\u0902\u0915\u0947\u0924\u093f\u0915 \u092d\u093e\u0937\u093e',
lang_direction: 'ltr',
},
],
[
'pi',
{
Expand Down Expand Up @@ -3011,6 +3056,7 @@ export const LanguagesNames = {
AF: 'af',
AK: 'ak',
AKA: 'aka',
RSN: 'rsn',
AN: 'an',
EN_PT: 'en-PT',
IG: 'ig',
Expand All @@ -3023,6 +3069,7 @@ export const LanguagesNames = {
EN_GB: 'en-GB',
BUG: 'bug',
BXK: 'bxk',
CSX: 'csx',
CA: 'ca',
CEB: 'ceb',
CH: 'ch',
Expand Down Expand Up @@ -3135,6 +3182,7 @@ export const LanguagesNames = {
PBT: 'pbt',
SV_SE: 'sv-SE',
SV_FI: 'sv-FI',
XKI: 'xki',
BE_TARA: 'be-tara',
VI: 'vi',
TPI: 'tpi',
Expand Down Expand Up @@ -3237,6 +3285,7 @@ export const LanguagesNames = {
NEW: 'new',
NE: 'ne',
NE_NP: 'ne-NP',
NSP: 'nsp',
PI: 'pi',
BH: 'bh',
BHO: 'bho',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@
return this.$tr('exercise');
case 'document':
return this.$tr('document');
case 'h5p':
return this.$tr('html5');
case 'html5':
return this.$tr('html5');
default:
Expand Down
Loading