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
1cd54d5f
Commit
1cd54d5f
authored
Apr 14, 2016
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename "is_default_cohort" method.
parent
ce6ffe6d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
lms/djangoapps/verified_track_content/models.py
+1
-1
openedx/core/djangoapps/course_groups/cohorts.py
+3
-3
No files found.
lms/djangoapps/verified_track_content/models.py
View file @
1cd54d5f
...
...
@@ -12,7 +12,7 @@ from courseware.courses import get_course_by_id
from
verified_track_content.tasks
import
sync_cohort_with_mode
from
openedx.core.djangoapps.course_groups.cohorts
import
(
get_course_cohorts
,
CourseCohort
,
is_course_cohorted
,
get_random_cohort
,
is_default_cohort
get_course_cohorts
,
CourseCohort
,
is_course_cohorted
,
get_random_cohort
)
import
logging
...
...
openedx/core/djangoapps/course_groups/cohorts.py
View file @
1cd54d5f
...
...
@@ -430,7 +430,7 @@ def set_assignment_type(user_group, assignment_type):
"""
course_cohort
=
user_group
.
cohort
if
is_
default
_cohort
(
user_group
)
and
course_cohort
.
assignment_type
!=
assignment_type
:
if
is_
last_random
_cohort
(
user_group
)
and
course_cohort
.
assignment_type
!=
assignment_type
:
raise
ValueError
(
_
(
"There must be one cohort to which students can automatically be assigned."
))
course_cohort
.
assignment_type
=
assignment_type
...
...
@@ -445,9 +445,9 @@ def get_assignment_type(user_group):
return
course_cohort
.
assignment_type
def
is_
default
_cohort
(
user_group
):
def
is_
last_random
_cohort
(
user_group
):
"""
Check if
a cohort is default
.
Check if
this cohort is the only random cohort in the course
.
"""
random_cohorts
=
CourseUserGroup
.
objects
.
filter
(
course_id
=
user_group
.
course_id
,
...
...
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