diff --git a/src/course-unit/CourseUnit.test.tsx b/src/course-unit/CourseUnit.test.tsx index 7930c56fb6..8893828176 100644 --- a/src/course-unit/CourseUnit.test.tsx +++ b/src/course-unit/CourseUnit.test.tsx @@ -2542,7 +2542,7 @@ describe('', () => { }); await executeThunk(fetchCourseSectionVerticalData(courseId), store.dispatch); - expect(screen.getByText(/this unit can only be edited from the \./i)).toBeInTheDocument(); + expect(screen.getByText(messages.alertLibraryUnitReadOnlyLinkText.defaultMessage)).toBeInTheDocument(); // Edit button should be enabled even for library imported units const unitHeaderTitle = screen.getByTestId('unit-header-title'); @@ -3446,7 +3446,7 @@ describe('', () => { }); await executeThunk(fetchCourseSectionVerticalData(courseId), store.dispatch); - expect(screen.getByText(/this unit can only be edited from the \./i)).toBeInTheDocument(); + expect(screen.getByText(messages.alertLibraryUnitReadOnlyLinkText.defaultMessage)).toBeInTheDocument(); // Does not render the "Add Components" section expect(screen.queryByText(addComponentMessages.title.defaultMessage)).not.toBeInTheDocument(); diff --git a/src/course-unit/CourseUnit.tsx b/src/course-unit/CourseUnit.tsx index 07b9d7d055..8b89edcba2 100644 --- a/src/course-unit/CourseUnit.tsx +++ b/src/course-unit/CourseUnit.tsx @@ -48,6 +48,7 @@ import { UnitSidebarProvider } from './unit-sidebar/UnitSidebarContext'; import { UnitSidebarPagesProvider } from './unit-sidebar/UnitSidebarPagesContext'; import { UNIT_VISIBILITY_STATES } from './constants'; import { isUnitPageNewDesignEnabled } from './utils'; +import { useHelpUrls } from '@src/help-urls/hooks'; const StatusBar = ({ courseUnit }: { courseUnit: any; }) => { const { selectedPartitionIndex, selectedGroupsLabel } = courseUnit.userPartitionInfo ?? {}; @@ -164,6 +165,7 @@ const CourseUnit = () => { const intl = useIntl(); const { blockId } = useParams(); const { courseId } = useCourseAuthoringContext(); + const urls = useHelpUrls(['syncLibraryUpdates']); if (courseId === undefined) { // istanbul ignore next - This shouldn't be possible; it's just here to satisfy the type checker. @@ -283,6 +285,11 @@ const CourseUnit = () => { ), + learnMore: ( + + + + ), }, )} variant="info" diff --git a/src/course-unit/messages.ts b/src/course-unit/messages.ts index 334becd2e5..495c1d4bc4 100644 --- a/src/course-unit/messages.ts +++ b/src/course-unit/messages.ts @@ -45,14 +45,19 @@ const messages = defineMessages({ }, alertLibraryUnitReadOnlyText: { id: 'course-authoring.course-unit.alert.read-only.text', - defaultMessage: 'This unit can only be edited from the {link}.', + defaultMessage: 'Only certain edits are possible for {link}. {learnMore}', description: 'Text of the alert when the unit is read only because is a library unit', }, alertLibraryUnitReadOnlyLinkText: { id: 'course-authoring.course-unit.alert.read-only.link.text', - defaultMessage: 'library', + defaultMessage: 'library content', description: 'Text of the link in the alert when the unit is read only because is a library unit', }, + alertLibraryUnitReadOnlyLearnMoreText: { + id: 'course-authoring.course-unit.alert.read-only.learn-more.text', + defaultMessage: 'Learn More', + description: 'Text of the learn more link in the alert when the unit is read only because is a library unit', + }, statusBarDraftChangesBadge: { id: 'course-authoring.course-unit.status-bar.publish-status.draft-changes', defaultMessage: 'Unpublished changes', diff --git a/src/help-urls/data/api.ts b/src/help-urls/data/api.ts index 961721838b..c896635993 100644 --- a/src/help-urls/data/api.ts +++ b/src/help-urls/data/api.ts @@ -29,6 +29,7 @@ export interface HelpUrls { register: string; schedule: string; socialSharing: string; + syncLibraryUpdates: string; teamCourse: string; teamLibrary: string; textbooks: string; diff --git a/src/library-authoring/import-course/messages.ts b/src/library-authoring/import-course/messages.ts index 89421e6e19..28c1a3d531 100644 --- a/src/library-authoring/import-course/messages.ts +++ b/src/library-authoring/import-course/messages.ts @@ -171,7 +171,7 @@ const messages = defineMessages({ }, importCourseAnalysisCompleteAllContentBody: { id: 'library-authoring.import-course.review-details.analysis-complete.100.body', - defaultMessage: 'All course content will imported into a collection in your library called {courseName}. See details below.', + defaultMessage: 'All course content will be imported into a collection in your library called {courseName}. See details below.', description: 'Body of the info card when course import analysis is complete and all data can be imported.', }, importCourseAnalysisCompleteSomeContentTitle: {