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
f3700127
Commit
f3700127
authored
Jan 10, 2014
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up the e-mail settings.
parent
a3f1f660
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
lms/djangoapps/linkedin/management/commands/linkedin_mailusers.py
+2
-2
lms/djangoapps/linkedin/management/commands/tests/test_mailusers.py
+2
-2
lms/templates/linkedin/linkedin_email.html
+1
-1
No files found.
lms/djangoapps/linkedin/management/commands/linkedin_mailusers.py
View file @
f3700127
...
@@ -89,7 +89,7 @@ class Command(BaseCommand):
...
@@ -89,7 +89,7 @@ class Command(BaseCommand):
'gf'
if
grandfather
else
'T'
])
'gf'
if
grandfather
else
'T'
])
query
=
[
query
=
[
(
'pfCertificationName'
,
certificate
.
name
),
(
'pfCertificationName'
,
certificate
.
name
),
(
'pfAuthorityName'
,
se
lf
.
api
.
config
[
'COMPANY_NAME'
]
),
(
'pfAuthorityName'
,
se
ttings
.
PLATFORM_NAME
),
(
'pfAuthorityId'
,
self
.
api
.
config
[
'COMPANY_ID'
]),
(
'pfAuthorityId'
,
self
.
api
.
config
[
'COMPANY_ID'
]),
(
'pfCertificationUrl'
,
certificate
.
download_url
),
(
'pfCertificationUrl'
,
certificate
.
download_url
),
(
'pfLicenseNo'
,
certificate
.
course_id
),
(
'pfLicenseNo'
,
certificate
.
course_id
),
...
@@ -152,6 +152,6 @@ class Command(BaseCommand):
...
@@ -152,6 +152,6 @@ class Command(BaseCommand):
"""
"""
Send an email.
Send an email.
"""
"""
fromaddr
=
se
lf
.
api
.
config
[
'EMAIL_FROM'
]
fromaddr
=
se
ttings
.
DEFAULT_FROM_EMAIL
toaddr
=
'
%
s <
%
s>'
%
(
user
.
profile
.
name
,
user
.
email
)
toaddr
=
'
%
s <
%
s>'
%
(
user
.
profile
.
name
,
user
.
email
)
send_mail
(
subject
,
body
,
fromaddr
,
(
toaddr
,))
send_mail
(
subject
,
body
,
fromaddr
,
(
toaddr
,))
lms/djangoapps/linkedin/management/commands/tests/test_mailusers.py
View file @
f3700127
...
@@ -16,7 +16,7 @@ from django.test import TestCase
...
@@ -16,7 +16,7 @@ from django.test import TestCase
from
xmodule.modulestore.tests.factories
import
CourseFactory
from
xmodule.modulestore.tests.factories
import
CourseFactory
from
student.models
import
UserProfile
from
student.models
import
UserProfile
from
linkedin.models
import
LinkedIn
from
linkedin.models
import
LinkedIn
from
xmodule.modulestore.tests.django_utils
import
ModuleStoreTestCase
,
mixed_store_config
from
xmodule.modulestore.tests.django_utils
import
mixed_store_config
from
linkedin.management.commands
import
linkedin_mailusers
as
mailusers
from
linkedin.management.commands
import
linkedin_mailusers
as
mailusers
MODULE
=
'linkedin.management.commands.linkedin_mailusers.'
MODULE
=
'linkedin.management.commands.linkedin_mailusers.'
...
@@ -80,7 +80,7 @@ class MailusersTests(TestCase):
...
@@ -80,7 +80,7 @@ class MailusersTests(TestCase):
self
.
assertEqual
(
self
.
assertEqual
(
json
.
loads
(
self
.
barney
.
linkedin
.
emailed_courses
),
[
'TESTX/3/TEST3'
])
json
.
loads
(
self
.
barney
.
linkedin
.
emailed_courses
),
[
'TESTX/3/TEST3'
])
self
.
assertEqual
(
len
(
mail
.
outbox
),
3
)
self
.
assertEqual
(
len
(
mail
.
outbox
),
3
)
self
.
assertEqual
(
mail
.
outbox
[
0
]
.
from_email
,
'The Team <team@test.foo>'
)
self
.
assertEqual
(
mail
.
outbox
[
0
]
.
from_email
,
settings
.
DEFAULT_FROM_EMAIL
)
self
.
assertEqual
(
self
.
assertEqual
(
mail
.
outbox
[
0
]
.
to
,
[
'Fred Flintstone <fred@bedrock.gov>'
])
mail
.
outbox
[
0
]
.
to
,
[
'Fred Flintstone <fred@bedrock.gov>'
])
self
.
assertEqual
(
self
.
assertEqual
(
...
...
lms/templates/linkedin/linkedin_email.html
View file @
f3700127
...
@@ -643,7 +643,7 @@
...
@@ -643,7 +643,7 @@
<br>
<br>
## TODO put path/to/real/source/file here
## TODO put path/to/real/source/file here
<div
align=
"right"
><a
href=
"${linkedin_add_url}"
style=
"font-size: 12px;word-wrap: break-word;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #126f9a;font-weight: normal;text-decoration: underline;"
target=
"_blank"
><img
align=
"none"
src=
"
file://localhost/Users/sarina/Desktop
/linkedin_add_to_profile.png"
></a></div>
<div
align=
"right"
><a
href=
"${linkedin_add_url}"
style=
"font-size: 12px;word-wrap: break-word;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #126f9a;font-weight: normal;text-decoration: underline;"
target=
"_blank"
><img
align=
"none"
src=
"/linkedin_add_to_profile.png"
></a></div>
</td>
</td>
</tr>
</tr>
</tbody></table>
</tbody></table>
...
...
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