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
15d77fda
Commit
15d77fda
authored
Oct 05, 2015
by
Peter Fogg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide due/release dates on course outline in Studio.
ECOM-2443
parent
dc7f09fc
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
2 deletions
+61
-2
cms/static/js/views/modals/course_outline_modals.js
+4
-0
cms/static/js/views/xblock_outline.js
+3
-1
cms/templates/base.html
+2
-1
cms/templates/js/course-outline.underscore
+2
-0
common/test/acceptance/tests/studio/test_studio_outline.py
+50
-0
No files found.
cms/static/js/views/modals/course_outline_modals.js
View file @
15d77fda
...
...
@@ -584,6 +584,10 @@ define(['jquery', 'backbone', 'underscore', 'gettext', 'js/views/baseview',
editors
.
push
(
VerificationAccessEditor
);
}
}
/* globals course */
if
(
course
.
get
(
'self_paced'
))
{
editors
=
_
.
without
(
editors
,
ReleaseDateEditor
,
DueDateEditor
);
}
return
new
SettingsXBlockModal
(
$
.
extend
({
editors
:
editors
,
model
:
xblockInfo
...
...
cms/static/js/views/xblock_outline.js
View file @
15d77fda
...
...
@@ -89,6 +89,7 @@ define(["jquery", "underscore", "gettext", "js/views/baseview", "common/js/compo
},
true
);
defaultNewChildName
=
childInfo
.
display_name
;
}
/* globals course */
return
{
xblockInfo
:
xblockInfo
,
visibilityClass
:
XBlockViewUtils
.
getXBlockVisibilityClass
(
xblockInfo
.
get
(
'visibility_state'
)),
...
...
@@ -104,7 +105,8 @@ define(["jquery", "underscore", "gettext", "js/views/baseview", "common/js/compo
isCollapsed
:
isCollapsed
,
includesChildren
:
this
.
shouldRenderChildren
(),
hasExplicitStaffLock
:
this
.
model
.
get
(
'has_explicit_staff_lock'
),
staffOnlyMessage
:
this
.
model
.
get
(
'staff_only_message'
)
staffOnlyMessage
:
this
.
model
.
get
(
'staff_only_message'
),
course
:
course
};
},
...
...
cms/templates/base.html
View file @
15d77fda
...
...
@@ -85,7 +85,8 @@ import json
org
:
"${context_course.location.org | h}"
,
num
:
"${context_course.location.course | h}"
,
display_course_number
:
"${_(context_course.display_coursenumber)}"
,
revision
:
"${context_course.location.revision | h}"
revision
:
"${context_course.location.revision | h}"
,
self_paced
:
$
{
json
.
dumps
(
context_course
.
self_paced
)}
});
});
%
endif
...
...
cms/templates/js/course-outline.underscore
View file @
15d77fda
...
...
@@ -113,6 +113,7 @@ if (xblockInfo.get('graded')) {
<p>
<span class="sr status-release-label"><%= gettext('Release Status:') %></span>
<span class="status-release-value">
<% if (!course.get('self_paced')) { %>
<% if (xblockInfo.get('released_to_students')) { %>
<i class="icon fa fa-check-square-o"></i>
<%= gettext('Released:') %>
...
...
@@ -126,6 +127,7 @@ if (xblockInfo.get('graded')) {
<% if (xblockInfo.get('release_date')) { %>
<%= xblockInfo.get('release_date') %>
<% } %>
<% } %>
</span>
</p>
</div>
...
...
common/test/acceptance/tests/studio/test_studio_outline.py
View file @
15d77fda
...
...
@@ -1752,3 +1752,53 @@ class DeprecationWarningMessageTest(CourseOutlineTest):
components_present
=
True
,
components_display_name_list
=
[
'Open'
,
'Peer'
]
)
class
SelfPacedOutlineTest
(
CourseOutlineTest
):
"""Test the course outline for a self-paced course."""
def
populate_course_fixture
(
self
,
course_fixture
):
course_fixture
.
add_children
(
XBlockFixtureDesc
(
'chapter'
,
SECTION_NAME
)
.
add_children
(
XBlockFixtureDesc
(
'sequential'
,
SUBSECTION_NAME
)
.
add_children
(
XBlockFixtureDesc
(
'vertical'
,
UNIT_NAME
)
)
),
)
self
.
course_fixture
.
add_course_details
({
'self_paced'
:
True
})
def
test_release_dates_not_shown
(
self
):
"""
Scenario: Ensure that block release dates are not shown on the
course outline page of a self-paced course.
Given I am the author of a self-paced course
When I go to the course outline
Then I should not see release dates for course content
"""
self
.
course_outline_page
.
visit
()
section
=
self
.
course_outline_page
.
section
(
SECTION_NAME
)
self
.
assertEqual
(
section
.
release_date
,
''
)
subsection
=
section
.
subsection
(
SUBSECTION_NAME
)
self
.
assertEqual
(
subsection
.
release_date
,
''
)
def
test_edit_section_and_subsection
(
self
):
"""
Scenario: Ensure that block release/due dates are not shown
in their settings modals.
Given I am the author of a self-paced course
When I go to the course outline
And I click on settings for a section or subsection
Then I should not see release or due date settings
"""
self
.
course_outline_page
.
visit
()
section
=
self
.
course_outline_page
.
section
(
SECTION_NAME
)
modal
=
section
.
edit
()
self
.
assertFalse
(
modal
.
has_release_date
())
self
.
assertFalse
(
modal
.
has_due_date
())
modal
.
cancel
()
subsection
=
section
.
subsection
(
SUBSECTION_NAME
)
modal
=
subsection
.
edit
()
self
.
assertFalse
(
modal
.
has_release_date
())
self
.
assertFalse
(
modal
.
has_due_date
())
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