Skip to content

Commit 3608d9f

Browse files
committed
Merge branch 'master' into problemblock-refactor
2 parents aef446c + b2376c5 commit 3608d9f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+687
-1458
lines changed

cms/djangoapps/contentstore/tests/test_utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from common.djangoapps.student.models import CourseEnrollment
2626
from common.djangoapps.student.tests.factories import GlobalStaffFactory, InstructorFactory, UserFactory
2727
from openedx.core.djangoapps.notifications.config.waffle import ENABLE_NOTIFICATIONS
28-
from openedx.core.djangoapps.notifications.models import CourseNotificationPreference, Notification
28+
from openedx.core.djangoapps.notifications.models import Notification
2929
from openedx.core.djangoapps.site_configuration.tests.test_util import with_site_configuration_context
3030
from xmodule.modulestore import ModuleStoreEnum # lint-amnesty, pylint: disable=wrong-import-order
3131
from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order
@@ -954,7 +954,6 @@ def setUp(self):
954954
super().setUp()
955955
self.user = UserFactory()
956956
self.course = CourseFactory.create(org='testorg', number='testcourse', run='testrun')
957-
CourseNotificationPreference.objects.create(user_id=self.user.id, course_id=self.course.id)
958957

959958
def test_course_update_notification_sent(self):
960959
"""

common/static/sass/_builtin-block-variables.scss

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
@import 'bourbon/bourbon';
99
@import 'lms/theme/variables';
1010
@import 'lms/theme/variables-v1';
11+
@import 'lms/static/sass/discussion/utilities/_variables-bootstrap.scss';
1112
@import 'cms/static/sass/partials/cms/theme/_variables';
1213
@import 'cms/static/sass/partials/cms/theme/_variables-v1';
1314
@import 'bootstrap/scss/variables';
@@ -16,6 +17,8 @@
1617

1718
:root {
1819
--action-primary-active-bg: $action-primary-active-bg;
20+
--actions-dropdown-width: $actions-dropdown-width;
21+
--actions-dropdown-offset: $actions-dropdown-offset;
1922
--base-font-size: $base-font-size;
2023
--base-line-height: $base-line-height;
2124
--baseline: $baseline;
@@ -28,17 +31,48 @@
2831
--blue-s1: $blue-s1;
2932
--body-color: $body-color;
3033
--border-color: $border-color;
34+
--border-color-4:$border-color-4;
3135
--bp-screen-lg: $bp-screen-lg;
3236
--btn-brand-focus-background: $btn-brand-focus-background;
3337
--correct: $correct;
38+
--comment-image-dimension: $comment-image-dimension;
39+
--container-max-widths-xl: map-get($container-max-widths, xl);
3440
--danger: $danger;
3541
--darkGrey: $darkGrey;
3642
--error-color: $error-color;
3743
--error-color-dark: darken($error-color, 11%);
3844
--error-color-light: lighten($error-color, 25%);
3945
--font-bold: $font-bold;
4046
--font-family-sans-serif: $font-family-sans-serif;
47+
--forum-color-active-thread: $forum-color-active-thread;
48+
--forum-color-hover: $forum-color-hover;
49+
--forum-color-active-text: $forum-color-active-text;
50+
--forum-color-background: $forum-color-background;
51+
--forum-x-large-font-size: $forum-x-large-font-size;
52+
--forum-color-copy-light: $forum-color-copy-light;
53+
--forum-large-font-size: $forum-large-font-size;
54+
--forum-border-radius: $forum-border-radius;
55+
--forum-base-font-size: $forum-base-font-size;
56+
--forum-small-font-size: $forum-small-font-size;
57+
--forum-color-border: $forum-color-border;
58+
--forum-color-background-light: $forum-color-background-light;
59+
--forum-color-editor-preview-label: $forum-color-editor-preview-label;
60+
--forum-color-following: $forum-color-following;
61+
--forum-color-error: $forum-color-error;
62+
--forum-color-pinned: $forum-color-pinned;
63+
--forum-color-reported: $forum-color-reported;
64+
--forum-color-closed: $forum-color-closed;
65+
--forum-color-staff: $forum-color-staff;
66+
--forum-color-community-ta: $forum-color-community-ta;
67+
--forum-color-response-count: $forum-color-response-count;
68+
--forum-color-read-post: $forum-color-read-post;
69+
--forum-color-hover-thread: $forum-color-hover-thread;
70+
--forum-color-reading-thread: $forum-color-reading-thread;
71+
--forum-color-never-read-post: $forum-color-never-read-post;
72+
--forum-color-navigation-bar: $forum-color-navigation-bar;
73+
--forum-color-primary: $forum-color-primary;
4174
--general-color-accent: $general-color-accent;
75+
--green: $green;
4276
--gray: $gray;
4377
--gray-300: $gray-300;
4478
--gray-d1: $gray-d1;
@@ -56,15 +90,20 @@
5690
--lightGrey: $lightGrey;
5791
--lighter-base-font-color: $lighter-base-font-color;
5892
--link-color: $link-color;
93+
--line-height-base:$line-height-base;
5994
--medium-font-size: $medium-font-size;
95+
--pink:$pink;
6096
--partially-correct: $partially-correct;
6197
--primary: $primary;
98+
--post-image-dimension: $post-image-dimension;
99+
--response-image-dimension: $response-image-dimension;
62100
--shadow: $shadow;
63101
--shadow-l1: $shadow-l1;
64102
--sidebar-color: $sidebar-color;
65103
--small-font-size: $small-font-size;
66104
--submitted: $submitted;
67105
--success: $success;
106+
--serif:$serif;
68107
--tmg-f2: $tmg-f2;
69108
--tmg-s2: $tmg-s2;
70109
--transparent: $transparent;

lms/static/sass/base/_base.scss

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66
// }
77

88
html {
9-
font-family: $font-family-sans-serif;
9+
font-family: var(--font-family-sans-serif);
1010
font-style: normal;
1111
line-height: 1em;
1212
background: theme-color("inverse");
1313

1414
}
1515

1616
body {
17-
font-family: $font-family-sans-serif;
17+
font-family: var(--font-family-sans-serif);
1818
font-style: normal;
19-
font-size: $font-size-base;
19+
font-size: var(--font-size-base);
2020
line-height: 1em;
21-
background: $body-bg;
21+
background: var(--body-bg);
2222

2323
}
2424

@@ -33,29 +33,29 @@ h3,
3333
h4,
3434
h5,
3535
h6 {
36-
color: $body-color;
37-
font: normal 1.2em/1.2em $serif;
36+
color: var(--body-color);
37+
font: normal 1.2em/1.2em var(--serif);
3838
margin: 0;
3939
}
4040

4141
h1 {
42-
color: $body-color;
43-
font: normal 2em/1.4em $font-family-sans-serif;
44-
margin-bottom: ($baseline*1.5);
42+
color: var(--body-color);
43+
font: normal 2em/1.4em var(--font-family-sans-serif);
44+
margin-bottom: calc(var(--baseline) * 1.5);
4545
text-align: center;
4646
}
4747

4848
h2 {
49-
color: $lighter-base-font-color;
50-
font: normal 1.2em/1.2em $serif;
51-
margin-bottom: ($baseline*0.75);
49+
color: var(--lighter-base-font-color);
50+
font: normal 1.2em/1.2em var(--serif);
51+
margin-bottom: calc(var(--baseline) * 0.75);
5252
-webkit-font-smoothing: antialiased;
5353
}
5454

5555
p + h2,
5656
ul + h2,
5757
ol + h2 {
58-
margin-top: ($baseline*2);
58+
margin-top: calc(var(--baseline) * 2);
5959
}
6060

6161
p {
@@ -78,20 +78,20 @@ span {
7878
}
7979

8080
.text-dark-grey {
81-
color: $dark-gray1;
81+
color: var(--dark-gray1);
8282
font-size: 24px;
8383
}
8484

8585
p + p,
8686
ul + p,
8787
ol + p {
88-
margin-top: $baseline;
88+
margin-top: var(--baseline);
8989
}
9090

9191
p {
9292
a:not(.btn),
9393
a:visited:not(.btn) {
94-
color: $link-color;
94+
color: var(--link-color);
9595
font: inherit;
9696
font-weight: inherit;
9797
text-decoration: none;
@@ -108,7 +108,7 @@ p {
108108

109109
a:not(.btn),
110110
a:visited:not(.btn) {
111-
color: $link-color;
111+
color: var(--link-color);
112112
font: inherit;
113113
text-decoration: none;
114114

@@ -131,12 +131,12 @@ a:visited:not(.btn) {
131131
}
132132

133133
.content-wrapper {
134-
margin: $baseline auto 0 auto;
135-
max-width: map-get($container-max-widths, xl);
136-
padding: 0 0 $baseline/2;
134+
margin: var(--baseline) auto 0 auto;
135+
max-width: var(--container-max-widths-xl);
136+
padding: 0 0 calc(var(--baseline) / 2);
137137

138138
@include media-breakpoint-up(md) {
139-
padding: 0 $baseline $baseline/2;
139+
padding: 0 var(--baseline) calc(var(--baseline) / 2);
140140
}
141141

142142
@media print {
@@ -151,7 +151,7 @@ a:visited:not(.btn) {
151151

152152
@include media-breakpoint-up(md) {
153153
margin: 0 auto;
154-
padding: ($baseline*2) 0;
154+
padding: calc(var(--baseline) * 2) 0;
155155
max-width: grid-width(12);
156156
min-width: 760px;
157157
width: flex-grid(12);
@@ -171,8 +171,8 @@ span.edx {
171171
@include clearfix();
172172

173173
margin: 0 auto;
174-
max-width: map-get($container-max-widths, xl);
175-
padding: ($baseline*3) 0 ($baseline*6);
174+
max-width: var(--container-max-widths-xl);
175+
padding: calc(var(--baseline) * 3) 0 calc(var(--baseline) * 6);
176176
width: flex-grid(12);
177177

178178
.inner-wrapper {
@@ -185,29 +185,29 @@ span.edx {
185185
list-style: disc;
186186

187187
li {
188-
color: $body-color;
189-
font: normal 1em/1.4em $serif;
188+
color: var(--body-color);
189+
font: normal 1em/1.4em var(--serif);
190190
margin: 0;
191191
}
192192
}
193193

194194
h1 {
195-
margin-bottom: ($baseline*1.5);
195+
margin-bottom: calc(var(--baseline) * 1.5);
196196
}
197197

198198
h1 + hr {
199-
margin-bottom: ($baseline*3);
199+
margin-bottom: calc(var(--baseline) * 3);
200200
}
201201

202202
p + h2,
203203
ul + h2,
204204
ol + h2 {
205-
margin-top: ($baseline*2);
205+
margin-top: calc(var(--baseline) * 2);
206206
}
207207

208208
ul + p,
209209
ol + p {
210-
margin-top: $baseline;
210+
margin-top: var(--baseline);
211211
}
212212
}
213213

@@ -227,13 +227,13 @@ mark {
227227

228228
.ie-banner {
229229
display: none;
230-
max-width: map-get($container-max-widths, xl);
230+
max-width: var(--container-max-widths-xl);
231231
min-width: 720px;
232232
margin: auto;
233233
border-radius: 0 0 3px 3px;
234234
background: #f4f4e0;
235235
color: #3c3c3c;
236-
padding: ($baseline/4) $baseline 8px;
236+
padding: calc(var(--baseline) / 4) var(--baseline) 8px;
237237
font-size: 13px;
238238
text-align: center;
239239

@@ -274,19 +274,19 @@ mark {
274274
display: inline-block;
275275
position: absolute;
276276
left: 0;
277-
top: -($baseline*30);
277+
top: calc(-1 * var(--baseline) * 30);
278278
overflow: hidden;
279-
background: $white;
280-
border-bottom: 1px solid $border-color-4;
281-
padding: ($baseline*0.75) 0;
279+
background: var(--white);
280+
border-bottom: 1px solid var(--border-color-4);
281+
padding: calc(var(--baseline) * 0.75) 0;
282282

283283
&:focus,
284284
&:active {
285285
@include left(45%);
286-
@include margin-left(-1 * $baseline * 1.5);
286+
@include margin-left(calc( -1 * var(--baseline) * 1.5));
287287

288288
position: absolute;
289-
top: $baseline/4;
289+
top: calc(var(--baseline) / 4);
290290
width: 10%;
291291
height: auto;
292292
background-color: black;

lms/static/sass/discussion/_discussion-v1.scss

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
);
1313

1414
display: inline-block;
15-
border: 1px solid $forum-color-active-thread;
15+
border: 1px solid var(--forum-color-active-thread);
1616
border-radius: 3px;
1717
margin: 0;
1818
background-image: none;
1919
box-shadow: none;
2020
height: 40px;
2121
text-shadow: none;
22-
font-family: $font-family-sans-serif; // without this, it would fallback to lms button tag style
22+
font-family: var(--font-family-sans-serif); // without this, it would fallback to lms button tag style
2323
font-size: 14px;
2424
font-weight: 600;
2525
word-wrap: break-word;
@@ -44,11 +44,11 @@
4444
&:focus {
4545
// Note:these rules all need !important in order to beat out
4646
// the base button styling defined in the courseware.
47-
border-color: $forum-color-hover !important;
48-
background-color: $forum-color-hover !important;
47+
border-color: var(--forum-color-hover) !important;
48+
background-color: var(--forum-color-hover) !important;
4949
background-image: none !important;
5050
box-shadow: none !important;
51-
color: $forum-color-active-text !important;
51+
color: var(--forum-color-active-text) !important;
5252
text-decoration: none !important; // Don't show underlines on links that are styled as buttons
5353
}
5454
}
@@ -59,15 +59,15 @@
5959
.btn {
6060
@extend %pattern-library-btn;
6161

62-
background-color: $forum-color-background;
63-
color: $forum-color-active-thread;
62+
background-color: var(--forum-color-background);
63+
color: var(--forum-color-active-thread);
6464
}
6565

6666
.btn-brand {
6767
@extend %pattern-library-btn;
6868

69-
background-color: $forum-color-active-thread;
70-
color: $forum-color-active-text;
69+
background-color: var(--forum-color-active-thread);
70+
color: var(--forum-color-active-text);
7171
}
7272
}
7373

0 commit comments

Comments
 (0)