From 55aeca65c2f1382c6b4a3b7f3f7e9de9f6fe94bc Mon Sep 17 00:00:00 2001 From: farhan Date: Thu, 24 Oct 2024 16:28:10 +0500 Subject: [PATCH 01/11] feat!: Dropping Sass support from builtin poll block, replacing with vanilla CSS --- xmodule/assets/poll/_display.scss | 16 +- xmodule/poll_block.py | 4 +- .../css-builtin-blocks/PollBlockDisplay.css | 221 ++++++++++++++++++ 3 files changed, 231 insertions(+), 10 deletions(-) create mode 100644 xmodule/static/css-builtin-blocks/PollBlockDisplay.css diff --git a/xmodule/assets/poll/_display.scss b/xmodule/assets/poll/_display.scss index 7c07f89376b2..7c9b21bf205e 100644 --- a/xmodule/assets/poll/_display.scss +++ b/xmodule/assets/poll/_display.scss @@ -20,13 +20,13 @@ div.poll_question { h3 { margin-top: 0; - margin-bottom: ($baseline*0.75); + margin-bottom: calc((var(--baseline)*0.75)); color: #fe57a1; font-size: 1.9em; &.problem-header { div.staff { - margin-top: ($baseline*1.5); + margin-top: calc((var(--baseline)*1.5)); font-size: 80%; } } @@ -44,7 +44,7 @@ div.poll_question { } .poll_answer { - margin-bottom: $baseline; + margin-bottom: var(--baseline); &.short { clear: both; @@ -107,7 +107,7 @@ div.poll_question { font-weight: bold; letter-spacing: normal; line-height: 25.59375px; - margin-bottom: ($baseline*0.75); + margin-bottom: calc((var(--baseline)*0.75)); margin: 0; padding: 0px; text-align: center; @@ -145,9 +145,9 @@ div.poll_question { width: 80%; text-align: left; min-height: 30px; - margin-left: $baseline; + margin-left: var(--baseline); height: auto; - margin-bottom: $baseline; + margin-bottom: var(--baseline); &.short { width: 100px; @@ -157,7 +157,7 @@ div.poll_question { .stats { min-height: 40px; - margin-top: $baseline; + margin-top: var(--baseline); clear: both; &.short { @@ -174,7 +174,7 @@ div.poll_question { border: 1px solid black; display: inline; float: left; - margin-right: ($baseline/2); + margin-right: calc((var(--baseline)/2)); &.short { width: 65%; diff --git a/xmodule/poll_block.py b/xmodule/poll_block.py index f09889f506e6..a1c9686f42ac 100644 --- a/xmodule/poll_block.py +++ b/xmodule/poll_block.py @@ -21,7 +21,7 @@ from openedx.core.djangolib.markup import Text, HTML from xmodule.mako_block import MakoTemplateBlockBase from xmodule.stringify import stringify_children -from xmodule.util.builtin_assets import add_webpack_js_to_fragment, add_sass_to_fragment +from xmodule.util.builtin_assets import add_webpack_js_to_fragment, add_css_to_fragment from xmodule.x_module import ( ResourceTemplates, shim_xmodule_js, @@ -136,7 +136,7 @@ def student_view(self, _context): 'configuration_json': self.dump_poll(), } fragment.add_content(self.runtime.service(self, 'mako').render_lms_template('poll.html', params)) - add_sass_to_fragment(fragment, 'PollBlockDisplay.scss') + add_css_to_fragment(fragment, 'PollBlockDisplay.css') add_webpack_js_to_fragment(fragment, 'PollBlockDisplay') shim_xmodule_js(fragment, 'Poll') return fragment diff --git a/xmodule/static/css-builtin-blocks/PollBlockDisplay.css b/xmodule/static/css-builtin-blocks/PollBlockDisplay.css new file mode 100644 index 000000000000..f617dc960d38 --- /dev/null +++ b/xmodule/static/css-builtin-blocks/PollBlockDisplay.css @@ -0,0 +1,221 @@ +@import url("https://fonts.googleapis.com/css?family=Open+Sans:300,400,400i,600,700"); + +.xmodule_display.xmodule_PollBlock { + /* stylelint-disable-line */ + /* stylelint-disable-line */ +} + +@media print { + .xmodule_display.xmodule_PollBlock div.poll_question { + display: block; + width: auto; + padding: 0; + } + + .xmodule_display.xmodule_PollBlock div.poll_question canvas, .xmodule_display.xmodule_PollBlock div.poll_question img { + page-break-inside: avoid; + } +} + +.xmodule_display.xmodule_PollBlock div.poll_question .inline { + display: inline; +} + +.xmodule_display.xmodule_PollBlock div.poll_question h3 { + margin-top: 0; + margin-bottom: calc((var(--baseline) * 0.75)); + color: #fe57a1; + font-size: 1.9em; +} + +.xmodule_display.xmodule_PollBlock div.poll_question h3.problem-header div.staff { + margin-top: calc((var(--baseline) * 1.5)); + font-size: 80%; +} + +@media print { + .xmodule_display.xmodule_PollBlock div.poll_question h3 { + display: block; + width: auto; + border-right: 0; + } +} + +.xmodule_display.xmodule_PollBlock div.poll_question p { + text-align: justify; + font-weight: bold; +} + +.xmodule_display.xmodule_PollBlock div.poll_question .poll_answer { + margin-bottom: var(--baseline); +} + +.xmodule_display.xmodule_PollBlock div.poll_question .poll_answer.short { + clear: both; +} + +.xmodule_display.xmodule_PollBlock div.poll_question .poll_answer .question { + height: auto; + clear: both; + min-height: 30px; +} + +.xmodule_display.xmodule_PollBlock div.poll_question .poll_answer .question.short { + clear: none; + width: 30%; + display: inline; + float: left; +} + +.xmodule_display.xmodule_PollBlock div.poll_question .poll_answer .question .button { + -webkit-appearance: none; + -webkit-background-clip: padding-box; + -webkit-border-image: none; + -webkit-box-align: center; + -webkit-box-shadow: white 0px 1px 0px 0px inset; + -webkit-font-smoothing: antialiased; + -webkit-rtl-ordering: logical; + -webkit-user-select: text; + -webkit-writing-mode: horizontal-tb; + background-clip: padding-box; + background-color: #eeeeee; + background-image: -webkit-linear-gradient(top, #eeeeee, #d2d2d2); + border-bottom-color: #cacaca; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; + border-bottom-style: solid; + border-bottom-width: 1px; + border-left-color: #cacaca; + border-left-style: solid; + border-left-width: 1px; + border-right-color: #cacaca; + border-right-style: solid; + border-right-width: 1px; + border-top-color: #cacaca; + border-top-left-radius: 3px; + border-top-right-radius: 3px; + border-top-style: solid; + border-top-width: 1px; + box-shadow: white 0px 1px 0px 0px inset; + box-sizing: border-box; + color: #333333; + /* display: inline-block; */ + display: inline; + float: left; + font-family: 'Open Sans', Verdana, Geneva, sans-serif; + font-size: 13px; + font-style: normal; + font-variant: normal; + font-weight: bold; + letter-spacing: normal; + line-height: 25.59375px; + margin-bottom: calc((var(--baseline) * 0.75)); + margin: 0; + padding: 0px; + text-align: center; + text-decoration: none; + text-indent: 0px; + text-shadow: #f8f8f8 0px 1px 0px; + text-transform: none; + vertical-align: top; + white-space: pre-line; + width: 25px; + height: 25px; + word-spacing: 0px; + writing-mode: lr-tb; +} + +.xmodule_display.xmodule_PollBlock div.poll_question .poll_answer .question .button.answered { + -webkit-box-shadow: #61b8e1 0px 1px 0px 0px inset; + background-color: #1d9dd9; + background-image: -webkit-linear-gradient(top, #1d9dd9, #0e7cb0); + border-bottom-color: #0d72a2; + border-left-color: #0d72a2; + border-right-color: #0d72a2; + border-top-color: #0d72a2; + box-shadow: #61b8e1 0px 1px 0px 0px inset; + color: white; + text-shadow: #076794 0px 1px 0px; + background-image: none; +} + +.xmodule_display.xmodule_PollBlock div.poll_question .poll_answer .question .text { + display: inline; + float: left; + width: 80%; + text-align: left; + min-height: 30px; + margin-left: var(--baseline); + height: auto; + margin-bottom: var(--baseline); +} + +.xmodule_display.xmodule_PollBlock div.poll_question .poll_answer .question .text.short { + width: 100px; +} + +.xmodule_display.xmodule_PollBlock div.poll_question .poll_answer .stats { + min-height: 40px; + margin-top: var(--baseline); + clear: both; +} + +.xmodule_display.xmodule_PollBlock div.poll_question .poll_answer .stats.short { + margin-top: 0; + clear: none; + display: inline; + float: right; + width: 70%; +} + +.xmodule_display.xmodule_PollBlock div.poll_question .poll_answer .stats .bar { + width: 75%; + height: 20px; + border: 1px solid black; + display: inline; + float: left; + margin-right: calc((var(--baseline) / 2)); +} + +.xmodule_display.xmodule_PollBlock div.poll_question .poll_answer .stats .bar.short { + width: 65%; + height: 20px; + margin-top: 3px; +} + +.xmodule_display.xmodule_PollBlock div.poll_question .poll_answer .stats .bar .percent { + background-color: gray; + width: 0; + height: 20px; +} + +.xmodule_display.xmodule_PollBlock div.poll_question .poll_answer .stats .number { + width: 80px; + display: inline; + float: right; + height: 28px; + text-align: right; +} + +.xmodule_display.xmodule_PollBlock div.poll_question .poll_answer .stats .number.short { + width: 120px; + height: auto; +} + +.xmodule_display.xmodule_PollBlock div.poll_question .poll_answer.answered { + -webkit-box-shadow: #61b8e1 0 1px 0 0 inset; + background-color: #1d9dd9; + background-image: -webkit-linear-gradient(top, #1d9dd9, #0e7cb0); + border-bottom-color: #0d72a2; + border-left-color: #0d72a2; + border-right-color: #0d72a2; + border-top-color: #0d72a2; + box-shadow: #61b8e1 0 1px 0 0 inset; + color: white; + text-shadow: #076794 0 1px 0; +} + +.xmodule_display.xmodule_PollBlock div.poll_question .button.reset-button { + clear: both; + float: right; +} From 7f1611ed9039b425e5ed094f7160e68f518298c2 Mon Sep 17 00:00:00 2001 From: farhan Date: Fri, 25 Oct 2024 18:35:23 +0500 Subject: [PATCH 02/11] chore: remove scss files related to the poll block --- xmodule/assets/PollBlockDisplay.scss | 3 - xmodule/assets/poll/_display.scss | 226 --------------------------- 2 files changed, 229 deletions(-) delete mode 100644 xmodule/assets/PollBlockDisplay.scss delete mode 100644 xmodule/assets/poll/_display.scss diff --git a/xmodule/assets/PollBlockDisplay.scss b/xmodule/assets/PollBlockDisplay.scss deleted file mode 100644 index 85110778c742..000000000000 --- a/xmodule/assets/PollBlockDisplay.scss +++ /dev/null @@ -1,3 +0,0 @@ -.xmodule_display.xmodule_PollBlock { - @import "poll/display.scss"; -} diff --git a/xmodule/assets/poll/_display.scss b/xmodule/assets/poll/_display.scss deleted file mode 100644 index 7c9b21bf205e..000000000000 --- a/xmodule/assets/poll/_display.scss +++ /dev/null @@ -1,226 +0,0 @@ -@import 'bourbon/bourbon'; -@import 'lms/theme/variables'; -@import 'bootstrap/scss/variables'; -@import 'lms/theme/variables-v1'; - -div.poll_question { - @media print { - display: block; - width: auto; - padding: 0; - - canvas, img { - page-break-inside: avoid; - } - } - - .inline { - display: inline; - } - - h3 { - margin-top: 0; - margin-bottom: calc((var(--baseline)*0.75)); - color: #fe57a1; - font-size: 1.9em; - - &.problem-header { - div.staff { - margin-top: calc((var(--baseline)*1.5)); - font-size: 80%; - } - } - - @media print { - display: block; - width: auto; - border-right: 0; - } - } - - p { - text-align: justify; - font-weight: bold; - } - - .poll_answer { - margin-bottom: var(--baseline); - - &.short { - clear: both; - } - - .question { - height: auto; - clear: both; - min-height: 30px; - - &.short { - clear: none; - width: 30%; - display: inline; - float: left; - } - - .button { - @extend %ui-fake-link; - - -webkit-appearance: none; - -webkit-background-clip: padding-box; - -webkit-border-image: none; - -webkit-box-align: center; - -webkit-box-shadow: rgb(255, 255, 255) 0px 1px 0px 0px inset; - -webkit-font-smoothing: antialiased; - -webkit-rtl-ordering: logical; - -webkit-user-select: text; - -webkit-writing-mode: horizontal-tb; - background-clip: padding-box; - background-color: rgb(238, 238, 238); - background-image: -webkit-linear-gradient(top, rgb(238, 238, 238), rgb(210, 210, 210)); - border-bottom-color: rgb(202, 202, 202); - border-bottom-left-radius: 3px; - border-bottom-right-radius: 3px; - border-bottom-style: solid; - border-bottom-width: 1px; - border-left-color: rgb(202, 202, 202); - border-left-style: solid; - border-left-width: 1px; - border-right-color: rgb(202, 202, 202); - border-right-style: solid; - border-right-width: 1px; - border-top-color: rgb(202, 202, 202); - border-top-left-radius: 3px; - border-top-right-radius: 3px; - border-top-style: solid; - border-top-width: 1px; - box-shadow: rgb(255, 255, 255) 0px 1px 0px 0px inset; - box-sizing: border-box; - color: rgb(51, 51, 51); - - /* display: inline-block; */ - display: inline; - float: left; - font-family: 'Open Sans', Verdana, Geneva, sans-serif; - font-size: 13px; - font-style: normal; - font-variant: normal; - font-weight: bold; - letter-spacing: normal; - line-height: 25.59375px; - margin-bottom: calc((var(--baseline)*0.75)); - margin: 0; - padding: 0px; - text-align: center; - text-decoration: none; - text-indent: 0px; - text-shadow: rgb(248, 248, 248) 0px 1px 0px; - text-transform: none; - vertical-align: top; - white-space: pre-line; - width: 25px; - height: 25px; - word-spacing: 0px; - writing-mode: lr-tb; - } - - .button.answered { - -webkit-box-shadow: rgb(97, 184, 225) 0px 1px 0px 0px inset; - background-color: rgb(29, 157, 217); - background-image: -webkit-linear-gradient(top, rgb(29, 157, 217), rgb(14, 124, 176)); - border-bottom-color: rgb(13, 114, 162); - border-left-color: rgb(13, 114, 162); - border-right-color: rgb(13, 114, 162); - border-top-color: rgb(13, 114, 162); - box-shadow: rgb(97, 184, 225) 0px 1px 0px 0px inset; - color: rgb(255, 255, 255); - text-shadow: rgb(7, 103, 148) 0px 1px 0px; - background-image: none; - } - - .text { - @extend %ui-fake-link; - - display: inline; - float: left; - width: 80%; - text-align: left; - min-height: 30px; - margin-left: var(--baseline); - height: auto; - margin-bottom: var(--baseline); - - &.short { - width: 100px; - } - } - } - - .stats { - min-height: 40px; - margin-top: var(--baseline); - clear: both; - - &.short { - margin-top: 0; - clear: none; - display: inline; - float: right; - width: 70%; - } - - .bar { - width: 75%; - height: 20px; - border: 1px solid black; - display: inline; - float: left; - margin-right: calc((var(--baseline)/2)); - - &.short { - width: 65%; - height: 20px; - margin-top: 3px; - } - - .percent { - background-color: gray; - width: 0; - height: 20px; - - &.short { } - } - } - - .number { - width: 80px; - display: inline; - float: right; - height: 28px; - text-align: right; - - &.short { - width: 120px; - height: auto; - } - } - } - } - - .poll_answer.answered { - -webkit-box-shadow: rgb(97, 184, 225) 0 1px 0 0 inset; - background-color: rgb(29, 157, 217); - background-image: -webkit-linear-gradient(top, rgb(29, 157, 217), rgb(14, 124, 176)); - border-bottom-color: rgb(13, 114, 162); - border-left-color: rgb(13, 114, 162); - border-right-color: rgb(13, 114, 162); - border-top-color: rgb(13, 114, 162); - box-shadow: rgb(97, 184, 225) 0 1px 0 0 inset; - color: rgb(255, 255, 255); - text-shadow: rgb(7, 103, 148) 0 1px 0; - } - - .button.reset-button { - clear: both; - float: right; - } -} From f52050712c0fc0b92bc04e250a7fced0f0f232a6 Mon Sep 17 00:00:00 2001 From: farhan Date: Thu, 24 Oct 2024 16:52:05 +0500 Subject: [PATCH 03/11] feat!: Dropping Sass support from builtin html block, replacing with vanilla CSS --- xmodule/assets/editor/_edit.scss | 12 +- xmodule/assets/html/_display.scss | 44 +- xmodule/html_block.py | 6 +- .../css-builtin-blocks/HtmlBlockDisplay.css | 510 ++++++++++++++++++ .../css-builtin-blocks/HtmlBlockEditor.css | 205 +++++++ 5 files changed, 746 insertions(+), 31 deletions(-) create mode 100644 xmodule/static/css-builtin-blocks/HtmlBlockDisplay.css create mode 100644 xmodule/static/css-builtin-blocks/HtmlBlockEditor.css diff --git a/xmodule/assets/editor/_edit.scss b/xmodule/assets/editor/_edit.scss index 71699776522d..0af846f8b201 100644 --- a/xmodule/assets/editor/_edit.scss +++ b/xmodule/assets/editor/_edit.scss @@ -18,7 +18,7 @@ @include linear-gradient(top, #d4dee8, #c9d5e2); position: relative; - padding: ($baseline/4); + padding: calc(var(--baseline)/4); border-bottom-color: #a5aaaf; button { @@ -26,7 +26,7 @@ @include float(left); - padding: 3px ($baseline/2) 5px; + padding: 3px calc(var(--baseline)/2) 5px; margin-left: 7px; border: 0; border-radius: 2px; @@ -53,7 +53,7 @@ li { @include float(left); - @include margin-right($baseline/4); + @include margin-right(calc(var(--baseline)/4)); &:last-child { @include margin-right(0); @@ -67,7 +67,7 @@ border: 1px solid #a5aaaf; border-radius: 3px 3px 0 0; - @include linear-gradient(top, $transparent 87%, rgba(0, 0, 0, .06)); + @include linear-gradient(top, var(--transparent) 87%, rgba(0, 0, 0, .06)); background-color: #e5ecf3; font-size: 13px; @@ -75,8 +75,8 @@ box-shadow: 1px -1px 1px rgba(0, 0, 0, .05); &.current { - background: $white; - border-bottom-color: $white; + background: var(--white); + border-bottom-color: var(--white); } } } diff --git a/xmodule/assets/html/_display.scss b/xmodule/assets/html/_display.scss index 25e2ce4fbd64..beceaa1d0119 100644 --- a/xmodule/assets/html/_display.scss +++ b/xmodule/assets/html/_display.scss @@ -10,8 +10,8 @@ } h1 { - color: $body-color; - font: normal 2em/1.4em $font-family-sans-serif; + color: var(--body-color); + font: normal 2em/1.4em var(--font-family-sans-serif); letter-spacing: 1px; @include margin(0, 0, 1.416em, 0); @@ -19,9 +19,9 @@ h1 { h2 { color: #646464; - font: normal 1.2em/1.2em $font-family-sans-serif; + font: normal 1.2em/1.2em var(--font-family-sans-serif); letter-spacing: 1px; - margin-bottom: ($baseline*0.75); + margin-bottom: calc((var(--baseline)*0.75)); -webkit-font-smoothing: antialiased; } @@ -29,7 +29,7 @@ h3, h4, h5, h6 { - @include margin(0, 0, ($baseline/2), 0); + @include margin(0, 0, calc((var(--baseline)/2)), 0); font-weight: 600; } @@ -54,7 +54,7 @@ p { margin-bottom: 1.416em; font-size: 1em; line-height: 1.6em !important; - color: $body-color; + color: var(--body-color); } em, @@ -78,11 +78,11 @@ b { p + p, ul + p, ol + p { - margin-top: $baseline; + margin-top: var(--baseline); } blockquote { - margin: 1em ($baseline*2); + margin: 1em calc((var(--baseline)*2)); } ol, @@ -91,7 +91,7 @@ ul { @include bi-app-compact(padding, 0, 0, 0, 1em); margin: 1em 0; - color: $body-color; + color: var(--body-color); li { margin-bottom: 0.708em; @@ -112,7 +112,7 @@ a { &:hover, &:active, &:focus { - color: $blue; + color: var(--blue); } } @@ -122,7 +122,7 @@ img { pre { margin: 1em 0; - color: $body-color; + color: var(--body-color); font-family: monospace, serif; font-size: 1em; white-space: pre-wrap; @@ -130,7 +130,7 @@ pre { } code { - color: $body-color; + color: var(--body-color); font-family: monospace, serif; background: none; padding: 0; @@ -138,15 +138,15 @@ code { table { width: 100%; - margin: $baseline 0; + margin: var(--baseline) 0; border-collapse: collapse; font-size: 16px; td, th { - margin: $baseline 0; - padding: ($baseline/2); - border: 1px solid $gray-l3; + margin: var(--baseline) 0; + padding: calc((var(--baseline)/2)); + border: 1px solid var(--gray-l3); font-size: 14px; &.cont-justified-left { @@ -179,12 +179,12 @@ th { position: absolute; display: block; - padding: ($baseline/4) 7px; + padding: calc((var(--baseline)/4)) 7px; border-radius: 5px; opacity: 0.9; - background: $white; - color: $black; - border: 2px solid $black; + background: var(--white); + color: var(--black); + border: 2px solid var(--black); .label { font-weight: bold; @@ -269,11 +269,11 @@ th { position: relative; &.action-zoom-in { - margin-right: ($baseline/4); + margin-right: calc((var(--baseline)/4)); } &.action-zoom-out { - margin-left: ($baseline/4); + margin-left: calc((var(--baseline)/4)); } &.is-disabled { diff --git a/xmodule/html_block.py b/xmodule/html_block.py index 2db198360107..62949647cee3 100644 --- a/xmodule/html_block.py +++ b/xmodule/html_block.py @@ -23,7 +23,7 @@ from xmodule.html_checker import check_html from xmodule.stringify import stringify_children from xmodule.util.misc import escape_html_characters -from xmodule.util.builtin_assets import add_webpack_js_to_fragment, add_sass_to_fragment +from xmodule.util.builtin_assets import add_webpack_js_to_fragment, add_css_to_fragment from xmodule.x_module import ( ResourceTemplates, shim_xmodule_js, @@ -90,7 +90,7 @@ def student_view(self, _context): Return a fragment that contains the html for the student view """ fragment = Fragment(self.get_html()) - add_sass_to_fragment(fragment, 'HtmlBlockDisplay.scss') + add_css_to_fragment(fragment, 'HtmlBlockDisplay.css') add_webpack_js_to_fragment(fragment, 'HtmlBlockDisplay') shim_xmodule_js(fragment, 'HTMLModule') return fragment @@ -136,7 +136,7 @@ def studio_view(self, _context): fragment = Fragment( self.runtime.service(self, 'mako').render_cms_template(self.mako_template, self.get_context()) ) - add_sass_to_fragment(fragment, 'HtmlBlockEditor.scss') + add_css_to_fragment(fragment, 'HtmlBlockEditor.css') add_webpack_js_to_fragment(fragment, 'HtmlBlockEditor') shim_xmodule_js(fragment, 'HTMLEditingDescriptor') return fragment diff --git a/xmodule/static/css-builtin-blocks/HtmlBlockDisplay.css b/xmodule/static/css-builtin-blocks/HtmlBlockDisplay.css new file mode 100644 index 000000000000..b89bb3c8c7ed --- /dev/null +++ b/xmodule/static/css-builtin-blocks/HtmlBlockDisplay.css @@ -0,0 +1,510 @@ +@import url("https://fonts.googleapis.com/css?family=Open+Sans:300,400,400i,600,700"); + +.xmodule_display.xmodule_AboutBlock, +.xmodule_display.xmodule_CourseInfoBlock, +.xmodule_display.xmodule_HtmlBlock, +.xmodule_display.xmodule_StaticTabBlock { + /* stylelint-disable-line */ + /* stylelint-disable-line */ +} + +.xmodule_display.xmodule_AboutBlock *, +.xmodule_display.xmodule_CourseInfoBlock *, +.xmodule_display.xmodule_HtmlBlock *, +.xmodule_display.xmodule_StaticTabBlock * { + line-height: 1.4em; +} + +.xmodule_display.xmodule_AboutBlock h1, +.xmodule_display.xmodule_CourseInfoBlock h1, +.xmodule_display.xmodule_HtmlBlock h1, +.xmodule_display.xmodule_StaticTabBlock h1 { + color: var(--body-color); + font: normal 2em/1.4em var(--font-family-sans-serif); + letter-spacing: 1px; + margin: 0 0 1.416em; +} + +.xmodule_display.xmodule_AboutBlock h2, +.xmodule_display.xmodule_CourseInfoBlock h2, +.xmodule_display.xmodule_HtmlBlock h2, +.xmodule_display.xmodule_StaticTabBlock h2 { + color: #646464; + font: normal 1.2em/1.2em var(--font-family-sans-serif); + letter-spacing: 1px; + margin-bottom: calc((var(--baseline) * 0.75)); + -webkit-font-smoothing: antialiased; +} + +.xmodule_display.xmodule_AboutBlock h3, +.xmodule_display.xmodule_AboutBlock h4, +.xmodule_display.xmodule_AboutBlock h5, +.xmodule_display.xmodule_AboutBlock h6, +.xmodule_display.xmodule_CourseInfoBlock h3, +.xmodule_display.xmodule_CourseInfoBlock h4, +.xmodule_display.xmodule_CourseInfoBlock h5, +.xmodule_display.xmodule_CourseInfoBlock h6, +.xmodule_display.xmodule_HtmlBlock h3, +.xmodule_display.xmodule_HtmlBlock h4, +.xmodule_display.xmodule_HtmlBlock h5, +.xmodule_display.xmodule_HtmlBlock h6, +.xmodule_display.xmodule_StaticTabBlock h3, +.xmodule_display.xmodule_StaticTabBlock h4, +.xmodule_display.xmodule_StaticTabBlock h5, +.xmodule_display.xmodule_StaticTabBlock h6 { + margin: 0 0 calc((var(--baseline) / 2)); + font-weight: 600; +} + +.xmodule_display.xmodule_AboutBlock h3, +.xmodule_display.xmodule_CourseInfoBlock h3, +.xmodule_display.xmodule_HtmlBlock h3, +.xmodule_display.xmodule_StaticTabBlock h3 { + font-size: 1.2em; +} + +.xmodule_display.xmodule_AboutBlock h4, +.xmodule_display.xmodule_CourseInfoBlock h4, +.xmodule_display.xmodule_HtmlBlock h4, +.xmodule_display.xmodule_StaticTabBlock h4 { + font-size: 1em; +} + +.xmodule_display.xmodule_AboutBlock h5, +.xmodule_display.xmodule_CourseInfoBlock h5, +.xmodule_display.xmodule_HtmlBlock h5, +.xmodule_display.xmodule_StaticTabBlock h5 { + font-size: 0.83em; +} + +.xmodule_display.xmodule_AboutBlock h6, +.xmodule_display.xmodule_CourseInfoBlock h6, +.xmodule_display.xmodule_HtmlBlock h6, +.xmodule_display.xmodule_StaticTabBlock h6 { + font-size: 0.75em; +} + +.xmodule_display.xmodule_AboutBlock p, +.xmodule_display.xmodule_CourseInfoBlock p, +.xmodule_display.xmodule_HtmlBlock p, +.xmodule_display.xmodule_StaticTabBlock p { + margin-bottom: 1.416em; + font-size: 1em; + line-height: 1.6em !important; + color: var(--body-color); +} + +.xmodule_display.xmodule_AboutBlock em, +.xmodule_display.xmodule_AboutBlock i, +.xmodule_display.xmodule_CourseInfoBlock em, +.xmodule_display.xmodule_CourseInfoBlock i, +.xmodule_display.xmodule_HtmlBlock em, +.xmodule_display.xmodule_HtmlBlock i, +.xmodule_display.xmodule_StaticTabBlock em, +.xmodule_display.xmodule_StaticTabBlock i { + font-style: italic; +} + +.xmodule_display.xmodule_AboutBlock em span, +.xmodule_display.xmodule_AboutBlock i span, +.xmodule_display.xmodule_CourseInfoBlock em span, +.xmodule_display.xmodule_CourseInfoBlock i span, +.xmodule_display.xmodule_HtmlBlock em span, +.xmodule_display.xmodule_HtmlBlock i span, +.xmodule_display.xmodule_StaticTabBlock em span, +.xmodule_display.xmodule_StaticTabBlock i span { + font-style: italic; +} + +.xmodule_display.xmodule_AboutBlock strong, +.xmodule_display.xmodule_AboutBlock b, +.xmodule_display.xmodule_CourseInfoBlock strong, +.xmodule_display.xmodule_CourseInfoBlock b, +.xmodule_display.xmodule_HtmlBlock strong, +.xmodule_display.xmodule_HtmlBlock b, +.xmodule_display.xmodule_StaticTabBlock strong, +.xmodule_display.xmodule_StaticTabBlock b { + font-weight: bold; +} + +.xmodule_display.xmodule_AboutBlock strong span, +.xmodule_display.xmodule_AboutBlock b span, +.xmodule_display.xmodule_CourseInfoBlock strong span, +.xmodule_display.xmodule_CourseInfoBlock b span, +.xmodule_display.xmodule_HtmlBlock strong span, +.xmodule_display.xmodule_HtmlBlock b span, +.xmodule_display.xmodule_StaticTabBlock strong span, +.xmodule_display.xmodule_StaticTabBlock b span { + font-weight: bold; +} + +.xmodule_display.xmodule_AboutBlock p + p, +.xmodule_display.xmodule_AboutBlock ul + p, +.xmodule_display.xmodule_AboutBlock ol + p, +.xmodule_display.xmodule_CourseInfoBlock p + p, +.xmodule_display.xmodule_CourseInfoBlock ul + p, +.xmodule_display.xmodule_CourseInfoBlock ol + p, +.xmodule_display.xmodule_HtmlBlock p + p, +.xmodule_display.xmodule_HtmlBlock ul + p, +.xmodule_display.xmodule_HtmlBlock ol + p, +.xmodule_display.xmodule_StaticTabBlock p + p, +.xmodule_display.xmodule_StaticTabBlock ul + p, +.xmodule_display.xmodule_StaticTabBlock ol + p { + margin-top: var(--baseline); +} + +.xmodule_display.xmodule_AboutBlock blockquote, +.xmodule_display.xmodule_CourseInfoBlock blockquote, +.xmodule_display.xmodule_HtmlBlock blockquote, +.xmodule_display.xmodule_StaticTabBlock blockquote { + margin: 1em calc((var(--baseline) * 2)); +} + +.xmodule_display.xmodule_AboutBlock ol, +.xmodule_display.xmodule_AboutBlock ul, +.xmodule_display.xmodule_CourseInfoBlock ol, +.xmodule_display.xmodule_CourseInfoBlock ul, +.xmodule_display.xmodule_HtmlBlock ol, +.xmodule_display.xmodule_HtmlBlock ul, +.xmodule_display.xmodule_StaticTabBlock ol, +.xmodule_display.xmodule_StaticTabBlock ul { + padding: 0 0 0 1em; + margin: 1em 0; + color: var(--body-color); +} + +.xmodule_display.xmodule_AboutBlock ol li, +.xmodule_display.xmodule_AboutBlock ul li, +.xmodule_display.xmodule_CourseInfoBlock ol li, +.xmodule_display.xmodule_CourseInfoBlock ul li, +.xmodule_display.xmodule_HtmlBlock ol li, +.xmodule_display.xmodule_HtmlBlock ul li, +.xmodule_display.xmodule_StaticTabBlock ol li, +.xmodule_display.xmodule_StaticTabBlock ul li { + margin-bottom: 0.708em; +} + +.xmodule_display.xmodule_AboutBlock ol, +.xmodule_display.xmodule_CourseInfoBlock ol, +.xmodule_display.xmodule_HtmlBlock ol, +.xmodule_display.xmodule_StaticTabBlock ol { + list-style: decimal outside none; +} + +.xmodule_display.xmodule_AboutBlock ul, +.xmodule_display.xmodule_CourseInfoBlock ul, +.xmodule_display.xmodule_HtmlBlock ul, +.xmodule_display.xmodule_StaticTabBlock ul { + list-style: disc outside none; +} + +.xmodule_display.xmodule_AboutBlock a:link, .xmodule_display.xmodule_AboutBlock a:visited, .xmodule_display.xmodule_AboutBlock a:hover, .xmodule_display.xmodule_AboutBlock a:active, .xmodule_display.xmodule_AboutBlock a:focus, +.xmodule_display.xmodule_CourseInfoBlock a:link, +.xmodule_display.xmodule_CourseInfoBlock a:visited, +.xmodule_display.xmodule_CourseInfoBlock a:hover, +.xmodule_display.xmodule_CourseInfoBlock a:active, +.xmodule_display.xmodule_CourseInfoBlock a:focus, +.xmodule_display.xmodule_HtmlBlock a:link, +.xmodule_display.xmodule_HtmlBlock a:visited, +.xmodule_display.xmodule_HtmlBlock a:hover, +.xmodule_display.xmodule_HtmlBlock a:active, +.xmodule_display.xmodule_HtmlBlock a:focus, +.xmodule_display.xmodule_StaticTabBlock a:link, +.xmodule_display.xmodule_StaticTabBlock a:visited, +.xmodule_display.xmodule_StaticTabBlock a:hover, +.xmodule_display.xmodule_StaticTabBlock a:active, +.xmodule_display.xmodule_StaticTabBlock a:focus { + color: var(--blue); +} + +.xmodule_display.xmodule_AboutBlock img, +.xmodule_display.xmodule_CourseInfoBlock img, +.xmodule_display.xmodule_HtmlBlock img, +.xmodule_display.xmodule_StaticTabBlock img { + max-width: 100%; +} + +.xmodule_display.xmodule_AboutBlock pre, +.xmodule_display.xmodule_CourseInfoBlock pre, +.xmodule_display.xmodule_HtmlBlock pre, +.xmodule_display.xmodule_StaticTabBlock pre { + margin: 1em 0; + color: var(--body-color); + font-family: monospace, serif; + font-size: 1em; + white-space: pre-wrap; + word-wrap: break-word; +} + +.xmodule_display.xmodule_AboutBlock code, +.xmodule_display.xmodule_CourseInfoBlock code, +.xmodule_display.xmodule_HtmlBlock code, +.xmodule_display.xmodule_StaticTabBlock code { + color: var(--body-color); + font-family: monospace, serif; + background: none; + padding: 0; +} + +.xmodule_display.xmodule_AboutBlock table, +.xmodule_display.xmodule_CourseInfoBlock table, +.xmodule_display.xmodule_HtmlBlock table, +.xmodule_display.xmodule_StaticTabBlock table { + width: 100%; + margin: var(--baseline) 0; + border-collapse: collapse; + font-size: 16px; +} + +.xmodule_display.xmodule_AboutBlock table td, +.xmodule_display.xmodule_AboutBlock table th, +.xmodule_display.xmodule_CourseInfoBlock table td, +.xmodule_display.xmodule_CourseInfoBlock table th, +.xmodule_display.xmodule_HtmlBlock table td, +.xmodule_display.xmodule_HtmlBlock table th, +.xmodule_display.xmodule_StaticTabBlock table td, +.xmodule_display.xmodule_StaticTabBlock table th { + margin: var(--baseline) 0; + padding: calc((var(--baseline) / 2)); + border: 1px solid var(--gray-l3); + font-size: 14px; +} + +.xmodule_display.xmodule_AboutBlock table td.cont-justified-left, +.xmodule_display.xmodule_AboutBlock table th.cont-justified-left, +.xmodule_display.xmodule_CourseInfoBlock table td.cont-justified-left, +.xmodule_display.xmodule_CourseInfoBlock table th.cont-justified-left, +.xmodule_display.xmodule_HtmlBlock table td.cont-justified-left, +.xmodule_display.xmodule_HtmlBlock table th.cont-justified-left, +.xmodule_display.xmodule_StaticTabBlock table td.cont-justified-left, +.xmodule_display.xmodule_StaticTabBlock table th.cont-justified-left { + text-align: left !important; +} + +.xmodule_display.xmodule_AboutBlock table td.cont-justified-right, +.xmodule_display.xmodule_AboutBlock table th.cont-justified-right, +.xmodule_display.xmodule_CourseInfoBlock table td.cont-justified-right, +.xmodule_display.xmodule_CourseInfoBlock table th.cont-justified-right, +.xmodule_display.xmodule_HtmlBlock table td.cont-justified-right, +.xmodule_display.xmodule_HtmlBlock table th.cont-justified-right, +.xmodule_display.xmodule_StaticTabBlock table td.cont-justified-right, +.xmodule_display.xmodule_StaticTabBlock table th.cont-justified-right { + text-align: right !important; +} + +.xmodule_display.xmodule_AboutBlock table td.cont-justified-center, +.xmodule_display.xmodule_AboutBlock table th.cont-justified-center, +.xmodule_display.xmodule_CourseInfoBlock table td.cont-justified-center, +.xmodule_display.xmodule_CourseInfoBlock table th.cont-justified-center, +.xmodule_display.xmodule_HtmlBlock table td.cont-justified-center, +.xmodule_display.xmodule_HtmlBlock table th.cont-justified-center, +.xmodule_display.xmodule_StaticTabBlock table td.cont-justified-center, +.xmodule_display.xmodule_StaticTabBlock table th.cont-justified-center { + text-align: center !important; +} + +.xmodule_display.xmodule_AboutBlock th, +.xmodule_display.xmodule_CourseInfoBlock th, +.xmodule_display.xmodule_HtmlBlock th, +.xmodule_display.xmodule_StaticTabBlock th { + background: #eee; + font-weight: bold; +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .modal-ui-icon, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .modal-ui-icon, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .modal-ui-icon, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .modal-ui-icon { + position: absolute; + display: block; + padding: calc((var(--baseline) / 4)) 7px; + border-radius: 5px; + opacity: 0.9; + background: var(--white); + color: var(--black); + border: 2px solid var(--black); +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .modal-ui-icon .label, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .modal-ui-icon .label, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .modal-ui-icon .label, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .modal-ui-icon .label { + font-weight: bold; +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .modal-ui-icon i, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .modal-ui-icon i, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .modal-ui-icon i, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .modal-ui-icon i { + font-style: normal; +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .image-link, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .image-link, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .image-link, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .image-link { + position: relative; + display: block; +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .image-link .action-fullscreen, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .image-link .action-fullscreen, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .image-link .action-fullscreen, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .image-link .action-fullscreen { + display: none; + top: 10px; + left: 10px; +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .image-link:hover .action-fullscreen, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .image-link:hover .action-fullscreen, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .image-link:hover .action-fullscreen, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .image-link:hover .action-fullscreen { + display: block; +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .image-modal, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .image-modal, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .image-modal, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .image-modal { + position: fixed; + top: 0; + left: 0; + display: none; + height: 100%; + width: 100%; + background-color: rgba(0, 0, 0, 0.7); +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .image-modal .image-content, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .image-modal .image-content, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .image-modal .image-content, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .image-modal .image-content { + position: relative; + top: 2.5%; + display: block; + height: 95%; + width: 95%; + margin: auto; + overflow: hidden; +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .image-modal .image-content .image-wrapper, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .image-modal .image-content .image-wrapper, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .image-modal .image-content .image-wrapper, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .image-modal .image-content .image-wrapper { + position: relative; +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .image-modal .image-content .image-wrapper img, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .image-modal .image-content .image-wrapper img, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .image-modal .image-content .image-wrapper img, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .image-modal .image-content .image-wrapper img { + position: relative; + display: block; + max-width: 100%; + max-height: 100%; + margin: auto; + cursor: default; +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .image-modal .image-content .action-close, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .image-modal .image-content .action-close, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .image-modal .image-content .action-close, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .image-modal .image-content .action-close { + top: 10px; + right: 10px; +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .image-modal .image-content .image-controls, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .image-modal .image-content .image-controls, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .image-modal .image-content .image-controls, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .image-modal .image-content .image-controls { + position: absolute; + right: 10px; + bottom: 10px; + margin: 0; + padding: 0; + list-style: none; +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .image-modal .image-content .image-controls .image-control, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .image-modal .image-content .image-controls .image-control, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .image-modal .image-content .image-controls .image-control, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .image-modal .image-content .image-controls .image-control { + position: relative; + display: inline-block; + margin: 0; + padding: 0; +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .image-modal .image-content .image-controls .image-control .modal-ui-icon, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .image-modal .image-content .image-controls .image-control .modal-ui-icon, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .image-modal .image-content .image-controls .image-control .modal-ui-icon, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .image-modal .image-content .image-controls .image-control .modal-ui-icon { + position: relative; +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .image-modal .image-content .image-controls .image-control .modal-ui-icon.action-zoom-in, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .image-modal .image-content .image-controls .image-control .modal-ui-icon.action-zoom-in, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .image-modal .image-content .image-controls .image-control .modal-ui-icon.action-zoom-in, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .image-modal .image-content .image-controls .image-control .modal-ui-icon.action-zoom-in { + margin-right: calc((var(--baseline) / 4)); +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .image-modal .image-content .image-controls .image-control .modal-ui-icon.action-zoom-out, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .image-modal .image-content .image-controls .image-control .modal-ui-icon.action-zoom-out, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .image-modal .image-content .image-controls .image-control .modal-ui-icon.action-zoom-out, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .image-modal .image-content .image-controls .image-control .modal-ui-icon.action-zoom-out { + margin-left: calc((var(--baseline) / 4)); +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .image-modal .image-content .image-controls .image-control .modal-ui-icon.is-disabled, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .image-modal .image-content .image-controls .image-control .modal-ui-icon.is-disabled, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .image-modal .image-content .image-controls .image-control .modal-ui-icon.is-disabled, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .image-modal .image-content .image-controls .image-control .modal-ui-icon.is-disabled { + opacity: 0.5; + cursor: default; +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .image-modal.image-is-fit-to-screen, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .image-modal.image-is-fit-to-screen, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .image-modal.image-is-fit-to-screen, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .image-modal.image-is-fit-to-screen { + display: block; +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .image-modal.image-is-fit-to-screen .image-content .image-wrapper, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .image-modal.image-is-fit-to-screen .image-content .image-wrapper, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .image-modal.image-is-fit-to-screen .image-content .image-wrapper, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .image-modal.image-is-fit-to-screen .image-content .image-wrapper { + top: 0 !important; + left: 0 !important; + width: 100% !important; + height: 100% !important; +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .image-modal.image-is-fit-to-screen .image-content .image-wrapper img, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .image-modal.image-is-fit-to-screen .image-content .image-wrapper img, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .image-modal.image-is-fit-to-screen .image-content .image-wrapper img, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .image-modal.image-is-fit-to-screen .image-content .image-wrapper img { + top: 0 !important; + left: 0 !important; +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .image-modal.image-is-zoomed, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .image-modal.image-is-zoomed, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .image-modal.image-is-zoomed, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .image-modal.image-is-zoomed { + display: block; +} + +.xmodule_display.xmodule_AboutBlock .wrapper-modal-image .image-modal.image-is-zoomed .image-content .image-wrapper img, +.xmodule_display.xmodule_CourseInfoBlock .wrapper-modal-image .image-modal.image-is-zoomed .image-content .image-wrapper img, +.xmodule_display.xmodule_HtmlBlock .wrapper-modal-image .image-modal.image-is-zoomed .image-content .image-wrapper img, +.xmodule_display.xmodule_StaticTabBlock .wrapper-modal-image .image-modal.image-is-zoomed .image-content .image-wrapper img { + max-width: none; + max-height: none; + margin: 0; + cursor: move; +} diff --git a/xmodule/static/css-builtin-blocks/HtmlBlockEditor.css b/xmodule/static/css-builtin-blocks/HtmlBlockEditor.css new file mode 100644 index 000000000000..feae8a0034dd --- /dev/null +++ b/xmodule/static/css-builtin-blocks/HtmlBlockEditor.css @@ -0,0 +1,205 @@ +@import url("https://fonts.googleapis.com/css?family=Open+Sans:300,400,400i,600,700"); + +.xmodule_edit.xmodule_AboutBlock, +.xmodule_edit.xmodule_CourseInfoBlock, +.xmodule_edit.xmodule_HtmlBlock, +.xmodule_edit.xmodule_StaticTabBlock { +} + +.xmodule_edit.xmodule_AboutBlock .ui-col-wide, +.xmodule_edit.xmodule_CourseInfoBlock .ui-col-wide, +.xmodule_edit.xmodule_HtmlBlock .ui-col-wide, +.xmodule_edit.xmodule_StaticTabBlock .ui-col-wide { + width: 74.46809%; + margin-right: 2.12766%; + float: left; +} + +.xmodule_edit.xmodule_AboutBlock .ui-col-narrow, +.xmodule_edit.xmodule_CourseInfoBlock .ui-col-narrow, +.xmodule_edit.xmodule_HtmlBlock .ui-col-narrow, +.xmodule_edit.xmodule_StaticTabBlock .ui-col-narrow { + width: 23.40426%; + float: left; +} + +.xmodule_edit.xmodule_AboutBlock .ui-loading, +.xmodule_edit.xmodule_CourseInfoBlock .ui-loading, +.xmodule_edit.xmodule_HtmlBlock .ui-loading, +.xmodule_edit.xmodule_StaticTabBlock .ui-loading { + box-shadow: inset 0 1px 2px 1px rgba(0, 0, 0, 0.2); + padding: 15px 20px; +} + +.xmodule_edit.xmodule_AboutBlock .ui-loading, +.xmodule_edit.xmodule_CourseInfoBlock .ui-loading, +.xmodule_edit.xmodule_HtmlBlock .ui-loading, +.xmodule_edit.xmodule_StaticTabBlock .ui-loading { + animation: fadeIn 0.25s linear 1; + opacity: 0.6; + background-color: #fff; + padding: 30px 20px; + text-align: center; +} + +.xmodule_edit.xmodule_AboutBlock .ui-loading .spin, +.xmodule_edit.xmodule_CourseInfoBlock .ui-loading .spin, +.xmodule_edit.xmodule_HtmlBlock .ui-loading .spin, +.xmodule_edit.xmodule_StaticTabBlock .ui-loading .spin { + display: inline-block; +} + +.xmodule_edit.xmodule_AboutBlock .ui-loading .copy, +.xmodule_edit.xmodule_CourseInfoBlock .ui-loading .copy, +.xmodule_edit.xmodule_HtmlBlock .ui-loading .copy, +.xmodule_edit.xmodule_StaticTabBlock .ui-loading .copy { + padding-left: 5px; +} + +.xmodule_edit.xmodule_AboutBlock .is-hidden, +.xmodule_edit.xmodule_CourseInfoBlock .is-hidden, +.xmodule_edit.xmodule_HtmlBlock .is-hidden, +.xmodule_edit.xmodule_StaticTabBlock .is-hidden { + display: none; +} + +.xmodule_edit.xmodule_AboutBlock .editor, +.xmodule_edit.xmodule_CourseInfoBlock .editor, +.xmodule_edit.xmodule_HtmlBlock .editor, +.xmodule_edit.xmodule_StaticTabBlock .editor { + position: relative; +} + +.xmodule_edit.xmodule_AboutBlock .editor .row, +.xmodule_edit.xmodule_CourseInfoBlock .editor .row, +.xmodule_edit.xmodule_HtmlBlock .editor .row, +.xmodule_edit.xmodule_StaticTabBlock .editor .row { + position: relative; +} + +.xmodule_edit.xmodule_AboutBlock .editor .editor-bar, +.xmodule_edit.xmodule_CourseInfoBlock .editor .editor-bar, +.xmodule_edit.xmodule_HtmlBlock .editor .editor-bar, +.xmodule_edit.xmodule_StaticTabBlock .editor .editor-bar { + background-color: #d4dee8; + background-image: -webkit-linear-gradient(top, #d4dee8, #c9d5e2); + background-image: linear-gradient(to bottom, #d4dee8, #c9d5e2); + position: relative; + padding: calc(var(--baseline) / 4); + border-bottom-color: #a5aaaf; +} + +.xmodule_edit.xmodule_AboutBlock .editor .editor-bar:after, +.xmodule_edit.xmodule_CourseInfoBlock .editor .editor-bar:after, +.xmodule_edit.xmodule_HtmlBlock .editor .editor-bar:after, +.xmodule_edit.xmodule_StaticTabBlock .editor .editor-bar:after { + content: ""; + display: table; + clear: both; +} + +.xmodule_edit.xmodule_AboutBlock .editor .editor-bar button, +.xmodule_edit.xmodule_CourseInfoBlock .editor .editor-bar button, +.xmodule_edit.xmodule_HtmlBlock .editor .editor-bar button, +.xmodule_edit.xmodule_StaticTabBlock .editor .editor-bar button { + display: inline-block; + float: left; + padding: 3px calc(var(--baseline) / 2) 5px; + margin-left: 7px; + border: 0; + border-radius: 2px; + background: transparent; +} + +.xmodule_edit.xmodule_AboutBlock .editor .editor-bar button .icon, +.xmodule_edit.xmodule_CourseInfoBlock .editor .editor-bar button .icon, +.xmodule_edit.xmodule_HtmlBlock .editor .editor-bar button .icon, +.xmodule_edit.xmodule_StaticTabBlock .editor .editor-bar button .icon { + height: 21px; +} + +.xmodule_edit.xmodule_AboutBlock .editor .editor-bar button:hover, .xmodule_edit.xmodule_AboutBlock .editor .editor-bar button:focus, +.xmodule_edit.xmodule_CourseInfoBlock .editor .editor-bar button:hover, +.xmodule_edit.xmodule_CourseInfoBlock .editor .editor-bar button:focus, +.xmodule_edit.xmodule_HtmlBlock .editor .editor-bar button:hover, +.xmodule_edit.xmodule_HtmlBlock .editor .editor-bar button:focus, +.xmodule_edit.xmodule_StaticTabBlock .editor .editor-bar button:hover, +.xmodule_edit.xmodule_StaticTabBlock .editor .editor-bar button:focus { + background: rgba(255, 255, 255, 0.5); +} + +.xmodule_edit.xmodule_AboutBlock .editor .editor-tabs, +.xmodule_edit.xmodule_CourseInfoBlock .editor .editor-tabs, +.xmodule_edit.xmodule_HtmlBlock .editor .editor-tabs, +.xmodule_edit.xmodule_StaticTabBlock .editor .editor-tabs { + position: absolute; + top: 10px; + right: 10px; + text-align: left; + direction: ltr; +} + +.xmodule_edit.xmodule_AboutBlock .editor .editor-tabs li, +.xmodule_edit.xmodule_CourseInfoBlock .editor .editor-tabs li, +.xmodule_edit.xmodule_HtmlBlock .editor .editor-tabs li, +.xmodule_edit.xmodule_StaticTabBlock .editor .editor-tabs li { + float: left; + margin-right: calc(var(--baseline) / 4); +} + +.xmodule_edit.xmodule_AboutBlock .editor .editor-tabs li:last-child, +.xmodule_edit.xmodule_CourseInfoBlock .editor .editor-tabs li:last-child, +.xmodule_edit.xmodule_HtmlBlock .editor .editor-tabs li:last-child, +.xmodule_edit.xmodule_StaticTabBlock .editor .editor-tabs li:last-child { + margin-right: 0; +} + +.xmodule_edit.xmodule_AboutBlock .editor .editor-tabs .tab, +.xmodule_edit.xmodule_CourseInfoBlock .editor .editor-tabs .tab, +.xmodule_edit.xmodule_HtmlBlock .editor .editor-tabs .tab, +.xmodule_edit.xmodule_StaticTabBlock .editor .editor-tabs .tab { + display: block; + height: 24px; + padding: 7px 20px 3px; + border: 1px solid #a5aaaf; + border-radius: 3px 3px 0 0; + background-color: var(--transparent); + background-image: -webkit-linear-gradient(top, var(--transparent) 87%, rgba(0, 0, 0, 0.06)); + background-image: linear-gradient(to bottom, var(--transparent) 87%, rgba(0, 0, 0, 0.06)); + background-color: #e5ecf3; + font-size: 13px; + color: #3c3c3c; + box-shadow: 1px -1px 1px rgba(0, 0, 0, 0.05); +} + +.xmodule_edit.xmodule_AboutBlock .editor .editor-tabs .tab.current, +.xmodule_edit.xmodule_CourseInfoBlock .editor .editor-tabs .tab.current, +.xmodule_edit.xmodule_HtmlBlock .editor .editor-tabs .tab.current, +.xmodule_edit.xmodule_StaticTabBlock .editor .editor-tabs .tab.current { + background: var(--white); + border-bottom-color: var(--white); +} + +.xmodule_edit.xmodule_AboutBlock .html-editor:after, +.xmodule_edit.xmodule_CourseInfoBlock .html-editor:after, +.xmodule_edit.xmodule_HtmlBlock .html-editor:after, +.xmodule_edit.xmodule_StaticTabBlock .html-editor:after { + content: ""; + display: table; + clear: both; +} + +.xmodule_edit.xmodule_AboutBlock .html-editor .CodeMirror, +.xmodule_edit.xmodule_CourseInfoBlock .html-editor .CodeMirror, +.xmodule_edit.xmodule_HtmlBlock .html-editor .CodeMirror, +.xmodule_edit.xmodule_StaticTabBlock .html-editor .CodeMirror { + box-sizing: border-box; + height: 435px; +} + +.xmodule_edit.xmodule_AboutBlock .html-editor .is-inactive, +.xmodule_edit.xmodule_CourseInfoBlock .html-editor .is-inactive, +.xmodule_edit.xmodule_HtmlBlock .html-editor .is-inactive, +.xmodule_edit.xmodule_StaticTabBlock .html-editor .is-inactive { + display: none; +} From 6ad6ec3ea42c24ab0718b083411711ae992fa10b Mon Sep 17 00:00:00 2001 From: farhan Date: Thu, 24 Oct 2024 19:00:43 +0500 Subject: [PATCH 04/11] chore: Remove scss files related to html block --- xmodule/assets/HtmlBlockDisplay.scss | 6 - xmodule/assets/HtmlBlockEditor.scss | 7 - xmodule/assets/html/_display.scss | 318 --------------------------- xmodule/assets/html/_edit.scss | 14 -- 4 files changed, 345 deletions(-) delete mode 100644 xmodule/assets/HtmlBlockDisplay.scss delete mode 100644 xmodule/assets/HtmlBlockEditor.scss delete mode 100644 xmodule/assets/html/_display.scss delete mode 100644 xmodule/assets/html/_edit.scss diff --git a/xmodule/assets/HtmlBlockDisplay.scss b/xmodule/assets/HtmlBlockDisplay.scss deleted file mode 100644 index 0bc49706cfff..000000000000 --- a/xmodule/assets/HtmlBlockDisplay.scss +++ /dev/null @@ -1,6 +0,0 @@ -.xmodule_display.xmodule_AboutBlock, -.xmodule_display.xmodule_CourseInfoBlock, -.xmodule_display.xmodule_HtmlBlock, -.xmodule_display.xmodule_StaticTabBlock { - @import "html/display.scss"; -} diff --git a/xmodule/assets/HtmlBlockEditor.scss b/xmodule/assets/HtmlBlockEditor.scss deleted file mode 100644 index 15d60863e28e..000000000000 --- a/xmodule/assets/HtmlBlockEditor.scss +++ /dev/null @@ -1,7 +0,0 @@ -.xmodule_edit.xmodule_AboutBlock, -.xmodule_edit.xmodule_CourseInfoBlock, -.xmodule_edit.xmodule_HtmlBlock, -.xmodule_edit.xmodule_StaticTabBlock { - @import "editor/edit.scss"; - @import "html/edit.scss"; -} diff --git a/xmodule/assets/html/_display.scss b/xmodule/assets/html/_display.scss deleted file mode 100644 index beceaa1d0119..000000000000 --- a/xmodule/assets/html/_display.scss +++ /dev/null @@ -1,318 +0,0 @@ -@import 'vendor/bi-app/bi-app-ltr'; -@import 'bourbon/bourbon'; -@import 'lms/theme/variables'; -@import 'bootstrap/scss/variables'; -@import 'lms/theme/variables-v1'; - -// HTML component display: -* { - line-height: 1.4em; -} - -h1 { - color: var(--body-color); - font: normal 2em/1.4em var(--font-family-sans-serif); - letter-spacing: 1px; - - @include margin(0, 0, 1.416em, 0); -} - -h2 { - color: #646464; - font: normal 1.2em/1.2em var(--font-family-sans-serif); - letter-spacing: 1px; - margin-bottom: calc((var(--baseline)*0.75)); - -webkit-font-smoothing: antialiased; -} - -h3, -h4, -h5, -h6 { - @include margin(0, 0, calc((var(--baseline)/2)), 0); - - font-weight: 600; -} - -h3 { - font-size: 1.2em; -} - -h4 { - font-size: 1em; -} - -h5 { - font-size: 0.83em; -} - -h6 { - font-size: 0.75em; -} - -p { - margin-bottom: 1.416em; - font-size: 1em; - line-height: 1.6em !important; - color: var(--body-color); -} - -em, -i { - font-style: italic; - - span { - font-style: italic; - } -} - -strong, -b { - font-weight: bold; - - span { - font-weight: bold; - } -} - -p + p, -ul + p, -ol + p { - margin-top: var(--baseline); -} - -blockquote { - margin: 1em calc((var(--baseline)*2)); -} - -ol, -ul { - // Using the lower level Bi App Sass mixin to avoid @padding conflicts with bourbon. - @include bi-app-compact(padding, 0, 0, 0, 1em); - - margin: 1em 0; - color: var(--body-color); - - li { - margin-bottom: 0.708em; - } -} - -ol { - list-style: decimal outside none; -} - -ul { - list-style: disc outside none; -} - -a { - &:link, - &:visited, - &:hover, - &:active, - &:focus { - color: var(--blue); - } -} - -img { - max-width: 100%; -} - -pre { - margin: 1em 0; - color: var(--body-color); - font-family: monospace, serif; - font-size: 1em; - white-space: pre-wrap; - word-wrap: break-word; -} - -code { - color: var(--body-color); - font-family: monospace, serif; - background: none; - padding: 0; -} - -table { - width: 100%; - margin: var(--baseline) 0; - border-collapse: collapse; - font-size: 16px; - - td, - th { - margin: var(--baseline) 0; - padding: calc((var(--baseline)/2)); - border: 1px solid var(--gray-l3); - font-size: 14px; - - &.cont-justified-left { - text-align: left !important; // nasty, but needed to override the bad specificity of the xmodule css selectors - } - - &.cont-justified-right { - text-align: right !important; // nasty, but needed to override the bad specificity of the xmodule css selectors - } - - &.cont-justified-center { - text-align: center !important; // nasty, but needed to override the bad specificity of the xmodule css selectorsstyles - } - } -} - -th { - background: #eee; - font-weight: bold; -} - - -// image modal -// -------------------- - -// modal - image zoom, fill window -.wrapper-modal-image { - .modal-ui-icon { - @extend %ui-fake-link; - - position: absolute; - display: block; - padding: calc((var(--baseline)/4)) 7px; - border-radius: 5px; - opacity: 0.9; - background: var(--white); - color: var(--black); - border: 2px solid var(--black); - - .label { - font-weight: bold; - } - - i { - font-style: normal; - } - } - - .image-link { - @extend %ui-fake-link; - - position: relative; - display: block; - - .action-fullscreen { - display: none; - top: 10px; - left: 10px; - } - - &:hover .action-fullscreen { - display: block; - } - } - - .image-modal { - @extend %ui-fake-link; - @extend %ui-depth5; - - position: fixed; - top: 0; - left: 0; - display: none; - height: 100%; - width: 100%; - background-color: rgba(0, 0, 0, 0.7); - - .image-content { - position: relative; - top: 2.5%; - display: block; - height: 95%; - width: 95%; - margin: auto; - overflow: hidden; - - .image-wrapper { - position: relative; - - img { - position: relative; - display: block; - max-width: 100%; - max-height: 100%; - margin: auto; - cursor: default; - } - } - - .action-close { - top: 10px; - right: 10px; - } - - .image-controls { - position: absolute; - right: 10px; - bottom: 10px; - margin: 0; - padding: 0; - list-style: none; - - .image-control { - position: relative; - display: inline-block; - margin: 0; - padding: 0; - - .modal-ui-icon { - position: relative; - - &.action-zoom-in { - margin-right: calc((var(--baseline)/4)); - } - - &.action-zoom-out { - margin-left: calc((var(--baseline)/4)); - } - - &.is-disabled { - opacity: 0.5; - cursor: default; - } - } - } - } - } - - &.image-is-fit-to-screen { - display: block; - - // !important used here to override jQuery. - .image-content .image-wrapper { - top: 0 !important; - left: 0 !important; - width: 100% !important; - height: 100% !important; - - img { - top: 0 !important; - left: 0 !important; - } - } - } - - &.image-is-zoomed { - display: block; - - .image-content .image-wrapper { - img { - max-width: none; - max-height: none; - margin: 0; - cursor: move; - } - } - } - } -} diff --git a/xmodule/assets/html/_edit.scss b/xmodule/assets/html/_edit.scss deleted file mode 100644 index bf47a0f5d372..000000000000 --- a/xmodule/assets/html/_edit.scss +++ /dev/null @@ -1,14 +0,0 @@ -// HTML component editor: -.html-editor { - @include clearfix(); - - .CodeMirror { - box-sizing: border-box; - - height: 435px; - } - - .is-inactive { - display: none; - } -} From d5a768964774e845b0e0040d5e86295dc2ab6635 Mon Sep 17 00:00:00 2001 From: Fatima Sohail <68312464+sohailfatima@users.noreply.github.com> Date: Wed, 30 Oct 2024 14:11:59 +0500 Subject: [PATCH 05/11] fix: import font for notification digest email (#35720) * fix: import font for notification digest email * fix: font smoothing and size --- .../templates/notifications/digest_content.html | 5 +++-- .../notifications/edx_ace/email_digest/email/body.html | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/openedx/core/djangoapps/notifications/templates/notifications/digest_content.html b/openedx/core/djangoapps/notifications/templates/notifications/digest_content.html index f2e239bb7e6e..df1de6171ae3 100644 --- a/openedx/core/djangoapps/notifications/templates/notifications/digest_content.html +++ b/openedx/core/djangoapps/notifications/templates/notifications/digest_content.html @@ -28,8 +28,9 @@

- +
+ {{ notification.email_content | truncatechars_html:600 | safe }}
{% if notification.details %} @@ -37,7 +38,7 @@

+
{{ notification.course_name }} {{ "·"|safe }} diff --git a/openedx/core/djangoapps/notifications/templates/notifications/edx_ace/email_digest/email/body.html b/openedx/core/djangoapps/notifications/templates/notifications/edx_ace/email_digest/email/body.html index 76658a043665..a15f4f6ebfed 100644 --- a/openedx/core/djangoapps/notifications/templates/notifications/edx_ace/email_digest/email/body.html +++ b/openedx/core/djangoapps/notifications/templates/notifications/edx_ace/email_digest/email/body.html @@ -1,4 +1,8 @@ -
+ + + + +
From 051eacb0244e438ae8b084b951a465b9e35b7f80 Mon Sep 17 00:00:00 2001 From: Muhammad Anas Date: Fri, 18 Oct 2024 18:35:13 +0000 Subject: [PATCH 06/11] fix: certificate display behaiviour not showing date-picker for end-with-date --- cms/static/js/views/settings/main.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/cms/static/js/views/settings/main.js b/cms/static/js/views/settings/main.js index 4f3bf0bb2733..5b7a25dbde95 100644 --- a/cms/static/js/views/settings/main.js +++ b/cms/static/js/views/settings/main.js @@ -388,9 +388,6 @@ function(ValidatingView, CodeMirror, _, $, ui, DateUtils, FileUploadModel, Hides and clears the certificate available date field if a display behavior that doesn't use it is chosen. Because we are clearing it, toggling back to "end_with_date" will require re-entering the date */ - if (!this.useV2CertDisplaySettings) { - return; - } // eslint-disable-next-line prefer-const let showDatepicker = this.model.get('certificates_display_behavior') == 'end_with_date'; // eslint-disable-next-line prefer-const From fb5e26952bc581f72529be0f7daeacf47625321d Mon Sep 17 00:00:00 2001 From: Muhammad Anas Date: Fri, 18 Oct 2024 18:44:42 +0000 Subject: [PATCH 07/11] fix: removed all the usage of useV2CertDisplaySettings --- cms/static/js/factories/settings.js | 4 +- .../js/models/settings/course_details.js | 54 +++++++++---------- 2 files changed, 27 insertions(+), 31 deletions(-) diff --git a/cms/static/js/factories/settings.js b/cms/static/js/factories/settings.js index f8f927287c64..472f3c874e9e 100644 --- a/cms/static/js/factories/settings.js +++ b/cms/static/js/factories/settings.js @@ -3,7 +3,7 @@ define([ ], function($, CourseDetailsModel, MainView) { 'use strict'; - return function(detailsUrl, showMinGradeWarning, showCertificateAvailableDate, upgradeDeadline, useV2CertDisplaySettings) { + return function(detailsUrl, showMinGradeWarning, showCertificateAvailableDate, upgradeDeadline) { var model; // highlighting labels when fields are focused in $('form :input') @@ -23,7 +23,6 @@ define([ model = new CourseDetailsModel(); model.urlRoot = detailsUrl; model.showCertificateAvailableDate = showCertificateAvailableDate; - model.useV2CertDisplaySettings = useV2CertDisplaySettings; model.set('upgrade_deadline', upgradeDeadline); model.fetch({ // eslint-disable-next-line no-shadow @@ -33,7 +32,6 @@ define([ model: model, showMinGradeWarning: showMinGradeWarning }); - editor.useV2CertDisplaySettings = useV2CertDisplaySettings; editor.render(); }, reset: true, diff --git a/cms/static/js/models/settings/course_details.js b/cms/static/js/models/settings/course_details.js index 302f214fd6ea..1714436d7d32 100644 --- a/cms/static/js/models/settings/course_details.js +++ b/cms/static/js/models/settings/course_details.js @@ -84,35 +84,33 @@ function(Backbone, _, gettext, ValidationHelpers, DateUtils, StringUtils) { ); } - if (this.useV2CertDisplaySettings) { - if ( - newattrs.certificates_display_behavior - && !(Object.values(CERTIFICATES_DISPLAY_BEHAVIOR_OPTIONS).includes(newattrs.certificates_display_behavior)) - ) { - errors.certificates_display_behavior = StringUtils.interpolate( - gettext( - 'The certificate display behavior must be one of: {behavior_options}' - ), - { - behavior_options: Object.values(CERTIFICATES_DISPLAY_BEHAVIOR_OPTIONS).join(', ') - } - ); - } + if ( + newattrs.certificates_display_behavior + && !(Object.values(CERTIFICATES_DISPLAY_BEHAVIOR_OPTIONS).includes(newattrs.certificates_display_behavior)) + ) { + errors.certificates_display_behavior = StringUtils.interpolate( + gettext( + 'The certificate display behavior must be one of: {behavior_options}' + ), + { + behavior_options: Object.values(CERTIFICATES_DISPLAY_BEHAVIOR_OPTIONS).join(', ') + } + ); + } - // Throw error if there's a value for certificate_available_date - if ( - (newattrs.certificate_available_date && newattrs.certificates_display_behavior != CERTIFICATES_DISPLAY_BEHAVIOR_OPTIONS.END_WITH_DATE) - || (!newattrs.certificate_available_date && newattrs.certificates_display_behavior == CERTIFICATES_DISPLAY_BEHAVIOR_OPTIONS.END_WITH_DATE) - ) { - errors.certificates_display_behavior = StringUtils.interpolate( - gettext( - 'The certificates display behavior must be {valid_option} if certificate available date is set.' - ), - { - valid_option: CERTIFICATES_DISPLAY_BEHAVIOR_OPTIONS.END_WITH_DATE - } - ); - } + // Throw error if there's a value for certificate_available_date + if ( + (newattrs.certificate_available_date && newattrs.certificates_display_behavior != CERTIFICATES_DISPLAY_BEHAVIOR_OPTIONS.END_WITH_DATE) + || (!newattrs.certificate_available_date && newattrs.certificates_display_behavior == CERTIFICATES_DISPLAY_BEHAVIOR_OPTIONS.END_WITH_DATE) + ) { + errors.certificates_display_behavior = StringUtils.interpolate( + gettext( + 'The certificates display behavior must be {valid_option} if certificate available date is set.' + ), + { + valid_option: CERTIFICATES_DISPLAY_BEHAVIOR_OPTIONS.END_WITH_DATE + } + ); } if (newattrs.intro_video && newattrs.intro_video !== this.get('intro_video')) { From 338a0a1166b34f83edc64cfe89787e609df23b61 Mon Sep 17 00:00:00 2001 From: Alison Langston <46360176+alangsto@users.noreply.github.com> Date: Wed, 30 Oct 2024 08:52:43 -0400 Subject: [PATCH 08/11] feat: check course start date for courseware search (#35740) --- lms/djangoapps/courseware/tests/test_views.py | 20 +++++++++++++++++++ lms/djangoapps/courseware/views/views.py | 7 +++++++ 2 files changed, 27 insertions(+) diff --git a/lms/djangoapps/courseware/tests/test_views.py b/lms/djangoapps/courseware/tests/test_views.py index cde0e8a34ec2..7a5e36e54904 100644 --- a/lms/djangoapps/courseware/tests/test_views.py +++ b/lms/djangoapps/courseware/tests/test_views.py @@ -3814,6 +3814,26 @@ def test_is_mfe_search_waffle_disabled(self): self.assertEqual(response.status_code, 200) self.assertEqual(body, {'enabled': False}) + @patch.dict('django.conf.settings.FEATURES', {'COURSEWARE_SEARCH_INCLUSION_DATE': '2020'}) + @ddt.data( + (datetime(2013, 9, 18, 11, 30, 00), False), + (None, False), + (datetime(2024, 9, 18, 11, 30, 00), True), + ) + @ddt.unpack + def test_inclusion_date_greater_than_course_start(self, start_date, expected_enabled): + course_with_start = CourseFactory.create(start=start_date) + api_url = reverse('courseware_search_enabled_view', kwargs={'course_id': str(course_with_start.id)}) + + user_staff = UserFactory(is_staff=True) + + self.client.login(username=user_staff.username, password=TEST_PASSWORD) + response = self.client.get(api_url, content_type='application/json') + body = json.loads(response.content.decode('utf-8')) + + self.assertEqual(response.status_code, 200) + self.assertEqual(body, {'enabled': expected_enabled}) + class TestCoursewareMFENavigationSidebarTogglesAPI(SharedModuleStoreTestCase): """ diff --git a/lms/djangoapps/courseware/views/views.py b/lms/djangoapps/courseware/views/views.py index 1c57b23d9b11..b182202eddaf 100644 --- a/lms/djangoapps/courseware/views/views.py +++ b/lms/djangoapps/courseware/views/views.py @@ -2317,6 +2317,13 @@ def courseware_mfe_search_enabled(request, course_id=None): else: enabled = True + inclusion_date = settings.FEATURES.get('COURSEWARE_SEARCH_INCLUSION_DATE') + start_date = CourseOverview.get_from_id(course_key).start + + # only include courses that have a start date later than the setting-defined inclusion date + if inclusion_date: + enabled = enabled and (start_date and start_date.strftime('%Y-%m-%d') > inclusion_date) + payload = {"enabled": courseware_mfe_search_is_enabled(course_key) if enabled else False} return JsonResponse(payload) From 10a876ffbd38d790c8a72462cd69b0d673160f21 Mon Sep 17 00:00:00 2001 From: Kira Miller <31229189+kiram15@users.noreply.github.com> Date: Wed, 30 Oct 2024 09:12:35 -0600 Subject: [PATCH 09/11] fix: removing migration check after dropping column in table (#35742) --- common/djangoapps/util/tests/test_db.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/common/djangoapps/util/tests/test_db.py b/common/djangoapps/util/tests/test_db.py index 8d80991c4178..4a16c2a20aa6 100644 --- a/common/djangoapps/util/tests/test_db.py +++ b/common/djangoapps/util/tests/test_db.py @@ -1,7 +1,6 @@ """Tests for util.db module.""" from io import StringIO -import unittest import ddt from django.core.management import call_command @@ -121,7 +120,6 @@ class MigrationTests(TestCase): Tests for migrations. """ - @unittest.skip('Skipping temporarily to drop column in table') @override_settings(MIGRATION_MODULES={}) def test_migrations_are_in_sync(self): """ From b20498cc4eec4ed1b85508967bef6c915372dd5b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 19:24:34 +0000 Subject: [PATCH 10/11] feat: Upgrade Python dependency edx-enterprise (#35748) serialize best_mode_for_course_run field in DefaultEnterpriseEnrollmentIntentionSerializer Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master` Co-authored-by: adamstankiewicz <2828721+adamstankiewicz@users.noreply.github.com> --- requirements/constraints.txt | 2 +- requirements/edx/base.txt | 2 +- requirements/edx/development.txt | 2 +- requirements/edx/doc.txt | 2 +- requirements/edx/testing.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 0292e08f6189..4bf073dfab05 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -82,7 +82,7 @@ django-storages<1.14.4 # The team that owns this package will manually bump this package rather than having it pulled in automatically. # This is to allow them to better control its deployment and to do it in a process that works better # for them. -edx-enterprise==4.30.0 +edx-enterprise==4.30.1 # Date: 2024-05-09 # This has to be constrained as well because newer versions of edx-i18n-tools need the diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index a0117e573084..88ab7b1c16a5 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -467,7 +467,7 @@ edx-drf-extensions==10.5.0 # edx-when # edxval # openedx-learning -edx-enterprise==4.30.0 +edx-enterprise==4.30.1 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/kernel.in diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index 485a57753a68..328dfe81381d 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -741,7 +741,7 @@ edx-drf-extensions==10.5.0 # edx-when # edxval # openedx-learning -edx-enterprise==4.30.0 +edx-enterprise==4.30.1 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/doc.txt diff --git a/requirements/edx/doc.txt b/requirements/edx/doc.txt index 5f6f0e1162ad..fc353debc489 100644 --- a/requirements/edx/doc.txt +++ b/requirements/edx/doc.txt @@ -547,7 +547,7 @@ edx-drf-extensions==10.5.0 # edx-when # edxval # openedx-learning -edx-enterprise==4.30.0 +edx-enterprise==4.30.1 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/base.txt diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index fc60c467d4ab..0c7d65b95c85 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -571,7 +571,7 @@ edx-drf-extensions==10.5.0 # edx-when # edxval # openedx-learning -edx-enterprise==4.30.0 +edx-enterprise==4.30.1 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/base.txt From de55da21709429e6ddc21934bc6f337c9c65c464 Mon Sep 17 00:00:00 2001 From: Fatima Sohail <68312464+sohailfatima@users.noreply.github.com> Date: Thu, 31 Oct 2024 20:54:17 +0500 Subject: [PATCH 11/11] fix: added font styles for email digest browser compatibility (#35750) --- .../templates/notifications/digest_content.html | 4 ++-- .../templates/notifications/digest_footer.html | 2 +- .../templates/notifications/digest_header.html | 6 +++--- .../notifications/edx_ace/email_digest/email/body.html | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/openedx/core/djangoapps/notifications/templates/notifications/digest_content.html b/openedx/core/djangoapps/notifications/templates/notifications/digest_content.html index df1de6171ae3..d482cd0c4408 100644 --- a/openedx/core/djangoapps/notifications/templates/notifications/digest_content.html +++ b/openedx/core/djangoapps/notifications/templates/notifications/digest_content.html @@ -1,5 +1,5 @@ {% for notification_app in email_content %} -

+

{{ notification_app.title }}

{% if notification_app.help_text %} @@ -29,7 +29,7 @@

-
+
{{ notification.email_content | truncatechars_html:600 | safe }}
diff --git a/openedx/core/djangoapps/notifications/templates/notifications/digest_footer.html b/openedx/core/djangoapps/notifications/templates/notifications/digest_footer.html index 4fa903d127ac..34f4bf09d808 100644 --- a/openedx/core/djangoapps/notifications/templates/notifications/digest_footer.html +++ b/openedx/core/djangoapps/notifications/templates/notifications/digest_footer.html @@ -1,4 +1,4 @@ -

+
- @@ -28,7 +28,7 @@ diff --git a/openedx/core/djangoapps/notifications/templates/notifications/edx_ace/email_digest/email/body.html b/openedx/core/djangoapps/notifications/templates/notifications/edx_ace/email_digest/email/body.html index a15f4f6ebfed..4d4daa7ca2a3 100644 --- a/openedx/core/djangoapps/notifications/templates/notifications/edx_ace/email_digest/email/body.html +++ b/openedx/core/djangoapps/notifications/templates/notifications/edx_ace/email_digest/email/body.html @@ -3,7 +3,7 @@
-
diff --git a/openedx/core/djangoapps/notifications/templates/notifications/digest_header.html b/openedx/core/djangoapps/notifications/templates/notifications/digest_header.html index 1f22ced20049..84a702d4c29e 100644 --- a/openedx/core/djangoapps/notifications/templates/notifications/digest_header.html +++ b/openedx/core/djangoapps/notifications/templates/notifications/digest_header.html @@ -19,7 +19,7 @@
+ {{ digest_frequency }} email digest
- + {{update.title}}
+