|
@@ -4,9 +4,21 @@ import { Remove as RemoveIcon, Add as AddIcon } from '@mui/icons-material';
|
4
|
4
|
import {
|
5
|
5
|
Card,CardContent,Avatar,Checkbox,List,Tooltip,Fade,
|
6
|
6
|
ListItem,ListItemButton,ListItemIcon,ListItemText,
|
|
7
|
+ Box,LinearProgress,
|
7
|
8
|
} from '@mui/material'
|
|
9
|
+
|
8
|
10
|
import { deepPurple } from '@mui/material/colors';
|
9
|
11
|
|
|
12
|
+function LinearProgressWithLabel(props) {
|
|
13
|
+ return (
|
|
14
|
+ <Box sx={{ display: 'flex', alignItems: 'center' }}>
|
|
15
|
+ <Box sx={{ width: '100%', mr: 0 }}>
|
|
16
|
+ <LinearProgress variant="determinate" {...props} />
|
|
17
|
+ </Box>
|
|
18
|
+ </Box>
|
|
19
|
+ );
|
|
20
|
+}
|
|
21
|
+
|
10
|
22
|
function CheckboxexHeader(prop) {
|
11
|
23
|
return (
|
12
|
24
|
<List sx={{ width: '100%', bgcolor: 'background.paper' }}>
|
|
@@ -44,7 +56,7 @@ function CheckboxesGroup(props) {
|
44
|
56
|
}
|
45
|
57
|
}
|
46
|
58
|
let final = Object.assign(resp,temp);
|
47
|
|
- console.log('Change A:',final)
|
|
59
|
+ // console.log('Change A:',final)
|
48
|
60
|
save(final)
|
49
|
61
|
}
|
50
|
62
|
};
|
|
@@ -60,7 +72,7 @@ function CheckboxesGroup(props) {
|
60
|
72
|
}
|
61
|
73
|
}
|
62
|
74
|
let final = Object.assign(resp,temp)
|
63
|
|
- console.log('Change B: ', final);
|
|
75
|
+ // console.log('Change B: ', final);
|
64
|
76
|
save(final)
|
65
|
77
|
}
|
66
|
78
|
};
|
|
@@ -119,16 +131,17 @@ function CheckboxesGroup(props) {
|
119
|
131
|
);
|
120
|
132
|
}
|
121
|
133
|
|
122
|
|
-export function Question({quiz, index, current, save, responses}) {
|
|
134
|
+export function Question({quiz, index, current, save, responses, progress}) {
|
123
|
135
|
let { instrucciondepregunta, respuestas,id } = quiz
|
124
|
136
|
let checked = index === current;
|
|
137
|
+
|
125
|
138
|
return (
|
126
|
139
|
<Fade in={checked} unmountOnExit>
|
127
|
140
|
<Card className="question_form">
|
128
|
141
|
<CardContent>
|
129
|
142
|
<div variant="body2">
|
130
|
143
|
<List>
|
131
|
|
- <CheckboxexHeader group={id} title={instrucciondepregunta}/>
|
|
144
|
+ <CheckboxexHeader group={index + 1} title={instrucciondepregunta}/>
|
132
|
145
|
</List>
|
133
|
146
|
<CheckboxesGroup
|
134
|
147
|
id={id}
|
|
@@ -138,6 +151,7 @@ export function Question({quiz, index, current, save, responses}) {
|
138
|
151
|
/>
|
139
|
152
|
</div>
|
140
|
153
|
</CardContent>
|
|
154
|
+ <LinearProgressWithLabel value={progress} />
|
141
|
155
|
</Card>
|
142
|
156
|
</Fade>
|
143
|
157
|
);
|