Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into mashal-m/node-18-upgrade
  • Loading branch information
mashal-m committed May 22, 2023
2 parents fa97c09 + 7012fa8 commit 039fa87
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 31 deletions.
21 changes: 0 additions & 21 deletions README.md

This file was deleted.

12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
<https://github.com/openedx/edx-platform/tree/master/lms/djangoapps/ora_staff_grader>`
<https://github.com/openedx/edx-platform/tree/master/lms/djangoapps/ora_staff_grader>`_
app in ``edx-platform``.

Getting Started
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/data/constants/app.js
Original file line number Diff line number Diff line change
@@ -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, '');
6 changes: 3 additions & 3 deletions src/data/constants/app.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
});
});

0 comments on commit 039fa87

Please sign in to comment.