@@ -66,25 +71,27 @@ const BasicTab = ({
{createOptions()}
-
-
- setFieldValue('dueDate', val)}
- data-testid="due-date-picker"
- />
- setFieldValue('dueDate', val)}
- />
-
-
+ {!isSelfPaced && (
+
+
+ setFieldValue('dueDate', val)}
+ data-testid="due-date-picker"
+ />
+ setFieldValue('dueDate', val)}
+ />
+
+
+ )}
)
}
@@ -101,6 +108,7 @@ BasicTab.propTypes = {
}).isRequired,
courseGraders: PropTypes.arrayOf(PropTypes.string).isRequired,
setFieldValue: PropTypes.func.isRequired,
+ isSelfPaced: PropTypes.bool.isRequired,
};
export default injectIntl(BasicTab);
diff --git a/src/generic/configure-modal/ConfigureModal.jsx b/src/generic/configure-modal/ConfigureModal.jsx
index a78bd386a7..ef9da846bb 100644
--- a/src/generic/configure-modal/ConfigureModal.jsx
+++ b/src/generic/configure-modal/ConfigureModal.jsx
@@ -28,6 +28,7 @@ const ConfigureModal = ({
currentItemData,
enableProctoredExams,
isXBlockComponent,
+ isSelfPaced,
}) => {
const intl = useIntl();
const {
@@ -58,6 +59,7 @@ const ConfigureModal = ({
supportsOnboarding,
showReviewRules,
onlineProctoringRules,
+ discussionEnabled,
} = currentItemData;
const getSelectedGroups = () => {
@@ -98,6 +100,7 @@ const ConfigureModal = ({
// by default it is -1 i.e. accessible to all learners & staff
selectedPartitionIndex: userPartitionInfo?.selectedPartitionIndex,
selectedGroups: getSelectedGroups(),
+ discussionEnabled,
};
const validationSchema = Yup.object().shape({
@@ -127,6 +130,7 @@ const ConfigureModal = ({
).nullable(true),
selectedPartitionIndex: Yup.number().integer(),
selectedGroups: Yup.array().of(Yup.string()),
+ discussionEnabled: Yup.boolean(),
});
const isSubsection = category === COURSE_BLOCK_NAMES.sequential.id;
@@ -168,7 +172,7 @@ const ConfigureModal = ({
const partitionId = userPartitionInfo.selectablePartitions[data.selectedPartitionIndex].id;
groupAccess[partitionId] = data.selectedGroups.map(g => parseInt(g, 10));
}
- onConfigureSubmit(data.isVisibleToStaffOnly, groupAccess);
+ onConfigureSubmit(data.isVisibleToStaffOnly, groupAccess, data.discussionEnabled);
break;
default:
break;
@@ -186,6 +190,7 @@ const ConfigureModal = ({
setFieldValue={setFieldValue}
isSubsection={isSubsection}
courseGraders={courseGraders === 'undefined' ? [] : courseGraders}
+ isSelfPaced={isSelfPaced}
/>