Fix student grade registration: set grade_10 as default, add auto-heal for legacy tawjihi_2008, add student grade selector and update-grade API

This commit is contained in:
Hamza-Ayed
2026-09-09 01:06:35 +03:00
parent 8183e53b86
commit 0a2ca71cb4
13 changed files with 440 additions and 41 deletions
@@ -20,7 +20,9 @@ class ErrorNotebookSummary {
});
factory ErrorNotebookSummary.fromJson(Map<String, dynamic> json) {
final rawBySubject = json['by_subject'] as Map<String, dynamic>? ?? {};
final rawBySubject = json['by_subject'] is Map
? Map<String, dynamic>.from(json['by_subject'] as Map)
: <String, dynamic>{};
final bySub = <String, int>{};
rawBySubject.forEach((k, v) {
bySub[k] = (v is num) ? v.toInt() : 0;