diff --git a/src/features/Classes/Class/ClassPage/Actions.jsx b/src/features/Classes/Class/ClassPage/Actions.jsx index 7bfa5d0..4a857e0 100644 --- a/src/features/Classes/Class/ClassPage/Actions.jsx +++ b/src/features/Classes/Class/ClassPage/Actions.jsx @@ -39,6 +39,7 @@ const Actions = ({ previousPage }) => { const classes = useSelector((state) => state.classes.allClasses.data); const deletionState = useSelector((state) => state.courses.newClass.status); const selectedInstitution = useSelector((state) => state.main.selectedInstitution); + const gradebookUrl = getConfig().GRADEBOOK_MICROFRONTEND_URL || getConfig().LMS_BASE_URL; const [deletionClassState, setDeletionState] = useState(initialDeletionClassState); @@ -67,6 +68,10 @@ const Actions = ({ previousPage }) => { history.push(addQueryParam(`/manage-instructors/${courseId}/${classId}?previous=${previousPage}`)); }; + const handleGradebookButton = () => { + window.open(`${gradebookUrl}/gradebook/${classIdDecoded}`, '_blank', 'noopener,noreferrer'); + }; + const handleResetDeletion = () => { setDeletionState(initialDeletionClassState); dispatch(resetClassState()); @@ -132,6 +137,10 @@ const Actions = ({ previousPage }) => { Edit class + + + Gradebook + Delete class diff --git a/src/features/Classes/Class/ClassPage/__test__/index.test.jsx b/src/features/Classes/Class/ClassPage/__test__/index.test.jsx index 81c784a..561021f 100644 --- a/src/features/Classes/Class/ClassPage/__test__/index.test.jsx +++ b/src/features/Classes/Class/ClassPage/__test__/index.test.jsx @@ -88,6 +88,7 @@ describe('ClassesPage', () => { expect(getByText('Assign instructor')).toBeInTheDocument(); expect(getByText('Edit Class')).toBeInTheDocument(); expect(getByText('Delete Class')).toBeInTheDocument(); + expect(getByText('Gradebook')).toBeInTheDocument(); }); }); });