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
b0c1e962
Commit
b0c1e962
authored
Jul 07, 2015
by
Matt Drayer
Committed by
christopher lee
Jul 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rc/2015-07-08-mattdrayer: Hide button behind feature flag
parent
b3437b72
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
21 deletions
+31
-21
common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py
+3
-2
lms/djangoapps/instructor/views/instructor_dashboard.py
+3
-0
lms/envs/bok_choy.env.json
+1
-0
lms/envs/common.py
+3
-0
lms/templates/instructor/instructor_dashboard_2/certificates.html
+21
-19
No files found.
common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py
View file @
b0c1e962
...
...
@@ -416,8 +416,9 @@ class CertificatesTest(BaseInstructorDashboardTest):
"""
Scenario: On the Certificates tab of the Instructor Dashboard, Generate Certificates button is visible.
Given that I am on the Certificates tab on the Instructor Dashboard
Then I see 'Generate Certificates' button
And when I click on 'Generate Certificates' button
And the instructor-generation feature flag has been enabled
Then I see a 'Generate Certificates' button
And when I click on the 'Generate Certificates' button
Then I should see a status message and 'Generate Certificates' button should be disabled.
"""
self
.
assertTrue
(
self
.
certificates_section
.
generate_certificates_button
.
visible
)
...
...
lms/djangoapps/instructor/views/instructor_dashboard.py
View file @
b0c1e962
...
...
@@ -245,12 +245,15 @@ def _section_certificates(course):
for
cert_status
in
example_cert_status
)
)
instructor_generation_enabled
=
settings
.
FEATURES
.
get
(
'CERTIFICATES_INSTRUCTOR_GENERATION'
,
False
)
return
{
'section_key'
:
'certificates'
,
'section_display_name'
:
_
(
'Certificates'
),
'example_certificate_status'
:
example_cert_status
,
'can_enable_for_course'
:
can_enable_for_course
,
'enabled_for_course'
:
certs_api
.
cert_generation_enabled
(
course
.
id
),
'instructor_generation_enabled'
:
instructor_generation_enabled
,
'urls'
:
{
'generate_example_certificates'
:
reverse
(
'generate_example_certificates'
,
...
...
lms/envs/bok_choy.env.json
View file @
b0c1e962
...
...
@@ -66,6 +66,7 @@
"AUTH_USE_OPENID_PROVIDER"
:
true
,
"CERTIFICATES_ENABLED"
:
true
,
"CERTIFICATES_HTML_VIEW"
:
true
,
"CERTIFICATES_INSTRUCTOR_GENERATION"
:
true
,
"MULTIPLE_ENROLLMENT_ROLES"
:
true
,
"SOCIAL_SHARING_SETTINGS"
:
{
"CUSTOM_COURSE_URLS"
:
true
,
...
...
lms/envs/common.py
View file @
b0c1e962
...
...
@@ -379,6 +379,9 @@ FEATURES = {
# Certificates Web/HTML Views
'CERTIFICATES_HTML_VIEW'
:
False
,
# Batch-Generated Certificates from Instructor Dashboard
'CERTIFICATES_INSTRUCTOR_GENERATION'
:
False
,
# Social Media Sharing on Student Dashboard
'SOCIAL_SHARING_SETTINGS'
:
{
# Note: Ensure 'CUSTOM_COURSE_URLS' has a matching value in cms/envs/common.py
...
...
lms/templates/instructor/instructor_dashboard_2/certificates.html
View file @
b0c1e962
...
...
@@ -56,26 +56,28 @@
% endif
</div>
<hr
/>
% if section_data['instructor_generation_enabled']:
<hr
/>
<div
class=
"start-certificate-generation"
>
<h2>
${_("Generate Certificates")}
</h2>
<form
id=
"certificates-generating-form"
method=
"post"
action=
"${section_data['urls']['start_certificate_generation']}"
>
<input
type=
"button"
id=
"btn-start-generating-certificates"
value=
"${_('Generate Certificates')}"
data-endpoint=
"${section_data['urls']['start_certificate_generation']}"
/>
</form>
<div
class=
"certificate-generation-status"
></div>
</div>
<div
class=
"start-certificate-generation"
>
<h2>
${_("Generate Certificates")}
</h2>
<form
id=
"certificates-generating-form"
method=
"post"
action=
"${section_data['urls']['start_certificate_generation']}"
>
<input
type=
"button"
id=
"btn-start-generating-certificates"
value=
"${_('Generate Certificates')}"
data-endpoint=
"${section_data['urls']['start_certificate_generation']}"
/>
</form>
<div
class=
"certificate-generation-status"
></div>
</div>
%if settings.FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'):
<div
class=
"running-tasks-container action-type-container"
>
<hr>
<h2>
${_("Pending Tasks")}
</h2>
<div
class=
"running-tasks-section"
>
<p>
${_("The status for any active tasks appears in a table below.")}
</p>
<br
/>
<div
class=
"running-tasks-table"
data-endpoint=
"${ section_data['urls']['list_instructor_tasks_url'] }"
></div>
%if settings.FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'):
<div
class=
"running-tasks-container action-type-container"
>
<hr>
<h2>
${_("Pending Tasks")}
</h2>
<div
class=
"running-tasks-section"
>
<p>
${_("The status for any active tasks appears in a table below.")}
</p>
<br
/>
<div
class=
"running-tasks-table"
data-endpoint=
"${ section_data['urls']['list_instructor_tasks_url'] }"
></div>
</div>
<div
class=
"no-pending-tasks-message"
></div>
</div>
<div
class=
"no-pending-tasks-message"
></div>
</div>
%endif
%endif
% endif
</div>
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