Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
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
course-discovery
Commits
17138e18
Commit
17138e18
authored
Jun 25, 2018
by
Sanford Student
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move
parent
866d38c0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
course_discovery/apps/publisher/dataloader/create_courses.py
+6
-5
No files found.
course_discovery/apps/publisher/dataloader/create_courses.py
View file @
17138e18
...
@@ -136,6 +136,12 @@ def create_course_runs(meta_data_course, publisher_course):
...
@@ -136,6 +136,12 @@ def create_course_runs(meta_data_course, publisher_course):
lms_course_id
=
canonical_course_run
.
key
,
defaults
=
defaults
lms_course_id
=
canonical_course_run
.
key
,
defaults
=
defaults
)
)
PUBLISHER_COURSE_RUN_CREATED
.
send
(
model
=
publisher_course_run
,
start
=
canonical_course_run
.
start
,
end
=
canonical_course_run
.
end
)
# add many to many fields.
# add many to many fields.
publisher_course_run
.
transcript_languages
.
add
(
*
canonical_course_run
.
transcript_languages
.
all
())
publisher_course_run
.
transcript_languages
.
add
(
*
canonical_course_run
.
transcript_languages
.
all
())
publisher_course_run
.
staff
.
add
(
*
canonical_course_run
.
staff
.
all
())
publisher_course_run
.
staff
.
add
(
*
canonical_course_run
.
staff
.
all
())
...
@@ -143,11 +149,6 @@ def create_course_runs(meta_data_course, publisher_course):
...
@@ -143,11 +149,6 @@ def create_course_runs(meta_data_course, publisher_course):
# Initialize workflow for Course-run.
# Initialize workflow for Course-run.
if
created
:
if
created
:
PUBLISHER_COURSE_RUN_CREATED
.
send
(
model
=
publisher_course_run
,
start
=
canonical_course_run
.
start
,
end
=
canonical_course_run
.
end
)
state
,
created
=
CourseRunState
.
objects
.
get_or_create
(
course_run
=
publisher_course_run
)
state
,
created
=
CourseRunState
.
objects
.
get_or_create
(
course_run
=
publisher_course_run
)
if
created
:
if
created
:
state
.
approved_by_role
=
PublisherUserRole
.
ProjectCoordinator
state
.
approved_by_role
=
PublisherUserRole
.
ProjectCoordinator
...
...
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