Skip to content

Commit 69a1ff4

Browse files
authored
Merge pull request #5509 from learningequality/hotfixes
Studio Patch Release v2025.10.29
2 parents 002a7ec + 0ce6108 commit 69a1ff4

File tree

15 files changed

+447
-291
lines changed

15 files changed

+447
-291
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ migrate:
3838
# 4) Remove the management command from this `deploy-migrate` recipe
3939
# 5) Repeat!
4040
deploy-migrate:
41-
echo "Nothing to do here!"
41+
python contentcuration/manage.py set_file_duration
4242

4343
contentnodegc:
4444
python contentcuration/manage.py garbage_collect

contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/ImportFromChannelsModal.vue

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -52,44 +52,40 @@
5252
>
5353
<VIconWrapper small> check_circle </VIconWrapper>
5454
<span class="mx-1">{{ $tr('addedText') }}</span>
55-
<VBtn
56-
color="primary"
55+
<KButton
56+
primary
57+
:text="$tr('removeButton')"
5758
@click="deselectNode(previewNode)"
58-
>
59-
{{ $tr('removeButton') }}
60-
</VBtn>
59+
/>
6160
</VLayout>
6261
</VFadeTransition>
63-
<VBtn
62+
<KButton
6463
v-if="!previewIsSelected"
65-
color="primary"
64+
primary
65+
:text="$tr('addButton')"
6666
@click="selectNode(previewNode)"
67-
>
68-
{{ $tr('addButton') }}
69-
</VBtn>
67+
/>
7068
</template>
7169
</ResourceDrawer>
7270
<template #bottom>
7371
<div class="mx-2 subheading">
7472
{{ $tr('resourcesSelected', { count: selectedResourcesCount }) }}
7573
</div>
7674
<VSpacer />
77-
<VBtn
75+
<KButton
7876
v-if="isReview"
77+
primary
7978
:disabled="selected.length === 0"
80-
color="primary"
79+
:text="$tr('importAction')"
8180
@click="handleClickImport"
82-
>
83-
{{ $tr('importAction') }}
84-
</VBtn>
85-
<VBtn
81+
/>
82+
<KButton
8683
v-else
87-
color="primary"
84+
primary
8885
:disabled="selected.length === 0"
86+
:text="$tr('reviewAction')"
8987
@click="handleClickReview"
90-
>
91-
{{ $tr('reviewAction') }}
92-
</VBtn>
88+
/>
9389
</template>
9490
</FullscreenModal>
9591

contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SearchOrBrowseWindow.vue

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
v-if="!isBrowsing"
1414
class="my-2"
1515
>
16-
<ActionLink
16+
<KButton
1717
:text="$tr('backToBrowseAction')"
18+
appearance="basic-link"
1819
@click="handleBackToBrowse"
1920
/>
2021
</div>
@@ -44,25 +45,27 @@
4445
<Icon icon="search" />
4546
</template>
4647
<template #append-outer>
47-
<VBtn
48+
<KButton
4849
class="px-4 search-btn"
49-
color="primary"
50+
primary
5051
type="submit"
52+
:text="$tr('searchAction')"
5153
:disabled="!searchIsValid"
52-
depressed
53-
large
54-
>
55-
{{ $tr('searchAction') }}
56-
</VBtn>
54+
appearance="raised-button"
55+
/>
5756
</template>
5857
</VTextField>
5958
</VForm>
6059

61-
<div class="my-2">
62-
<ActionLink
63-
v-if="!isBrowsing"
60+
<div
61+
v-if="!isBrowsing"
62+
class="my-2"
63+
>
64+
<KButton
65+
class="mb-3"
6466
:text="$tr('savedSearchesLabel')"
6567
:disabled="!savedSearchesExist"
68+
appearance="basic-link"
6669
@click="showSavedSearches = true"
6770
/>
6871
<ActionLink

contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SearchResultsList.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@
4040
})
4141
}}
4242
</span>
43-
<ActionLink
43+
<KButton
4444
class="mx-2"
4545
:disabled="currentSearchSaved"
4646
:text="currentSearchSaved ? $tr('searchSavedSnackbar') : $tr('saveSearchAction')"
47+
appearance="basic-link"
4748
@click="handleClickSaveSearch"
4849
/>
4950
</VFlex>

contentcuration/contentcuration/frontend/channelEdit/views/files/ContentRenderer.vue

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<template>
22

3-
<VLayout
4-
:key="fileId"
5-
:class="{ fullscreen }"
3+
<div
4+
class="renderer"
5+
:aria-busy="isSupported && loading"
66
>
7-
<div
8-
class="renderer"
9-
:aria-busy="isSupported && loading"
7+
<VLayout
8+
:key="fileId"
9+
:class="{ fullscreen }"
1010
>
1111
<div
1212
v-show="isSupported && loading"
@@ -139,8 +139,8 @@
139139
</VTooltip>
140140
</VLayout>
141141
</VCard>
142-
</div>
143-
</VLayout>
142+
</VLayout>
143+
</div>
144144

145145
</template>
146146

@@ -201,27 +201,30 @@
201201
f => f.language.id,
202202
);
203203
},
204+
fileFormat() {
205+
return this.file?.file_format || '';
206+
},
204207
isVideo() {
205-
return this.file.file_format === 'mp4' || this.file.file_format === 'webm';
208+
return this.fileFormat === 'mp4' || this.fileFormat === 'webm';
206209
},
207210
isAudio() {
208-
return this.file.file_format === 'mp3';
211+
return this.fileFormat === 'mp3';
209212
},
210213
isHTML() {
211-
return this.file.file_format === 'zip';
214+
return this.fileFormat === 'zip';
212215
},
213216
isPDF() {
214-
return this.file.file_format === 'pdf';
217+
return this.fileFormat === 'pdf';
215218
},
216219
isEpub() {
217-
return this.file.file_format === 'epub';
220+
return this.fileFormat === 'epub';
218221
},
219222
isSupported() {
220223
return this.isVideo || this.isAudio || this.isHTML || this.isPDF || this.isEpub;
221224
},
222225
htmlPath() {
223226
const entry = get(this.contentNode, ['extra_fields', 'options', 'entry'], 'index.html');
224-
return `/zipcontent/${this.file.checksum}.${this.file.file_format}/${entry}`;
227+
return `/zipcontent/${this.file.checksum}.${this.fileFormat}/${entry}`;
225228
},
226229
src() {
227230
return this.file && this.file.url;

contentcuration/contentcuration/frontend/channelEdit/vuex/contentNode/getters.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import messages from '../../translator';
77
import { parseNode } from './utils';
88
import { getNodeDetailsErrors, getNodeFilesErrors } from 'shared/utils/validation';
99
import { ContentKindsNames } from 'shared/leUtils/ContentKinds';
10-
import { NEW_OBJECT } from 'shared/constants';
10+
import { NEW_OBJECT, ValidationErrors } from 'shared/constants';
1111
import { COPYING_STATUS, COPYING_STATUS_VALUES } from 'shared/data/constants';
1212

1313
function sorted(nodes) {
@@ -158,14 +158,22 @@ export function getContentNodeIsValid(state, getters, rootState, rootGetters) {
158158

159159
export function getContentNodeDetailsAreValid(state) {
160160
return function (contentNodeId) {
161-
const contentNode = state.contentNodesMap[contentNodeId];
162-
return contentNode && (contentNode[NEW_OBJECT] || !getNodeDetailsErrors(contentNode).length);
161+
return !getNodeDetailsErrorsList(state)(contentNodeId).length;
163162
};
164163
}
165164

166165
export function getNodeDetailsErrorsList(state) {
167166
return function (contentNodeId) {
168167
const contentNode = state.contentNodesMap[contentNodeId];
168+
169+
if (!contentNode) {
170+
return [ValidationErrors.MISSING_NODE];
171+
}
172+
173+
if (contentNode[NEW_OBJECT]) {
174+
return [];
175+
}
176+
169177
return getNodeDetailsErrors(contentNode);
170178
};
171179
}

contentcuration/contentcuration/frontend/shared/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ export const ValidationErrors = {
190190
ACTIVITY_DURATION_MAX_FOR_LONG_ACTIVITY: 'ACTIVITY_DURATION_MAX_FOR_LONG_ACTIVITY',
191191
ACTIVITY_DURATION_MIN_REQUIREMENT: 'ACTIVITY_DURATION_MIN_REQUIREMENT',
192192
ACTIVITY_DURATION_TOO_LONG: 'ACTIVITY_DURATION_TOO_LONG',
193+
MISSING_NODE: 'MISSING_NODE',
193194
...fileErrors,
194195
};
195196

contentcuration/contentcuration/frontend/shared/feedbackApiUtils.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ export const FeedbackTypeOptions = {
1212
flagged: 'FLAGGED',
1313
};
1414

15-
export const FLAG_FEEDBACK_EVENT_ENDPOINT = 'flagged';
16-
export const RECOMMENDATION_EVENT_ENDPOINT = 'recommendations';
17-
export const RECOMMENDATION_INTERACTION_EVENT_ENDPOINT = 'recommendations-interaction';
15+
export const FLAG_FEEDBACK_EVENT_ENDPOINT = 'flagged-events';
16+
export const RECOMMENDATION_EVENT_ENDPOINT = 'recommendations-events';
17+
export const RECOMMENDATION_INTERACTION_EVENT_ENDPOINT = 'recommendations-interaction-events';
1818

1919
/**
2020
* @typedef {Object} BaseFeedbackParams

contentcuration/contentcuration/frontend/shared/styles/main.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,12 @@ body {
4848
text-align: center;
4949
}
5050

51-
.button:focus-visible,
5251
.v-btn:focus-visible {
53-
outline: 2px solid var(--v-secondary-base) !important;
52+
// ensures that until KDS migration is complete,
53+
// Vuetify-based buttons have a visible focus style
54+
// consistent with KDS buttons and links
55+
outline: 3px solid #33acf5 !important;
56+
outline-offset: 4px !important;
5457
}
5558

5659
> .v-dialog__content,

contentcuration/contentcuration/frontend/shared/views/channel/ChannelSharing.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@
5959
</template>
6060
</DropdownWrapper>
6161
</VLayout>
62-
<VBtn
63-
color="primary"
62+
<KButton
6463
type="submit"
6564
:disabled="sharing"
65+
primary
6666
>
6767
{{ $tr('inviteButton') }}
68-
</VBtn>
68+
</KButton>
6969
</VForm>
7070

7171
<ChannelSharingTable

0 commit comments

Comments
 (0)