Skip to content

Commit

Permalink
fix broken link to MITx Online Dashboard (#5136)
Browse files Browse the repository at this point in the history
  • Loading branch information
Umar Asghar authored Dec 22, 2021
1 parent a5d76be commit 1821465
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docker-compose.selenium.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
DEBUG: 'False'
ELASTICSEARCH_DEFAULT_PAGE_SIZE: '5'
MITXONLINE_BASE_URL: "https://fake-mitxonline.example.com/"

MITXONLINE_URL: "https://fake-mitxonline.example.com/"
# To silence ImproperlyConfigured when running tests
MAILGUN_URL: http://fake.mailgun.url
MAILGUN_KEY: fake_mailgun_key
Expand Down
1 change: 1 addition & 0 deletions micromasters/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@

EDXORG_BASE_URL = get_string('EDXORG_BASE_URL', 'https://courses.edx.org/')
MITXONLINE_BASE_URL = get_string('MITXONLINE_BASE_URL', None)
MITXONLINE_URL = get_string('MITXONLINE_URL', None)
MITXONLINE_STAFF_ACCESS_TOKEN = get_string('MITXONLINE_STAFF_ACCESS_TOKEN', None)
SOCIAL_AUTH_EDXORG_KEY = get_string('EDXORG_CLIENT_ID', '')
SOCIAL_AUTH_EDXORG_SECRET = get_string('EDXORG_CLIENT_SECRET', '')
Expand Down
7 changes: 6 additions & 1 deletion static/js/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ export const MITXONLINE_LINK_BASE = urljoin(
"courses/"
)

export const MITXONLINE_DASHBOARD_LINK = urljoin(
SETTINGS.mitxonline_url,
"dashboard/"
)

export const COURSEWARE_BACKEND_EDXORG = "edxorg"
export const COURSEWARE_BACKEND_MITXONLINE = "mitxonline"
export const COURSEWARE_BACKEND_NAMES = {
Expand All @@ -136,7 +141,7 @@ export const COURSEWARE_BACKEND_NAMES = {
}
export const COURSEWARE_BACKEND_BASE_URLS = {
[COURSEWARE_BACKEND_EDXORG]: EDX_LINK_BASE,
[COURSEWARE_BACKEND_MITXONLINE]: MITXONLINE_LINK_BASE
[COURSEWARE_BACKEND_MITXONLINE]: MITXONLINE_DASHBOARD_LINK
}

export const COUPON_CONTENT_TYPE_COURSE = "course"
Expand Down
1 change: 1 addition & 0 deletions static/js/flow/declarations.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ declare var SETTINGS: {
host: string,
edx_base_url: string,
mitxonline_base_url: string,
mitxonline_url: string,
EXAMS_SSO_CLIENT_CODE: string,
EXAMS_SSO_URL: string,
FEATURES: {
Expand Down
1 change: 1 addition & 0 deletions static/js/global_init.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const _createSettings = () => ({
},
edx_base_url: "/edx/",
mitxonline_base_url: "/mitxonline/",
mitxonline_url: "/mitxonline/",
search_url: "/",
roles: [],
support_email: "[email protected]",
Expand Down
4 changes: 2 additions & 2 deletions static/js/util/courseware_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { coursewareBaseUrl, courseRunUrl } from "./courseware"
import { makeRun } from "../factories/dashboard"
import {
EDX_LINK_BASE,
MITXONLINE_LINK_BASE,
MITXONLINE_DASHBOARD_LINK,
COURSEWARE_BACKEND_EDXORG,
COURSEWARE_BACKEND_MITXONLINE
} from "../constants"
Expand All @@ -19,7 +19,7 @@ describe("courseware utility functions", () => {
it("should return the edxurl for mitxonline coursewaree", () => {
assert.equal(
coursewareBaseUrl(COURSEWARE_BACKEND_MITXONLINE),
MITXONLINE_LINK_BASE
MITXONLINE_DASHBOARD_LINK
)
})
})
Expand Down
2 changes: 1 addition & 1 deletion static/scss/_grid-settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $grid-columns: 12;
$max-width: 1350px;
$min-width: 1350px;
$visual-grid: false;
$visual-grid-index: front !global;
$visual-grid-index: front;

// Define your breakpoints
$tablet: new-breakpoint(max-width 768px 8);
Expand Down
2 changes: 1 addition & 1 deletion static/scss/page-layout.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$border-box-sizing: true !global;
$border-box-sizing: true;

.page-content {
width: 100%;
Expand Down
1 change: 1 addition & 0 deletions ui/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def get_context(self, request):
"host": webpack_dev_server_host(request),
"edx_base_url": settings.EDXORG_BASE_URL,
"mitxonline_base_url": settings.MITXONLINE_BASE_URL,
"mitxonline_url": settings.MITXONLINE_URL,
"roles": roles,
"release_version": settings.VERSION,
"environment": settings.ENVIRONMENT,
Expand Down
9 changes: 9 additions & 0 deletions ui/views_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ def test_dashboard_settings(self):
react_ga_debug = FuzzyText().fuzz()
edx_base_url = FuzzyText().fuzz()
mitxonline_base_url = FuzzyText().fuzz()
mitxonline_url = FuzzyText().fuzz()
host = FuzzyText().fuzz()
email_support = FuzzyText().fuzz()
open_discussions_redirect_url = FuzzyText().fuzz()
Expand All @@ -248,6 +249,7 @@ def test_dashboard_settings(self):
REACT_GA_DEBUG=react_ga_debug,
EDXORG_BASE_URL=edx_base_url,
MITXONLINE_BASE_URL=mitxonline_base_url,
MITXONLINE_URL=mitxonline_url,
WEBPACK_DEV_SERVER_HOST=host,
EMAIL_SUPPORT=email_support,
VERSION='0.0.1',
Expand Down Expand Up @@ -280,6 +282,7 @@ def test_dashboard_settings(self):
'host': host,
'edx_base_url': edx_base_url,
"mitxonline_base_url": mitxonline_base_url,
"mitxonline_url": mitxonline_url,
'roles': [],
'search_url': reverse('search_api', kwargs={"elastic_url": ""}),
'support_email': email_support,
Expand Down Expand Up @@ -694,6 +697,7 @@ def test_users_logged_in(self):
react_ga_debug = FuzzyText().fuzz()
edx_base_url = FuzzyText().fuzz()
mitxonline_base_url = FuzzyText().fuzz()
mitxonline_url = FuzzyText().fuzz()
host = FuzzyText().fuzz()
email_support = FuzzyText().fuzz()
open_discussions_redirect_url = FuzzyText().fuzz()
Expand All @@ -702,6 +706,7 @@ def test_users_logged_in(self):
REACT_GA_DEBUG=react_ga_debug,
EDXORG_BASE_URL=edx_base_url,
MITXONLINE_BASE_URL=mitxonline_base_url,
MITXONLINE_URL=mitxonline_url,
WEBPACK_DEV_SERVER_HOST=host,
EMAIL_SUPPORT=email_support,
VERSION='0.0.1',
Expand Down Expand Up @@ -735,6 +740,7 @@ def test_users_logged_in(self):
'host': host,
'edx_base_url': edx_base_url,
"mitxonline_base_url": mitxonline_base_url,
"mitxonline_url": mitxonline_url,
'roles': [],
'search_url': reverse('search_api', kwargs={"elastic_url": ""}),
'support_email': email_support,
Expand Down Expand Up @@ -775,6 +781,7 @@ def test_users_anonymous(self):
react_ga_debug = FuzzyText().fuzz()
edx_base_url = FuzzyText().fuzz()
mitxonline_base_url = FuzzyText().fuzz()
mitxonline_url = FuzzyText().fuzz()
host = FuzzyText().fuzz()
email_support = FuzzyText().fuzz()
open_discussions_redirect_url = FuzzyText().fuzz()
Expand All @@ -783,6 +790,7 @@ def test_users_anonymous(self):
REACT_GA_DEBUG=react_ga_debug,
EDXORG_BASE_URL=edx_base_url,
MITXONLINE_BASE_URL=mitxonline_base_url,
MITXONLINE_URL=mitxonline_url,
WEBPACK_DEV_SERVER_HOST=host,
EMAIL_SUPPORT=email_support,
VERSION='0.0.1',
Expand All @@ -809,6 +817,7 @@ def test_users_anonymous(self):
'host': host,
'edx_base_url': edx_base_url,
"mitxonline_base_url": mitxonline_base_url,
"mitxonline_url": mitxonline_url,
'roles': [],
'search_url': reverse('search_api', kwargs={"elastic_url": ""}),
'support_email': email_support,
Expand Down

0 comments on commit 1821465

Please sign in to comment.