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
d0b2787f
Commit
d0b2787f
authored
Aug 23, 2017
by
Sanford Student
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TNL-1230: cert available date hidden in self paced
parent
3131790a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
3 deletions
+16
-3
cms/templates/settings.html
+1
-1
lms/djangoapps/courseware/date_summary.py
+3
-2
lms/djangoapps/courseware/tests/test_date_summary.py
+12
-0
No files found.
cms/templates/settings.html
View file @
d0b2787f
...
...
@@ -214,7 +214,7 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}'
</li>
</ol>
% if waffle.waffle().is_enabled(waffle.INSTRUCTOR_PACED_ONLY):
% if waffle.waffle().is_enabled(waffle.INSTRUCTOR_PACED_ONLY)
and not context_course.self_paced
:
<ol
class=
"list-input"
>
<li
class=
"field-group field-group-certificate-available"
id=
"certificate-available"
>
<div
class=
"field date"
id=
"field-certificate-available-date"
>
...
...
lms/djangoapps/courseware/date_summary.py
View file @
d0b2787f
...
...
@@ -205,8 +205,9 @@ class CertificateAvailableDate(DateSummary):
@property
def
is_enabled
(
self
):
return
self
.
date
is
not
None
and
datetime
.
datetime
.
now
(
utc
)
<=
self
.
date
and
waffle
.
waffle
()
.
is_enabled
(
waffle
.
INSTRUCTOR_PACED_ONLY
return
(
self
.
date
is
not
None
and
datetime
.
datetime
.
now
(
utc
)
<=
self
.
date
and
not
self
.
course
.
self_paced
and
waffle
.
waffle
()
.
is_enabled
(
waffle
.
INSTRUCTOR_PACED_ONLY
)
)
@property
...
...
lms/djangoapps/courseware/tests/test_date_summary.py
View file @
d0b2787f
...
...
@@ -362,6 +362,18 @@ class CourseDateSummaryTest(SharedModuleStoreTestCase):
self
.
assertEqual
(
block
.
date
,
None
)
self
.
assertFalse
(
block
.
is_enabled
)
## CertificateAvailableDate
@waffle.testutils.override_switch
(
'certificates.instructor_paced_only'
,
True
)
def
test_no_certificate_available_date_for_self_paced
(
self
):
course
=
self
.
create_self_paced_course_run
()
verified_user
=
self
.
create_user
()
CourseEnrollmentFactory
(
course_id
=
course
.
id
,
user
=
verified_user
,
mode
=
CourseMode
.
VERIFIED
)
course
.
certificate_available_date
=
datetime
.
now
(
utc
)
+
timedelta
(
days
=
7
)
course
.
save
()
block
=
CertificateAvailableDate
(
course
,
verified_user
)
self
.
assertNotEqual
(
block
.
date
,
None
)
self
.
assertFalse
(
block
.
is_enabled
)
@waffle.testutils.override_switch
(
'certificates.instructor_paced_only'
,
True
)
def
test_certificate_available_date_defined
(
self
):
course
=
self
.
create_course_run
()
...
...
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