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
14f1fdf3
Commit
14f1fdf3
authored
Sep 22, 2016
by
Felipe Volpone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disabling the "View Unit in Studio" button to CCX courses
parent
878b9124
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
common/test/acceptance/pages/lms/ccx_dashboard_page.py
+6
-0
common/test/acceptance/tests/lms/test_ccx.py
+4
-0
lms/djangoapps/ccx/overrides.py
+6
-0
No files found.
common/test/acceptance/pages/lms/ccx_dashboard_page.py
View file @
14f1fdf3
...
...
@@ -40,3 +40,9 @@ class CoachDashboardPage(CoursePage):
lambda
:
self
.
q
(
css
=
create_ccx_button
)
.
present
,
"Create a new Custom Course for edX"
)
.
fulfill
()
self
.
q
(
css
=
create_ccx_button
)
.
click
()
def
is_button_view_unit_in_studio_visible
(
self
):
"""
check if the View Unit in Studio button is on the page
"""
return
self
.
q
(
css
=
'instructor-info-action'
)
.
present
common/test/acceptance/tests/lms/test_ccx.py
View file @
14f1fdf3
...
...
@@ -56,3 +56,7 @@ class CreateCCXCoachTest(EventsTestMixin, UniqueCourseTest):
# Assert that new ccx is created and we are on ccx dashboard/enrollment tab.
self
.
assertTrue
(
self
.
coach_dashboard_page
.
is_browser_on_enrollment_page
())
# Assert that the user cannot click in the "View Unit in Studio" button,
# which means the user cannot edit the ccx course in studio
self
.
assertFalse
(
self
.
coach_dashboard_page
.
is_button_view_unit_in_studio_visible
())
lms/djangoapps/ccx/overrides.py
View file @
14f1fdf3
...
...
@@ -88,6 +88,12 @@ def get_override_for_ccx(ccx, block, name, default=None):
clean_ccx_key
=
_clean_ccx_key
(
block
.
location
)
block_overrides
=
overrides
.
get
(
clean_ccx_key
,
{})
# Hardcode the course_edit_method to be None instead of 'Studio', so,
# the LMS never tries to link back to Studio. CCX courses
# can't be edited in Studio.
block_overrides
[
'course_edit_method'
]
=
None
if
name
in
block_overrides
:
try
:
return
block
.
fields
[
name
]
.
from_json
(
block_overrides
[
name
])
...
...
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