Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions data_fixtures/migrations/0015_unit_page_copy_updates.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Generated by Django 4.2.14 on 2024-07-16 17:30

from django.db import migrations

fixtures = [
{
"name": "mitpe",
"offeror_configuration": {
"value_prop": (
"MIT Professional Education is a leader in technology and "
"engineering education for working professionals pursuing "
"career advancement, and organizations seeking to meet modern-day "
"challenges by expanding the knowledge and skills of their employees. "
"Courses are delivered in a range of formats—in-person (on-campus "
"and live online), online, and through hybrid approaches—to "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this right? approaches—to? Not approaches to?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea - not easily visible on github but its a long dash approaches—to https://rc.learn.mit.edu/c/unit/mitpe/

"meet the needs of today's learners."
),
},
"channel_configuration": {
"sub_heading": (
"MIT Professional Education is a leader in technology and "
"engineering education for working professionals pursuing "
"career advancement, and organizations seeking to meet modern-day "
"challenges by expanding the knowledge and skills of their employees. "
"Courses are delivered in a range of formats—in-person (on-campus "
"and live online), online, and through hybrid approaches—to "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

"meet the needs of today's learners."
),
},
},
]


def update_copy(apps, schema_editor):
Channel = apps.get_model("channels", "Channel")
LearningResourceOfferor = apps.get_model(
"learning_resources", "LearningResourceOfferor"
)
for fixture in fixtures:
channel_configuration_updates = fixture["channel_configuration"]
offeror_configuration_updates = fixture["offeror_configuration"]
channel = Channel.objects.get(name=fixture["name"])
if Channel.objects.filter(name=fixture["name"]).exists():
for key, val in channel_configuration_updates.items():
channel.configuration[key] = val
channel.save()
if LearningResourceOfferor.objects.filter(code=fixture["name"]).exists():
offeror = LearningResourceOfferor.objects.get(code=fixture["name"])
for key, val in offeror_configuration_updates.items():
setattr(offeror, key, val)
offeror.save()


class Migration(migrations.Migration):
dependencies = [
("data_fixtures", "0014_add_department_SP"),
]

operations = [
migrations.RunPython(update_copy, migrations.RunPython.noop),
]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed frontends/mit-learn/public/images/mit-logo-learn.jpg
Binary file not shown.
87 changes: 57 additions & 30 deletions main/templates/email/email_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -249,49 +249,76 @@
<tr>
<td>
<![endif]-->

<!-- Email Body : BEGIN -->
<!-- Email Header : BEGIN -->
<table
role="presentation"
cellspacing="0"
cellpadding="0"
border="0"
width="100%"
style="margin: 0 auto"
style="font-size: 12px"
>
<!-- Email Header : BEGIN -->
<tr>
<td style="padding: 20px">
{% block logo %}
<h1 style="text-align: center">
<img
src="{{ABSOLUTE_STATIC_URL}}images/mit-logo-learn.jpg"
width="113"
height="32"
alt="MIT-Learn"
style="
height: 32px;
width: 113px;
background: #ffffff;
font-family: sans-serif;
font-size: 15px;
line-height: 15px;
display: block;
color: #a31f34;
margin: 0 auto;
margin-bottom: -10px;
"
/>
</h1>
{% endblock %}
<tr style="margin-top: 32px; margin-bottom: 32px">
<td style="text-align: left; padding: 20px">
<img
src="{{ABSOLUTE_STATIC_URL}}images/mit-learn-logo.jpg"
width="113"
height="32"
alt="MIT-Learn"
style="
height: 24px;
width: 134px;
background: #ffffff;
font-family: sans-serif;
font-size: 15px;
line-height: 15px;
display: block;
color: #a31f34;
"
/>
</td>
<td></td>
<td style="text-align: right; padding: 20px">
<img
src="{{ABSOLUTE_STATIC_URL}}images/mit-block-logo.jpg"
width="113"
height="32"
alt="MIT-Learn"
style="
height: 24px;
width: 45px;
background: #ffffff;
font-family: sans-serif;
font-size: 15px;
line-height: 15px;
display: block;
color: #a31f34;
float: right;
"
/>
</td>
</tr>
</table>
<!-- Email Header : END -->
<!--[if mso]>
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="680">
<tr>
<td>
<![endif]-->
<!-- Email Body : BEGIN -->
<table
role="presentation"
cellspacing="0"
cellpadding="0"
border="0"
width="100%"
style="margin: 0 auto"
>
<tr>
<td>
<p style="border-top: 1px solid #f3f4f8"></p>
</td>
</tr>
<!-- Email Header : END -->

{% block content %}{% endblock %}

Expand Down Expand Up @@ -332,7 +359,7 @@ <h1 style="text-align: center">

If you don't want to receive these emails in the future, you can
<a
href="{{APP_BASE_URL}}dashboard/settings"
href="{{APP_BASE_URL}}/dashboard/settings/"
style="text-decoration: underline"
>unsubscribe</a
>. <br /><br />
Expand Down
2 changes: 1 addition & 1 deletion main/templates/email/subscribed_channel_digest.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
>
<h4
style="
margin: 0 0 10px;
margin: 0 0 48px;
font-size: 24px;
line-height: 20px;
font-weight: bold;
Expand Down
Loading