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
ffb7f9b9
Commit
ffb7f9b9
authored
Sep 20, 2015
by
Matt Drayer
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9804 from edx/asadiqbal08/SOL-1224
SOL-1224 Verified Preview not showing
parents
f8e1224f
287cc843
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
cms/djangoapps/contentstore/views/certificates.py
+3
-1
cms/static/js/certificates/spec/views/certificate_preview_spec.js
+5
-1
cms/static/js/certificates/views/certificate_preview.js
+2
-0
No files found.
cms/djangoapps/contentstore/views/certificates.py
View file @
ffb7f9b9
...
...
@@ -354,7 +354,9 @@ def certificates_list_handler(request, course_key_string):
handler_name
=
'certificates.certificate_activation_handler'
,
course_key
=
course_key
)
course_modes
=
[
mode
.
slug
for
mode
in
CourseMode
.
modes_for_course
(
course
.
id
)]
course_modes
=
[
mode
.
slug
for
mode
in
CourseMode
.
modes_for_course
(
course_id
=
course
.
id
,
include_expired
=
True
)]
certificate_web_view_url
=
get_lms_link_for_certificate_web_view
(
user_id
=
request
.
user
.
id
,
course_key
=
course_key
,
...
...
cms/static/js/certificates/spec/views/certificate_preview_spec.js
View file @
ffb7f9b9
...
...
@@ -49,7 +49,7 @@ function(_, $, Course, CertificatePreview, TemplateHelpers, ViewHelpers, AjaxHel
appendSetFixtures
(
'<div class="preview-certificate nav-actions"></div>'
);
this
.
view
=
new
CertificatePreview
({
el
:
$
(
'.preview-certificate'
),
course_modes
:
[
'test1'
,
'test2'
,
'test3'
],
course_modes
:
[
'test1'
,
'test2'
,
'test3'
,
'audit'
],
certificate_web_view_url
:
'/users/1/courses/orgX/009/2016?preview=test1'
,
certificate_activation_handler_url
:
'/certificates/activation/'
+
window
.
course
.
id
,
is_active
:
true
...
...
@@ -59,6 +59,10 @@ function(_, $, Course, CertificatePreview, TemplateHelpers, ViewHelpers, AjaxHel
describe
(
'Certificate preview'
,
function
()
{
it
(
'course mode "audit" should not be render in preview list'
,
function
()
{
expect
(
this
.
view
.
course_modes
.
indexOf
(
'audit'
)
<
0
).
toBe
(
true
);
});
it
(
'course mode event should call when user choose a new mode'
,
function
()
{
spyOn
(
this
.
view
,
'courseModeChanged'
);
this
.
view
.
delegateEvents
();
...
...
cms/static/js/certificates/views/certificate_preview.js
View file @
ffb7f9b9
...
...
@@ -27,6 +27,8 @@ function(_, gettext, BaseView, ViewUtils, NotificationView) {
},
render
:
function
()
{
// removing the course mode 'audit' from the preview list.
this
.
course_modes
=
_
.
without
(
this
.
course_modes
,
'audit'
);
this
.
$el
.
html
(
this
.
template
({
course_modes
:
this
.
course_modes
,
certificate_web_view_url
:
this
.
certificate_web_view_url
,
...
...
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