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
42117498
Commit
42117498
authored
Oct 09, 2013
by
Adam Palay
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add UserStanding model
add migration
parent
97e01be1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
common/djangoapps/student/migrations/0028_auto__add_userstanding.py
+0
-0
common/djangoapps/student/models.py
+21
-0
No files found.
common/djangoapps/student/migrations/0028_auto__add_userstanding.py
0 → 100644
View file @
42117498
This diff is collapsed.
Click to expand it.
common/djangoapps/student/models.py
View file @
42117498
...
...
@@ -33,6 +33,27 @@ from pytz import UTC
log
=
logging
.
getLogger
(
__name__
)
AUDIT_LOG
=
logging
.
getLogger
(
"audit"
)
class
UserStanding
(
models
.
Model
):
"""
This table contains a student's account's status.
Currently, we're only disabling accounts; in the future we can imagine
taking away more specific privileges, like forums access, or adding
more specific karma levels or probationary stages.
"""
ACCOUNT_DISABLED
=
"disabled"
ACCOUNT_ENABLED
=
"enabled"
USER_STANDING_CHOICES
=
(
(
ACCOUNT_DISABLED
,
u"Account Disabled"
),
(
ACCOUNT_ENABLED
,
u"Account Enabled"
),
)
user
=
models
.
ForeignKey
(
User
,
db_index
=
True
,
related_name
=
'standing'
,
unique
=
True
)
account_status
=
models
.
CharField
(
blank
=
True
,
max_length
=
31
,
choices
=
USER_STANDING_CHOICES
)
changed_by
=
models
.
ForeignKey
(
User
,
blank
=
True
)
standing_last_changed_at
=
models
.
DateTimeField
(
auto_now
=
True
)
class
UserProfile
(
models
.
Model
):
"""This is where we store all the user demographic fields. We have a
...
...
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