mirror of
https://gitlab.com/MrFry/qmining-data-editor
synced 2025-04-01 20:24:01 +02:00
Possible answers fix
This commit is contained in:
parent
5cabf0766f
commit
09b2e1a0d0
2 changed files with 12 additions and 5 deletions
|
@ -66,6 +66,13 @@ export default function Question({ question, onChange, index }) {
|
|||
{possibleAnswers.map((possibleAnswer, i) => {
|
||||
// {"text":"a. Kétismeretlenes egyenletrendszert használunk.",
|
||||
// "selectedByUser":true}
|
||||
|
||||
console.log(possibleAnswer)
|
||||
const pa =
|
||||
typeof possibleAnswer === 'string'
|
||||
? possibleAnswer
|
||||
: possibleAnswer.text
|
||||
|
||||
return (
|
||||
<div key={i}>
|
||||
<div>
|
||||
|
@ -73,15 +80,15 @@ export default function Question({ question, onChange, index }) {
|
|||
onChange={() => {
|
||||
onChange({
|
||||
...question,
|
||||
A: possibleAnswer.text,
|
||||
A: pa,
|
||||
})
|
||||
}}
|
||||
checked={possibleAnswer.text === question.A}
|
||||
value={possibleAnswer.text}
|
||||
checked={pa === question.A}
|
||||
value={pa}
|
||||
type="radio"
|
||||
name={`possiblea${index ? index : ''}`}
|
||||
/>
|
||||
<span>{possibleAnswer.text}</span>
|
||||
<span>{pa}</span>
|
||||
</div>
|
||||
<span
|
||||
onClick={() => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"siteUrl": "https://qmining.frylabs.net/",
|
||||
"apiUrl": "http://localhost:8080/",
|
||||
"apiUrl": "https://api.frylabs.net/",
|
||||
"maxQuestionsToRender": 250
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue