Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-video-pipeline
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-video-pipeline
Commits
0e5b8765
Unverified
Commit
0e5b8765
authored
Nov 08, 2017
by
M. Rehan
Committed by
GitHub
Nov 08, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #60 from edx/enable-video-uploads-by-default
Clean Course Model
parents
722e8945
eecf7430
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
96 additions
and
47 deletions
+96
-47
VEDA_OS01/admin.py
+3
-1
VEDA_OS01/fixtures/destinations.json
+0
-1
VEDA_OS01/migrations/0003_auto_20171024_2003.py
+1
-1
VEDA_OS01/migrations/0004_auto_20171108_0714.py
+63
-0
VEDA_OS01/models.py
+20
-27
VEDA_OS01/serializers.py
+3
-2
control/veda_deliver.py
+1
-2
control/veda_encode.py
+3
-6
frontend/course_validate.py
+0
-1
frontend/veda_models.yaml
+2
-6
No files found.
VEDA_OS01/admin.py
View file @
0e5b8765
...
...
@@ -20,7 +20,9 @@ class CourseAdmin(admin.ModelAdmin):
'institution'
,
'edx_classid'
,
'last_vid_number'
,
'previous_statechange'
'previous_statechange'
,
'created'
,
'modified'
,
]
list_filter
=
[
'institution'
]
search_fields
=
[
...
...
VEDA_OS01/fixtures/destinations.json
View file @
0e5b8765
...
...
@@ -63,7 +63,6 @@
"tp_proc"
:
false
,
"c24_proc"
:
false
,
"s3_proc"
:
true
,
"xue"
:
true
,
"local_storedir"
:
"course-v1:VEDA+VEDA201+2015_T1"
,
"studio_hex"
:
"xxxx"
}
...
...
VEDA_OS01/migrations/0003_auto_20171024_2003.py
View file @
0e5b8765
...
...
@@ -8,7 +8,7 @@ from django.db import migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'VEDA_OS01'
,
'000
2_auto_20171016_1211
'
),
(
'VEDA_OS01'
,
'000
3_auto_20171019_1317
'
),
]
operations
=
[
...
...
VEDA_OS01/migrations/0004_auto_20171108_0714.py
0 → 100644
View file @
0e5b8765
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-11-08 07:14
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
import
django.utils.timezone
import
model_utils.fields
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'VEDA_OS01'
,
'0003_auto_20171024_2003'
),
]
operations
=
[
migrations
.
RemoveField
(
model_name
=
'course'
,
name
=
'mobile_override'
,
),
migrations
.
RemoveField
(
model_name
=
'course'
,
name
=
'parent_ID'
,
),
migrations
.
RemoveField
(
model_name
=
'course'
,
name
=
's3_dir'
,
),
migrations
.
RemoveField
(
model_name
=
'course'
,
name
=
'xue'
,
),
migrations
.
AddField
(
model_name
=
'course'
,
name
=
'created'
,
field
=
model_utils
.
fields
.
AutoCreatedField
(
default
=
django
.
utils
.
timezone
.
now
,
editable
=
False
,
verbose_name
=
'created'
),
),
migrations
.
AddField
(
model_name
=
'course'
,
name
=
'modified'
,
field
=
model_utils
.
fields
.
AutoLastModifiedField
(
default
=
django
.
utils
.
timezone
.
now
,
editable
=
False
,
verbose_name
=
'modified'
),
),
migrations
.
AlterField
(
model_name
=
'course'
,
name
=
'course_hold'
,
field
=
models
.
BooleanField
(
default
=
True
,
help_text
=
b
'Tells whether this course is active.'
,
verbose_name
=
b
'Course Active'
),
),
migrations
.
AlterField
(
model_name
=
'course'
,
name
=
'course_name'
,
field
=
models
.
CharField
(
help_text
=
b
'Name of this course'
,
max_length
=
255
,
verbose_name
=
b
'Course Name'
),
),
migrations
.
AlterField
(
model_name
=
'course'
,
name
=
'edx_classid'
,
field
=
models
.
CharField
(
help_text
=
b
'Course number to identify the course.'
,
max_length
=
255
,
verbose_name
=
b
'Class ID'
),
),
migrations
.
AlterField
(
model_name
=
'course'
,
name
=
'institution'
,
field
=
models
.
CharField
(
help_text
=
b
'Organization of the course.'
,
max_length
=
50
,
verbose_name
=
b
'Inst. Code'
),
),
]
VEDA_OS01/models.py
View file @
0e5b8765
...
...
@@ -229,24 +229,32 @@ class Institution(models.Model):
)
class
Course
(
models
.
Model
):
class
Course
(
TimeStamped
Model
):
"""
Model for Course.
Model to contain Studio course runs. Ideally, there should be one entry
in this Model for all the course runs in Studio.
"""
course_name
=
models
.
CharField
(
'Course Name'
,
max_length
=
100
)
course_name
=
models
.
CharField
(
'Course Name'
,
help_text
=
'Name of this course'
,
max_length
=
255
)
# TODO: Change Name (this is reversed)
course_hold
=
models
.
BooleanField
(
'Course Active'
,
default
=
False
)
institution
=
models
.
CharField
(
'Inst. Code'
,
max_length
=
4
)
edx_classid
=
models
.
CharField
(
'Class ID'
,
max_length
=
5
)
course_hold
=
models
.
BooleanField
(
'Course Active'
,
help_text
=
'Tells whether this course is active.'
,
default
=
True
)
institution
=
models
.
CharField
(
'Inst. Code'
,
help_text
=
'Organization of the course.'
,
max_length
=
50
)
edx_classid
=
models
.
CharField
(
'Class ID'
,
help_text
=
'Course number to identify the course.'
,
max_length
=
255
)
# TODO
: Create Default for 'this year' (e.g. 2017)
# TODO
deprecate semesterid.
semesterid
=
models
.
CharField
(
'Semester'
,
max_length
=
4
)
parent_ID
=
models
.
CharField
(
'Parent Project'
,
max_length
=
8
,
null
=
True
,
blank
=
True
)
previous_statechange
=
models
.
DateTimeField
(
'Previous Data Statechange'
,
null
=
True
,
blank
=
True
...
...
@@ -357,21 +365,6 @@ class Course(models.Model):
# TODO: Change field name
s3_proc
=
models
.
BooleanField
(
'Process for AWS S3/Mobile?'
,
default
=
True
)
# TODO: Deprecate (HLS) Replace
mobile_override
=
models
.
BooleanField
(
'Low Bandwidth Override'
,
default
=
False
)
# TODO: Deprecate
s3_dir
=
models
.
CharField
(
'S3 Directory'
,
max_length
=
50
,
null
=
True
,
blank
=
True
)
# TODO: Change field name
xue
=
models
.
BooleanField
(
'Submit to VAL'
,
default
=
False
)
# TODO: Change field name
local_storedir
=
models
.
CharField
(
'edX Studio URL (VAL)'
,
...
...
VEDA_OS01/serializers.py
View file @
0e5b8765
...
...
@@ -15,7 +15,6 @@ class CourseSerializer(serializers.ModelSerializer):
'review_proc'
,
'yt_proc'
,
's3_proc'
,
'mobile_override'
,
'course_name'
,
'institution'
,
'edx_classid'
,
...
...
@@ -24,7 +23,9 @@ class CourseSerializer(serializers.ModelSerializer):
'previous_statechange'
,
'studio_hex'
,
'proc_loc'
,
'sg_projID'
'sg_projID'
,
'created'
,
'modified'
,
)
def
create
(
self
,
validated_data
,
partial
=
True
):
...
...
control/veda_deliver.py
View file @
0e5b8765
...
...
@@ -361,8 +361,7 @@ class VedaDelivery:
For now, old style workflow with checks and deletes at end
"""
if
self
.
video_query
.
inst_class
.
s3_proc
is
False
and
\
self
.
video_query
.
inst_class
.
mobile_override
is
False
:
if
not
self
.
video_query
.
inst_class
.
s3_proc
:
return
False
if
self
.
video_proto
.
filesize
<
self
.
auth_dict
[
'multi_upload_barrier'
]:
...
...
control/veda_encode.py
View file @
0e5b8765
...
...
@@ -70,13 +70,10 @@ class VedaEncode(object):
self
.
encode_list
.
add
(
e
)
return
None
if
self
.
course_object
.
mobile_override
is
True
:
for
e
in
self
.
encode_dict
[
'mobile_override'
]:
self
.
encode_list
.
add
(
e
)
return
None
for
key
,
entry
in
self
.
encode_dict
.
iteritems
():
if
getattr
(
self
.
course_object
,
key
)
is
True
:
# Adding default to avoid AttributeError on trying to get
# `mobile_override`, it is currently in `encode_dict`.
if
getattr
(
self
.
course_object
,
key
,
False
)
is
True
:
if
key
!=
'review_proc'
:
for
e
in
entry
:
self
.
encode_list
.
add
(
e
)
...
...
frontend/course_validate.py
View file @
0e5b8765
...
...
@@ -267,7 +267,6 @@ class VEDACat():
setattr
(
c1
,
'tp_proc'
,
False
)
"""Always Set"""
setattr
(
c1
,
'xue'
,
True
)
setattr
(
c1
,
'course_hold'
,
True
)
# Remember, this is reversed
# Semester
...
...
frontend/veda_models.yaml
View file @
0e5b8765
...
...
@@ -10,22 +10,21 @@ models_nottoget:
-
last_vid_number
-
previous_statechange
-
yt_proc
-
s3_dir
-
studio_hex
-
sg_projID
-
c24_hours
-
created
-
modified
#boolean (checkbox)
bools
:
-
course_hold
-
proc_loc
-
review_proc
-
mobile_override
-
yt_proc
-
tp_proc
-
c24_proc
-
s3_proc
-
xue
# dropdown boxes
dropdowns
:
...
...
@@ -47,14 +46,11 @@ organizational:
institution
:
main
institution_name
:
main
edx_classid
:
main
parent_ID
:
main
yt_proc
:
encode
s3_proc
:
encode
mobile_override
:
encode
review_proc
:
encode
proc_loc
:
encode
xue
:
encode
yt_logon
:
encode
tp_proc
:
transcribe
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment