Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,7 @@ const ContentKinds = new Set([
'slideshow',
'topic',
'video',
'zim',
]);

export default ContentKinds;
Expand All@@ -23,4 +24,5 @@ export const ContentKindsNames = {
SLIDESHOW: 'slideshow',
TOPIC: 'topic',
VIDEO: 'video',
ZIM: 'zim',
};
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,6 +16,22 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['.mp3'],
},
],
[
'audio_dependency',
{
id: 'audio_dependency',
readable_name: 'Audio',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 3,
kind_id: 'audio',
allowed_formats: ['mp3'],
associated_mimetypes: ['.mp3'],
},
],
[
'audio_thumbnail',
{
Expand DownExpand Up@@ -125,7 +141,7 @@ const FormatPresetsMap = new Map([
order: 4,
kind_id: 'exercise',
allowed_formats: ['svg', 'json', 'graphie'],
associated_mimetypes: ['.graphie', 'image/svg', 'application/json'],
associated_mimetypes: ['image/svg', '.graphie', 'application/json'],
},
],
[
Expand All@@ -141,7 +157,7 @@ const FormatPresetsMap = new Map([
order: 3,
kind_id: 'exercise',
allowed_formats: ['png', 'jpg', 'jpeg', 'gif', 'svg'],
associated_mimetypes: ['image/jpeg', 'image/png', 'image/gif', 'image/svg'],
associated_mimetypes: ['image/svg', 'image/gif', 'image/jpeg', 'image/png'],
},
],
[
Expand DownExpand Up@@ -214,7 +230,7 @@ const FormatPresetsMap = new Map([
id: 'html5_dependency',
readable_name: 'HTML5 Zip Dependency',
multi_language: false,
supplementary: true,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
Expand DownExpand Up@@ -272,6 +288,38 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['video/webm', 'video/mp4'],
},
],
[
'qti',
{
id: 'qti',
readable_name: 'QTI',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 1,
kind_id: 'exercise',
allowed_formats: ['zip'],
associated_mimetypes: ['.zip'],
},
],
[
'qti_thumbnail',
{
id: 'qti_thumbnail',
readable_name: 'QTI Thumbnail',
multi_language: false,
supplementary: true,
thumbnail: true,
subtitle: false,
display: true,
order: 2,
kind_id: 'exercise',
allowed_formats: ['png', 'jpg', 'jpeg'],
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
[
'slideshow_image',
{
Expand DownExpand Up@@ -342,7 +390,7 @@ const FormatPresetsMap = new Map([
id: 'video_dependency',
readable_name: 'Video Dependency',
multi_language: false,
supplementary: true,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
Expand DownExpand Up@@ -384,6 +432,38 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
[
'zim',
{
id: 'zim',
readable_name: 'Zim',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 1,
kind_id: 'zim',
allowed_formats: ['zim'],
associated_mimetypes: ['.zim'],
},
],
[
'zim_thumbnail',
{
id: 'zim_thumbnail',
readable_name: 'Zim Thumbnail',
multi_language: false,
supplementary: true,
thumbnail: true,
subtitle: false,
display: true,
order: 2,
kind_id: 'zim',
allowed_formats: ['png', 'jpg', 'jpeg'],
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
]);

export default FormatPresetsMap;
Expand All@@ -392,6 +472,7 @@ export const FormatPresetsList = Array.from(FormatPresetsMap.values());

export const FormatPresetsNames = {
AUDIO: 'audio',
AUDIO_DEPENDENCY: 'audio_dependency',
AUDIO_THUMBNAIL: 'audio_thumbnail',
CHANNEL_THUMBNAIL: 'channel_thumbnail',
DOCUMENT: 'document',
Expand All@@ -408,11 +489,15 @@ export const FormatPresetsNames = {
HTML5_THUMBNAIL: 'html5_thumbnail',
HTML5_ZIP: 'html5_zip',
LOW_RES_VIDEO: 'low_res_video',
QTI: 'qti',
QTI_THUMBNAIL: 'qti_thumbnail',
SLIDESHOW_IMAGE: 'slideshow_image',
SLIDESHOW_MANIFEST: 'slideshow_manifest',
SLIDESHOW_THUMBNAIL: 'slideshow_thumbnail',
TOPIC_THUMBNAIL: 'topic_thumbnail',
VIDEO_DEPENDENCY: 'video_dependency',
VIDEO_SUBTITLE: 'video_subtitle',
VIDEO_THUMBNAIL: 'video_thumbnail',
ZIM: 'zim',
ZIM_THUMBNAIL: 'zim_thumbnail',
};
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,8 +7,7 @@ const LicensesMap = new Map([
license_name: 'CC BY',
exists: true,
license_url: 'https://creativecommons.org/licenses/by/4.0/',
license_description:
'The Attribution License lets others distribute, remix, tweak, and build upon your work, even commercially, as long as they credit you for the original creation. This is the most accommodating of licenses offered. Recommended for maximum dissemination and use of licensed materials.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -20,8 +19,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-SA',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-sa/4.0/',
license_description:
'The Attribution-ShareAlike License lets others remix, tweak, and build upon your work even for commercial purposes, as long as they credit you and license their new creations under the identical terms. This license is often compared to "copyleft" free and open source software licenses. All new works based on yours will carry the same license, so any derivatives will also allow commercial use. This is the license used by Wikipedia, and is recommended for materials that would benefit from incorporating content from Wikipedia and similarly licensed projects.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -33,8 +31,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-ND',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nd/4.0/',
license_description:
'The Attribution-NoDerivs License allows for redistribution, commercial and non-commercial, as long as it is passed along unchanged and in whole, with credit to you.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -46,8 +43,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc/4.0/',
license_description:
"The Attribution-NonCommercial License lets others remix, tweak, and build upon your work non-commercially, and although their new works must also acknowledge you and be non-commercial, they don't have to license their derivative works on the same terms.",
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -59,8 +55,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC-SA',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc-sa/4.0/',
license_description:
'The Attribution-NonCommercial-ShareAlike License lets others remix, tweak, and build upon your work non-commercially, as long as they credit you and license their new creations under the identical terms.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -72,8 +67,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC-ND',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc-nd/4.0/',
license_description:
"The Attribution-NonCommercial-NoDerivs License is the most restrictive of our six main licenses, only allowing others to download your works and share them with others as long as they credit you, but they can't change them in any way or use them commercially.",
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -85,8 +79,7 @@ const LicensesMap = new Map([
license_name: 'All Rights Reserved',
exists: true,
license_url: 'http://www.allrights-reserved.com/',
license_description:
'The All Rights Reserved License indicates that the copyright holder reserves, or holds for their own use, all the rights provided by copyright law under one specific copyright treaty.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -98,8 +91,7 @@ const LicensesMap = new Map([
license_name: 'Public Domain',
exists: true,
license_url: 'https://creativecommons.org/publicdomain/mark/1.0/',
license_description:
'Public Domain work has been identified as being free of known restrictions under copyright law, including all related and neighboring rights.',
license_description: '',
copyright_holder_required: false,
is_custom: false,
},
Expand All@@ -111,8 +103,7 @@ const LicensesMap = new Map([
license_name: 'Special Permissions',
exists: false,
license_url: '',
license_description:
'Special Permissions is a custom license to use when the current licenses do not apply to the content. The owner of this license is responsible for creating a description of what this license entails.',
license_description: '',
copyright_holder_required: true,
is_custom: true,
},
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
# Generated by Django 3.2.3 on 2021-07-06 20:05
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
('contentcuration', '0129_auto_20210519_2213'),
]

operations = [
migrations.AlterField(
model_name='contentkind',
name='kind',
field=models.CharField(choices=[('topic', 'Topic'), ('video', 'Video'), ('audio', 'Audio'), ('exercise', 'Exercise'), ('document', 'Document'), ('html5', 'HTML5 App'), ('slideshow', 'Slideshow'), ('h5p', 'H5P'), ('zim', 'Zim')], max_length=200, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='fileformat',
name='extension',
field=models.CharField(choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='formatpreset',
name='id',
field=models.CharField(choices=[('high_res_video', 'High Resolution'), ('low_res_video', 'Low Resolution'), ('video_thumbnail', 'Thumbnail'), ('video_subtitle', 'Subtitle'), ('video_dependency', 'Video (dependency)'), ('audio', 'Audio'), ('audio_thumbnail', 'Thumbnail'), ('audio_dependency', 'audio (dependency)'), ('document', 'Document'), ('epub', 'ePub Document'), ('document_thumbnail', 'Thumbnail'), ('exercise', 'Exercise'), ('exercise_thumbnail', 'Thumbnail'), ('exercise_image', 'Exercise Image'), ('exercise_graphie', 'Exercise Graphie'), ('channel_thumbnail', 'Channel Thumbnail'), ('topic_thumbnail', 'Thumbnail'), ('html5_zip', 'HTML5 Zip'), ('html5_dependency', 'HTML5 Dependency (Zip format)'), ('html5_thumbnail', 'HTML5 Thumbnail'), ('h5p', 'H5P Zip'), ('h5p_thumbnail', 'H5P Thumbnail'), ('zim', 'Zim'), ('zim_thumbnail', 'Zim Thumbnail'), ('qti', 'QTI Zip'), ('qti_thumbnail', 'QTI Thumbnail'), ('slideshow_image', 'Slideshow Image'), ('slideshow_thumbnail', 'Slideshow Thumbnail'), ('slideshow_manifest', 'Slideshow Manifest')], max_length=150, primary_key=True, serialize=False),
),
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
# Generated by Django 3.2.3 on 2021-07-06 20:05
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
('content', '0013_auto_20210519_1759'),
]

operations = [
migrations.AlterField(
model_name='contentnode',
name='kind',
field=models.CharField(blank=True, choices=[('topic', 'Topic'), ('video', 'Video'), ('audio', 'Audio'), ('exercise', 'Exercise'), ('document', 'Document'), ('html5', 'HTML5 App'), ('slideshow', 'Slideshow'), ('h5p', 'H5P'), ('zim', 'Zim')], max_length=200),
),
migrations.AlterField(
model_name='file',
name='extension',
field=models.CharField(blank=True, choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40),
),
migrations.AlterField(
model_name='file',
name='preset',
field=models.CharField(blank=True, choices=[('high_res_video', 'High Resolution'), ('low_res_video', 'Low Resolution'), ('video_thumbnail', 'Thumbnail'), ('video_subtitle', 'Subtitle'), ('video_dependency', 'Video (dependency)'), ('audio', 'Audio'), ('audio_thumbnail', 'Thumbnail'), ('audio_dependency', 'audio (dependency)'), ('document', 'Document'), ('epub', 'ePub Document'), ('document_thumbnail', 'Thumbnail'), ('exercise', 'Exercise'), ('exercise_thumbnail', 'Thumbnail'), ('exercise_image', 'Exercise Image'), ('exercise_graphie', 'Exercise Graphie'), ('channel_thumbnail', 'Channel Thumbnail'), ('topic_thumbnail', 'Thumbnail'), ('html5_zip', 'HTML5 Zip'), ('html5_dependency', 'HTML5 Dependency (Zip format)'), ('html5_thumbnail', 'HTML5 Thumbnail'), ('h5p', 'H5P Zip'), ('h5p_thumbnail', 'H5P Thumbnail'), ('zim', 'Zim'), ('zim_thumbnail', 'Zim Thumbnail'), ('qti', 'QTI Zip'), ('qti_thumbnail', 'QTI Thumbnail'), ('slideshow_image', 'Slideshow Image'), ('slideshow_thumbnail', 'Slideshow Thumbnail'), ('slideshow_manifest', 'Slideshow Manifest')], max_length=150),
),
migrations.AlterField(
model_name='localfile',
name='extension',
field=models.CharField(blank=True, choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40),
),
]
2 changes: 1 addition & 1 deletion requirements.in
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ djangorestframework==3.12.4
psycopg2-binary==2.8.6
django-js-reverse==0.9.1
django-registration==3.1.2
le-utils>=0.1.30
le-utils==0.1.31
gunicorn==19.6.0
django-postmark==0.1.6
jsonfield==3.1.0
Expand Down
9 changes: 7 additions & 2 deletions requirements.txt
Original file line numberDiff line numberDiff line change
Expand Up@@ -152,7 +152,10 @@ httplib2==0.19.1
idna==2.10
# via requests
importlib-metadata==1.7.0
# via -r requirements.in
# via
# -r requirements.in
# jsonschema
# kombu
jmespath==0.10.0
# via
# boto3
Expand All@@ -163,7 +166,7 @@ jsonschema==3.2.0
# via -r requirements.in
kombu==4.6.11
# via celery
le-utils==0.1.30
le-utils==0.1.31
# via -r requirements.in
minio==3.0.3
# via -r requirements.in
Expand DownExpand Up@@ -271,6 +274,8 @@ six==1.16.0
# python-utils
sqlparse==0.4.1
# via django
typing-extensions==3.10.0.0
# via asgiref
uritemplate==3.0.1
# via google-api-python-client
urllib3==1.26.4
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,7 @@ const ContentKinds = new Set([
'slideshow',
'topic',
'video',
'zim',
]);

export default ContentKinds;
Expand All@@ -23,4 +24,5 @@ export const ContentKindsNames = {
SLIDESHOW: 'slideshow',
TOPIC: 'topic',
VIDEO: 'video',
ZIM: 'zim',
};
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,6 +16,22 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['.mp3'],
},
],
[
'audio_dependency',
{
id: 'audio_dependency',
readable_name: 'Audio',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 3,
kind_id: 'audio',
allowed_formats: ['mp3'],
associated_mimetypes: ['.mp3'],
},
],
[
'audio_thumbnail',
{
Expand DownExpand Up@@ -125,7 +141,7 @@ const FormatPresetsMap = new Map([
order: 4,
kind_id: 'exercise',
allowed_formats: ['svg', 'json', 'graphie'],
associated_mimetypes: ['.graphie', 'image/svg', 'application/json'],
associated_mimetypes: ['image/svg', '.graphie', 'application/json'],
},
],
[
Expand All@@ -141,7 +157,7 @@ const FormatPresetsMap = new Map([
order: 3,
kind_id: 'exercise',
allowed_formats: ['png', 'jpg', 'jpeg', 'gif', 'svg'],
associated_mimetypes: ['image/jpeg', 'image/png', 'image/gif', 'image/svg'],
associated_mimetypes: ['image/svg', 'image/gif', 'image/jpeg', 'image/png'],
},
],
[
Expand DownExpand Up@@ -214,7 +230,7 @@ const FormatPresetsMap = new Map([
id: 'html5_dependency',
readable_name: 'HTML5 Zip Dependency',
multi_language: false,
supplementary: true,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
Expand DownExpand Up@@ -272,6 +288,38 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['video/webm', 'video/mp4'],
},
],
[
'qti',
{
id: 'qti',
readable_name: 'QTI',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 1,
kind_id: 'exercise',
allowed_formats: ['zip'],
associated_mimetypes: ['.zip'],
},
],
[
'qti_thumbnail',
{
id: 'qti_thumbnail',
readable_name: 'QTI Thumbnail',
multi_language: false,
supplementary: true,
thumbnail: true,
subtitle: false,
display: true,
order: 2,
kind_id: 'exercise',
allowed_formats: ['png', 'jpg', 'jpeg'],
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
[
'slideshow_image',
{
Expand DownExpand Up@@ -342,7 +390,7 @@ const FormatPresetsMap = new Map([
id: 'video_dependency',
readable_name: 'Video Dependency',
multi_language: false,
supplementary: true,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
Expand DownExpand Up@@ -384,6 +432,38 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
[
'zim',
{
id: 'zim',
readable_name: 'Zim',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 1,
kind_id: 'zim',
allowed_formats: ['zim'],
associated_mimetypes: ['.zim'],
},
],
[
'zim_thumbnail',
{
id: 'zim_thumbnail',
readable_name: 'Zim Thumbnail',
multi_language: false,
supplementary: true,
thumbnail: true,
subtitle: false,
display: true,
order: 2,
kind_id: 'zim',
allowed_formats: ['png', 'jpg', 'jpeg'],
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
]);

export default FormatPresetsMap;
Expand All@@ -392,6 +472,7 @@ export const FormatPresetsList = Array.from(FormatPresetsMap.values());

export const FormatPresetsNames = {
AUDIO: 'audio',
AUDIO_DEPENDENCY: 'audio_dependency',
AUDIO_THUMBNAIL: 'audio_thumbnail',
CHANNEL_THUMBNAIL: 'channel_thumbnail',
DOCUMENT: 'document',
Expand All@@ -408,11 +489,15 @@ export const FormatPresetsNames = {
HTML5_THUMBNAIL: 'html5_thumbnail',
HTML5_ZIP: 'html5_zip',
LOW_RES_VIDEO: 'low_res_video',
QTI: 'qti',
QTI_THUMBNAIL: 'qti_thumbnail',
SLIDESHOW_IMAGE: 'slideshow_image',
SLIDESHOW_MANIFEST: 'slideshow_manifest',
SLIDESHOW_THUMBNAIL: 'slideshow_thumbnail',
TOPIC_THUMBNAIL: 'topic_thumbnail',
VIDEO_DEPENDENCY: 'video_dependency',
VIDEO_SUBTITLE: 'video_subtitle',
VIDEO_THUMBNAIL: 'video_thumbnail',
ZIM: 'zim',
ZIM_THUMBNAIL: 'zim_thumbnail',
};
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,8 +7,7 @@ const LicensesMap = new Map([
license_name: 'CC BY',
exists: true,
license_url: 'https://creativecommons.org/licenses/by/4.0/',
license_description:
'The Attribution License lets others distribute, remix, tweak, and build upon your work, even commercially, as long as they credit you for the original creation. This is the most accommodating of licenses offered. Recommended for maximum dissemination and use of licensed materials.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -20,8 +19,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-SA',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-sa/4.0/',
license_description:
'The Attribution-ShareAlike License lets others remix, tweak, and build upon your work even for commercial purposes, as long as they credit you and license their new creations under the identical terms. This license is often compared to "copyleft" free and open source software licenses. All new works based on yours will carry the same license, so any derivatives will also allow commercial use. This is the license used by Wikipedia, and is recommended for materials that would benefit from incorporating content from Wikipedia and similarly licensed projects.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -33,8 +31,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-ND',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nd/4.0/',
license_description:
'The Attribution-NoDerivs License allows for redistribution, commercial and non-commercial, as long as it is passed along unchanged and in whole, with credit to you.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -46,8 +43,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc/4.0/',
license_description:
"The Attribution-NonCommercial License lets others remix, tweak, and build upon your work non-commercially, and although their new works must also acknowledge you and be non-commercial, they don't have to license their derivative works on the same terms.",
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -59,8 +55,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC-SA',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc-sa/4.0/',
license_description:
'The Attribution-NonCommercial-ShareAlike License lets others remix, tweak, and build upon your work non-commercially, as long as they credit you and license their new creations under the identical terms.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -72,8 +67,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC-ND',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc-nd/4.0/',
license_description:
"The Attribution-NonCommercial-NoDerivs License is the most restrictive of our six main licenses, only allowing others to download your works and share them with others as long as they credit you, but they can't change them in any way or use them commercially.",
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -85,8 +79,7 @@ const LicensesMap = new Map([
license_name: 'All Rights Reserved',
exists: true,
license_url: 'http://www.allrights-reserved.com/',
license_description:
'The All Rights Reserved License indicates that the copyright holder reserves, or holds for their own use, all the rights provided by copyright law under one specific copyright treaty.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -98,8 +91,7 @@ const LicensesMap = new Map([
license_name: 'Public Domain',
exists: true,
license_url: 'https://creativecommons.org/publicdomain/mark/1.0/',
license_description:
'Public Domain work has been identified as being free of known restrictions under copyright law, including all related and neighboring rights.',
license_description: '',
copyright_holder_required: false,
is_custom: false,
},
Expand All@@ -111,8 +103,7 @@ const LicensesMap = new Map([
license_name: 'Special Permissions',
exists: false,
license_url: '',
license_description:
'Special Permissions is a custom license to use when the current licenses do not apply to the content. The owner of this license is responsible for creating a description of what this license entails.',
license_description: '',
copyright_holder_required: true,
is_custom: true,
},
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
# Generated by Django 3.2.3 on 2021-07-06 20:05
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
('contentcuration', '0129_auto_20210519_2213'),
]

operations = [
migrations.AlterField(
model_name='contentkind',
name='kind',
field=models.CharField(choices=[('topic', 'Topic'), ('video', 'Video'), ('audio', 'Audio'), ('exercise', 'Exercise'), ('document', 'Document'), ('html5', 'HTML5 App'), ('slideshow', 'Slideshow'), ('h5p', 'H5P'), ('zim', 'Zim')], max_length=200, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='fileformat',
name='extension',
field=models.CharField(choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='formatpreset',
name='id',
field=models.CharField(choices=[('high_res_video', 'High Resolution'), ('low_res_video', 'Low Resolution'), ('video_thumbnail', 'Thumbnail'), ('video_subtitle', 'Subtitle'), ('video_dependency', 'Video (dependency)'), ('audio', 'Audio'), ('audio_thumbnail', 'Thumbnail'), ('audio_dependency', 'audio (dependency)'), ('document', 'Document'), ('epub', 'ePub Document'), ('document_thumbnail', 'Thumbnail'), ('exercise', 'Exercise'), ('exercise_thumbnail', 'Thumbnail'), ('exercise_image', 'Exercise Image'), ('exercise_graphie', 'Exercise Graphie'), ('channel_thumbnail', 'Channel Thumbnail'), ('topic_thumbnail', 'Thumbnail'), ('html5_zip', 'HTML5 Zip'), ('html5_dependency', 'HTML5 Dependency (Zip format)'), ('html5_thumbnail', 'HTML5 Thumbnail'), ('h5p', 'H5P Zip'), ('h5p_thumbnail', 'H5P Thumbnail'), ('zim', 'Zim'), ('zim_thumbnail', 'Zim Thumbnail'), ('qti', 'QTI Zip'), ('qti_thumbnail', 'QTI Thumbnail'), ('slideshow_image', 'Slideshow Image'), ('slideshow_thumbnail', 'Slideshow Thumbnail'), ('slideshow_manifest', 'Slideshow Manifest')], max_length=150, primary_key=True, serialize=False),
),
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
# Generated by Django 3.2.3 on 2021-07-06 20:05
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
('content', '0013_auto_20210519_1759'),
]

operations = [
migrations.AlterField(
model_name='contentnode',
name='kind',
field=models.CharField(blank=True, choices=[('topic', 'Topic'), ('video', 'Video'), ('audio', 'Audio'), ('exercise', 'Exercise'), ('document', 'Document'), ('html5', 'HTML5 App'), ('slideshow', 'Slideshow'), ('h5p', 'H5P'), ('zim', 'Zim')], max_length=200),
),
migrations.AlterField(
model_name='file',
name='extension',
field=models.CharField(blank=True, choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40),
),
migrations.AlterField(
model_name='file',
name='preset',
field=models.CharField(blank=True, choices=[('high_res_video', 'High Resolution'), ('low_res_video', 'Low Resolution'), ('video_thumbnail', 'Thumbnail'), ('video_subtitle', 'Subtitle'), ('video_dependency', 'Video (dependency)'), ('audio', 'Audio'), ('audio_thumbnail', 'Thumbnail'), ('audio_dependency', 'audio (dependency)'), ('document', 'Document'), ('epub', 'ePub Document'), ('document_thumbnail', 'Thumbnail'), ('exercise', 'Exercise'), ('exercise_thumbnail', 'Thumbnail'), ('exercise_image', 'Exercise Image'), ('exercise_graphie', 'Exercise Graphie'), ('channel_thumbnail', 'Channel Thumbnail'), ('topic_thumbnail', 'Thumbnail'), ('html5_zip', 'HTML5 Zip'), ('html5_dependency', 'HTML5 Dependency (Zip format)'), ('html5_thumbnail', 'HTML5 Thumbnail'), ('h5p', 'H5P Zip'), ('h5p_thumbnail', 'H5P Thumbnail'), ('zim', 'Zim'), ('zim_thumbnail', 'Zim Thumbnail'), ('qti', 'QTI Zip'), ('qti_thumbnail', 'QTI Thumbnail'), ('slideshow_image', 'Slideshow Image'), ('slideshow_thumbnail', 'Slideshow Thumbnail'), ('slideshow_manifest', 'Slideshow Manifest')], max_length=150),
),
migrations.AlterField(
model_name='localfile',
name='extension',
field=models.CharField(blank=True, choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40),
),
]
2 changes: 1 addition & 1 deletion requirements.in
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ djangorestframework==3.12.4
psycopg2-binary==2.8.6
django-js-reverse==0.9.1
django-registration==3.1.2
le-utils>=0.1.30
le-utils==0.1.31
gunicorn==19.6.0
django-postmark==0.1.6
jsonfield==3.1.0
Expand Down
9 changes: 7 additions & 2 deletions requirements.txt
Original file line numberDiff line numberDiff line change
Expand Up@@ -152,7 +152,10 @@ httplib2==0.19.1
idna==2.10
# via requests
importlib-metadata==1.7.0
# via -r requirements.in
# via
# -r requirements.in
# jsonschema
# kombu
jmespath==0.10.0
# via
# boto3
Expand All@@ -163,7 +166,7 @@ jsonschema==3.2.0
# via -r requirements.in
kombu==4.6.11
# via celery
le-utils==0.1.30
le-utils==0.1.31
# via -r requirements.in
minio==3.0.3
# via -r requirements.in
Expand DownExpand Up@@ -271,6 +274,8 @@ six==1.16.0
# python-utils
sqlparse==0.4.1
# via django
typing-extensions==3.10.0.0
# via asgiref
uritemplate==3.0.1
# via google-api-python-client
urllib3==1.26.4
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,7 @@ const ContentKinds = new Set([
'slideshow',
'topic',
'video',
'zim',
]);

export default ContentKinds;
Expand All@@ -23,4 +24,5 @@ export const ContentKindsNames = {
SLIDESHOW: 'slideshow',
TOPIC: 'topic',
VIDEO: 'video',
ZIM: 'zim',
};
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,6 +16,22 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['.mp3'],
},
],
[
'audio_dependency',
{
id: 'audio_dependency',
readable_name: 'Audio',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 3,
kind_id: 'audio',
allowed_formats: ['mp3'],
associated_mimetypes: ['.mp3'],
},
],
[
'audio_thumbnail',
{
Expand DownExpand Up@@ -125,7 +141,7 @@ const FormatPresetsMap = new Map([
order: 4,
kind_id: 'exercise',
allowed_formats: ['svg', 'json', 'graphie'],
associated_mimetypes: ['.graphie', 'image/svg', 'application/json'],
associated_mimetypes: ['image/svg', '.graphie', 'application/json'],
},
],
[
Expand All@@ -141,7 +157,7 @@ const FormatPresetsMap = new Map([
order: 3,
kind_id: 'exercise',
allowed_formats: ['png', 'jpg', 'jpeg', 'gif', 'svg'],
associated_mimetypes: ['image/jpeg', 'image/png', 'image/gif', 'image/svg'],
associated_mimetypes: ['image/svg', 'image/gif', 'image/jpeg', 'image/png'],
},
],
[
Expand DownExpand Up@@ -214,7 +230,7 @@ const FormatPresetsMap = new Map([
id: 'html5_dependency',
readable_name: 'HTML5 Zip Dependency',
multi_language: false,
supplementary: true,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
Expand DownExpand Up@@ -272,6 +288,38 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['video/webm', 'video/mp4'],
},
],
[
'qti',
{
id: 'qti',
readable_name: 'QTI',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 1,
kind_id: 'exercise',
allowed_formats: ['zip'],
associated_mimetypes: ['.zip'],
},
],
[
'qti_thumbnail',
{
id: 'qti_thumbnail',
readable_name: 'QTI Thumbnail',
multi_language: false,
supplementary: true,
thumbnail: true,
subtitle: false,
display: true,
order: 2,
kind_id: 'exercise',
allowed_formats: ['png', 'jpg', 'jpeg'],
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
[
'slideshow_image',
{
Expand DownExpand Up@@ -342,7 +390,7 @@ const FormatPresetsMap = new Map([
id: 'video_dependency',
readable_name: 'Video Dependency',
multi_language: false,
supplementary: true,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
Expand DownExpand Up@@ -384,6 +432,38 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
[
'zim',
{
id: 'zim',
readable_name: 'Zim',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 1,
kind_id: 'zim',
allowed_formats: ['zim'],
associated_mimetypes: ['.zim'],
},
],
[
'zim_thumbnail',
{
id: 'zim_thumbnail',
readable_name: 'Zim Thumbnail',
multi_language: false,
supplementary: true,
thumbnail: true,
subtitle: false,
display: true,
order: 2,
kind_id: 'zim',
allowed_formats: ['png', 'jpg', 'jpeg'],
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
]);

export default FormatPresetsMap;
Expand All@@ -392,6 +472,7 @@ export const FormatPresetsList = Array.from(FormatPresetsMap.values());

export const FormatPresetsNames = {
AUDIO: 'audio',
AUDIO_DEPENDENCY: 'audio_dependency',
AUDIO_THUMBNAIL: 'audio_thumbnail',
CHANNEL_THUMBNAIL: 'channel_thumbnail',
DOCUMENT: 'document',
Expand All@@ -408,11 +489,15 @@ export const FormatPresetsNames = {
HTML5_THUMBNAIL: 'html5_thumbnail',
HTML5_ZIP: 'html5_zip',
LOW_RES_VIDEO: 'low_res_video',
QTI: 'qti',
QTI_THUMBNAIL: 'qti_thumbnail',
SLIDESHOW_IMAGE: 'slideshow_image',
SLIDESHOW_MANIFEST: 'slideshow_manifest',
SLIDESHOW_THUMBNAIL: 'slideshow_thumbnail',
TOPIC_THUMBNAIL: 'topic_thumbnail',
VIDEO_DEPENDENCY: 'video_dependency',
VIDEO_SUBTITLE: 'video_subtitle',
VIDEO_THUMBNAIL: 'video_thumbnail',
ZIM: 'zim',
ZIM_THUMBNAIL: 'zim_thumbnail',
};
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,8 +7,7 @@ const LicensesMap = new Map([
license_name: 'CC BY',
exists: true,
license_url: 'https://creativecommons.org/licenses/by/4.0/',
license_description:
'The Attribution License lets others distribute, remix, tweak, and build upon your work, even commercially, as long as they credit you for the original creation. This is the most accommodating of licenses offered. Recommended for maximum dissemination and use of licensed materials.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -20,8 +19,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-SA',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-sa/4.0/',
license_description:
'The Attribution-ShareAlike License lets others remix, tweak, and build upon your work even for commercial purposes, as long as they credit you and license their new creations under the identical terms. This license is often compared to "copyleft" free and open source software licenses. All new works based on yours will carry the same license, so any derivatives will also allow commercial use. This is the license used by Wikipedia, and is recommended for materials that would benefit from incorporating content from Wikipedia and similarly licensed projects.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -33,8 +31,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-ND',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nd/4.0/',
license_description:
'The Attribution-NoDerivs License allows for redistribution, commercial and non-commercial, as long as it is passed along unchanged and in whole, with credit to you.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -46,8 +43,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc/4.0/',
license_description:
"The Attribution-NonCommercial License lets others remix, tweak, and build upon your work non-commercially, and although their new works must also acknowledge you and be non-commercial, they don't have to license their derivative works on the same terms.",
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -59,8 +55,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC-SA',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc-sa/4.0/',
license_description:
'The Attribution-NonCommercial-ShareAlike License lets others remix, tweak, and build upon your work non-commercially, as long as they credit you and license their new creations under the identical terms.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -72,8 +67,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC-ND',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc-nd/4.0/',
license_description:
"The Attribution-NonCommercial-NoDerivs License is the most restrictive of our six main licenses, only allowing others to download your works and share them with others as long as they credit you, but they can't change them in any way or use them commercially.",
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -85,8 +79,7 @@ const LicensesMap = new Map([
license_name: 'All Rights Reserved',
exists: true,
license_url: 'http://www.allrights-reserved.com/',
license_description:
'The All Rights Reserved License indicates that the copyright holder reserves, or holds for their own use, all the rights provided by copyright law under one specific copyright treaty.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -98,8 +91,7 @@ const LicensesMap = new Map([
license_name: 'Public Domain',
exists: true,
license_url: 'https://creativecommons.org/publicdomain/mark/1.0/',
license_description:
'Public Domain work has been identified as being free of known restrictions under copyright law, including all related and neighboring rights.',
license_description: '',
copyright_holder_required: false,
is_custom: false,
},
Expand All@@ -111,8 +103,7 @@ const LicensesMap = new Map([
license_name: 'Special Permissions',
exists: false,
license_url: '',
license_description:
'Special Permissions is a custom license to use when the current licenses do not apply to the content. The owner of this license is responsible for creating a description of what this license entails.',
license_description: '',
copyright_holder_required: true,
is_custom: true,
},
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
# Generated by Django 3.2.3 on 2021-07-06 20:05
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
('contentcuration', '0129_auto_20210519_2213'),
]

operations = [
migrations.AlterField(
model_name='contentkind',
name='kind',
field=models.CharField(choices=[('topic', 'Topic'), ('video', 'Video'), ('audio', 'Audio'), ('exercise', 'Exercise'), ('document', 'Document'), ('html5', 'HTML5 App'), ('slideshow', 'Slideshow'), ('h5p', 'H5P'), ('zim', 'Zim')], max_length=200, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='fileformat',
name='extension',
field=models.CharField(choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='formatpreset',
name='id',
field=models.CharField(choices=[('high_res_video', 'High Resolution'), ('low_res_video', 'Low Resolution'), ('video_thumbnail', 'Thumbnail'), ('video_subtitle', 'Subtitle'), ('video_dependency', 'Video (dependency)'), ('audio', 'Audio'), ('audio_thumbnail', 'Thumbnail'), ('audio_dependency', 'audio (dependency)'), ('document', 'Document'), ('epub', 'ePub Document'), ('document_thumbnail', 'Thumbnail'), ('exercise', 'Exercise'), ('exercise_thumbnail', 'Thumbnail'), ('exercise_image', 'Exercise Image'), ('exercise_graphie', 'Exercise Graphie'), ('channel_thumbnail', 'Channel Thumbnail'), ('topic_thumbnail', 'Thumbnail'), ('html5_zip', 'HTML5 Zip'), ('html5_dependency', 'HTML5 Dependency (Zip format)'), ('html5_thumbnail', 'HTML5 Thumbnail'), ('h5p', 'H5P Zip'), ('h5p_thumbnail', 'H5P Thumbnail'), ('zim', 'Zim'), ('zim_thumbnail', 'Zim Thumbnail'), ('qti', 'QTI Zip'), ('qti_thumbnail', 'QTI Thumbnail'), ('slideshow_image', 'Slideshow Image'), ('slideshow_thumbnail', 'Slideshow Thumbnail'), ('slideshow_manifest', 'Slideshow Manifest')], max_length=150, primary_key=True, serialize=False),
),
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
# Generated by Django 3.2.3 on 2021-07-06 20:05
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
('content', '0013_auto_20210519_1759'),
]

operations = [
migrations.AlterField(
model_name='contentnode',
name='kind',
field=models.CharField(blank=True, choices=[('topic', 'Topic'), ('video', 'Video'), ('audio', 'Audio'), ('exercise', 'Exercise'), ('document', 'Document'), ('html5', 'HTML5 App'), ('slideshow', 'Slideshow'), ('h5p', 'H5P'), ('zim', 'Zim')], max_length=200),
),
migrations.AlterField(
model_name='file',
name='extension',
field=models.CharField(blank=True, choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40),
),
migrations.AlterField(
model_name='file',
name='preset',
field=models.CharField(blank=True, choices=[('high_res_video', 'High Resolution'), ('low_res_video', 'Low Resolution'), ('video_thumbnail', 'Thumbnail'), ('video_subtitle', 'Subtitle'), ('video_dependency', 'Video (dependency)'), ('audio', 'Audio'), ('audio_thumbnail', 'Thumbnail'), ('audio_dependency', 'audio (dependency)'), ('document', 'Document'), ('epub', 'ePub Document'), ('document_thumbnail', 'Thumbnail'), ('exercise', 'Exercise'), ('exercise_thumbnail', 'Thumbnail'), ('exercise_image', 'Exercise Image'), ('exercise_graphie', 'Exercise Graphie'), ('channel_thumbnail', 'Channel Thumbnail'), ('topic_thumbnail', 'Thumbnail'), ('html5_zip', 'HTML5 Zip'), ('html5_dependency', 'HTML5 Dependency (Zip format)'), ('html5_thumbnail', 'HTML5 Thumbnail'), ('h5p', 'H5P Zip'), ('h5p_thumbnail', 'H5P Thumbnail'), ('zim', 'Zim'), ('zim_thumbnail', 'Zim Thumbnail'), ('qti', 'QTI Zip'), ('qti_thumbnail', 'QTI Thumbnail'), ('slideshow_image', 'Slideshow Image'), ('slideshow_thumbnail', 'Slideshow Thumbnail'), ('slideshow_manifest', 'Slideshow Manifest')], max_length=150),
),
migrations.AlterField(
model_name='localfile',
name='extension',
field=models.CharField(blank=True, choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40),
),
]
2 changes: 1 addition & 1 deletion requirements.in
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ djangorestframework==3.12.4
psycopg2-binary==2.8.6
django-js-reverse==0.9.1
django-registration==3.1.2
le-utils>=0.1.30
le-utils==0.1.31
gunicorn==19.6.0
django-postmark==0.1.6
jsonfield==3.1.0
Expand Down
9 changes: 7 additions & 2 deletions requirements.txt
Original file line numberDiff line numberDiff line change
Expand Up@@ -152,7 +152,10 @@ httplib2==0.19.1
idna==2.10
# via requests
importlib-metadata==1.7.0
# via -r requirements.in
# via
# -r requirements.in
# jsonschema
# kombu
jmespath==0.10.0
# via
# boto3
Expand All@@ -163,7 +166,7 @@ jsonschema==3.2.0
# via -r requirements.in
kombu==4.6.11
# via celery
le-utils==0.1.30
le-utils==0.1.31
# via -r requirements.in
minio==3.0.3
# via -r requirements.in
Expand DownExpand Up@@ -271,6 +274,8 @@ six==1.16.0
# python-utils
sqlparse==0.4.1
# via django
typing-extensions==3.10.0.0
# via asgiref
uritemplate==3.0.1
# via google-api-python-client
urllib3==1.26.4
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,7 @@ const ContentKinds = new Set([
'slideshow',
'topic',
'video',
'zim',
]);

export default ContentKinds;
Expand All@@ -23,4 +24,5 @@ export const ContentKindsNames = {
SLIDESHOW: 'slideshow',
TOPIC: 'topic',
VIDEO: 'video',
ZIM: 'zim',
};
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,6 +16,22 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['.mp3'],
},
],
[
'audio_dependency',
{
id: 'audio_dependency',
readable_name: 'Audio',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 3,
kind_id: 'audio',
allowed_formats: ['mp3'],
associated_mimetypes: ['.mp3'],
},
],
[
'audio_thumbnail',
{
Expand DownExpand Up@@ -125,7 +141,7 @@ const FormatPresetsMap = new Map([
order: 4,
kind_id: 'exercise',
allowed_formats: ['svg', 'json', 'graphie'],
associated_mimetypes: ['.graphie', 'image/svg', 'application/json'],
associated_mimetypes: ['image/svg', '.graphie', 'application/json'],
},
],
[
Expand All@@ -141,7 +157,7 @@ const FormatPresetsMap = new Map([
order: 3,
kind_id: 'exercise',
allowed_formats: ['png', 'jpg', 'jpeg', 'gif', 'svg'],
associated_mimetypes: ['image/jpeg', 'image/png', 'image/gif', 'image/svg'],
associated_mimetypes: ['image/svg', 'image/gif', 'image/jpeg', 'image/png'],
},
],
[
Expand DownExpand Up@@ -214,7 +230,7 @@ const FormatPresetsMap = new Map([
id: 'html5_dependency',
readable_name: 'HTML5 Zip Dependency',
multi_language: false,
supplementary: true,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
Expand DownExpand Up@@ -272,6 +288,38 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['video/webm', 'video/mp4'],
},
],
[
'qti',
{
id: 'qti',
readable_name: 'QTI',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 1,
kind_id: 'exercise',
allowed_formats: ['zip'],
associated_mimetypes: ['.zip'],
},
],
[
'qti_thumbnail',
{
id: 'qti_thumbnail',
readable_name: 'QTI Thumbnail',
multi_language: false,
supplementary: true,
thumbnail: true,
subtitle: false,
display: true,
order: 2,
kind_id: 'exercise',
allowed_formats: ['png', 'jpg', 'jpeg'],
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
[
'slideshow_image',
{
Expand DownExpand Up@@ -342,7 +390,7 @@ const FormatPresetsMap = new Map([
id: 'video_dependency',
readable_name: 'Video Dependency',
multi_language: false,
supplementary: true,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
Expand DownExpand Up@@ -384,6 +432,38 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
[
'zim',
{
id: 'zim',
readable_name: 'Zim',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 1,
kind_id: 'zim',
allowed_formats: ['zim'],
associated_mimetypes: ['.zim'],
},
],
[
'zim_thumbnail',
{
id: 'zim_thumbnail',
readable_name: 'Zim Thumbnail',
multi_language: false,
supplementary: true,
thumbnail: true,
subtitle: false,
display: true,
order: 2,
kind_id: 'zim',
allowed_formats: ['png', 'jpg', 'jpeg'],
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
]);

export default FormatPresetsMap;
Expand All@@ -392,6 +472,7 @@ export const FormatPresetsList = Array.from(FormatPresetsMap.values());

export const FormatPresetsNames = {
AUDIO: 'audio',
AUDIO_DEPENDENCY: 'audio_dependency',
AUDIO_THUMBNAIL: 'audio_thumbnail',
CHANNEL_THUMBNAIL: 'channel_thumbnail',
DOCUMENT: 'document',
Expand All@@ -408,11 +489,15 @@ export const FormatPresetsNames = {
HTML5_THUMBNAIL: 'html5_thumbnail',
HTML5_ZIP: 'html5_zip',
LOW_RES_VIDEO: 'low_res_video',
QTI: 'qti',
QTI_THUMBNAIL: 'qti_thumbnail',
SLIDESHOW_IMAGE: 'slideshow_image',
SLIDESHOW_MANIFEST: 'slideshow_manifest',
SLIDESHOW_THUMBNAIL: 'slideshow_thumbnail',
TOPIC_THUMBNAIL: 'topic_thumbnail',
VIDEO_DEPENDENCY: 'video_dependency',
VIDEO_SUBTITLE: 'video_subtitle',
VIDEO_THUMBNAIL: 'video_thumbnail',
ZIM: 'zim',
ZIM_THUMBNAIL: 'zim_thumbnail',
};
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,8 +7,7 @@ const LicensesMap = new Map([
license_name: 'CC BY',
exists: true,
license_url: 'https://creativecommons.org/licenses/by/4.0/',
license_description:
'The Attribution License lets others distribute, remix, tweak, and build upon your work, even commercially, as long as they credit you for the original creation. This is the most accommodating of licenses offered. Recommended for maximum dissemination and use of licensed materials.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -20,8 +19,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-SA',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-sa/4.0/',
license_description:
'The Attribution-ShareAlike License lets others remix, tweak, and build upon your work even for commercial purposes, as long as they credit you and license their new creations under the identical terms. This license is often compared to "copyleft" free and open source software licenses. All new works based on yours will carry the same license, so any derivatives will also allow commercial use. This is the license used by Wikipedia, and is recommended for materials that would benefit from incorporating content from Wikipedia and similarly licensed projects.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -33,8 +31,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-ND',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nd/4.0/',
license_description:
'The Attribution-NoDerivs License allows for redistribution, commercial and non-commercial, as long as it is passed along unchanged and in whole, with credit to you.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -46,8 +43,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc/4.0/',
license_description:
"The Attribution-NonCommercial License lets others remix, tweak, and build upon your work non-commercially, and although their new works must also acknowledge you and be non-commercial, they don't have to license their derivative works on the same terms.",
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -59,8 +55,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC-SA',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc-sa/4.0/',
license_description:
'The Attribution-NonCommercial-ShareAlike License lets others remix, tweak, and build upon your work non-commercially, as long as they credit you and license their new creations under the identical terms.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -72,8 +67,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC-ND',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc-nd/4.0/',
license_description:
"The Attribution-NonCommercial-NoDerivs License is the most restrictive of our six main licenses, only allowing others to download your works and share them with others as long as they credit you, but they can't change them in any way or use them commercially.",
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -85,8 +79,7 @@ const LicensesMap = new Map([
license_name: 'All Rights Reserved',
exists: true,
license_url: 'http://www.allrights-reserved.com/',
license_description:
'The All Rights Reserved License indicates that the copyright holder reserves, or holds for their own use, all the rights provided by copyright law under one specific copyright treaty.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -98,8 +91,7 @@ const LicensesMap = new Map([
license_name: 'Public Domain',
exists: true,
license_url: 'https://creativecommons.org/publicdomain/mark/1.0/',
license_description:
'Public Domain work has been identified as being free of known restrictions under copyright law, including all related and neighboring rights.',
license_description: '',
copyright_holder_required: false,
is_custom: false,
},
Expand All@@ -111,8 +103,7 @@ const LicensesMap = new Map([
license_name: 'Special Permissions',
exists: false,
license_url: '',
license_description:
'Special Permissions is a custom license to use when the current licenses do not apply to the content. The owner of this license is responsible for creating a description of what this license entails.',
license_description: '',
copyright_holder_required: true,
is_custom: true,
},
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
# Generated by Django 3.2.3 on 2021-07-06 20:05
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
('contentcuration', '0129_auto_20210519_2213'),
]

operations = [
migrations.AlterField(
model_name='contentkind',
name='kind',
field=models.CharField(choices=[('topic', 'Topic'), ('video', 'Video'), ('audio', 'Audio'), ('exercise', 'Exercise'), ('document', 'Document'), ('html5', 'HTML5 App'), ('slideshow', 'Slideshow'), ('h5p', 'H5P'), ('zim', 'Zim')], max_length=200, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='fileformat',
name='extension',
field=models.CharField(choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='formatpreset',
name='id',
field=models.CharField(choices=[('high_res_video', 'High Resolution'), ('low_res_video', 'Low Resolution'), ('video_thumbnail', 'Thumbnail'), ('video_subtitle', 'Subtitle'), ('video_dependency', 'Video (dependency)'), ('audio', 'Audio'), ('audio_thumbnail', 'Thumbnail'), ('audio_dependency', 'audio (dependency)'), ('document', 'Document'), ('epub', 'ePub Document'), ('document_thumbnail', 'Thumbnail'), ('exercise', 'Exercise'), ('exercise_thumbnail', 'Thumbnail'), ('exercise_image', 'Exercise Image'), ('exercise_graphie', 'Exercise Graphie'), ('channel_thumbnail', 'Channel Thumbnail'), ('topic_thumbnail', 'Thumbnail'), ('html5_zip', 'HTML5 Zip'), ('html5_dependency', 'HTML5 Dependency (Zip format)'), ('html5_thumbnail', 'HTML5 Thumbnail'), ('h5p', 'H5P Zip'), ('h5p_thumbnail', 'H5P Thumbnail'), ('zim', 'Zim'), ('zim_thumbnail', 'Zim Thumbnail'), ('qti', 'QTI Zip'), ('qti_thumbnail', 'QTI Thumbnail'), ('slideshow_image', 'Slideshow Image'), ('slideshow_thumbnail', 'Slideshow Thumbnail'), ('slideshow_manifest', 'Slideshow Manifest')], max_length=150, primary_key=True, serialize=False),
),
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
# Generated by Django 3.2.3 on 2021-07-06 20:05
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
('content', '0013_auto_20210519_1759'),
]

operations = [
migrations.AlterField(
model_name='contentnode',
name='kind',
field=models.CharField(blank=True, choices=[('topic', 'Topic'), ('video', 'Video'), ('audio', 'Audio'), ('exercise', 'Exercise'), ('document', 'Document'), ('html5', 'HTML5 App'), ('slideshow', 'Slideshow'), ('h5p', 'H5P'), ('zim', 'Zim')], max_length=200),
),
migrations.AlterField(
model_name='file',
name='extension',
field=models.CharField(blank=True, choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40),
),
migrations.AlterField(
model_name='file',
name='preset',
field=models.CharField(blank=True, choices=[('high_res_video', 'High Resolution'), ('low_res_video', 'Low Resolution'), ('video_thumbnail', 'Thumbnail'), ('video_subtitle', 'Subtitle'), ('video_dependency', 'Video (dependency)'), ('audio', 'Audio'), ('audio_thumbnail', 'Thumbnail'), ('audio_dependency', 'audio (dependency)'), ('document', 'Document'), ('epub', 'ePub Document'), ('document_thumbnail', 'Thumbnail'), ('exercise', 'Exercise'), ('exercise_thumbnail', 'Thumbnail'), ('exercise_image', 'Exercise Image'), ('exercise_graphie', 'Exercise Graphie'), ('channel_thumbnail', 'Channel Thumbnail'), ('topic_thumbnail', 'Thumbnail'), ('html5_zip', 'HTML5 Zip'), ('html5_dependency', 'HTML5 Dependency (Zip format)'), ('html5_thumbnail', 'HTML5 Thumbnail'), ('h5p', 'H5P Zip'), ('h5p_thumbnail', 'H5P Thumbnail'), ('zim', 'Zim'), ('zim_thumbnail', 'Zim Thumbnail'), ('qti', 'QTI Zip'), ('qti_thumbnail', 'QTI Thumbnail'), ('slideshow_image', 'Slideshow Image'), ('slideshow_thumbnail', 'Slideshow Thumbnail'), ('slideshow_manifest', 'Slideshow Manifest')], max_length=150),
),
migrations.AlterField(
model_name='localfile',
name='extension',
field=models.CharField(blank=True, choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40),
),
]
2 changes: 1 addition & 1 deletion requirements.in
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ djangorestframework==3.12.4
psycopg2-binary==2.8.6
django-js-reverse==0.9.1
django-registration==3.1.2
le-utils>=0.1.30
le-utils==0.1.31
gunicorn==19.6.0
django-postmark==0.1.6
jsonfield==3.1.0
Expand Down
9 changes: 7 additions & 2 deletions requirements.txt
Original file line numberDiff line numberDiff line change
Expand Up@@ -152,7 +152,10 @@ httplib2==0.19.1
idna==2.10
# via requests
importlib-metadata==1.7.0
# via -r requirements.in
# via
# -r requirements.in
# jsonschema
# kombu
jmespath==0.10.0
# via
# boto3
Expand All@@ -163,7 +166,7 @@ jsonschema==3.2.0
# via -r requirements.in
kombu==4.6.11
# via celery
le-utils==0.1.30
le-utils==0.1.31
# via -r requirements.in
minio==3.0.3
# via -r requirements.in
Expand DownExpand Up@@ -271,6 +274,8 @@ six==1.16.0
# python-utils
sqlparse==0.4.1
# via django
typing-extensions==3.10.0.0
# via asgiref
uritemplate==3.0.1
# via google-api-python-client
urllib3==1.26.4
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,7 @@ const ContentKinds = new Set([
'slideshow',
'topic',
'video',
'zim',
]);

export default ContentKinds;
Expand All@@ -23,4 +24,5 @@ export const ContentKindsNames = {
SLIDESHOW: 'slideshow',
TOPIC: 'topic',
VIDEO: 'video',
ZIM: 'zim',
};
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,6 +16,22 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['.mp3'],
},
],
[
'audio_dependency',
{
id: 'audio_dependency',
readable_name: 'Audio',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 3,
kind_id: 'audio',
allowed_formats: ['mp3'],
associated_mimetypes: ['.mp3'],
},
],
[
'audio_thumbnail',
{
Expand DownExpand Up@@ -125,7 +141,7 @@ const FormatPresetsMap = new Map([
order: 4,
kind_id: 'exercise',
allowed_formats: ['svg', 'json', 'graphie'],
associated_mimetypes: ['.graphie', 'image/svg', 'application/json'],
associated_mimetypes: ['image/svg', '.graphie', 'application/json'],
},
],
[
Expand All@@ -141,7 +157,7 @@ const FormatPresetsMap = new Map([
order: 3,
kind_id: 'exercise',
allowed_formats: ['png', 'jpg', 'jpeg', 'gif', 'svg'],
associated_mimetypes: ['image/jpeg', 'image/png', 'image/gif', 'image/svg'],
associated_mimetypes: ['image/svg', 'image/gif', 'image/jpeg', 'image/png'],
},
],
[
Expand DownExpand Up@@ -214,7 +230,7 @@ const FormatPresetsMap = new Map([
id: 'html5_dependency',
readable_name: 'HTML5 Zip Dependency',
multi_language: false,
supplementary: true,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
Expand DownExpand Up@@ -272,6 +288,38 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['video/webm', 'video/mp4'],
},
],
[
'qti',
{
id: 'qti',
readable_name: 'QTI',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 1,
kind_id: 'exercise',
allowed_formats: ['zip'],
associated_mimetypes: ['.zip'],
},
],
[
'qti_thumbnail',
{
id: 'qti_thumbnail',
readable_name: 'QTI Thumbnail',
multi_language: false,
supplementary: true,
thumbnail: true,
subtitle: false,
display: true,
order: 2,
kind_id: 'exercise',
allowed_formats: ['png', 'jpg', 'jpeg'],
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
[
'slideshow_image',
{
Expand DownExpand Up@@ -342,7 +390,7 @@ const FormatPresetsMap = new Map([
id: 'video_dependency',
readable_name: 'Video Dependency',
multi_language: false,
supplementary: true,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
Expand DownExpand Up@@ -384,6 +432,38 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
[
'zim',
{
id: 'zim',
readable_name: 'Zim',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 1,
kind_id: 'zim',
allowed_formats: ['zim'],
associated_mimetypes: ['.zim'],
},
],
[
'zim_thumbnail',
{
id: 'zim_thumbnail',
readable_name: 'Zim Thumbnail',
multi_language: false,
supplementary: true,
thumbnail: true,
subtitle: false,
display: true,
order: 2,
kind_id: 'zim',
allowed_formats: ['png', 'jpg', 'jpeg'],
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
]);

export default FormatPresetsMap;
Expand All@@ -392,6 +472,7 @@ export const FormatPresetsList = Array.from(FormatPresetsMap.values());

export const FormatPresetsNames = {
AUDIO: 'audio',
AUDIO_DEPENDENCY: 'audio_dependency',
AUDIO_THUMBNAIL: 'audio_thumbnail',
CHANNEL_THUMBNAIL: 'channel_thumbnail',
DOCUMENT: 'document',
Expand All@@ -408,11 +489,15 @@ export const FormatPresetsNames = {
HTML5_THUMBNAIL: 'html5_thumbnail',
HTML5_ZIP: 'html5_zip',
LOW_RES_VIDEO: 'low_res_video',
QTI: 'qti',
QTI_THUMBNAIL: 'qti_thumbnail',
SLIDESHOW_IMAGE: 'slideshow_image',
SLIDESHOW_MANIFEST: 'slideshow_manifest',
SLIDESHOW_THUMBNAIL: 'slideshow_thumbnail',
TOPIC_THUMBNAIL: 'topic_thumbnail',
VIDEO_DEPENDENCY: 'video_dependency',
VIDEO_SUBTITLE: 'video_subtitle',
VIDEO_THUMBNAIL: 'video_thumbnail',
ZIM: 'zim',
ZIM_THUMBNAIL: 'zim_thumbnail',
};
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,8 +7,7 @@ const LicensesMap = new Map([
license_name: 'CC BY',
exists: true,
license_url: 'https://creativecommons.org/licenses/by/4.0/',
license_description:
'The Attribution License lets others distribute, remix, tweak, and build upon your work, even commercially, as long as they credit you for the original creation. This is the most accommodating of licenses offered. Recommended for maximum dissemination and use of licensed materials.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -20,8 +19,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-SA',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-sa/4.0/',
license_description:
'The Attribution-ShareAlike License lets others remix, tweak, and build upon your work even for commercial purposes, as long as they credit you and license their new creations under the identical terms. This license is often compared to "copyleft" free and open source software licenses. All new works based on yours will carry the same license, so any derivatives will also allow commercial use. This is the license used by Wikipedia, and is recommended for materials that would benefit from incorporating content from Wikipedia and similarly licensed projects.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -33,8 +31,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-ND',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nd/4.0/',
license_description:
'The Attribution-NoDerivs License allows for redistribution, commercial and non-commercial, as long as it is passed along unchanged and in whole, with credit to you.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -46,8 +43,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc/4.0/',
license_description:
"The Attribution-NonCommercial License lets others remix, tweak, and build upon your work non-commercially, and although their new works must also acknowledge you and be non-commercial, they don't have to license their derivative works on the same terms.",
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -59,8 +55,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC-SA',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc-sa/4.0/',
license_description:
'The Attribution-NonCommercial-ShareAlike License lets others remix, tweak, and build upon your work non-commercially, as long as they credit you and license their new creations under the identical terms.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -72,8 +67,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC-ND',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc-nd/4.0/',
license_description:
"The Attribution-NonCommercial-NoDerivs License is the most restrictive of our six main licenses, only allowing others to download your works and share them with others as long as they credit you, but they can't change them in any way or use them commercially.",
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -85,8 +79,7 @@ const LicensesMap = new Map([
license_name: 'All Rights Reserved',
exists: true,
license_url: 'http://www.allrights-reserved.com/',
license_description:
'The All Rights Reserved License indicates that the copyright holder reserves, or holds for their own use, all the rights provided by copyright law under one specific copyright treaty.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -98,8 +91,7 @@ const LicensesMap = new Map([
license_name: 'Public Domain',
exists: true,
license_url: 'https://creativecommons.org/publicdomain/mark/1.0/',
license_description:
'Public Domain work has been identified as being free of known restrictions under copyright law, including all related and neighboring rights.',
license_description: '',
copyright_holder_required: false,
is_custom: false,
},
Expand All@@ -111,8 +103,7 @@ const LicensesMap = new Map([
license_name: 'Special Permissions',
exists: false,
license_url: '',
license_description:
'Special Permissions is a custom license to use when the current licenses do not apply to the content. The owner of this license is responsible for creating a description of what this license entails.',
license_description: '',
copyright_holder_required: true,
is_custom: true,
},
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
# Generated by Django 3.2.3 on 2021-07-06 20:05
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
('contentcuration', '0129_auto_20210519_2213'),
]

operations = [
migrations.AlterField(
model_name='contentkind',
name='kind',
field=models.CharField(choices=[('topic', 'Topic'), ('video', 'Video'), ('audio', 'Audio'), ('exercise', 'Exercise'), ('document', 'Document'), ('html5', 'HTML5 App'), ('slideshow', 'Slideshow'), ('h5p', 'H5P'), ('zim', 'Zim')], max_length=200, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='fileformat',
name='extension',
field=models.CharField(choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='formatpreset',
name='id',
field=models.CharField(choices=[('high_res_video', 'High Resolution'), ('low_res_video', 'Low Resolution'), ('video_thumbnail', 'Thumbnail'), ('video_subtitle', 'Subtitle'), ('video_dependency', 'Video (dependency)'), ('audio', 'Audio'), ('audio_thumbnail', 'Thumbnail'), ('audio_dependency', 'audio (dependency)'), ('document', 'Document'), ('epub', 'ePub Document'), ('document_thumbnail', 'Thumbnail'), ('exercise', 'Exercise'), ('exercise_thumbnail', 'Thumbnail'), ('exercise_image', 'Exercise Image'), ('exercise_graphie', 'Exercise Graphie'), ('channel_thumbnail', 'Channel Thumbnail'), ('topic_thumbnail', 'Thumbnail'), ('html5_zip', 'HTML5 Zip'), ('html5_dependency', 'HTML5 Dependency (Zip format)'), ('html5_thumbnail', 'HTML5 Thumbnail'), ('h5p', 'H5P Zip'), ('h5p_thumbnail', 'H5P Thumbnail'), ('zim', 'Zim'), ('zim_thumbnail', 'Zim Thumbnail'), ('qti', 'QTI Zip'), ('qti_thumbnail', 'QTI Thumbnail'), ('slideshow_image', 'Slideshow Image'), ('slideshow_thumbnail', 'Slideshow Thumbnail'), ('slideshow_manifest', 'Slideshow Manifest')], max_length=150, primary_key=True, serialize=False),
),
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
# Generated by Django 3.2.3 on 2021-07-06 20:05
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
('content', '0013_auto_20210519_1759'),
]

operations = [
migrations.AlterField(
model_name='contentnode',
name='kind',
field=models.CharField(blank=True, choices=[('topic', 'Topic'), ('video', 'Video'), ('audio', 'Audio'), ('exercise', 'Exercise'), ('document', 'Document'), ('html5', 'HTML5 App'), ('slideshow', 'Slideshow'), ('h5p', 'H5P'), ('zim', 'Zim')], max_length=200),
),
migrations.AlterField(
model_name='file',
name='extension',
field=models.CharField(blank=True, choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40),
),
migrations.AlterField(
model_name='file',
name='preset',
field=models.CharField(blank=True, choices=[('high_res_video', 'High Resolution'), ('low_res_video', 'Low Resolution'), ('video_thumbnail', 'Thumbnail'), ('video_subtitle', 'Subtitle'), ('video_dependency', 'Video (dependency)'), ('audio', 'Audio'), ('audio_thumbnail', 'Thumbnail'), ('audio_dependency', 'audio (dependency)'), ('document', 'Document'), ('epub', 'ePub Document'), ('document_thumbnail', 'Thumbnail'), ('exercise', 'Exercise'), ('exercise_thumbnail', 'Thumbnail'), ('exercise_image', 'Exercise Image'), ('exercise_graphie', 'Exercise Graphie'), ('channel_thumbnail', 'Channel Thumbnail'), ('topic_thumbnail', 'Thumbnail'), ('html5_zip', 'HTML5 Zip'), ('html5_dependency', 'HTML5 Dependency (Zip format)'), ('html5_thumbnail', 'HTML5 Thumbnail'), ('h5p', 'H5P Zip'), ('h5p_thumbnail', 'H5P Thumbnail'), ('zim', 'Zim'), ('zim_thumbnail', 'Zim Thumbnail'), ('qti', 'QTI Zip'), ('qti_thumbnail', 'QTI Thumbnail'), ('slideshow_image', 'Slideshow Image'), ('slideshow_thumbnail', 'Slideshow Thumbnail'), ('slideshow_manifest', 'Slideshow Manifest')], max_length=150),
),
migrations.AlterField(
model_name='localfile',
name='extension',
field=models.CharField(blank=True, choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40),
),
]
2 changes: 1 addition & 1 deletion requirements.in
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ djangorestframework==3.12.4
psycopg2-binary==2.8.6
django-js-reverse==0.9.1
django-registration==3.1.2
le-utils>=0.1.30
le-utils==0.1.31
gunicorn==19.6.0
django-postmark==0.1.6
jsonfield==3.1.0
Expand Down
9 changes: 7 additions & 2 deletions requirements.txt
Original file line numberDiff line numberDiff line change
Expand Up@@ -152,7 +152,10 @@ httplib2==0.19.1
idna==2.10
# via requests
importlib-metadata==1.7.0
# via -r requirements.in
# via
# -r requirements.in
# jsonschema
# kombu
jmespath==0.10.0
# via
# boto3
Expand All@@ -163,7 +166,7 @@ jsonschema==3.2.0
# via -r requirements.in
kombu==4.6.11
# via celery
le-utils==0.1.30
le-utils==0.1.31
# via -r requirements.in
minio==3.0.3
# via -r requirements.in
Expand DownExpand Up@@ -271,6 +274,8 @@ six==1.16.0
# python-utils
sqlparse==0.4.1
# via django
typing-extensions==3.10.0.0
# via asgiref
uritemplate==3.0.1
# via google-api-python-client
urllib3==1.26.4
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,7 @@ const ContentKinds = new Set([
'slideshow',
'topic',
'video',
'zim',
]);

export default ContentKinds;
Expand All@@ -23,4 +24,5 @@ export const ContentKindsNames = {
SLIDESHOW: 'slideshow',
TOPIC: 'topic',
VIDEO: 'video',
ZIM: 'zim',
};
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,6 +16,22 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['.mp3'],
},
],
[
'audio_dependency',
{
id: 'audio_dependency',
readable_name: 'Audio',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 3,
kind_id: 'audio',
allowed_formats: ['mp3'],
associated_mimetypes: ['.mp3'],
},
],
[
'audio_thumbnail',
{
Expand DownExpand Up@@ -125,7 +141,7 @@ const FormatPresetsMap = new Map([
order: 4,
kind_id: 'exercise',
allowed_formats: ['svg', 'json', 'graphie'],
associated_mimetypes: ['.graphie', 'image/svg', 'application/json'],
associated_mimetypes: ['image/svg', '.graphie', 'application/json'],
},
],
[
Expand All@@ -141,7 +157,7 @@ const FormatPresetsMap = new Map([
order: 3,
kind_id: 'exercise',
allowed_formats: ['png', 'jpg', 'jpeg', 'gif', 'svg'],
associated_mimetypes: ['image/jpeg', 'image/png', 'image/gif', 'image/svg'],
associated_mimetypes: ['image/svg', 'image/gif', 'image/jpeg', 'image/png'],
},
],
[
Expand DownExpand Up@@ -214,7 +230,7 @@ const FormatPresetsMap = new Map([
id: 'html5_dependency',
readable_name: 'HTML5 Zip Dependency',
multi_language: false,
supplementary: true,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
Expand DownExpand Up@@ -272,6 +288,38 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['video/webm', 'video/mp4'],
},
],
[
'qti',
{
id: 'qti',
readable_name: 'QTI',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 1,
kind_id: 'exercise',
allowed_formats: ['zip'],
associated_mimetypes: ['.zip'],
},
],
[
'qti_thumbnail',
{
id: 'qti_thumbnail',
readable_name: 'QTI Thumbnail',
multi_language: false,
supplementary: true,
thumbnail: true,
subtitle: false,
display: true,
order: 2,
kind_id: 'exercise',
allowed_formats: ['png', 'jpg', 'jpeg'],
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
[
'slideshow_image',
{
Expand DownExpand Up@@ -342,7 +390,7 @@ const FormatPresetsMap = new Map([
id: 'video_dependency',
readable_name: 'Video Dependency',
multi_language: false,
supplementary: true,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
Expand DownExpand Up@@ -384,6 +432,38 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
[
'zim',
{
id: 'zim',
readable_name: 'Zim',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 1,
kind_id: 'zim',
allowed_formats: ['zim'],
associated_mimetypes: ['.zim'],
},
],
[
'zim_thumbnail',
{
id: 'zim_thumbnail',
readable_name: 'Zim Thumbnail',
multi_language: false,
supplementary: true,
thumbnail: true,
subtitle: false,
display: true,
order: 2,
kind_id: 'zim',
allowed_formats: ['png', 'jpg', 'jpeg'],
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
]);

export default FormatPresetsMap;
Expand All@@ -392,6 +472,7 @@ export const FormatPresetsList = Array.from(FormatPresetsMap.values());

export const FormatPresetsNames = {
AUDIO: 'audio',
AUDIO_DEPENDENCY: 'audio_dependency',
AUDIO_THUMBNAIL: 'audio_thumbnail',
CHANNEL_THUMBNAIL: 'channel_thumbnail',
DOCUMENT: 'document',
Expand All@@ -408,11 +489,15 @@ export const FormatPresetsNames = {
HTML5_THUMBNAIL: 'html5_thumbnail',
HTML5_ZIP: 'html5_zip',
LOW_RES_VIDEO: 'low_res_video',
QTI: 'qti',
QTI_THUMBNAIL: 'qti_thumbnail',
SLIDESHOW_IMAGE: 'slideshow_image',
SLIDESHOW_MANIFEST: 'slideshow_manifest',
SLIDESHOW_THUMBNAIL: 'slideshow_thumbnail',
TOPIC_THUMBNAIL: 'topic_thumbnail',
VIDEO_DEPENDENCY: 'video_dependency',
VIDEO_SUBTITLE: 'video_subtitle',
VIDEO_THUMBNAIL: 'video_thumbnail',
ZIM: 'zim',
ZIM_THUMBNAIL: 'zim_thumbnail',
};
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,8 +7,7 @@ const LicensesMap = new Map([
license_name: 'CC BY',
exists: true,
license_url: 'https://creativecommons.org/licenses/by/4.0/',
license_description:
'The Attribution License lets others distribute, remix, tweak, and build upon your work, even commercially, as long as they credit you for the original creation. This is the most accommodating of licenses offered. Recommended for maximum dissemination and use of licensed materials.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -20,8 +19,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-SA',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-sa/4.0/',
license_description:
'The Attribution-ShareAlike License lets others remix, tweak, and build upon your work even for commercial purposes, as long as they credit you and license their new creations under the identical terms. This license is often compared to "copyleft" free and open source software licenses. All new works based on yours will carry the same license, so any derivatives will also allow commercial use. This is the license used by Wikipedia, and is recommended for materials that would benefit from incorporating content from Wikipedia and similarly licensed projects.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -33,8 +31,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-ND',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nd/4.0/',
license_description:
'The Attribution-NoDerivs License allows for redistribution, commercial and non-commercial, as long as it is passed along unchanged and in whole, with credit to you.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -46,8 +43,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc/4.0/',
license_description:
"The Attribution-NonCommercial License lets others remix, tweak, and build upon your work non-commercially, and although their new works must also acknowledge you and be non-commercial, they don't have to license their derivative works on the same terms.",
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -59,8 +55,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC-SA',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc-sa/4.0/',
license_description:
'The Attribution-NonCommercial-ShareAlike License lets others remix, tweak, and build upon your work non-commercially, as long as they credit you and license their new creations under the identical terms.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -72,8 +67,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC-ND',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc-nd/4.0/',
license_description:
"The Attribution-NonCommercial-NoDerivs License is the most restrictive of our six main licenses, only allowing others to download your works and share them with others as long as they credit you, but they can't change them in any way or use them commercially.",
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -85,8 +79,7 @@ const LicensesMap = new Map([
license_name: 'All Rights Reserved',
exists: true,
license_url: 'http://www.allrights-reserved.com/',
license_description:
'The All Rights Reserved License indicates that the copyright holder reserves, or holds for their own use, all the rights provided by copyright law under one specific copyright treaty.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -98,8 +91,7 @@ const LicensesMap = new Map([
license_name: 'Public Domain',
exists: true,
license_url: 'https://creativecommons.org/publicdomain/mark/1.0/',
license_description:
'Public Domain work has been identified as being free of known restrictions under copyright law, including all related and neighboring rights.',
license_description: '',
copyright_holder_required: false,
is_custom: false,
},
Expand All@@ -111,8 +103,7 @@ const LicensesMap = new Map([
license_name: 'Special Permissions',
exists: false,
license_url: '',
license_description:
'Special Permissions is a custom license to use when the current licenses do not apply to the content. The owner of this license is responsible for creating a description of what this license entails.',
license_description: '',
copyright_holder_required: true,
is_custom: true,
},
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
# Generated by Django 3.2.3 on 2021-07-06 20:05
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
('contentcuration', '0129_auto_20210519_2213'),
]

operations = [
migrations.AlterField(
model_name='contentkind',
name='kind',
field=models.CharField(choices=[('topic', 'Topic'), ('video', 'Video'), ('audio', 'Audio'), ('exercise', 'Exercise'), ('document', 'Document'), ('html5', 'HTML5 App'), ('slideshow', 'Slideshow'), ('h5p', 'H5P'), ('zim', 'Zim')], max_length=200, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='fileformat',
name='extension',
field=models.CharField(choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='formatpreset',
name='id',
field=models.CharField(choices=[('high_res_video', 'High Resolution'), ('low_res_video', 'Low Resolution'), ('video_thumbnail', 'Thumbnail'), ('video_subtitle', 'Subtitle'), ('video_dependency', 'Video (dependency)'), ('audio', 'Audio'), ('audio_thumbnail', 'Thumbnail'), ('audio_dependency', 'audio (dependency)'), ('document', 'Document'), ('epub', 'ePub Document'), ('document_thumbnail', 'Thumbnail'), ('exercise', 'Exercise'), ('exercise_thumbnail', 'Thumbnail'), ('exercise_image', 'Exercise Image'), ('exercise_graphie', 'Exercise Graphie'), ('channel_thumbnail', 'Channel Thumbnail'), ('topic_thumbnail', 'Thumbnail'), ('html5_zip', 'HTML5 Zip'), ('html5_dependency', 'HTML5 Dependency (Zip format)'), ('html5_thumbnail', 'HTML5 Thumbnail'), ('h5p', 'H5P Zip'), ('h5p_thumbnail', 'H5P Thumbnail'), ('zim', 'Zim'), ('zim_thumbnail', 'Zim Thumbnail'), ('qti', 'QTI Zip'), ('qti_thumbnail', 'QTI Thumbnail'), ('slideshow_image', 'Slideshow Image'), ('slideshow_thumbnail', 'Slideshow Thumbnail'), ('slideshow_manifest', 'Slideshow Manifest')], max_length=150, primary_key=True, serialize=False),
),
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
# Generated by Django 3.2.3 on 2021-07-06 20:05
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
('content', '0013_auto_20210519_1759'),
]

operations = [
migrations.AlterField(
model_name='contentnode',
name='kind',
field=models.CharField(blank=True, choices=[('topic', 'Topic'), ('video', 'Video'), ('audio', 'Audio'), ('exercise', 'Exercise'), ('document', 'Document'), ('html5', 'HTML5 App'), ('slideshow', 'Slideshow'), ('h5p', 'H5P'), ('zim', 'Zim')], max_length=200),
),
migrations.AlterField(
model_name='file',
name='extension',
field=models.CharField(blank=True, choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40),
),
migrations.AlterField(
model_name='file',
name='preset',
field=models.CharField(blank=True, choices=[('high_res_video', 'High Resolution'), ('low_res_video', 'Low Resolution'), ('video_thumbnail', 'Thumbnail'), ('video_subtitle', 'Subtitle'), ('video_dependency', 'Video (dependency)'), ('audio', 'Audio'), ('audio_thumbnail', 'Thumbnail'), ('audio_dependency', 'audio (dependency)'), ('document', 'Document'), ('epub', 'ePub Document'), ('document_thumbnail', 'Thumbnail'), ('exercise', 'Exercise'), ('exercise_thumbnail', 'Thumbnail'), ('exercise_image', 'Exercise Image'), ('exercise_graphie', 'Exercise Graphie'), ('channel_thumbnail', 'Channel Thumbnail'), ('topic_thumbnail', 'Thumbnail'), ('html5_zip', 'HTML5 Zip'), ('html5_dependency', 'HTML5 Dependency (Zip format)'), ('html5_thumbnail', 'HTML5 Thumbnail'), ('h5p', 'H5P Zip'), ('h5p_thumbnail', 'H5P Thumbnail'), ('zim', 'Zim'), ('zim_thumbnail', 'Zim Thumbnail'), ('qti', 'QTI Zip'), ('qti_thumbnail', 'QTI Thumbnail'), ('slideshow_image', 'Slideshow Image'), ('slideshow_thumbnail', 'Slideshow Thumbnail'), ('slideshow_manifest', 'Slideshow Manifest')], max_length=150),
),
migrations.AlterField(
model_name='localfile',
name='extension',
field=models.CharField(blank=True, choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40),
),
]
2 changes: 1 addition & 1 deletion requirements.in
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ djangorestframework==3.12.4
psycopg2-binary==2.8.6
django-js-reverse==0.9.1
django-registration==3.1.2
le-utils>=0.1.30
le-utils==0.1.31
gunicorn==19.6.0
django-postmark==0.1.6
jsonfield==3.1.0
Expand Down
9 changes: 7 additions & 2 deletions requirements.txt
Original file line numberDiff line numberDiff line change
Expand Up@@ -152,7 +152,10 @@ httplib2==0.19.1
idna==2.10
# via requests
importlib-metadata==1.7.0
# via -r requirements.in
# via
# -r requirements.in
# jsonschema
# kombu
jmespath==0.10.0
# via
# boto3
Expand All@@ -163,7 +166,7 @@ jsonschema==3.2.0
# via -r requirements.in
kombu==4.6.11
# via celery
le-utils==0.1.30
le-utils==0.1.31
# via -r requirements.in
minio==3.0.3
# via -r requirements.in
Expand DownExpand Up@@ -271,6 +274,8 @@ six==1.16.0
# python-utils
sqlparse==0.4.1
# via django
typing-extensions==3.10.0.0
# via asgiref
uritemplate==3.0.1
# via google-api-python-client
urllib3==1.26.4
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,7 @@ const ContentKinds = new Set([
'slideshow',
'topic',
'video',
'zim',
]);

export default ContentKinds;
Expand All@@ -23,4 +24,5 @@ export const ContentKindsNames = {
SLIDESHOW: 'slideshow',
TOPIC: 'topic',
VIDEO: 'video',
ZIM: 'zim',
};
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,6 +16,22 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['.mp3'],
},
],
[
'audio_dependency',
{
id: 'audio_dependency',
readable_name: 'Audio',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 3,
kind_id: 'audio',
allowed_formats: ['mp3'],
associated_mimetypes: ['.mp3'],
},
],
[
'audio_thumbnail',
{
Expand DownExpand Up@@ -125,7 +141,7 @@ const FormatPresetsMap = new Map([
order: 4,
kind_id: 'exercise',
allowed_formats: ['svg', 'json', 'graphie'],
associated_mimetypes: ['.graphie', 'image/svg', 'application/json'],
associated_mimetypes: ['image/svg', '.graphie', 'application/json'],
},
],
[
Expand All@@ -141,7 +157,7 @@ const FormatPresetsMap = new Map([
order: 3,
kind_id: 'exercise',
allowed_formats: ['png', 'jpg', 'jpeg', 'gif', 'svg'],
associated_mimetypes: ['image/jpeg', 'image/png', 'image/gif', 'image/svg'],
associated_mimetypes: ['image/svg', 'image/gif', 'image/jpeg', 'image/png'],
},
],
[
Expand DownExpand Up@@ -214,7 +230,7 @@ const FormatPresetsMap = new Map([
id: 'html5_dependency',
readable_name: 'HTML5 Zip Dependency',
multi_language: false,
supplementary: true,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
Expand DownExpand Up@@ -272,6 +288,38 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['video/webm', 'video/mp4'],
},
],
[
'qti',
{
id: 'qti',
readable_name: 'QTI',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 1,
kind_id: 'exercise',
allowed_formats: ['zip'],
associated_mimetypes: ['.zip'],
},
],
[
'qti_thumbnail',
{
id: 'qti_thumbnail',
readable_name: 'QTI Thumbnail',
multi_language: false,
supplementary: true,
thumbnail: true,
subtitle: false,
display: true,
order: 2,
kind_id: 'exercise',
allowed_formats: ['png', 'jpg', 'jpeg'],
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
[
'slideshow_image',
{
Expand DownExpand Up@@ -342,7 +390,7 @@ const FormatPresetsMap = new Map([
id: 'video_dependency',
readable_name: 'Video Dependency',
multi_language: false,
supplementary: true,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
Expand DownExpand Up@@ -384,6 +432,38 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
[
'zim',
{
id: 'zim',
readable_name: 'Zim',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 1,
kind_id: 'zim',
allowed_formats: ['zim'],
associated_mimetypes: ['.zim'],
},
],
[
'zim_thumbnail',
{
id: 'zim_thumbnail',
readable_name: 'Zim Thumbnail',
multi_language: false,
supplementary: true,
thumbnail: true,
subtitle: false,
display: true,
order: 2,
kind_id: 'zim',
allowed_formats: ['png', 'jpg', 'jpeg'],
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
]);

export default FormatPresetsMap;
Expand All@@ -392,6 +472,7 @@ export const FormatPresetsList = Array.from(FormatPresetsMap.values());

export const FormatPresetsNames = {
AUDIO: 'audio',
AUDIO_DEPENDENCY: 'audio_dependency',
AUDIO_THUMBNAIL: 'audio_thumbnail',
CHANNEL_THUMBNAIL: 'channel_thumbnail',
DOCUMENT: 'document',
Expand All@@ -408,11 +489,15 @@ export const FormatPresetsNames = {
HTML5_THUMBNAIL: 'html5_thumbnail',
HTML5_ZIP: 'html5_zip',
LOW_RES_VIDEO: 'low_res_video',
QTI: 'qti',
QTI_THUMBNAIL: 'qti_thumbnail',
SLIDESHOW_IMAGE: 'slideshow_image',
SLIDESHOW_MANIFEST: 'slideshow_manifest',
SLIDESHOW_THUMBNAIL: 'slideshow_thumbnail',
TOPIC_THUMBNAIL: 'topic_thumbnail',
VIDEO_DEPENDENCY: 'video_dependency',
VIDEO_SUBTITLE: 'video_subtitle',
VIDEO_THUMBNAIL: 'video_thumbnail',
ZIM: 'zim',
ZIM_THUMBNAIL: 'zim_thumbnail',
};
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,8 +7,7 @@ const LicensesMap = new Map([
license_name: 'CC BY',
exists: true,
license_url: 'https://creativecommons.org/licenses/by/4.0/',
license_description:
'The Attribution License lets others distribute, remix, tweak, and build upon your work, even commercially, as long as they credit you for the original creation. This is the most accommodating of licenses offered. Recommended for maximum dissemination and use of licensed materials.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -20,8 +19,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-SA',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-sa/4.0/',
license_description:
'The Attribution-ShareAlike License lets others remix, tweak, and build upon your work even for commercial purposes, as long as they credit you and license their new creations under the identical terms. This license is often compared to "copyleft" free and open source software licenses. All new works based on yours will carry the same license, so any derivatives will also allow commercial use. This is the license used by Wikipedia, and is recommended for materials that would benefit from incorporating content from Wikipedia and similarly licensed projects.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -33,8 +31,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-ND',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nd/4.0/',
license_description:
'The Attribution-NoDerivs License allows for redistribution, commercial and non-commercial, as long as it is passed along unchanged and in whole, with credit to you.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -46,8 +43,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc/4.0/',
license_description:
"The Attribution-NonCommercial License lets others remix, tweak, and build upon your work non-commercially, and although their new works must also acknowledge you and be non-commercial, they don't have to license their derivative works on the same terms.",
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -59,8 +55,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC-SA',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc-sa/4.0/',
license_description:
'The Attribution-NonCommercial-ShareAlike License lets others remix, tweak, and build upon your work non-commercially, as long as they credit you and license their new creations under the identical terms.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -72,8 +67,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC-ND',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc-nd/4.0/',
license_description:
"The Attribution-NonCommercial-NoDerivs License is the most restrictive of our six main licenses, only allowing others to download your works and share them with others as long as they credit you, but they can't change them in any way or use them commercially.",
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -85,8 +79,7 @@ const LicensesMap = new Map([
license_name: 'All Rights Reserved',
exists: true,
license_url: 'http://www.allrights-reserved.com/',
license_description:
'The All Rights Reserved License indicates that the copyright holder reserves, or holds for their own use, all the rights provided by copyright law under one specific copyright treaty.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -98,8 +91,7 @@ const LicensesMap = new Map([
license_name: 'Public Domain',
exists: true,
license_url: 'https://creativecommons.org/publicdomain/mark/1.0/',
license_description:
'Public Domain work has been identified as being free of known restrictions under copyright law, including all related and neighboring rights.',
license_description: '',
copyright_holder_required: false,
is_custom: false,
},
Expand All@@ -111,8 +103,7 @@ const LicensesMap = new Map([
license_name: 'Special Permissions',
exists: false,
license_url: '',
license_description:
'Special Permissions is a custom license to use when the current licenses do not apply to the content. The owner of this license is responsible for creating a description of what this license entails.',
license_description: '',
copyright_holder_required: true,
is_custom: true,
},
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
# Generated by Django 3.2.3 on 2021-07-06 20:05
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
('contentcuration', '0129_auto_20210519_2213'),
]

operations = [
migrations.AlterField(
model_name='contentkind',
name='kind',
field=models.CharField(choices=[('topic', 'Topic'), ('video', 'Video'), ('audio', 'Audio'), ('exercise', 'Exercise'), ('document', 'Document'), ('html5', 'HTML5 App'), ('slideshow', 'Slideshow'), ('h5p', 'H5P'), ('zim', 'Zim')], max_length=200, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='fileformat',
name='extension',
field=models.CharField(choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='formatpreset',
name='id',
field=models.CharField(choices=[('high_res_video', 'High Resolution'), ('low_res_video', 'Low Resolution'), ('video_thumbnail', 'Thumbnail'), ('video_subtitle', 'Subtitle'), ('video_dependency', 'Video (dependency)'), ('audio', 'Audio'), ('audio_thumbnail', 'Thumbnail'), ('audio_dependency', 'audio (dependency)'), ('document', 'Document'), ('epub', 'ePub Document'), ('document_thumbnail', 'Thumbnail'), ('exercise', 'Exercise'), ('exercise_thumbnail', 'Thumbnail'), ('exercise_image', 'Exercise Image'), ('exercise_graphie', 'Exercise Graphie'), ('channel_thumbnail', 'Channel Thumbnail'), ('topic_thumbnail', 'Thumbnail'), ('html5_zip', 'HTML5 Zip'), ('html5_dependency', 'HTML5 Dependency (Zip format)'), ('html5_thumbnail', 'HTML5 Thumbnail'), ('h5p', 'H5P Zip'), ('h5p_thumbnail', 'H5P Thumbnail'), ('zim', 'Zim'), ('zim_thumbnail', 'Zim Thumbnail'), ('qti', 'QTI Zip'), ('qti_thumbnail', 'QTI Thumbnail'), ('slideshow_image', 'Slideshow Image'), ('slideshow_thumbnail', 'Slideshow Thumbnail'), ('slideshow_manifest', 'Slideshow Manifest')], max_length=150, primary_key=True, serialize=False),
),
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
# Generated by Django 3.2.3 on 2021-07-06 20:05
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
('content', '0013_auto_20210519_1759'),
]

operations = [
migrations.AlterField(
model_name='contentnode',
name='kind',
field=models.CharField(blank=True, choices=[('topic', 'Topic'), ('video', 'Video'), ('audio', 'Audio'), ('exercise', 'Exercise'), ('document', 'Document'), ('html5', 'HTML5 App'), ('slideshow', 'Slideshow'), ('h5p', 'H5P'), ('zim', 'Zim')], max_length=200),
),
migrations.AlterField(
model_name='file',
name='extension',
field=models.CharField(blank=True, choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40),
),
migrations.AlterField(
model_name='file',
name='preset',
field=models.CharField(blank=True, choices=[('high_res_video', 'High Resolution'), ('low_res_video', 'Low Resolution'), ('video_thumbnail', 'Thumbnail'), ('video_subtitle', 'Subtitle'), ('video_dependency', 'Video (dependency)'), ('audio', 'Audio'), ('audio_thumbnail', 'Thumbnail'), ('audio_dependency', 'audio (dependency)'), ('document', 'Document'), ('epub', 'ePub Document'), ('document_thumbnail', 'Thumbnail'), ('exercise', 'Exercise'), ('exercise_thumbnail', 'Thumbnail'), ('exercise_image', 'Exercise Image'), ('exercise_graphie', 'Exercise Graphie'), ('channel_thumbnail', 'Channel Thumbnail'), ('topic_thumbnail', 'Thumbnail'), ('html5_zip', 'HTML5 Zip'), ('html5_dependency', 'HTML5 Dependency (Zip format)'), ('html5_thumbnail', 'HTML5 Thumbnail'), ('h5p', 'H5P Zip'), ('h5p_thumbnail', 'H5P Thumbnail'), ('zim', 'Zim'), ('zim_thumbnail', 'Zim Thumbnail'), ('qti', 'QTI Zip'), ('qti_thumbnail', 'QTI Thumbnail'), ('slideshow_image', 'Slideshow Image'), ('slideshow_thumbnail', 'Slideshow Thumbnail'), ('slideshow_manifest', 'Slideshow Manifest')], max_length=150),
),
migrations.AlterField(
model_name='localfile',
name='extension',
field=models.CharField(blank=True, choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40),
),
]
2 changes: 1 addition & 1 deletion requirements.in
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ djangorestframework==3.12.4
psycopg2-binary==2.8.6
django-js-reverse==0.9.1
django-registration==3.1.2
le-utils>=0.1.30
le-utils==0.1.31
gunicorn==19.6.0
django-postmark==0.1.6
jsonfield==3.1.0
Expand Down
9 changes: 7 additions & 2 deletions requirements.txt
Original file line numberDiff line numberDiff line change
Expand Up@@ -152,7 +152,10 @@ httplib2==0.19.1
idna==2.10
# via requests
importlib-metadata==1.7.0
# via -r requirements.in
# via
# -r requirements.in
# jsonschema
# kombu
jmespath==0.10.0
# via
# boto3
Expand All@@ -163,7 +166,7 @@ jsonschema==3.2.0
# via -r requirements.in
kombu==4.6.11
# via celery
le-utils==0.1.30
le-utils==0.1.31
# via -r requirements.in
minio==3.0.3
# via -r requirements.in
Expand DownExpand Up@@ -271,6 +274,8 @@ six==1.16.0
# python-utils
sqlparse==0.4.1
# via django
typing-extensions==3.10.0.0
# via asgiref
uritemplate==3.0.1
# via google-api-python-client
urllib3==1.26.4
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,7 @@ const ContentKinds = new Set([
'slideshow',
'topic',
'video',
'zim',
]);

export default ContentKinds;
Expand All@@ -23,4 +24,5 @@ export const ContentKindsNames = {
SLIDESHOW: 'slideshow',
TOPIC: 'topic',
VIDEO: 'video',
ZIM: 'zim',
};
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,6 +16,22 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['.mp3'],
},
],
[
'audio_dependency',
{
id: 'audio_dependency',
readable_name: 'Audio',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 3,
kind_id: 'audio',
allowed_formats: ['mp3'],
associated_mimetypes: ['.mp3'],
},
],
[
'audio_thumbnail',
{
Expand DownExpand Up@@ -125,7 +141,7 @@ const FormatPresetsMap = new Map([
order: 4,
kind_id: 'exercise',
allowed_formats: ['svg', 'json', 'graphie'],
associated_mimetypes: ['.graphie', 'image/svg', 'application/json'],
associated_mimetypes: ['image/svg', '.graphie', 'application/json'],
},
],
[
Expand All@@ -141,7 +157,7 @@ const FormatPresetsMap = new Map([
order: 3,
kind_id: 'exercise',
allowed_formats: ['png', 'jpg', 'jpeg', 'gif', 'svg'],
associated_mimetypes: ['image/jpeg', 'image/png', 'image/gif', 'image/svg'],
associated_mimetypes: ['image/svg', 'image/gif', 'image/jpeg', 'image/png'],
},
],
[
Expand DownExpand Up@@ -214,7 +230,7 @@ const FormatPresetsMap = new Map([
id: 'html5_dependency',
readable_name: 'HTML5 Zip Dependency',
multi_language: false,
supplementary: true,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
Expand DownExpand Up@@ -272,6 +288,38 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['video/webm', 'video/mp4'],
},
],
[
'qti',
{
id: 'qti',
readable_name: 'QTI',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 1,
kind_id: 'exercise',
allowed_formats: ['zip'],
associated_mimetypes: ['.zip'],
},
],
[
'qti_thumbnail',
{
id: 'qti_thumbnail',
readable_name: 'QTI Thumbnail',
multi_language: false,
supplementary: true,
thumbnail: true,
subtitle: false,
display: true,
order: 2,
kind_id: 'exercise',
allowed_formats: ['png', 'jpg', 'jpeg'],
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
[
'slideshow_image',
{
Expand DownExpand Up@@ -342,7 +390,7 @@ const FormatPresetsMap = new Map([
id: 'video_dependency',
readable_name: 'Video Dependency',
multi_language: false,
supplementary: true,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
Expand DownExpand Up@@ -384,6 +432,38 @@ const FormatPresetsMap = new Map([
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
[
'zim',
{
id: 'zim',
readable_name: 'Zim',
multi_language: false,
supplementary: false,
thumbnail: false,
subtitle: false,
display: false,
order: 1,
kind_id: 'zim',
allowed_formats: ['zim'],
associated_mimetypes: ['.zim'],
},
],
[
'zim_thumbnail',
{
id: 'zim_thumbnail',
readable_name: 'Zim Thumbnail',
multi_language: false,
supplementary: true,
thumbnail: true,
subtitle: false,
display: true,
order: 2,
kind_id: 'zim',
allowed_formats: ['png', 'jpg', 'jpeg'],
associated_mimetypes: ['image/jpeg', 'image/png'],
},
],
]);

export default FormatPresetsMap;
Expand All@@ -392,6 +472,7 @@ export const FormatPresetsList = Array.from(FormatPresetsMap.values());

export const FormatPresetsNames = {
AUDIO: 'audio',
AUDIO_DEPENDENCY: 'audio_dependency',
AUDIO_THUMBNAIL: 'audio_thumbnail',
CHANNEL_THUMBNAIL: 'channel_thumbnail',
DOCUMENT: 'document',
Expand All@@ -408,11 +489,15 @@ export const FormatPresetsNames = {
HTML5_THUMBNAIL: 'html5_thumbnail',
HTML5_ZIP: 'html5_zip',
LOW_RES_VIDEO: 'low_res_video',
QTI: 'qti',
QTI_THUMBNAIL: 'qti_thumbnail',
SLIDESHOW_IMAGE: 'slideshow_image',
SLIDESHOW_MANIFEST: 'slideshow_manifest',
SLIDESHOW_THUMBNAIL: 'slideshow_thumbnail',
TOPIC_THUMBNAIL: 'topic_thumbnail',
VIDEO_DEPENDENCY: 'video_dependency',
VIDEO_SUBTITLE: 'video_subtitle',
VIDEO_THUMBNAIL: 'video_thumbnail',
ZIM: 'zim',
ZIM_THUMBNAIL: 'zim_thumbnail',
};
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,8 +7,7 @@ const LicensesMap = new Map([
license_name: 'CC BY',
exists: true,
license_url: 'https://creativecommons.org/licenses/by/4.0/',
license_description:
'The Attribution License lets others distribute, remix, tweak, and build upon your work, even commercially, as long as they credit you for the original creation. This is the most accommodating of licenses offered. Recommended for maximum dissemination and use of licensed materials.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -20,8 +19,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-SA',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-sa/4.0/',
license_description:
'The Attribution-ShareAlike License lets others remix, tweak, and build upon your work even for commercial purposes, as long as they credit you and license their new creations under the identical terms. This license is often compared to "copyleft" free and open source software licenses. All new works based on yours will carry the same license, so any derivatives will also allow commercial use. This is the license used by Wikipedia, and is recommended for materials that would benefit from incorporating content from Wikipedia and similarly licensed projects.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -33,8 +31,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-ND',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nd/4.0/',
license_description:
'The Attribution-NoDerivs License allows for redistribution, commercial and non-commercial, as long as it is passed along unchanged and in whole, with credit to you.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -46,8 +43,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc/4.0/',
license_description:
"The Attribution-NonCommercial License lets others remix, tweak, and build upon your work non-commercially, and although their new works must also acknowledge you and be non-commercial, they don't have to license their derivative works on the same terms.",
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -59,8 +55,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC-SA',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc-sa/4.0/',
license_description:
'The Attribution-NonCommercial-ShareAlike License lets others remix, tweak, and build upon your work non-commercially, as long as they credit you and license their new creations under the identical terms.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -72,8 +67,7 @@ const LicensesMap = new Map([
license_name: 'CC BY-NC-ND',
exists: true,
license_url: 'https://creativecommons.org/licenses/by-nc-nd/4.0/',
license_description:
"The Attribution-NonCommercial-NoDerivs License is the most restrictive of our six main licenses, only allowing others to download your works and share them with others as long as they credit you, but they can't change them in any way or use them commercially.",
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -85,8 +79,7 @@ const LicensesMap = new Map([
license_name: 'All Rights Reserved',
exists: true,
license_url: 'http://www.allrights-reserved.com/',
license_description:
'The All Rights Reserved License indicates that the copyright holder reserves, or holds for their own use, all the rights provided by copyright law under one specific copyright treaty.',
license_description: '',
copyright_holder_required: true,
is_custom: false,
},
Expand All@@ -98,8 +91,7 @@ const LicensesMap = new Map([
license_name: 'Public Domain',
exists: true,
license_url: 'https://creativecommons.org/publicdomain/mark/1.0/',
license_description:
'Public Domain work has been identified as being free of known restrictions under copyright law, including all related and neighboring rights.',
license_description: '',
copyright_holder_required: false,
is_custom: false,
},
Expand All@@ -111,8 +103,7 @@ const LicensesMap = new Map([
license_name: 'Special Permissions',
exists: false,
license_url: '',
license_description:
'Special Permissions is a custom license to use when the current licenses do not apply to the content. The owner of this license is responsible for creating a description of what this license entails.',
license_description: '',
copyright_holder_required: true,
is_custom: true,
},
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
# Generated by Django 3.2.3 on 2021-07-06 20:05
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
('contentcuration', '0129_auto_20210519_2213'),
]

operations = [
migrations.AlterField(
model_name='contentkind',
name='kind',
field=models.CharField(choices=[('topic', 'Topic'), ('video', 'Video'), ('audio', 'Audio'), ('exercise', 'Exercise'), ('document', 'Document'), ('html5', 'HTML5 App'), ('slideshow', 'Slideshow'), ('h5p', 'H5P'), ('zim', 'Zim')], max_length=200, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='fileformat',
name='extension',
field=models.CharField(choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='formatpreset',
name='id',
field=models.CharField(choices=[('high_res_video', 'High Resolution'), ('low_res_video', 'Low Resolution'), ('video_thumbnail', 'Thumbnail'), ('video_subtitle', 'Subtitle'), ('video_dependency', 'Video (dependency)'), ('audio', 'Audio'), ('audio_thumbnail', 'Thumbnail'), ('audio_dependency', 'audio (dependency)'), ('document', 'Document'), ('epub', 'ePub Document'), ('document_thumbnail', 'Thumbnail'), ('exercise', 'Exercise'), ('exercise_thumbnail', 'Thumbnail'), ('exercise_image', 'Exercise Image'), ('exercise_graphie', 'Exercise Graphie'), ('channel_thumbnail', 'Channel Thumbnail'), ('topic_thumbnail', 'Thumbnail'), ('html5_zip', 'HTML5 Zip'), ('html5_dependency', 'HTML5 Dependency (Zip format)'), ('html5_thumbnail', 'HTML5 Thumbnail'), ('h5p', 'H5P Zip'), ('h5p_thumbnail', 'H5P Thumbnail'), ('zim', 'Zim'), ('zim_thumbnail', 'Zim Thumbnail'), ('qti', 'QTI Zip'), ('qti_thumbnail', 'QTI Thumbnail'), ('slideshow_image', 'Slideshow Image'), ('slideshow_thumbnail', 'Slideshow Thumbnail'), ('slideshow_manifest', 'Slideshow Manifest')], max_length=150, primary_key=True, serialize=False),
),
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
# Generated by Django 3.2.3 on 2021-07-06 20:05
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
('content', '0013_auto_20210519_1759'),
]

operations = [
migrations.AlterField(
model_name='contentnode',
name='kind',
field=models.CharField(blank=True, choices=[('topic', 'Topic'), ('video', 'Video'), ('audio', 'Audio'), ('exercise', 'Exercise'), ('document', 'Document'), ('html5', 'HTML5 App'), ('slideshow', 'Slideshow'), ('h5p', 'H5P'), ('zim', 'Zim')], max_length=200),
),
migrations.AlterField(
model_name='file',
name='extension',
field=models.CharField(blank=True, choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40),
),
migrations.AlterField(
model_name='file',
name='preset',
field=models.CharField(blank=True, choices=[('high_res_video', 'High Resolution'), ('low_res_video', 'Low Resolution'), ('video_thumbnail', 'Thumbnail'), ('video_subtitle', 'Subtitle'), ('video_dependency', 'Video (dependency)'), ('audio', 'Audio'), ('audio_thumbnail', 'Thumbnail'), ('audio_dependency', 'audio (dependency)'), ('document', 'Document'), ('epub', 'ePub Document'), ('document_thumbnail', 'Thumbnail'), ('exercise', 'Exercise'), ('exercise_thumbnail', 'Thumbnail'), ('exercise_image', 'Exercise Image'), ('exercise_graphie', 'Exercise Graphie'), ('channel_thumbnail', 'Channel Thumbnail'), ('topic_thumbnail', 'Thumbnail'), ('html5_zip', 'HTML5 Zip'), ('html5_dependency', 'HTML5 Dependency (Zip format)'), ('html5_thumbnail', 'HTML5 Thumbnail'), ('h5p', 'H5P Zip'), ('h5p_thumbnail', 'H5P Thumbnail'), ('zim', 'Zim'), ('zim_thumbnail', 'Zim Thumbnail'), ('qti', 'QTI Zip'), ('qti_thumbnail', 'QTI Thumbnail'), ('slideshow_image', 'Slideshow Image'), ('slideshow_thumbnail', 'Slideshow Thumbnail'), ('slideshow_manifest', 'Slideshow Manifest')], max_length=150),
),
migrations.AlterField(
model_name='localfile',
name='extension',
field=models.CharField(blank=True, choices=[('mp4', 'MP4 Video'), ('webm', 'WEBM Video'), ('vtt', 'VTT Subtitle'), ('mp3', 'MP3 Audio'), ('pdf', 'PDF Document'), ('jpg', 'JPG Image'), ('jpeg', 'JPEG Image'), ('png', 'PNG Image'), ('gif', 'GIF Image'), ('json', 'JSON'), ('svg', 'SVG Image'), ('perseus', 'Perseus Exercise'), ('graphie', 'Graphie Exercise'), ('zip', 'HTML5 Zip'), ('h5p', 'H5P'), ('zim', 'ZIM'), ('epub', 'ePub Document')], max_length=40),
),
]
2 changes: 1 addition & 1 deletion requirements.in
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ djangorestframework==3.12.4
psycopg2-binary==2.8.6
django-js-reverse==0.9.1
django-registration==3.1.2
le-utils>=0.1.30
le-utils==0.1.31
gunicorn==19.6.0
django-postmark==0.1.6
jsonfield==3.1.0
Expand Down
9 changes: 7 additions & 2 deletions requirements.txt
Original file line numberDiff line numberDiff line change
Expand Up@@ -152,7 +152,10 @@ httplib2==0.19.1
idna==2.10
# via requests
importlib-metadata==1.7.0
# via -r requirements.in
# via
# -r requirements.in
# jsonschema
# kombu
jmespath==0.10.0
# via
# boto3
Expand All@@ -163,7 +166,7 @@ jsonschema==3.2.0
# via -r requirements.in
kombu==4.6.11
# via celery
le-utils==0.1.30
le-utils==0.1.31
# via -r requirements.in
minio==3.0.3
# via -r requirements.in
Expand DownExpand Up@@ -271,6 +274,8 @@ six==1.16.0
# python-utils
sqlparse==0.4.1
# via django
typing-extensions==3.10.0.0
# via asgiref
uritemplate==3.0.1
# via google-api-python-client
urllib3==1.26.4
Expand Down