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
e7b35904
Commit
e7b35904
authored
Oct 05, 2017
by
Tyler Hallada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add verified cert image to email template
Make image url in the task and pass to template
parent
9876f597
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
16 deletions
+32
-16
openedx/core/djangoapps/schedules/tasks.py
+2
-0
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/upgradereminder/email/body.html
+30
-16
No files found.
openedx/core/djangoapps/schedules/tasks.py
View file @
e7b35904
...
@@ -6,6 +6,7 @@ from celery.task import task
...
@@ -6,6 +6,7 @@ from celery.task import task
from
django.conf
import
settings
from
django.conf
import
settings
from
django.contrib.auth.models
import
User
from
django.contrib.auth.models
import
User
from
django.contrib.sites.models
import
Site
from
django.contrib.sites.models
import
Site
from
django.contrib.staticfiles.templatetags.staticfiles
import
static
from
django.core.exceptions
import
ValidationError
from
django.core.exceptions
import
ValidationError
from
django.core.urlresolvers
import
reverse
from
django.core.urlresolvers
import
reverse
from
django.db.models
import
F
,
Min
from
django.db.models
import
F
,
Min
...
@@ -285,6 +286,7 @@ def _upgrade_reminder_schedules_for_bin(target_day, bin_num, org_list, exclude_o
...
@@ -285,6 +286,7 @@ def _upgrade_reminder_schedules_for_bin(target_day, bin_num, org_list, exclude_o
# This is used by the bulk email optout policy
# This is used by the bulk email optout policy
'course_ids'
:
course_id_strs
,
'course_ids'
:
course_id_strs
,
'cert_image'
:
absolute_url
(
static
(
'course_experience/images/verified-cert.png'
)),
})
})
yield
(
user
,
first_schedule
.
enrollment
.
course
.
language
,
template_context
)
yield
(
user
,
first_schedule
.
enrollment
.
course
.
language
,
template_context
)
...
...
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/upgradereminder/email/body.html
View file @
e7b35904
{% extends 'schedules/edx_ace/common/base_body.html' %}
{% extends 'schedules/edx_ace/common/base_body.html' %}
{% load i18n %}
{% load i18n %}
{% load static %}
{% block preview_text %}
{% block preview_text %}
{% blocktrans trimmed %}
{% blocktrans trimmed %}
...
@@ -29,26 +30,39 @@
...
@@ -29,26 +30,39 @@
{% endblocktrans %}
{% endblocktrans %}
</p>
</p>
<a
href=
"{{ course_url }}"
>
<img
src=
"{{ cert_image }}"
alt=
"{% blocktrans %}Example print-out of a verified certificate{% endblocktrans %}"
style=
"
display: block;
margin-right: auto;
margin-left: auto;
margin-top: 50px;
margin-bottom: 50px;
border-top: 1px solid lightgray;
border-bottom: 3px solid lightgray;
border-right: 3px solid lightgray;
border-left: 1px solid lightgray;
"
/>
</a>
<p>
<p>
<!-- email client support for style sheets is pretty spotty, so we have to inline all of these styles -->
<!-- email client support for style sheets is pretty spotty, so we have to inline all of these styles -->
<a
<a
{%
if
course_ids
|
length
>
1 %}
href="{{ dashboard_url }}"
{% else %}
href=
"{{ course_url }}"
href=
"{{ course_url }}"
{% endif %}
style=
"
style="
color: #ffffff;
color: #ffffff;
text-decoration: none;
text-decoration: none;
border-radius: 4px;
border-radius: 4px;
-webkit-border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-moz-border-radius: 4px;
background-color: #005686;
background-color: #005686;
border-top: 10px solid #005686;
border-top: 10px solid #005686;
border-bottom: 10px solid #005686;
border-bottom: 10px solid #005686;
border-right: 16px solid #005686;
border-right: 16px solid #005686;
border-left: 16px solid #005686;
border-left: 16px solid #005686;
display: inline-block;
display: inline-block;
"
>
"
>
<!-- old email clients require the use of the font tag :( -->
<!-- old email clients require the use of the font tag :( -->
<font
color=
"#ffffff"
><b>
{% trans "Upgrade now" %}
</b></font>
<font
color=
"#ffffff"
><b>
{% trans "Upgrade now" %}
</b></font>
...
...
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