Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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-platform
Commits
72999e84
Commit
72999e84
authored
Jun 28, 2013
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial model.
parent
938e48e5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
0 deletions
+67
-0
cms/djangoapps/course_creators/__init__.py
+0
-0
cms/djangoapps/course_creators/migrations/0001_initial.py
+37
-0
cms/djangoapps/course_creators/migrations/__init__.py
+0
-0
cms/djangoapps/course_creators/models.py
+29
-0
cms/envs/common.py
+1
-0
No files found.
cms/djangoapps/course_creators/__init__.py
0 → 100644
View file @
72999e84
cms/djangoapps/course_creators/migrations/0001_initial.py
0 → 100644
View file @
72999e84
# -*- coding: utf-8 -*-
import
datetime
from
south.db
import
db
from
south.v2
import
SchemaMigration
from
django.db
import
models
class
Migration
(
SchemaMigration
):
def
forwards
(
self
,
orm
):
# Adding model 'CourseCreators'
db
.
create_table
(
'course_creators_coursecreators'
,
(
(
'username'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
unique
=
True
,
max_length
=
64
,
primary_key
=
True
)),
(
'state_changed'
,
self
.
gf
(
'django.db.models.fields.DateTimeField'
)(
auto_now_add
=
True
,
blank
=
True
)),
(
'state'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
default
=
'u'
,
max_length
=
1
)),
(
'note'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
max_length
=
512
,
blank
=
True
)),
))
db
.
send_create_signal
(
'course_creators'
,
[
'CourseCreators'
])
def
backwards
(
self
,
orm
):
# Deleting model 'CourseCreators'
db
.
delete_table
(
'course_creators_coursecreators'
)
models
=
{
'course_creators.coursecreators'
:
{
'Meta'
:
{
'object_name'
:
'CourseCreators'
},
'note'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'512'
,
'blank'
:
'True'
}),
'state'
:
(
'django.db.models.fields.CharField'
,
[],
{
'default'
:
"'u'"
,
'max_length'
:
'1'
}),
'state_changed'
:
(
'django.db.models.fields.DateTimeField'
,
[],
{
'auto_now_add'
:
'True'
,
'blank'
:
'True'
}),
'username'
:
(
'django.db.models.fields.CharField'
,
[],
{
'unique'
:
'True'
,
'max_length'
:
'64'
,
'primary_key'
:
'True'
})
}
}
complete_apps
=
[
'course_creators'
]
\ No newline at end of file
cms/djangoapps/course_creators/migrations/__init__.py
0 → 100644
View file @
72999e84
cms/djangoapps/course_creators/models.py
0 → 100644
View file @
72999e84
"""
Table for storing information about whether or not Studio users have course creation privileges.
"""
from
django.db
import
models
class
CourseCreators
(
models
.
Model
):
"""
Creates the database table model.
"""
STATES
=
(
(
u'u'
,
u'unrequested'
),
(
u'p'
,
u'pending'
),
(
u'g'
,
u'granted'
),
(
u'd'
,
u'denied'
),
)
username
=
models
.
CharField
(
max_length
=
64
,
blank
=
False
,
help_text
=
"Studio username"
,
primary_key
=
True
,
unique
=
True
)
state_changed
=
models
.
DateTimeField
(
'state last updated'
,
auto_now_add
=
True
,
help_text
=
'The date when state was last updated'
)
state
=
models
.
CharField
(
max_length
=
1
,
blank
=
False
,
choices
=
STATES
,
default
=
'u'
,
help_text
=
'Current course creator state'
)
note
=
models
.
CharField
(
max_length
=
512
,
blank
=
True
,
help_text
=
'Optional notes about this user (for example, '
'why course creation access was denied)'
)
def
__unicode__
(
self
):
s
=
"
%
s |
%
s [
%
s] |
%
s"
%
(
self
.
username
,
self
.
state
,
self
.
state_changed
,
self
.
note
)
return
s
cms/envs/common.py
View file @
72999e84
...
...
@@ -331,6 +331,7 @@ INSTALLED_APPS = (
# For CMS
'contentstore'
,
'auth'
,
'course_creators'
,
'student'
,
# misleading name due to sharing with lms
'course_groups'
,
# not used in cms (yet), but tests run
...
...
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