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
5925edbf
Commit
5925edbf
authored
Jul 23, 2015
by
Zia Fazal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hiding generated certificate button in case of self paced courses
parent
9e634a17
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletions
+18
-1
lms/djangoapps/instructor/tests/test_certificates.py
+17
-0
lms/templates/instructor/instructor_dashboard_2/certificates.html
+1
-1
No files found.
lms/djangoapps/instructor/tests/test_certificates.py
View file @
5925edbf
...
@@ -111,6 +111,23 @@ class CertificatesInstructorDashTest(ModuleStoreTestCase):
...
@@ -111,6 +111,23 @@ class CertificatesInstructorDashTest(ModuleStoreTestCase):
self
.
assertContains
(
response
,
'enable-certificates-submit'
)
self
.
assertContains
(
response
,
'enable-certificates-submit'
)
self
.
assertNotContains
(
response
,
'Generate Example Certificates'
)
self
.
assertNotContains
(
response
,
'Generate Example Certificates'
)
@mock.patch.dict
(
settings
.
FEATURES
,
{
'CERTIFICATES_HTML_VIEW'
:
True
})
def
test_buttons_for_html_certs_in_self_paced_course
(
self
):
"""
Tests `Enable Student-Generated Certificates` button is enabled
and `Generate Certificates` button is not available if
course has Web/HTML certificates view enabled on a self paced course.
"""
self
.
course
.
cert_html_view_enabled
=
True
self
.
course
.
save
()
self
.
store
.
update_item
(
self
.
course
,
self
.
global_staff
.
id
)
# pylint: disable=no-member
self
.
client
.
login
(
username
=
self
.
global_staff
.
username
,
password
=
"test"
)
response
=
self
.
client
.
get
(
self
.
url
)
self
.
assertContains
(
response
,
'Enable Student-Generated Certificates'
)
self
.
assertContains
(
response
,
'enable-certificates-submit'
)
self
.
assertNotContains
(
response
,
'Generate Certificates'
)
self
.
assertNotContains
(
response
,
'btn-start-generating-certificates'
)
def
_assert_certificates_visible
(
self
,
is_visible
):
def
_assert_certificates_visible
(
self
,
is_visible
):
"""Check that the certificates section is visible on the instructor dash. """
"""Check that the certificates section is visible on the instructor dash. """
response
=
self
.
client
.
get
(
self
.
url
)
response
=
self
.
client
.
get
(
self
.
url
)
...
...
lms/templates/instructor/instructor_dashboard_2/certificates.html
View file @
5925edbf
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
% endif
% endif
</div>
</div>
% if section_data['instructor_generation_enabled']:
% if section_data['instructor_generation_enabled']
and not (section_data['enabled_for_course'] and section_data['html_cert_enabled'])
:
<hr
/>
<hr
/>
<div
class=
"start-certificate-generation"
>
<div
class=
"start-certificate-generation"
>
...
...
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