diff --git a/src/components/learner-credit-management/assignment-modal/NewAssignmentModalButton.jsx b/src/components/learner-credit-management/assignment-modal/NewAssignmentModalButton.jsx index 826fb46aec..8c169e4d70 100644 --- a/src/components/learner-credit-management/assignment-modal/NewAssignmentModalButton.jsx +++ b/src/components/learner-credit-management/assignment-modal/NewAssignmentModalButton.jsx @@ -9,7 +9,7 @@ import PropTypes from 'prop-types'; import React, { useCallback, useContext, useState } from 'react'; import { connect } from 'react-redux'; import { generatePath, useNavigate, useParams } from 'react-router-dom'; - +import { AppContext } from '@edx/frontend-platform/react'; import { FormattedMessage, useIntl } from '@edx/frontend-platform/i18n'; import { logError } from '@edx/frontend-platform/logging'; import EnterpriseAccessApiService from '../../../data/services/EnterpriseAccessApiService'; @@ -67,6 +67,7 @@ const NewAssignmentModalButton = ({ enterpriseId, course, children }) => { aggregates, isLateRedemptionAllowed, } = subsidyAccessPolicy; + const { authenticatedUser } = useContext(AppContext); const sharedEnterpriseTrackEventMetadata = { subsidyAccessPolicyId, catalogUuid, @@ -180,6 +181,7 @@ const NewAssignmentModalButton = ({ enterpriseId, course, children }) => { contentPriceCents: assignmentRun.contentPrice * 100, // Convert to USD cents contentKey: assignmentRun.key, learnerEmails: [...learnerEmails, ...groupLearnerEmails], + adminLmsUserId: authenticatedUser.userId, // Tracks the LMS admin user }); const mutationArgs = { subsidyAccessPolicyId, diff --git a/src/components/learner-credit-management/cards/tests/CourseCard.test.jsx b/src/components/learner-credit-management/cards/tests/CourseCard.test.jsx index 7028cbc997..1abee4be3e 100644 --- a/src/components/learner-credit-management/cards/tests/CourseCard.test.jsx +++ b/src/components/learner-credit-management/cards/tests/CourseCard.test.jsx @@ -240,6 +240,7 @@ const CourseCardWrapper = ({ @@ -699,6 +700,7 @@ describe('CourseCard', () => { content_price_cents: 10000, content_key: 'course-v1:edX+course-123x+3T2020', learner_emails: mockLearnerEmails, + admin_lms_user_id: '3', }), );