Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
484ab75
first pass of set_storage_used cronjob
Jan 13, 2021
aa8d733
add first pass of mark_incomplete management command
Jan 13, 2021
7ee77a3
Merge pull request #2768 from learningequality/hotfixes
rtibbles Jan 13, 2021
eb18e48
Merge pull request #2767 from learningequality/develop
rtibbles Jan 13, 2021
fe31fe1
Merge pull request #2770 from learningequality/develop
rtibbles Jan 14, 2021
77d9f6b
Clean up and linearize migration history.
rtibbles Jan 14, 2021
3f3a7a6
Merge pull request #2776 from rtibbles/linear_migrations
aronasorman Jan 14, 2021
c1e76f1
Merge pull request #2769 from learningequality/hotfixes
jayoshih Jan 14, 2021
585dd06
Merge branch 'create-data-cleaning-management-commands'
Jan 14, 2021
b99b3b4
Add True setting for incomplete. Wrap in transaction.
rtibbles Jan 14, 2021
4da2b89
Merge pull request #2779 from rtibbles/incomplete
rtibbles Jan 14, 2021
23cae97
Merge pull request #2781 from learningequality/hotfixes
rtibbles Jan 14, 2021
9884b99
Added epub renderer
jayoshih Jan 14, 2021
0424867
Removed unused import
jayoshih Jan 14, 2021
7168682
Added comment
jayoshih Jan 14, 2021
db5286b
Made width a computed field
jayoshih Jan 14, 2021
013edde
Merge pull request #2782 from jayoshih/epub
rtibbles Jan 14, 2021
7e876a5
Fixed issue where creating a channel could open the sharing tab inste…
jayoshih Jan 14, 2021
1c8cf08
set a node affinity for workers
Jan 14, 2021
0961c22
set a default of 5 replicas for the frontend pods
Jan 14, 2021
0310da5
Merge branch 'master' of github.com:learningequality/studio
Jan 14, 2021
288724e
Added title for new channels
jayoshih Jan 14, 2021
4f5a99a
fixed tab title
jayoshih Jan 14, 2021
cfe9674
Merge pull request #2784 from aronasorman/full-access-affinity
jayoshih Jan 14, 2021
60a27b5
Merge pull request #2785 from aronasorman/data-cleaning-commands
jayoshih Jan 14, 2021
817896d
Make node deletion an async task.
rtibbles Jan 14, 2021
3de8297
Use channel methods for filtering queryset
bjester Jan 14, 2021
99f42a6
Merge pull request #2783 from jayoshih/hotfixes
rtibbles Jan 14, 2021
5f8e141
Merge pull request #2787 from bjester/consolidate-task-filter
bjester Jan 14, 2021
faae9b6
Added pagination to channel lists
jayoshih Jan 14, 2021
cd3d91d
Make sure invitation accepted channel shows up in list
jayoshih Jan 14, 2021
5783d5b
Fixed linting
jayoshih Jan 14, 2021
902b8b1
Add channel_id as an explicit indexed field on the task model.
rtibbles Jan 14, 2021
5f5cc10
Adds event handling to ensure we capture selections from dropdown
bjester Jan 14, 2021
4d124f6
Delete node delete tasks when complete.
rtibbles Jan 14, 2021
7e48aae
Allow editing tags when editing multiple
bjester Jan 14, 2021
e55fb06
Fix task query test.
rtibbles Jan 14, 2021
051c4f7
Merge pull request #2786 from rtibbles/tree_async
jayoshih Jan 15, 2021
632d148
Fixed issue where creating a new node was causing drawer to disappear
jayoshih Jan 15, 2021
bca0cc0
Merge pull request #2791 from bjester/fix-dropdown-change
jayoshih Jan 15, 2021
f1f9dda
Merge pull request #2790 from rtibbles/channel_id_for_tasks
rtibbles Jan 15, 2021
c7f6a62
Updated mark_incomplete
jayoshih Jan 15, 2021
4c2c01e
Cleaned up command
jayoshih Jan 15, 2021
228c1f5
Get more accurate counts
jayoshih Jan 15, 2021
93b3c6d
Fixed log statement
jayoshih Jan 15, 2021
7318fc5
Added filter by is_null
jayoshih Jan 15, 2021
7de069c
Annotate chunks
jayoshih Jan 15, 2021
85e803b
Merge pull request #2793 from jayoshih/mark-incomplete
jayoshih Jan 15, 2021
e3a0aa7
Merge pull request #2794 from learningequality/hotfixes
jayoshih Jan 15, 2021
c43a4ef
Made accepting invitations synchronous
jayoshih Jan 15, 2021
04e20d9
Fixed linting and tests
jayoshih Jan 15, 2021
e4a65b4
Commented out tests
jayoshih Jan 15, 2021
6d72b28
Merge pull request #2788 from jayoshih/channel-pages
jayoshih Jan 15, 2021
12ca6fc
Merge pull request #2792 from jayoshih/nodes
MisRob Jan 15, 2021
07a9e9b
Separate out different categories of incomplete.
rtibbles Jan 15, 2021
daf9a4e
Validate channel modal automatically on existing channels
jayoshih Jan 15, 2021
13adbee
Merge pull request #2801 from jayoshih/channel-validation
jayoshih Jan 15, 2021
8221171
Added checks for existing long-running tasks on publish
jayoshih Jan 15, 2021
726e0d9
Added a couple more test cases
jayoshih Jan 15, 2021
5689f2d
Remove chunking based on query analysis.
rtibbles Jan 15, 2021
bd62f87
Mark questionless exercises before checking others.
rtibbles Jan 15, 2021
9c96ab9
Use CTE for file check query.
rtibbles Jan 15, 2021
2d9b036
Fixed test
jayoshih Jan 15, 2021
969b18d
Use CTE to check existence of questions.
rtibbles Jan 15, 2021
eba1b7e
Add CTE for valid questions.
rtibbles Jan 15, 2021
b670bf7
Change outer join to inner join to avoid additional filter.
rtibbles Jan 15, 2021
6d773c1
Merge pull request #2800 from rtibbles/mark_incomplete
rtibbles Jan 15, 2021
cced7c6
Merge pull request #2803 from jayoshih/publishing
jayoshih Jan 15, 2021
0c330e9
scale up number of workers by default
Jan 15, 2021
4c6fbf9
Merge branch 'master' into hotfixes
jayoshih Jan 15, 2021
2dbf36d
Merge pull request #2807 from aronasorman/scale-up-workers
jayoshih Jan 15, 2021
1172aca
Merge pull request #2809 from learningequality/hotfixes
jayoshih Jan 15, 2021
143c44d
Correct complete setting for exercises.
rtibbles Jan 19, 2021
7642d6b
Merge pull request #2831 from rtibbles/mastery_model_not_type
jayoshih Jan 19, 2021
3adc832
Switched type to mastery_model on extra_fields
jayoshih Jan 19, 2021
e2f9d06
Fixed linting
jayoshih Jan 19, 2021
a59220f
Merge pull request #2832 from jayoshih/masterymodel-fix
jayoshih Jan 19, 2021
aa33ca2
Merge pull request #2833 from learningequality/hotfixes
rtibbles Jan 19, 2021
950e24f
Merge branch 'master' into 'develop'
rtibbles Jan 19, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@
transition: background-color ease 500ms;

.highlight & {
background-color: #e3f0ed;
background-color: var(--v-greenHighlightBackground-base);
}

&__action,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@
return '';
}

const masteryModel = this.node.extra_fields.type;
const masteryModel = this.node.extra_fields.mastery_model;
if (!masteryModel) {
return this.defaultText;
} else if (masteryModel === MasteryModelsNames.M_OF_N) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@

<!-- Basic information section -->
<VLayout row wrap class="section">
<VFlex v-if="oneSelected" xs12>
<VFlex xs12>
<h1 class="subheading">
{{ $tr('basicInfoHeader') }}
</h1>
<!-- Title -->
<VTextField
v-if="oneSelected"
ref="title"
v-model="title"
maxlength="200"
Expand All @@ -33,6 +34,7 @@
/>
<!-- Description -->
<VTextarea
v-if="oneSelected"
ref="description"
v-model="description"
:label="$tr('descriptionLabel')"
Expand Down Expand Up @@ -187,6 +189,7 @@
:placeholder="getPlaceholder('author')"
:value="author && author.toString()"
@input.native="e => author = e.srcElement.value"
@input="author = $event"
@focus="trackClick('Author')"
>
<template v-slot:append-outer>
Expand All @@ -207,6 +210,7 @@
box
:value="provider && provider.toString()"
@input.native="e => provider = e.srcElement.value"
@input="provider = $event"
@focus="trackClick('Provider')"
>
<template v-slot:append-outer>
Expand All @@ -227,6 +231,7 @@
box
:value="aggregator && aggregator.toString()"
@input.native="e => aggregator = e.srcElement.value"
@input="aggregator = $event"
@focus="trackClick('Aggregator')"
>
<template v-slot:append-outer>
Expand Down Expand Up @@ -262,7 +267,7 @@
box
:value="copyright_holder && copyright_holder.toString()"
@input.native="e => copyright_holder = e.srcElement.value"
@input="e => copyright_holder = e"
@input="copyright_holder = $event"
@focus="trackClick('Copyright holder')"
/>
</VFlex>
Expand Down Expand Up @@ -425,7 +430,7 @@
role: generateGetterSetter('role_visibility'),
language: generateGetterSetter('language'),
mastery_model() {
return this.getExtraFieldsValueFromNodes('type');
return this.getExtraFieldsValueFromNodes('mastery_model');
},
m() {
return this.getExtraFieldsValueFromNodes('m');
Expand All @@ -436,7 +441,7 @@
masteryModelItem: {
get() {
return {
type: this.mastery_model,
mastery_model: this.mastery_model,
m: this.m,
n: this.n,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function generateNode(props = {}) {
});

let extra_fields = {
type: 'do_all',
mastery_model: 'do_all',
randomize: false,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe.skip('detailsTabView', () => {
role: DEFAULT_EXERCISE.role_visibility,
randomizeOrder: DEFAULT_EXERCISE.extra_fields.randomize,
masteryModel: {
type: DEFAULT_EXERCISE.extra_fields.type,
mastery_model: DEFAULT_EXERCISE.extra_fields.mastery_model,
},
copyrightHolder: DEFAULT_EXERCISE.copyright_holder,
});
Expand Down Expand Up @@ -146,7 +146,7 @@ describe.skip('detailsTabView', () => {
});
it('exercise fields should set selected node data extra_fields', () => {
wrapper.find({ ref: 'mastery_model' }).vm.$emit('input', { type: 'm_of_n' });
expect(wrapper.vm.masteryModel.type).toEqual('m_of_n');
expect(wrapper.vm.masteryModel.mastery_model).toEqual('m_of_n');
});
});
describe('on validation', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
@load="loading = false"
></iframe>
<embed v-else-if="isPDF" :src="src" :type="file.mimetype" @load="loading = false">
<div v-else-if="isEpub" class="epub">
<EpubRenderer :src="src" @load="loading = false" />
</div>

<VCard v-else class="message-card" flat>
<VLayout align-center justify-center fill-height data-test="not-supported">
<VTooltip bottom>
Expand All @@ -63,12 +67,14 @@
import uniqBy from 'lodash/uniqBy';
import sortBy from 'lodash/sortBy';
import { mapGetters } from 'vuex';
import EpubRenderer from './EpubRenderer';
import FileStatus from 'shared/views/files/FileStatus';

export default {
name: 'ContentRenderer',
components: {
FileStatus,
EpubRenderer,
},
props: {
fileId: {
Expand Down Expand Up @@ -117,6 +123,9 @@
isPDF() {
return this.file.file_format === 'pdf';
},
isEpub() {
return this.file.file_format === 'epub';
},
htmlPath() {
return `/zipcontent/${this.file.checksum}.${this.file.file_format}`;
},
Expand Down Expand Up @@ -145,14 +154,16 @@
video,
audio,
embed,
iframe {
iframe,
.epub {
width: 100%;
outline: none;
}
.v-card,
.v-card > .layout,
embed,
iframe {
iframe,
.epub {
min-height: 200px;
max-height: @max-height;
}
Expand All @@ -162,7 +173,8 @@
.message-card,
video,
embed,
iframe {
iframe,
.epub {
border-color: var(--v-greyBorder-base) !important;
border-style: solid;
border-width: 1px;
Expand All @@ -173,7 +185,8 @@
.v-card,
audio,
embed,
iframe {
iframe,
.epub {
min-height: @max-height;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<template>

<VLayout align-center fill-height row style="background-color: white;">
<VFlex shrink class="px-2">
<IconButton
icon="chevronLeft"
text=""
size="small"
rtlFlip
@click="rendition.prev()"
/>
</VFlex>
<div ref="epub" :style="{ height: '100%', width }"></div>
<VFlex shrink class="px-2">
<IconButton
icon="chevronRight"
text=""
size="small"
rtlFlip
@click="rendition.next()"
/>
</VFlex>
</VLayout>

</template>

<script>

import ePub from 'epubjs';
import IconButton from 'shared/views/IconButton';

export default {
name: 'EpubRenderer',
components: {
IconButton,
},
props: {
src: {
type: String,
required: true,
},
},
data() {
return {
book: null,
rendition: null,
};
},
computed: {
width() {
return 'calc(100% - 96px)';
},
},
mounted() {
this.$nextTick(() => {
this.book = ePub(this.src);
this.rendition = this.book.renderTo(this.$refs.epub, {
manager: 'continuous',
flow: 'paginated',
width: this.width,
height: '100%',
});
const displayed = this.rendition.display();
displayed.then(() => {
this.$emit('load');
});
}, 1000); // There seems to be some lag for loading, so add delay to be safe
},
};

</script>
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,6 @@
isAudio() {
return this.file.file_format === 'mp3';
},
isEPub() {
// TODO: Remove once epub previewer is available
return this.file.file_format === 'epub';
},
isZip() {
return this.file.file_format === 'zip';
},
Expand All @@ -110,7 +106,6 @@
this.file.url &&
this.isPreviewable &&
!this.isAudio &&
!this.isEPub &&
!this.file.uploading
);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ export function createContentNode(context, { parent, kind, ...payload }) {
tags: {},
extra_fields: {},
[NEW_OBJECT]: true,
total_count: 0,
resource_count: 0,
complete: false,
changed: true,
language: session.preferences ? session.preferences.language : session.currentLanguage,
parent,
Expand Down Expand Up @@ -243,8 +246,8 @@ function generateContentNodeData({
}
if (extra_fields !== NOVALUE) {
contentNodeData.extra_fields = contentNodeData.extra_fields || {};
if (extra_fields.type) {
contentNodeData.extra_fields.type = extra_fields.type;
if (extra_fields.mastery_model) {
contentNodeData.extra_fields.mastery_model = extra_fields.mastery_model;
}
if (extra_fields.m) {
contentNodeData.extra_fields.m = extra_fields.m;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ export const ListTypeToRouteMapping = {
};

export const RouteToListTypeMapping = invert(ListTypeToRouteMapping);

export const CHANNEL_PAGE_SIZE = 25;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<VCard
class="channel my-3"
:class="{ hideHighlight }"
:class="{ hideHighlight, added }"
data-test="channel-card"
tabindex="0"
:href="linkToChannelTree ? channelHref : null"
Expand Down Expand Up @@ -226,7 +226,7 @@

<script>

import { mapActions, mapGetters } from 'vuex';
import { mapActions, mapGetters, mapMutations } from 'vuex';
import { RouterNames } from '../../constants';
import ChannelStar from './ChannelStar';
import PrimaryDialog from 'shared/views/PrimaryDialog';
Expand Down Expand Up @@ -267,6 +267,7 @@
deleteDialog: false,
tokenDialog: false,
hideHighlight: false,
added: false,
};
},
computed: {
Expand Down Expand Up @@ -339,8 +340,18 @@
return !this.channel.last_published || this.channel.modified > this.channel.last_published;
},
},
mounted() {
if (this.channel.added) {
this.added = true;
setTimeout(() => {
this.updateChannel({ id: this.channel.id, added: false });
this.added = false;
}, 2500);
}
},
methods: {
...mapActions('channel', ['deleteChannel']),
...mapMutations('channel', { updateChannel: 'UPDATE_CHANNEL' }),
handleDelete() {
this.deleteChannel(this.channelId).then(() => {
this.deleteDialog = false;
Expand Down Expand Up @@ -394,6 +405,9 @@
&:hover:not(.hideHighlight) {
background-color: var(--v-greyBackground-base);
}
&.added {
background-color: var(--v-greenHighlightBackground-base);
}
}

.card-header {
Expand Down
Loading