update exercise student views

This commit is contained in:
Dimas Atmodjo 2024-11-05 02:24:16 +07:00
parent ef00467309
commit 9ddd10bb77
3 changed files with 21 additions and 4 deletions

View File

@ -122,8 +122,13 @@ const MatchingPairsQuestion = ({ question, onAnswer, studentAnswer, index }) =>
{mediaUrls.length > 0 && <MediaViewer mediaUrls={mediaUrls} />} {mediaUrls.length > 0 && <MediaViewer mediaUrls={mediaUrls} />}
<p>{question.QUESTION.split('\n').map((line, index) => (
<p>{question.QUESTION}</p> <React.Fragment key={index}>
{line}
<br />
</React.Fragment>
))}</p>
<div className="w-100 options-mp d-flex justify-content-between"> <div className="w-100 options-mp d-flex justify-content-between">
{/* Bagian kiri */} {/* Bagian kiri */}
<div> <div>

View File

@ -26,7 +26,13 @@ const MultipleChoiceQuestion = ({ question, onAnswer, studentAnswer, index }) =>
<div> <div>
{mediaUrls.length > 0 && <MediaViewer mediaUrls={mediaUrls} />} {mediaUrls.length > 0 && <MediaViewer mediaUrls={mediaUrls} />}
<p>{question.QUESTION}</p> <p>{question.QUESTION.split('\n').map((line, index) => (
<React.Fragment key={index}>
{line}
<br />
</React.Fragment>
))}</p>
<div className="options"> <div className="options">
{['OPTION_A', 'OPTION_B', 'OPTION_C', 'OPTION_D', 'OPTION_E'].map( {['OPTION_A', 'OPTION_B', 'OPTION_C', 'OPTION_D', 'OPTION_E'].map(
(optionKey) => { (optionKey) => {

View File

@ -19,7 +19,13 @@ const TrueFalseQuestion = ({ question, onAnswer, studentAnswer, index }) => {
<div> <div>
{mediaUrls.length > 0 && <MediaViewer mediaUrls={mediaUrls} />} {mediaUrls.length > 0 && <MediaViewer mediaUrls={mediaUrls} />}
<p>{question.QUESTION}</p> <p>{question.QUESTION.split('\n').map((line, index) => (
<React.Fragment key={index}>
{line}
<br />
</React.Fragment>
))}</p>
<div className="options-tf"> <div className="options-tf">
<div <div