|
|
|
@ -15,7 +15,15 @@ const AddQuestions = ({ grades, addExamState, dispatch, stepClick, backStep }) = |
|
|
|
|
const [questionarePopUp, setQuestionairePopUp] = useState(false); |
|
|
|
|
const [showCoursesInList, setShowCoursesInList] = useState([]); |
|
|
|
|
const [choosedQuestionaries, seChoosedQuestionaries] = useState([]); |
|
|
|
|
const [selectedQuestionare, setSelectedQuestionare] = useState(null) |
|
|
|
|
const [selectedQuestionare, setSelectedQuestionare] = useState(null); |
|
|
|
|
const [selectedCourse, setSelectedCourse] = useState({ |
|
|
|
|
sortId: 1, |
|
|
|
|
title: 'ادبیات فارسی', |
|
|
|
|
coefficient: 3, |
|
|
|
|
questionStart: 1, |
|
|
|
|
questionEnd: 0, |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
console.log(choosedQuestionaries) |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
@ -235,7 +243,8 @@ const AddQuestions = ({ grades, addExamState, dispatch, stepClick, backStep }) = |
|
|
|
|
{ |
|
|
|
|
selectedQuestionare?.courses.map( |
|
|
|
|
(item) => ( |
|
|
|
|
<SelectedCourse title={item.title} coefficient={item.coefficient} questionQuantity={item.questionEnd - item.questionStart + 1}/> |
|
|
|
|
<SelectedCourse title={item.title} coefficient={item.coefficient} questionQuantity={item.questionEnd - item.questionStart + 1}
|
|
|
|
|
onClick={() => {setSelectedCourse(item); console.log(selectedCourse)}}/> |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
@ -246,7 +255,7 @@ const AddQuestions = ({ grades, addExamState, dispatch, stepClick, backStep }) = |
|
|
|
|
</div> |
|
|
|
|
<div className="w-1/2 flex justify-center"> |
|
|
|
|
<div className="w-4/5 py-8"> |
|
|
|
|
<AnswerSheet questionsQuantity={30} optionsQuantity={4}/> |
|
|
|
|
<AnswerSheet questionsQuantity={selectedCourse.questionEnd - selectedCourse.questionStart + 1} optionsQuantity={4}/> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|