Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import CourseUserTypeTabs, {
CourseUserTypeTabValue,
getCurrentSelectedUserType,
} from 'lib/components/core/CourseUserTypeTabs';
import ConfirmationDialog from 'lib/components/core/dialogs/ConfirmationDialog';
import Prompt from 'lib/components/core/dialogs/Prompt';
import Page from 'lib/components/core/layouts/Page';
import LoadingIndicator from 'lib/components/core/LoadingIndicator';
Expand Down Expand Up @@ -244,28 +243,36 @@ const AssessmentSubmissionsIndex: FC = () => {
: translations.forceSubmitConfirmation;

return (
<ConfirmationDialog
message={t(message, values)}
onCancel={() => setIsConfirmingForceSubmit(false)}
onConfirm={() => {
<Prompt
cancelColor="secondary"
onClickPrimary={() => {
dispatch(forceSubmitSubmissions(currentSelectedUserType));
setIsConfirmingForceSubmit(false);
}}
onClose={() => setIsConfirmingForceSubmit(false)}
open={isConfirmingForceSubmit}
/>
primaryLabel={t(formTranslations.continue)}
>
<Typography variant="body2">{t(message, values)}</Typography>
</Prompt>
);
};

const renderFetchFromKoditsuConfirmation = (): JSX.Element => (
<ConfirmationDialog
message={t(translations.fetchSubmissionsFromKoditsuConfirmation)}
onCancel={() => setIsConfirmingFetchFromKoditsu(false)}
onConfirm={() => {
<Prompt
cancelColor="secondary"
onClickPrimary={() => {
dispatch(fetchSubmissionsFromKoditsu());
setIsConfirmingFetchFromKoditsu(false);
}}
onClose={() => setIsConfirmingFetchFromKoditsu(false)}
open={isConfirmingFetchFromKoditsu}
/>
primaryLabel={t(formTranslations.continue)}
>
<Typography variant="body2">
{t(translations.fetchSubmissionsFromKoditsuConfirmation)}
</Typography>
</Prompt>
);

const renderStatusChart = (): JSX.Element => {
Expand Down Expand Up @@ -318,7 +325,7 @@ const AssessmentSubmissionsIndex: FC = () => {

{renderStatusChart()}

<section className="flex-wrap space-x-4">
<section className="flex flex-wrap gap-3">
{canPublishGrades && (
<Button
color="primary"
Expand Down Expand Up @@ -445,15 +452,20 @@ const AssessmentSubmissionsIndex: FC = () => {
};

return (
<ConfirmationDialog
message={t(translations.publishConfirmation, values)}
onCancel={() => setIsConfirmingPublish(false)}
onConfirm={() => {
<Prompt
cancelColor="secondary"
onClickPrimary={() => {
dispatch(publishSubmissions(currentSelectedUserType));
setIsConfirmingPublish(false);
}}
onClose={() => setIsConfirmingPublish(false)}
open={isConfirmingPublish}
/>
primaryLabel={t(formTranslations.continue)}
>
<Typography variant="body2">
{t(translations.publishConfirmation, values)}
</Typography>
</Prompt>
);
};

Expand All @@ -471,10 +483,9 @@ const AssessmentSubmissionsIndex: FC = () => {
};

return (
<ConfirmationDialog
message={t(translations.sendReminderEmailConfirmation, values)}
onCancel={() => setIsConfirmingRemind(false)}
onConfirm={() => {
<Prompt
cancelColor="secondary"
onClickPrimary={() => {
dispatch(
sendAssessmentReminderEmail(
parsedAssessmentId,
Expand All @@ -483,8 +494,14 @@ const AssessmentSubmissionsIndex: FC = () => {
);
setIsConfirmingRemind(false);
}}
onClose={() => setIsConfirmingRemind(false)}
open={isConfirmingRemind}
/>
primaryLabel={t(formTranslations.continue)}
>
<Typography variant="body2">
{t(translations.sendReminderEmailConfirmation, values)}
</Typography>
</Prompt>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ const translations = defineMessages({
publishRubricFeedbackConfirmation: {
id: 'course.assessment.submission.publishRubricFeedbackConfirmation',
defaultMessage:
'You are about to publish {count} AI rubric-based feedback {count, plural, one {comment} other {comments}} on written answers. Students will be able to see them straight away.',
'You are about to publish {count} AI rubric-based feedback {count, plural, one {comment} other {comments}} on written answers. The receiving students will be able to see them immediately.',
},
publishAutoFeedbackConfirmationPleaseRate: {
id: 'course.assessment.submission.publishAutoFeedbackConfirmationPleaseRate',
Expand Down
2 changes: 1 addition & 1 deletion client/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3528,7 +3528,7 @@
"defaultMessage": "Include phantom users"
},
"course.assessment.submission.publishRubricFeedbackConfirmation": {
"defaultMessage": "You are about to publish {count} AI rubric-based feedback {count, plural, one {comment} other {comments}} on written answers. Students will be able to see them straight away."
"defaultMessage": "You are about to publish {count} AI rubric-based feedback {count, plural, one {comment} other {comments}} on written answers. The receiving students will be able to see them immediately."
},
"course.assessment.submission.publishRubricFeedbackSuccess": {
"defaultMessage": "All AI rubric-based feedback has been published."
Expand Down
2 changes: 1 addition & 1 deletion client/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -3522,7 +3522,7 @@
"defaultMessage": "팬텀 사용자 포함"
},
"course.assessment.submission.publishRubricFeedbackConfirmation": {
"defaultMessage": "서술형 답안에 대한 AI 루브릭 기반 피드백 댓글 {count}개를 게시하려고 합니다. 학생들이 바로 볼 수 있게 됩니다."
"defaultMessage": "서술형 답안에 대한 AI 루브릭 기반 피드백 댓글 {count}개를 게시하려고 합니다. 해당 학생들이 즉시 볼 수 있게 됩니다."
},
"course.assessment.submission.publishRubricFeedbackSuccess": {
"defaultMessage": "모든 AI 루브릭 기반 피드백이 게시되었습니다."
Expand Down
2 changes: 1 addition & 1 deletion client/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -3528,7 +3528,7 @@
"defaultMessage": "包括旁听学生"
},
"course.assessment.submission.publishRubricFeedbackConfirmation": {
"defaultMessage": "您即将发布 {count} 条针对书面答案的 AI 评分标准反馈评语。学生将立即可以看到这些评语。"
"defaultMessage": "您即将发布 {count} 条针对书面答案的 AI 评分标准反馈评语。收到评语的学生将立即看到这些评语。"
},
"course.assessment.submission.publishRubricFeedbackSuccess": {
"defaultMessage": "所有 AI 评分标准反馈均已发布。"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@

expect(page).to have_text('Graded, unpublished')
click_button('Publish Grades')
accept_confirm_dialog
accept_prompt
wait_for_job
expect(page).not_to have_text('Graded, unpublished')

Expand All @@ -170,7 +170,7 @@
expect(page).to have_text('Not Started')

click_button('Force Submit Remaining')
accept_confirm_dialog
accept_prompt
wait_for_job

expect(page).not_to have_text('Attempting')
Expand Down
Loading