diff --git a/src/course-home/progress-tab/grades/detailed-grades/DetailedGradesTable.jsx b/src/course-home/progress-tab/grades/detailed-grades/DetailedGradesTable.jsx index a25c1a72..0e349070 100644 --- a/src/course-home/progress-tab/grades/detailed-grades/DetailedGradesTable.jsx +++ b/src/course-home/progress-tab/grades/detailed-grades/DetailedGradesTable.jsx @@ -1,7 +1,9 @@ import React from 'react'; import { useSelector } from 'react-redux'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { + getLocale, injectIntl, intlShape, isRtl, +} from '@edx/frontend-platform/i18n'; import { DataTable } from '@edx/paragon'; import { useModel } from '../../../../generic/model-store'; @@ -17,6 +19,7 @@ function DetailedGradesTable({ intl }) { sectionScores, } = useModel('progress', courseId); + const isLocaleRtl = isRtl(getLocale()); return ( sectionScores.map((chapter) => { const subsectionScores = chapter.subsections.filter( @@ -32,7 +35,7 @@ function DetailedGradesTable({ intl }) { const detailedGradesData = subsectionScores.map((subsection) => ({ subsectionTitle: , - score: {subsection.numPointsEarned}/{subsection.numPointsPossible}, + score: {subsection.numPointsEarned}{isLocaleRtl ? '\\' : '/'}{subsection.numPointsPossible}, })); return ( diff --git a/src/course-home/progress-tab/grades/detailed-grades/ProblemScoreDrawer.jsx b/src/course-home/progress-tab/grades/detailed-grades/ProblemScoreDrawer.jsx index 2a90551e..7f64aa8f 100644 --- a/src/course-home/progress-tab/grades/detailed-grades/ProblemScoreDrawer.jsx +++ b/src/course-home/progress-tab/grades/detailed-grades/ProblemScoreDrawer.jsx @@ -2,18 +2,21 @@ import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { + getLocale, injectIntl, intlShape, isRtl, +} from '@edx/frontend-platform/i18n'; import messages from '../messages'; function ProblemScoreDrawer({ intl, problemScores, subsection }) { + const isLocaleRtl = isRtl(getLocale()); return ( {intl.formatMessage(messages.problemScoreLabel)}
    {problemScores.map(problemScore => ( -
  • {problemScore.earned}/{problemScore.possible}
  • +
  • {problemScore.earned}{isLocaleRtl ? '\\' : '/'}{problemScore.possible}
  • ))}