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
d15ff4b2
Commit
d15ff4b2
authored
Apr 14, 2017
by
Waheed Ahmed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
After MKTG reviews a course the label should read: "Reviewed on xx/xx/xxxx".
ECOM-7696
parent
12346ec2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletions
+14
-1
course_discovery/apps/publisher/tests/test_views.py
+10
-0
course_discovery/apps/publisher/views.py
+4
-1
No files found.
course_discovery/apps/publisher/tests/test_views.py
View file @
d15ff4b2
...
@@ -1822,6 +1822,16 @@ class CourseDetailViewTests(TestCase):
...
@@ -1822,6 +1822,16 @@ class CourseDetailViewTests(TestCase):
self
.
assertContains
(
response
,
'<span class="icon fa fa-check" aria-hidden="true">'
,
count
=
2
)
self
.
assertContains
(
response
,
'<span class="icon fa fa-check" aria-hidden="true">'
,
count
=
2
)
self
.
assertContains
(
response
,
'Send for Review'
,
count
=
1
)
self
.
assertContains
(
response
,
'Send for Review'
,
count
=
1
)
self
.
course_state
.
marketing_reviewed
=
True
self
.
course_state
.
owner_role
=
PublisherUserRole
.
CourseTeam
self
.
course_state
.
save
()
response
=
self
.
client
.
get
(
self
.
detail_page_url
)
# Verify that content is marked as reviewed by both marketing and course team.
self
.
assertNotContains
(
response
,
'Send for Review'
)
self
.
assertContains
(
response
,
'Reviewed'
,
count
=
2
)
def
test_edit_permission_with_owner_role
(
self
):
def
test_edit_permission_with_owner_role
(
self
):
"""
"""
Test that user can see edit button if he has permission and has role for course.
Test that user can see edit button if he has permission and has role for course.
...
...
course_discovery/apps/publisher/views.py
View file @
d15ff4b2
...
@@ -767,7 +767,10 @@ def get_course_role_widgets_data(user, course, state_object, change_state_url, p
...
@@ -767,7 +767,10 @@ def get_course_role_widgets_data(user, course, state_object, change_state_url, p
name
=
CourseStateChoices
.
Review
name
=
CourseStateChoices
.
Review
)
.
order_by
(
'-modified'
)
.
first
()
)
.
order_by
(
'-modified'
)
.
first
()
if
history_record
:
if
history_record
:
role_widget
[
'sent_for_review'
]
=
history_record
.
modified
if
hasattr
(
state_object
,
'marketing_reviewed'
)
and
state_object
.
marketing_reviewed
:
role_widget
[
'reviewed'
]
=
history_record
.
modified
else
:
role_widget
[
'sent_for_review'
]
=
history_record
.
modified
role_widgets
.
append
(
role_widget
)
role_widgets
.
append
(
role_widget
)
...
...
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