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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ TWITTER_HASHTAG='myedxjourney'
TWITTER_URL='https://twitter.com/edXOnline'
USER_INFO_COOKIE_NAME='edx-user-info'
SESSION_COOKIE_DOMAIN='localhost'
CHAT_RESPONSE_URL='http://localhost:18000/api/learning_assistant/v1/course_id'
PRIVACY_POLICY_URL='http://localhost:18000/privacy'
OPTIMIZELY_FULL_STACK_SDK_KEY=''
SHOW_UNGRADED_ASSIGNMENT_PROGRESS=''
Expand Down
2,876 changes: 1,373 additions & 1,503 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"@edx/browserslist-config": "1.5.1",
"@edx/frontend-component-footer": "^14.6.0",
"@edx/frontend-component-header": "^8.0.0",
"@edx/frontend-lib-learning-assistant": "^2.24.0",
"@edx/frontend-lib-special-exams": "^4.0.0",
"@edx/frontend-platform": "^8.4.0",
"@edx/openedx-atlas": "^0.7.0",
Expand Down
24 changes: 0 additions & 24 deletions src/course-home/data/redux.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,6 @@ describe('Data layer integration tests', () => {

const state = store.getState();
expect(state.courseHome.courseStatus).toEqual('loaded');
expect(state).toEqual(expect.objectContaining({
// The Xpert chatbot (frontend-lib-learning-assistant) generates a unique UUID
// to keep track of conversations. This UUID is generated on each run.
// Instead, we use an asymmetric matcher here.
learningAssistant: expect.objectContaining({
conversationId: expect.any(String),
}),
}));
});

it.each([401, 403, 404])(
Expand Down Expand Up @@ -163,14 +155,6 @@ describe('Data layer integration tests', () => {

const state = store.getState();
expect(state.courseHome.courseStatus).toEqual('loaded');
expect(state).toEqual(expect.objectContaining({
// The Xpert chatbot (frontend-lib-learning-assistant) generates a unique UUID
// to keep track of conversations. This UUID is generated on each run.
// Instead, we use an asymmetric matcher here.
learningAssistant: expect.objectContaining({
conversationId: expect.any(String),
}),
}));
});

it.each([401, 403, 404])(
Expand Down Expand Up @@ -211,14 +195,6 @@ describe('Data layer integration tests', () => {

const state = store.getState();
expect(state.courseHome.courseStatus).toEqual('loaded');
expect(state).toEqual(expect.objectContaining({
// The Xpert chatbot (frontend-lib-learning-assistant) generates a unique UUID
// to keep track of conversations. This UUID is generated on each run.
// Instead, we use an asymmetric matcher here.
learningAssistant: expect.objectContaining({
conversationId: expect.any(String),
}),
}));
});

it('Should handle the url including a targetUserId', async () => {
Expand Down
33 changes: 12 additions & 21 deletions src/courseware/course/content-tools/ContentTools.jsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,23 @@
import React from 'react';
import PropTypes from 'prop-types';
import { useSelector } from 'react-redux';

import Calculator from './calculator';
import NotesVisibility from './notes-visibility';

const ContentTools = ({
course,
}) => {
const {
sidebarIsOpen,
} = useSelector(state => state.learningAssistant);

return (
!sidebarIsOpen && (
<div className="content-tools">
<div className="d-flex justify-content-end align-items-end m-0">
{course.showCalculator && (
<Calculator />
)}
{course.notes.enabled && (
<NotesVisibility course={course} />
)}
</div>
</div>
)
);
};
}) => (
<div className="content-tools">
<div className="d-flex justify-content-end align-items-end m-0">
{course.showCalculator && (
<Calculator />
)}
{course.notes.enabled && (
<NotesVisibility course={course} />
)}
</div>
</div>
);

ContentTools.propTypes = {
course: PropTypes.shape({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,4 @@ Factory.define('courseMetadata')
related_programs: null,
user_needs_integrity_signature: false,
recommendations: null,
learning_assistant_enabled: null,
});
2 changes: 0 additions & 2 deletions src/courseware/data/pact-tests/lmsPact.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ describe('Courseware Service', () => {
linkedinAddToProfileUrl: null,
relatedPrograms: null,
userNeedsIntegritySignature: false,
learningAssistantEnabled: false,
};
setTimeout(() => {
provider.addInteraction({
Expand Down Expand Up @@ -332,7 +331,6 @@ describe('Courseware Service', () => {
verification_status: string('none'),
linkedin_add_to_profile_url: null,
user_needs_integrity_signature: boolean(false),
learning_assistant_enabled: boolean(false),
language: string('en'),
whole_course_translation_enabled: boolean(false),
},
Expand Down
1 change: 0 additions & 1 deletion src/courseware/data/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ export function normalizeMetadata(metadata) {
relatedPrograms: camelCaseObject(data.related_programs),
userNeedsIntegritySignature: data.user_needs_integrity_signature,
canAccessProctoredExams: data.can_access_proctored_exams,
learningAssistantEnabled: data.learning_assistant_enabled,
};
}

Expand Down
2 changes: 0 additions & 2 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,8 @@ initialize({
EXAMS_BASE_URL: process.env.EXAMS_BASE_URL || null,
PROCTORED_EXAM_FAQ_URL: process.env.PROCTORED_EXAM_FAQ_URL || null,
PROCTORED_EXAM_RULES_URL: process.env.PROCTORED_EXAM_RULES_URL || null,
CHAT_RESPONSE_URL: process.env.CHAT_RESPONSE_URL || null,
PRIVACY_POLICY_URL: process.env.PRIVACY_POLICY_URL || null,
SHOW_UNGRADED_ASSIGNMENT_PROGRESS: process.env.SHOW_UNGRADED_ASSIGNMENT_PROGRESS || false,
ENABLE_XPERT_AUDIT: process.env.ENABLE_XPERT_AUDIT || false,
}, 'LearnerAppConfig');
},
},
Expand Down
4 changes: 0 additions & 4 deletions src/pacts/frontend-app-learning-lms.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@
"verification_status": "none",
"linkedin_add_to_profile_url": null,
"user_needs_integrity_signature": false,
"learning_assistant_enabled": false,
"language": "en",
"whole_course_translation_enabled": false
},
Expand Down Expand Up @@ -444,9 +443,6 @@
"$.body.user_needs_integrity_signature": {
"match": "type"
},
"$.body.learning_assistant_enabled": {
"match": "type"
},
"$.body.whole_course_translation_enabled": {
"match": "type"
}
Expand Down
2 changes: 0 additions & 2 deletions src/setupTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import PropTypes from 'prop-types';
import { render as rtlRender } from '@testing-library/react';
import { configureStore } from '@reduxjs/toolkit';
import MockAdapter from 'axios-mock-adapter';
import { reducer as learningAssistantReducer } from '@edx/frontend-lib-learning-assistant';
import { reducer as specialExamsReducer } from '@edx/frontend-lib-special-exams';
import { AppProvider } from '@edx/frontend-platform/react';
import { reducer as courseHomeReducer } from './course-home/data';
Expand Down Expand Up @@ -177,7 +176,6 @@ export async function initializeTestStore(options = {}, overrideStore = true) {
models: modelsReducer,
courseware: coursewareReducer,
courseHome: courseHomeReducer,
learningAssistant: learningAssistantReducer,
specialExams: specialExamsReducer,
recommendations: recommendationsReducer,
tours: toursReducer,
Expand Down
2 changes: 0 additions & 2 deletions src/store.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { reducer as learningAssistantReducer } from '@edx/frontend-lib-learning-assistant';
import { reducer as specialExamsReducer } from '@edx/frontend-lib-special-exams';
import { configureStore } from '@reduxjs/toolkit';
import { reducer as courseHomeReducer } from './course-home/data';
Expand All @@ -14,7 +13,6 @@ export default function initializeStore() {
models: modelsReducer,
courseware: coursewareReducer,
courseHome: courseHomeReducer,
learningAssistant: learningAssistantReducer,
specialExams: specialExamsReducer,
recommendations: recommendationsReducer,
tours: toursReducer,
Expand Down
Loading