mcy_new #1
|
|
@ -340,7 +340,6 @@ class Utils {
|
|||
];
|
||||
|
||||
Map<String, int> optInfos = {};
|
||||
print('opt====${que.questionNo}');
|
||||
for (var d in ques
|
||||
.where((w) => w.questionType == 1 && w.studentAnswer != null)) {
|
||||
final key = d.studentAnswer!;
|
||||
|
|
@ -353,7 +352,8 @@ class Utils {
|
|||
List<SelectionRate> student = [];
|
||||
optInfos.forEach((key, value) {
|
||||
// optInfos[key] = Utils.calcRate(value, ques.length).round();
|
||||
List<Students> currentOptionStudents = data.students.where((s) => ques
|
||||
List<Students> currentOptionStudents = data.students
|
||||
.where((s) => ques
|
||||
.where(
|
||||
(w) => w.studentAnswer == key && w.studentId == s.studentId)
|
||||
.isNotEmpty)
|
||||
|
|
@ -363,12 +363,15 @@ class Utils {
|
|||
List<String> chars = upStr.split('')..sort();
|
||||
String sortedStr = chars.join();
|
||||
|
||||
student.add(SelectionRate(sortedStr, Utils.calcRate(value, ques.length).round(),false, currentOptionStudents));
|
||||
student.add(SelectionRate(
|
||||
sortedStr,
|
||||
Utils.calcRate(value, ques.length).round(),
|
||||
false,
|
||||
currentOptionStudents));
|
||||
});
|
||||
print('optitems=$optInfos');
|
||||
/* var ARate = Utils.calcRate(
|
||||
/* print('optitems=$optInfos');
|
||||
var ARate = Utils.calcRate(
|
||||
ques.where((w) => w.studentAnswer == "A").length, ques.length);*/
|
||||
|
||||
que.options = student;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -897,7 +897,8 @@ class _ReportTableState extends State<ReportTable> {
|
|||
.r,
|
||||
horizontal:
|
||||
8.r),
|
||||
color:const Color(0xFFF0ECFF),
|
||||
color: const Color(
|
||||
0xFFF0ECFF),
|
||||
child: quickText(
|
||||
e
|
||||
.studentName,
|
||||
|
|
|
|||
Loading…
Reference in New Issue