The logic to show the modal is controlled by the backend. Displays the modal only in courseware the first time the learner hits their weekly learning goal. After viewing the goal, the database row is updated to not show the modal again. Also updates first section celebration to use the StandardModal component as the Modal component has been deprecated.
11 lines
412 B
JavaScript
11 lines
412 B
JavaScript
/* eslint-disable import/prefer-default-export */
|
|
|
|
import { getConfig } from '@edx/frontend-platform';
|
|
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';
|
|
|
|
// Does not block on answer
|
|
export function postCelebrationComplete(courseId, data) {
|
|
const url = new URL(`${getConfig().LMS_BASE_URL}/api/courseware/celebration/${courseId}`);
|
|
getAuthenticatedHttpClient().post(url.href, data);
|
|
}
|