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
12ffe180
Commit
12ffe180
authored
Oct 08, 2014
by
stephensanchez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pull Request comments addressed. Tests fixed.
parent
0c6b3ba0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
13 deletions
+15
-13
common/djangoapps/student/tests/test_recent_enrollments.py
+5
-1
lms/static/js/dashboard/donation.js
+1
-1
lms/static/sass/multicourse/_dashboard.scss
+3
-3
lms/templates/dashboard/donation.underscore
+1
-2
lms/templates/enrollment/course_enrollment_message.html
+5
-6
No files found.
common/djangoapps/student/tests/test_recent_enrollments.py
View file @
12ffe180
...
@@ -9,6 +9,7 @@ from opaque_keys.edx import locator
...
@@ -9,6 +9,7 @@ from opaque_keys.edx import locator
from
pytz
import
UTC
from
pytz
import
UTC
import
unittest
import
unittest
import
ddt
import
ddt
from
shoppingcart.models
import
DonationConfiguration
from
student.tests.factories
import
UserFactory
from
student.tests.factories
import
UserFactory
from
xmodule.modulestore.tests.django_utils
import
ModuleStoreTestCase
from
xmodule.modulestore.tests.django_utils
import
ModuleStoreTestCase
...
@@ -124,7 +125,7 @@ class TestRecentEnrollments(ModuleStoreTestCase):
...
@@ -124,7 +125,7 @@ class TestRecentEnrollments(ModuleStoreTestCase):
self
.
_configure_message_timeout
(
600
)
self
.
_configure_message_timeout
(
600
)
self
.
client
.
login
(
username
=
self
.
student
.
username
,
password
=
self
.
PASSWORD
)
self
.
client
.
login
(
username
=
self
.
student
.
username
,
password
=
self
.
PASSWORD
)
response
=
self
.
client
.
get
(
reverse
(
"dashboard"
))
response
=
self
.
client
.
get
(
reverse
(
"dashboard"
))
self
.
assertContains
(
response
,
"
You have successfully enrolled
in"
)
self
.
assertContains
(
response
,
"
Thank you for enrolling
in"
)
@ddt.data
(
@ddt.data
(
([
'audit'
,
'honor'
,
'verified'
],
False
),
([
'audit'
,
'honor'
,
'verified'
],
False
),
...
@@ -139,6 +140,9 @@ class TestRecentEnrollments(ModuleStoreTestCase):
...
@@ -139,6 +140,9 @@ class TestRecentEnrollments(ModuleStoreTestCase):
# Enable the enrollment success message
# Enable the enrollment success message
self
.
_configure_message_timeout
(
10000
)
self
.
_configure_message_timeout
(
10000
)
# Enable donations
DonationConfiguration
(
enabled
=
True
)
.
save
()
# Create the course mode(s)
# Create the course mode(s)
for
mode
in
course_modes
:
for
mode
in
course_modes
:
CourseModeFactory
(
mode_slug
=
mode
,
course_id
=
self
.
course
.
id
)
CourseModeFactory
(
mode_slug
=
mode
,
course_id
=
self
.
course
.
id
)
...
...
lms/static/js/dashboard/donation.js
View file @
12ffe180
...
@@ -100,7 +100,7 @@ var edx = edx || {};
...
@@ -100,7 +100,7 @@ var edx = edx || {};
var
html
=
_
.
template
(
$
(
"#donation-tpl"
).
html
(),
{});
var
html
=
_
.
template
(
$
(
"#donation-tpl"
).
html
(),
{});
this
.
$el
.
html
(
html
);
this
.
$el
.
html
(
html
);
this
.
$amount
=
$
(
"input[name=
\"
amount
\"
]"
,
this
.
$el
);
this
.
$amount
=
$
(
"input[name=
\"
amount
\"
]"
,
this
.
$el
);
this
.
$submit
=
$
(
"
button[type=
\"
submit
\"
]
"
,
this
.
$el
);
this
.
$submit
=
$
(
"
.action-donate
"
,
this
.
$el
);
this
.
$errorMsg
=
$
(
".donation-error-msg"
,
this
.
$el
);
this
.
$errorMsg
=
$
(
".donation-error-msg"
,
this
.
$el
);
this
.
$paymentForm
=
$
(
".payment-form"
,
this
.
$el
);
this
.
$paymentForm
=
$
(
".payment-form"
,
this
.
$el
);
this
.
$submit
.
click
(
this
.
donate
);
this
.
$submit
.
click
(
this
.
donate
);
...
...
lms/static/sass/multicourse/_dashboard.scss
View file @
12ffe180
...
@@ -1188,14 +1188,14 @@
...
@@ -1188,14 +1188,14 @@
}
}
.amount
{
.amount
{
padding
:
$baseline
(
$baseline
/
2
)
;
height
:
40px
;
width
:
80px
;
width
:
80px
;
vertical-align
:
middle
;
vertical-align
:
middle
;
text-align
:
left
;
text-align
:
left
;
border
:
2px
;
border
:
2px
solid
$white
;
&
.validation-error
{
&
.validation-error
{
border
:
2px
solid
$
pink
;
border
:
2px
solid
$
error-color
;
}
}
}
}
...
...
lms/templates/dashboard/donation.underscore
View file @
12ffe180
...
@@ -4,4 +4,4 @@
...
@@ -4,4 +4,4 @@
<input class="amount" type="text" name="amount" value="25" />
<input class="amount" type="text" name="amount" value="25" />
<button class="btn action-primary action-donate" type="submit" name="Donate"><%- gettext('Donate') %></button>
<button class="btn action-primary action-donate" type="submit" name="Donate"><%- gettext('Donate') %></button>
</form>
</form>
<form class="payment-form"></form>
<form class="payment-form"></form>
\ No newline at end of file
lms/templates/enrollment/course_enrollment_message.html
View file @
12ffe180
...
@@ -16,11 +16,11 @@
...
@@ -16,11 +16,11 @@
</div>
</div>
</div>
</div>
% if course_msg["allow_donation"]:
% if course_msg["allow_donation"]:
<div
class=
"nav-actions donate-actions"
>
<div
class=
"nav-actions donate-actions"
>
<h3
class=
"sr"
>
${_('Donation Actions')}
</h3>
<h3
class=
"sr"
>
${_('Donation Actions')}
</h3>
<div
class=
"donate-container"
data-course=
"${ course_msg['course_id'] }"
></div>
<div
class=
"donate-container"
data-course=
"${ course_msg['course_id'] }"
></div>
</div>
</div>
% endif
% endif
</div>
</div>
</div>
</div>
% endfor
% endfor
\ No newline at end of file
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