Skip to content

Commit

Permalink
refactor: rename to optional completion
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielVZ96 committed Feb 29, 2024
1 parent eb4628e commit ef661fd
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/course-home/data/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export function normalizeOutlineBlocks(courseId, blocks) {
title: block.display_name,
resumeBlock: block.resume_block,
sequenceIds: block.children || [],
optional: block.optional_content,
optional: block.optional_completion,
};
break;

Expand All @@ -153,7 +153,7 @@ export function normalizeOutlineBlocks(courseId, blocks) {
// link in the outline (even though we ignore the given url and use an internal <Link> to ourselves).
showLink: !!block.lms_web_url,
title: block.display_name,
optional: block.optional_content,
optional: block.optional_completion,
};
break;

Expand Down
2 changes: 1 addition & 1 deletion src/course-home/outline-tab/Section.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const Section = ({
</div>
<div className="col-10 ml-3 p-0 font-weight-bold text-dark-500">
<span className="align-middle">{title}</span>
<Badge className="ml-2" variant="light" hidden={!optional}>{intl.formatMessage(messages.optionalContent)}</Badge>
<Badge className="ml-2" variant="light" hidden={!optional}>{intl.formatMessage(messages.optionalCompletion)}</Badge>
<span className="sr-only">
, {intl.formatMessage(complete ? messages.completedSection : messages.incompleteSection)}
</span>
Expand Down
2 changes: 1 addition & 1 deletion src/course-home/outline-tab/SequenceLink.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const SequenceLink = ({
</div>
<div className="row w-100 m-0 ml-3 pl-3">
<small className="text-body pl-2 pr-0">
{optional ? intl.formatMessage(messages.optionalContent) : ''}
{optional ? intl.formatMessage(messages.optionalCompletion) : ''}
</small>
<small className="text-body pl-2">
{due ? dueDateMessage : noDueDateMessage}
Expand Down
2 changes: 1 addition & 1 deletion src/course-home/outline-tab/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const messages = defineMessages({
defaultMessage: 'Open',
description: 'A button to open the given section of the course outline',
},
optionalContent: {
optionalCompletion: {
id: 'learning.outline.optionalBlock',
defaultMessage: 'Optional',
description: 'Used as a label to indicate that a section, sequence, or unit is optional.',
Expand Down
2 changes: 1 addition & 1 deletion src/courseware/course/sequence/Unit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const Unit = ({
return (
<div className="unit">
<h1 className="mb-0 h3">{unit.title}</h1>
<Badge className="ml-2" variant="light" hidden={!unit.optional}>{intl.formatMessage(messages.optionalContent)}</Badge>
<Badge className="ml-2" variant="light" hidden={!unit.optional}>{intl.formatMessage(messages.optionalCompletion)}</Badge>
<h2 className="sr-only">{intl.formatMessage(messages.headerPlaceholder)}</h2>
<BookmarkButton
unitId={unit.id}
Expand Down
2 changes: 1 addition & 1 deletion src/courseware/course/sequence/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const messages = defineMessages({
defaultMessage: 'There is no content here.',
description: 'Message shown when there is no content to show a user inside a learning sequence.',
},
optionalContent: {
optionalCompletion: {
id: 'learn.sequence.optionalBlock',
defaultMessage: 'Optional',
description: 'Used as a label to indicate that a section, sequence, or unit is optional.',
Expand Down
2 changes: 1 addition & 1 deletion src/courseware/data/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function normalizeSequenceMetadata(sequence) {
contentType: unit.type,
graded: unit.graded,
containsContentTypeGatedContent: unit.contains_content_type_gated_content,
optional: unit.optional_content,
optional: unit.optional_completion,
})),
};
}
Expand Down

0 comments on commit ef661fd

Please sign in to comment.