Skip to content

Commit 6d1bc0b

Browse files
authored
Revert "feat: Drop canShowUpgradeSock course data."
This reverts commit 11de72f.
1 parent b265b14 commit 6d1bc0b

6 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/course-home/data/__factories__/outlineTabData.factory.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Factory.define('outlineTabData')
3131
course_access_redirect: false,
3232
has_scheduled_content: null,
3333
access_expiration: null,
34+
can_show_upgrade_sock: false,
3435
cert_data: {
3536
cert_status: null,
3637
cert_web_view_url: null,

src/course-home/data/__snapshots__/redux.test.js.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ exports[`Data layer integration tests Test fetchOutlineTab Should fetch, normali
489489
"outline": {
490490
"course-v1:edX+DemoX+Demo_Course": {
491491
"accessExpiration": null,
492+
"canShowUpgradeSock": false,
492493
"certData": {
493494
"certStatus": null,
494495
"certWebViewUrl": null,

src/course-home/data/api.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ export async function getOutlineTabData(courseId) {
367367
} = tabData;
368368

369369
const accessExpiration = camelCaseObject(data.access_expiration);
370+
const canShowUpgradeSock = data.can_show_upgrade_sock;
370371
const certData = camelCaseObject(data.cert_data);
371372
const courseBlocks = data.course_blocks ? normalizeOutlineBlocks(courseId, data.course_blocks.blocks) : {};
372373
const courseGoals = camelCaseObject(data.course_goals);
@@ -388,6 +389,7 @@ export async function getOutlineTabData(courseId) {
388389

389390
return {
390391
accessExpiration,
392+
canShowUpgradeSock,
391393
certData,
392394
courseBlocks,
393395
courseGoals,

src/course-home/data/pact-tests/lmsPact.test.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ describe('Course Home Service', () => {
4646
willRespondWith: {
4747
status: 200,
4848
body: {
49+
can_show_upgrade_sock: boolean(false),
4950
verified_mode: like({
5051
access_expiration_date: null,
5152
currency: 'USD',
@@ -93,6 +94,7 @@ describe('Course Home Service', () => {
9394
},
9495
});
9596
const normalizedTabData = {
97+
canShowUpgradeSock: false,
9698
verifiedMode: {
9799
accessExpirationDate: null,
98100
currency: 'USD',

src/courseware/data/pact-tests/lmsPact.test.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ describe('Courseware Service', () => {
192192
upgradeDeadline: '2013-02-05T05:00:00Z',
193193
upgradeUrl: 'link',
194194
},
195+
canShowUpgradeSock: false,
195196
contentTypeGatingEnabled: false,
196197
id: 'course-v1:edX+DemoX+Demo_Course',
197198
title: 'Demonstration Course',
@@ -255,6 +256,7 @@ describe('Courseware Service', () => {
255256
}),
256257
upgrade_url: string('link'),
257258
},
259+
can_show_upgrade_sock: boolean(false),
258260
content_type_gating_enabled: boolean(false),
259261
end: term({
260262
generate: '2013-02-05T05:00:00Z',

src/courseware/data/utils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export function normalizeMetadata(metadata) {
7373
const { data, headers } = metadata;
7474
return {
7575
accessExpiration: camelCaseObject(data.access_expiration),
76+
canShowUpgradeSock: data.can_show_upgrade_sock,
7677
contentTypeGatingEnabled: data.content_type_gating_enabled,
7778
courseGoals: camelCaseObject(data.course_goals),
7879
id: data.id,

0 commit comments

Comments
 (0)