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
0e78eaaf
Commit
0e78eaaf
authored
Jan 19, 2013
by
Victor Shnayder
Committed by
Victor Shnayder
Jan 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a course_groups djangoapp with a CourseUserGroup model.
parent
c655f62f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
+28
-0
common/djangoapps/course_groups/__init__.py
+0
-0
common/djangoapps/course_groups/models.py
+27
-0
lms/envs/common.py
+1
-0
No files found.
common/djangoapps/course_groups/__init__.py
0 → 100644
View file @
0e78eaaf
common/djangoapps/course_groups/models.py
0 → 100644
View file @
0e78eaaf
from
django.contrib.auth.models
import
User
from
django.db
import
models
class
CourseUserGroup
(
models
.
Model
):
"""
This model represents groups of users in a course. Groups may have different types,
which may be treated specially. For example, a user can be in at most one cohort per
course, and cohorts are used to split up the forums by group.
"""
class
Meta
:
unique_together
=
((
'name'
,
'course_id'
),
)
name
=
models
.
CharField
(
max_length
=
255
,
help_text
=
(
"What is the name of this group? "
"Must be unique within a course."
))
users
=
models
.
ManyToManyField
(
User
,
db_index
=
True
,
related_name
=
'course_groups'
,
help_text
=
"Who is in this group?"
)
# Note: groups associated with particular runs of a course. E.g. Fall 2012 and Spring
# 2013 versions of 6.00x will have separate groups.
course_id
=
models
.
CharField
(
max_length
=
255
,
db_index
=
True
,
help_text
=
"Which course is this group associated with?"
)
# For now, only have group type 'cohort', but adding a type field to support
# things like 'question_discussion', 'friends', 'off-line-class', etc
GROUP_TYPE_CHOICES
=
((
'cohort'
,
'Cohort'
),)
group_type
=
models
.
CharField
(
max_length
=
20
,
choices
=
GROUP_TYPE_CHOICES
)
lms/envs/common.py
View file @
0e78eaaf
...
@@ -577,6 +577,7 @@ INSTALLED_APPS = (
...
@@ -577,6 +577,7 @@ INSTALLED_APPS = (
'open_ended_grading'
,
'open_ended_grading'
,
'psychometrics'
,
'psychometrics'
,
'licenses'
,
'licenses'
,
'course_groups'
,
#For the wiki
#For the wiki
'wiki'
,
# The new django-wiki from benjaoming
'wiki'
,
# The new django-wiki from benjaoming
...
...
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