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
83e3c006
Commit
83e3c006
authored
Mar 06, 2017
by
tasawernawaz
Committed by
Bill DeRusha
Mar 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comments added in comments/models
parent
6e012c58
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
course_discovery/apps/publisher_comments/models.py
+5
-2
No files found.
course_discovery/apps/publisher_comments/models.py
View file @
83e3c006
...
@@ -22,6 +22,9 @@ class Comments(CommentAbstractModel):
...
@@ -22,6 +22,9 @@ class Comments(CommentAbstractModel):
DECLINE_PREVIEW
=
'decline_preview'
DECLINE_PREVIEW
=
'decline_preview'
modified
=
ModificationDateTimeField
(
_
(
'modified'
))
modified
=
ModificationDateTimeField
(
_
(
'modified'
))
# comment type added to differentiate weather comment is for preview decline or a
# normal comment on content of course/course run.
comment_type
=
models
.
CharField
(
comment_type
=
models
.
CharField
(
max_length
=
255
,
null
=
True
,
blank
=
True
,
choices
=
CommentTypeChoices
.
choices
,
default
=
CommentTypeChoices
.
Default
max_length
=
255
,
null
=
True
,
blank
=
True
,
choices
=
CommentTypeChoices
.
choices
,
default
=
CommentTypeChoices
.
Default
)
)
...
@@ -50,9 +53,9 @@ def mark_preview_url_as_decline(instance):
...
@@ -50,9 +53,9 @@ def mark_preview_url_as_decline(instance):
course_run
.
preview_url
=
None
course_run
.
preview_url
=
None
course_run
.
save
()
course_run
.
save
()
#
change the owner role
#
assign course back to publisher
course_run
.
course_run_state
.
change_owner_role
(
PublisherUserRole
.
Publisher
)
course_run
.
course_run_state
.
change_owner_role
(
PublisherUserRole
.
Publisher
)
# send email for decline preview
# send email for decline preview
to publisher
if
waffle
.
switch_is_active
(
'enable_publisher_email_notifications'
):
if
waffle
.
switch_is_active
(
'enable_publisher_email_notifications'
):
send_email_decline_preview
(
instance
,
course_run
,
preview_url
)
send_email_decline_preview
(
instance
,
course_run
,
preview_url
)
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