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
3cabb2de
Commit
3cabb2de
authored
Aug 13, 2012
by
David Ormsbee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the no-longer-used is_valid_course_id code
parent
d24ee256
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
common/djangoapps/student/models.py
+6
-9
No files found.
common/djangoapps/student/models.py
View file @
3cabb2de
...
@@ -348,17 +348,14 @@ def replicate_model(model_method, instance, user_id):
...
@@ -348,17 +348,14 @@ def replicate_model(model_method, instance, user_id):
######### Replication Helpers #########
######### Replication Helpers #########
def
is_valid_course_id
(
course_id
):
def
is_valid_course_id
(
course_id
):
"""We check to both make sure that it's a valid course_id (and not
"""Right now, the only database that's not a course database is 'default'.
'default', or some other non-course DB name) and that we have a mapping
I had nicer checking in here originally -- it would scan the courses that
for what database it belongs to."""
were in the system and only let you choose that. But it was annoying to run
tests with, since we don't have course data for some for our course test
databases. Hence the lazy version.
"""
return
course_id
!=
'default'
return
course_id
!=
'default'
course_ids
=
set
(
course
.
id
for
course
in
modulestore
()
.
get_courses
())
is_valid
=
(
course_id
in
course_ids
)
and
(
course_id
in
settings
.
DATABASES
)
if
not
is_valid
:
log
.
error
(
"{0} is not a valid DB to replicate to."
.
format
(
course_id
))
return
is_valid
def
is_portal
():
def
is_portal
():
"""Are we in the portal pool? Only Portal servers are allowed to replicate
"""Are we in the portal pool? Only Portal servers are allowed to replicate
their changes. For now, only Portal servers see multiple DBs, so we use
their changes. For now, only Portal servers see multiple DBs, so we use
...
...
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