Skip to content

Commit

Permalink
fix: views and wrapper updates
Browse files Browse the repository at this point in the history
  • Loading branch information
muselesscreator committed Oct 10, 2023
1 parent 89b385e commit 626aef2
Show file tree
Hide file tree
Showing 17 changed files with 43 additions and 543 deletions.
5 changes: 3 additions & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import { Spinner } from '@edx/paragon';

import { useIsORAConfigLoaded, useIsPageDataLoaded } from 'data/services/lms/hooks/selectors';

import AppContainer from 'views/AppContainer';
import ModalContainer from 'views/ModalContainer';
import PeerAssessmentView from 'views/PeerAssessmentView';
import SelfAssessmentView from 'views/SelfAssessmentView';
import StudentTrainingView from 'views/StudentTrainingView';
import SubmissionView from 'views/SubmissionView';
import XBlockView from 'views/XBlockView';

import AppContainer from 'components/AppContainer';
import ModalContainer from 'components/ModalContainer';
import PageDataProvider from 'components/PageDataProvider';

import messages from './messages';
Expand Down
File renamed without changes.
File renamed without changes.
45 changes: 0 additions & 45 deletions src/views/SelfAssessmentView/AssessmentContent.test.jsx

This file was deleted.

45 changes: 0 additions & 45 deletions src/views/SelfAssessmentView/AssessmentContentLayout.jsx

This file was deleted.

28 changes: 0 additions & 28 deletions src/views/SelfAssessmentView/AssessmentContentLayout.test.jsx

This file was deleted.

99 changes: 0 additions & 99 deletions src/views/SelfAssessmentView/AssessmentStatus.jsx

This file was deleted.

33 changes: 8 additions & 25 deletions src/views/SelfAssessmentView/Content.jsx
Original file line number Diff line number Diff line change
@@ -1,44 +1,27 @@
import React from 'react';

import { useIntl } from '@edx/frontend-platform/i18n';

import {
usePrompts,
useSubmissionConfig,
useSubmissionResponse,
} from 'data/services/lms/hooks/selectors';

import Prompt from 'components/Prompt';
import TextResponse from 'components/TextResponse';
import FileUpload from 'components/FileUpload';

import messages from './messages';

const AssessmentContent = () => {
const prompts = usePrompts();
const response = useSubmissionResponse();
const submissionConfig = useSubmissionConfig();
const { formatMessage } = useIntl();
return (
<div>
<div className="d-flex justify-content-between">
<h2 className="mb-4">{formatMessage(messages.yourResponse)}</h2>
</div>
<p>
<strong>{formatMessage(messages.instructions)}: </strong>
{formatMessage(messages.instructionsText)}
</p>
{prompts.map((prompt, index) => (
// eslint-disable-next-line react/no-array-index-key
<div key={index}>
<Prompt prompt={prompt} />
<TextResponse
submissionConfig={submissionConfig}
value={response.textResponses[index]}
isReadOnly
/>
</div>
))}
{React.Children.toArray(
prompts.map((prompt, index) => (
<div>
<Prompt prompt={prompt} />
<TextResponse response={response.textResponses[index]} />
</div>
)),
)}
<FileUpload isReadOnly uploadedFiles={response.uploadedFiles} />
</div>
);
Expand Down

This file was deleted.

Loading

0 comments on commit 626aef2

Please sign in to comment.