fix: modify message on discussion provider LTI configuration page (#265)

* fix: modify message on discussion provider LTI configuration page

* fix: update message
This commit is contained in:
Abdurrahman Asad
2022-03-21 11:05:51 +05:00
committed by GitHub
parent ca4f559fff
commit f3f05d77f2
2 changed files with 10 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
import React, { useEffect } from 'react';
import PropTypes from 'prop-types';
import { ensureConfig, getConfig } from '@edx/frontend-platform';
import { ensureConfig } from '@edx/frontend-platform';
import { getAuthenticatedUser } from '@edx/frontend-platform/auth';
import { FormattedMessage, injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { Card, Form, MailtoLink } from '@edx/paragon';
@@ -50,9 +50,14 @@ function LtiConfigForm({ onSubmit, intl, formRef }) {
const isInvalidConsumerKey = Boolean(touched.consumerKey && errors.consumerKey);
const isInvalidConsumerSecret = Boolean(touched.consumerSecret && errors.consumerSecret);
const isInvalidLaunchUrl = Boolean(touched.launchUrl && errors.launchUrl);
const supportEmail = getConfig().SUPPORT_EMAIL;
const showLTIConfig = user.administrator;
const enablePIISharing = false;
const supportEmails = {
Yellowdig: 'learnmore@yellowdig.com',
'Ed Discussion': 'team@edstem.org',
InScribe: 'hello@inscribeapp.com',
Piazza: 'team@piazza.com',
};
useEffect(() => {
dispatch(updateValidationStatus({ hasError: Object.keys(errors).length > 0 }));
@@ -67,9 +72,8 @@ function LtiConfigForm({ onSubmit, intl, formRef }) {
{...messages.stuffOnlyConfig}
values={{
providerName,
platformName: getConfig().SITE_NAME,
supportEmail: supportEmail ? (
<MailtoLink to={supportEmail}>{supportEmail}</MailtoLink>
supportEmail: supportEmails[providerName] ? (
<MailtoLink to={supportEmails[providerName]}>{supportEmails[providerName]}</MailtoLink>
) : (
'support'
),

View File

@@ -41,7 +41,7 @@ const messages = defineMessages({
},
stuffOnlyConfig: {
id: 'authoring.discussions.stuffConfig',
defaultMessage: '{providerName} can only be configured by {platformName} administrators. Please contact {supportEmail} to enable this feature. This will require sharing usernames and emails of learners and the course team with {providerName}',
defaultMessage: 'To enable {providerName} for your course, please contact their support team at {supportEmail} to learn more about pricing and usage. To fully configure {providerName} will also require sharing usernames and emails for learners and course team. Please contact your edX project coordinator to enable PII sharing for this course.',
},
piiSharing: {
id: 'authoring.discussions.piiSharing',