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
ff0da0f7
Commit
ff0da0f7
authored
Apr 21, 2017
by
Matthew Piatetsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix progress issues
ECOM-6602
parent
22ab0c8d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
17 deletions
+29
-17
lms/static/js/learner_dashboard/models/course_card_model.js
+15
-9
lms/static/js/learner_dashboard/views/course_card_view_2017.js
+5
-4
lms/static/js/learner_dashboard/views/course_enroll_view_2017.js
+1
-1
lms/static/js/spec/learner_dashboard/program_details_view_spec.js
+0
-0
lms/static/sass/views/_program-details.scss
+6
-1
lms/templates/learner_dashboard/upgrade_message_2017.underscore
+2
-2
No files found.
lms/static/js/learner_dashboard/models/course_card_model.js
View file @
ff0da0f7
...
@@ -122,19 +122,25 @@
...
@@ -122,19 +122,25 @@
},
},
getCertificatePriceString
:
function
(
run
)
{
getCertificatePriceString
:
function
(
run
)
{
var
verifiedSeat
,
currency
;
var
upgradeableSeat
,
upgradeableSeats
,
currency
;
if
(
'seats'
in
run
&&
run
.
seats
.
length
)
{
if
(
'seats'
in
run
&&
run
.
seats
.
length
)
{
// eslint-disable-next-line consistent-return
// eslint-disable-next-line consistent-return
verifiedSeat
=
_
.
filter
(
run
.
seats
,
function
(
seat
)
{
upgradeableSeats
=
_
.
filter
(
run
.
seats
,
function
(
seat
)
{
if
([
'verified'
,
'professional'
,
'credit'
].
indexOf
(
seat
.
type
)
>=
0
)
{
var
upgradeableSeatTypes
=
[
'verified'
,
'professional'
,
'no-id-professional'
,
'credit'
];
if
(
upgradeableSeatTypes
.
indexOf
(
seat
.
type
)
>=
0
)
{
return
seat
;
return
seat
;
}
}
})[
0
];
});
currency
=
verifiedSeat
.
currency
;
if
(
upgradeableSeats
.
length
>
0
)
{
if
(
currency
===
'USD'
)
{
upgradeableSeat
=
upgradeableSeats
[
0
];
return
'$'
+
verifiedSeat
.
price
;
if
(
upgradeableSeat
)
{
}
else
{
currency
=
upgradeableSeat
.
currency
;
return
verifiedSeat
.
price
+
' '
+
currency
;
if
(
currency
===
'USD'
)
{
return
'$'
+
upgradeableSeat
.
price
;
}
else
{
return
upgradeableSeat
.
price
+
' '
+
currency
;
}
}
}
}
}
}
return
null
;
return
null
;
...
...
lms/static/js/learner_dashboard/views/course_card_view_2017.js
View file @
ff0da0f7
...
@@ -53,7 +53,8 @@
...
@@ -53,7 +53,8 @@
postRender
:
function
()
{
postRender
:
function
()
{
var
$upgradeMessage
=
this
.
$
(
'.upgrade-message'
),
var
$upgradeMessage
=
this
.
$
(
'.upgrade-message'
),
$certStatus
=
this
.
$
(
'.certificate-status'
),
$certStatus
=
this
.
$
(
'.certificate-status'
),
$expiredNotification
=
this
.
$
(
'.expired-notification'
);
$expiredNotification
=
this
.
$
(
'.expired-notification'
),
expired
=
this
.
model
.
get
(
'expired'
);
this
.
enrollView
=
new
CourseEnrollView
({
this
.
enrollView
=
new
CourseEnrollView
({
$parentEl
:
this
.
$
(
'.course-actions'
),
$parentEl
:
this
.
$
(
'.course-actions'
),
...
@@ -62,14 +63,14 @@
...
@@ -62,14 +63,14 @@
enrollModel
:
this
.
enrollModel
enrollModel
:
this
.
enrollModel
});
});
if
(
this
.
model
.
get
(
'upgrade_url'
))
{
if
(
this
.
model
.
get
(
'upgrade_url'
)
&&
!
(
expired
===
true
)
)
{
this
.
upgradeMessage
=
new
UpgradeMessageView
({
this
.
upgradeMessage
=
new
UpgradeMessageView
({
$el
:
$upgradeMessage
,
$el
:
$upgradeMessage
,
model
:
this
.
model
model
:
this
.
model
});
});
$certStatus
.
remove
();
$certStatus
.
remove
();
}
else
if
(
this
.
model
.
get
(
'certificate_url'
))
{
}
else
if
(
this
.
model
.
get
(
'certificate_url'
)
&&
!
(
expired
===
true
)
)
{
this
.
certificateStatus
=
new
CertificateStatusView
({
this
.
certificateStatus
=
new
CertificateStatusView
({
$el
:
$certStatus
,
$el
:
$certStatus
,
model
:
this
.
model
model
:
this
.
model
...
@@ -82,7 +83,7 @@
...
@@ -82,7 +83,7 @@
$certStatus
.
remove
();
$certStatus
.
remove
();
}
}
if
(
this
.
model
.
get
(
'expired'
)
)
{
if
(
expired
)
{
this
.
expiredNotification
=
new
ExpiredNotificationView
({
this
.
expiredNotification
=
new
ExpiredNotificationView
({
$el
:
$expiredNotification
,
$el
:
$expiredNotification
,
model
:
this
.
model
model
:
this
.
model
...
...
lms/static/js/learner_dashboard/views/course_enroll_view_2017.js
View file @
ff0da0f7
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
handleEnroll
:
function
()
{
handleEnroll
:
function
()
{
// Enrollment click event handled here
// Enrollment click event handled here
var
courseRunKey
=
$
(
'.run-select'
).
val
();
var
courseRunKey
=
$
(
'.run-select'
).
val
()
||
this
.
model
.
get
(
'course_run_key'
)
;
this
.
model
.
updateCourseRun
(
courseRunKey
);
this
.
model
.
updateCourseRun
(
courseRunKey
);
if
(
!
this
.
model
.
get
(
'is_enrolled'
))
{
if
(
!
this
.
model
.
get
(
'is_enrolled'
))
{
// Create the enrollment.
// Create the enrollment.
...
...
lms/static/js/spec/learner_dashboard/program_details_view_spec.js
0 → 100644
View file @
ff0da0f7
This diff is collapsed.
Click to expand it.
lms/static/sass/views/_program-details.scss
View file @
ff0da0f7
...
@@ -115,6 +115,10 @@
...
@@ -115,6 +115,10 @@
margin-top
:
10px
;
margin-top
:
10px
;
height
:
auto
;
height
:
auto
;
svg
{
width
:
inherit
;
}
/* IE11 CSS styles */
/* IE11 CSS styles */
@media
(
min-width
:
$bp-screen-md
)
and
(
-
ms-high-contrast
:
none
)
,
(
-
ms-high-contrast
:
active
)
{
@media
(
min-width
:
$bp-screen-md
)
and
(
-
ms-high-contrast
:
none
)
,
(
-
ms-high-contrast
:
active
)
{
height
:
50px
;
height
:
50px
;
...
@@ -147,6 +151,7 @@
...
@@ -147,6 +151,7 @@
.meta-info
{
.meta-info
{
margin
:
0
;
margin
:
0
;
display
:
block
;
@media
(
min-width
:
$bp-screen-md
)
{
@media
(
min-width
:
$bp-screen-md
)
{
width
:
70%
;
width
:
70%
;
}
}
...
@@ -426,7 +431,7 @@
...
@@ -426,7 +431,7 @@
height
:
37px
;
height
:
37px
;
width
:
128px
;
width
:
128px
;
border-radius
:
0
;
border-radius
:
0
;
padding
:
0
;
padding
:
7px
0
0
0
;
text-align
:
center
;
text-align
:
center
;
font-size
:
0
.9375em
;
font-size
:
0
.9375em
;
...
...
lms/templates/learner_dashboard/upgrade_message_2017.underscore
View file @
ff0da0f7
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<span class="price"> <%- price %></span>
<span class="price"> <%- price %></span>
</div>
</div>
<div class="action col-12 md-col-4">
<div class="action col-12 md-col-4">
<
button href="<%- upgrade_url %>" type="button
" class="btn-brand btn cta-primary upgrade-button">
<
a href="<%- upgrade_url %>
" class="btn-brand btn cta-primary upgrade-button">
<%- gettext('Buy Certificate') %>
<%- gettext('Buy Certificate') %>
<
/button
>
<
a
>
</div>
</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