diff --git a/README.md b/README.md deleted file mode 100644 index a39b1851..00000000 --- a/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# frontend-app-ora-grading - -The ORA Staff Grading App is a microfrontend (MFE) staff grading experience for Open Response Assessments (ORAs). This experience was designed to streamline the grading process and enable richer previews of submission content. - -When enabled, ORAs with a staff grading step will link to this new MFE when clicking "Grade Available Responses" from the ORA or link in the instructor dashboard. - -## Quickstart - -To start the MFE and enable the feature in LMS: - -1. Start the MFE with `npm run start`. Take a note of the path/port (defaults to `http://localhost:1993`). - -2. Add the route root to `edx-platform` settings: In `edx-platform/lms/envs/private.py` or similar, add `ORA_GRADING_MICROFRONTEND_URL = 'http://localhost:1993'` - -3. Enable the feature: In Django Admin go to django-waffle > Flags and add/enable a new flag called `openresponseassessment.enhanced_staff_grader`. - -From there, visit the new experience by going to the Instructor Dashboard > Open Responses or an ORA with a Staff Graded Step and click a link to begin grading. - -## Resources - -See the [ORA Staff Grading](https://edx.readthedocs.io/projects/edx-partner-course-staff/en/latest/exercises_tools/open_response_assessments/ORA_Staff_Grading.html#ora-staff-grading) section on ReadTheDocs for usage information. \ No newline at end of file diff --git a/README.rst b/README.rst index f142282a..15a9d2fb 100644 --- a/README.rst +++ b/README.rst @@ -16,7 +16,7 @@ clicking "Grade Available Responses" from the ORA or link in the instructor dashboard. The ORA Staff Grader depends on the `lms/djangoapps/ora_staff_grader -` +`_ app in ``edx-platform``. Getting Started @@ -58,13 +58,13 @@ Next, enable the ORA Grading micro-frontend in `edx-platform` #. Enable the ORA Grading feature in Django Admin. - #. Go to Django Admin (`{lms-root}/admin`) + #. Go to Django Admin (`{lms-root}/admin`) - #. Navigate to ``django-waffle`` > ``Flags`` and click ``add/enable a new - flag``. + #. Navigate to ``django-waffle`` > ``Flags`` and click ``add/enable a new + flag``. - #. Add a new flag called ``openresponseassessment.enhanced_staff_grader`` - and enable it. + #. Add a new flag called ``openresponseassessment.enhanced_staff_grader`` + and enable it. From there, visit an Open Response Assessment with a Staff Graded Step and click the "View and grade responses" button to begin grading in the ORA Staff diff --git a/src/data/constants/app.js b/src/data/constants/app.js index 1e129226..dda06d5f 100644 --- a/src/data/constants/app.js +++ b/src/data/constants/app.js @@ -1,4 +1,4 @@ import { getConfig } from '@edx/frontend-platform'; export const routePath = `${getConfig().PUBLIC_PATH}:courseId`; -export const locationId = window.location.pathname.slice(1); +export const locationId = window.location.pathname.replace(getConfig().PUBLIC_PATH, ''); diff --git a/src/data/constants/app.test.js b/src/data/constants/app.test.js index 20c554ae..17fb772b 100644 --- a/src/data/constants/app.test.js +++ b/src/data/constants/app.test.js @@ -4,7 +4,7 @@ import * as constants from './app'; jest.unmock('./app'); jest.mock('@edx/frontend-platform', () => { - const PUBLIC_PATH = 'test-public-path'; + const PUBLIC_PATH = '/test-public-path/'; return { getConfig: () => ({ PUBLIC_PATH }), PUBLIC_PATH, @@ -17,8 +17,8 @@ describe('app constants', () => { }); test('locationId returns trimmed pathname', () => { const old = window.location; - window.location = { pathName: '/somePath.jpg' }; - expect(constants.locationId).toEqual(window.location.pathname.slice(1)); + window.location = { pathName: `${platform.PUBLIC_PATH}somePath.jpg` }; + expect(constants.locationId).toEqual(window.location.pathname.replace(platform.PUBLIC_PATH, '')); window.location = old; }); });