refactor:removed legacy proctoring route (#127)

This commit is contained in:
Ahtisham Shahid
2021-06-10 17:13:38 +05:00
committed by GitHub
parent c10f1521dc
commit 0a5b4c136e
2 changed files with 0 additions and 39 deletions

View File

@@ -16,23 +16,11 @@ import appMessages from './i18n';
import initializeStore from './store';
import './index.scss';
import CourseAuthoringRoutes from './CourseAuthoringRoutes';
import LegacyProctoringRoute from './proctored-exam-settings/LegacyProctoringRoute';
subscribe(APP_READY, () => {
ReactDOM.render(
<AppProvider store={initializeStore()}>
<Switch>
<Route
exact
path="/proctored-exam-settings/:courseId"
render={({ match }) => {
const { params: { courseId } } = match;
/* See component for details on what this is */
return (
<LegacyProctoringRoute courseId={courseId} />
);
}}
/>
<Route
path="/course/:courseId"
render={({ match }) => {

View File

@@ -1,27 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import CourseAuthoringPage from '../CourseAuthoringPage';
import ProctoredExamSettings from './ProctoredExamSettings';
/**
* LEGACY proctored exam settings route! This is an EXPAND and CONTRACT refactoring - this
* legacy route exists because we're in an EXPANDED state. Delete this route when backends
* no longer send users here.
*
* The refactoring is intended to organize our routes by the primary entity first (a course),
* and the sub-entity second (proctoring settings). In CourseAuthoringContainer below, you'll see
* that we flip the routes so that the pages follow the courseId, since they're conceptually
* children of it.
*/
export default function LegacyProctoringRoute({ courseId }) {
return (
<CourseAuthoringPage courseId={courseId}>
<ProctoredExamSettings courseId={courseId} />
</CourseAuthoringPage>
);
}
LegacyProctoringRoute.propTypes = {
courseId: PropTypes.string.isRequired,
};