File tree Expand file tree Collapse file tree
library-authoring/import-course Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2542,7 +2542,7 @@ describe('<CourseUnit />', () => {
25422542 } ) ;
25432543 await executeThunk ( fetchCourseSectionVerticalData ( courseId ) , store . dispatch ) ;
25442544
2545- expect ( screen . getByText ( / t h i s u n i t c a n o n l y b e e d i t e d f r o m t h e \. / i ) ) . toBeInTheDocument ( ) ;
2545+ expect ( screen . getByText ( messages . alertLibraryUnitReadOnlyLinkText . defaultMessage ) ) . toBeInTheDocument ( ) ;
25462546
25472547 // Edit button should be enabled even for library imported units
25482548 const unitHeaderTitle = screen . getByTestId ( 'unit-header-title' ) ;
@@ -3451,7 +3451,7 @@ describe('<CourseUnit />', () => {
34513451 } ) ;
34523452 await executeThunk ( fetchCourseSectionVerticalData ( courseId ) , store . dispatch ) ;
34533453
3454- expect ( screen . getByText ( / t h i s u n i t c a n o n l y b e e d i t e d f r o m t h e \. / i ) ) . toBeInTheDocument ( ) ;
3454+ expect ( screen . getByText ( messages . alertLibraryUnitReadOnlyLinkText . defaultMessage ) ) . toBeInTheDocument ( ) ;
34553455
34563456 // Does not render the "Add Components" section
34573457 expect ( screen . queryByText ( addComponentMessages . title . defaultMessage ) ) . not . toBeInTheDocument ( ) ;
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ import { UnitSidebarProvider } from './unit-sidebar/UnitSidebarContext';
4848import { UnitSidebarPagesProvider } from './unit-sidebar/UnitSidebarPagesContext' ;
4949import { UNIT_VISIBILITY_STATES } from './constants' ;
5050import { isUnitPageNewDesignEnabled } from './utils' ;
51+ import { useHelpUrls } from '@src/help-urls/hooks' ;
5152
5253const StatusBar = ( { courseUnit } : { courseUnit : any ; } ) => {
5354 const { selectedPartitionIndex, selectedGroupsLabel } = courseUnit . userPartitionInfo ?? { } ;
@@ -164,6 +165,7 @@ const CourseUnit = () => {
164165 const intl = useIntl ( ) ;
165166 const { blockId } = useParams ( ) ;
166167 const { courseId } = useCourseAuthoringContext ( ) ;
168+ const urls = useHelpUrls ( [ 'syncLibraryUpdates' ] ) ;
167169
168170 if ( courseId === undefined ) {
169171 // istanbul ignore next - This shouldn't be possible; it's just here to satisfy the type checker.
@@ -283,6 +285,11 @@ const CourseUnit = () => {
283285 < FormattedMessage { ...messages . alertLibraryUnitReadOnlyLinkText } />
284286 </ Alert . Link >
285287 ) ,
288+ learnMore : (
289+ < Alert . Link href = { urls [ 'syncLibraryUpdates' ] } >
290+ < FormattedMessage { ...messages . alertLibraryUnitReadOnlyLearnMoreText } />
291+ </ Alert . Link >
292+ ) ,
286293 } ,
287294 ) }
288295 variant = "info"
Original file line number Diff line number Diff line change @@ -45,14 +45,19 @@ const messages = defineMessages({
4545 } ,
4646 alertLibraryUnitReadOnlyText : {
4747 id : 'course-authoring.course-unit.alert.read-only.text' ,
48- defaultMessage : 'This unit can only be edited from the {link}.' ,
48+ defaultMessage : 'Only certain edits are possible for {link}. {learnMore} ' ,
4949 description : 'Text of the alert when the unit is read only because is a library unit' ,
5050 } ,
5151 alertLibraryUnitReadOnlyLinkText : {
5252 id : 'course-authoring.course-unit.alert.read-only.link.text' ,
53- defaultMessage : 'library' ,
53+ defaultMessage : 'library content ' ,
5454 description : 'Text of the link in the alert when the unit is read only because is a library unit' ,
5555 } ,
56+ alertLibraryUnitReadOnlyLearnMoreText : {
57+ id : 'course-authoring.course-unit.alert.read-only.learn-more.text' ,
58+ defaultMessage : 'Learn More' ,
59+ description : 'Text of the learn more link in the alert when the unit is read only because is a library unit' ,
60+ } ,
5661 statusBarDraftChangesBadge : {
5762 id : 'course-authoring.course-unit.status-bar.publish-status.draft-changes' ,
5863 defaultMessage : 'Unpublished changes' ,
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ export interface HelpUrls {
2929 register : string ;
3030 schedule : string ;
3131 socialSharing : string ;
32+ syncLibraryUpdates : string ;
3233 teamCourse : string ;
3334 teamLibrary : string ;
3435 textbooks : string ;
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ const messages = defineMessages({
171171 } ,
172172 importCourseAnalysisCompleteAllContentBody : {
173173 id : 'library-authoring.import-course.review-details.analysis-complete.100.body' ,
174- defaultMessage : 'All course content will imported into a collection in your library called {courseName}. See details below.' ,
174+ defaultMessage : 'All course content will be imported into a collection in your library called {courseName}. See details below.' ,
175175 description : 'Body of the info card when course import analysis is complete and all data can be imported.' ,
176176 } ,
177177 importCourseAnalysisCompleteSomeContentTitle : {
You can’t perform that action at this time.
0 commit comments