diff --git a/src/course-home/data/api.js b/src/course-home/data/api.js index 1e7104d8..4ac3268d 100644 --- a/src/course-home/data/api.js +++ b/src/course-home/data/api.js @@ -142,8 +142,11 @@ export async function getProgressTabData(courseId) { } } -export async function getProctoringInfoData(courseId) { - const url = `${getConfig().LMS_BASE_URL}/api/edx_proctoring/v1/user_onboarding/status?course_id=${encodeURIComponent(courseId)}`; +export async function getProctoringInfoData(courseId, username) { + let url = `${getConfig().LMS_BASE_URL}/api/edx_proctoring/v1/user_onboarding/status?course_id=${encodeURIComponent(courseId)}`; + if (username) { + url += `&username=${encodeURIComponent(username)}`; + } try { const { data } = await getAuthenticatedHttpClient().get(url); return data; diff --git a/src/course-home/outline-tab/OutlineTab.jsx b/src/course-home/outline-tab/OutlineTab.jsx index 1b82f854..538c21df 100644 --- a/src/course-home/outline-tab/OutlineTab.jsx +++ b/src/course-home/outline-tab/OutlineTab.jsx @@ -39,6 +39,7 @@ function OutlineTab({ intl }) { const { org, title, + username, } = useModel('courseHomeMeta', courseId); const { @@ -204,6 +205,7 @@ function OutlineTab({ intl }) {
{courseGoalToDisplay && goalOptions && goalOptions.length > 0 && ( { - getProctoringInfoData(courseId) + getProctoringInfoData(courseId, username) .then( response => { if (response) { @@ -172,7 +172,12 @@ function ProctoringInfoPanel({ courseId, intl }) { ProctoringInfoPanel.propTypes = { courseId: PropTypes.string.isRequired, + username: PropTypes.string, intl: intlShape.isRequired, }; +ProctoringInfoPanel.defaultProps = { + username: null, +}; + export default injectIntl(ProctoringInfoPanel);