From 8b09ab767bdae454a87254b683aa087bb5b4ad18 Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Fri, 28 Aug 2026 04:49:19 +0300 Subject: [PATCH] Update Saqel Platform: 2026-08-28 04:49:19 --- backend/app/Services/TeacherRatingService.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/app/Services/TeacherRatingService.php b/backend/app/Services/TeacherRatingService.php index 8036efb..22c0de6 100644 --- a/backend/app/Services/TeacherRatingService.php +++ b/backend/app/Services/TeacherRatingService.php @@ -431,7 +431,7 @@ class TeacherRatingService $teachers = Database::select( "SELECT u.id, u.full_name, u.phone_number, - tp.specialization, tp.bio, tp.rating as legacy_rating, + tp.specialization, tp.bio, m.avg_response_minutes, m.response_rate_percentage, m.active_queue_count, m.total_students_enrolled, m.total_reviews_count, m.weighted_student_rating, m.composite_merit_score, m.star_equivalent, m.reputation_tier, @@ -444,6 +444,12 @@ class TeacherRatingService ); foreach ($teachers as &$t) { + $rawName = (string)($t['full_name'] ?? ''); + $t['full_name'] = \App\Core\Security::decrypt($rawName) ?: $rawName; + if (empty($t['full_name'])) { + $t['full_name'] = 'الأستاذ المعتمد'; + } + if (empty($t['composite_merit_score'])) { $metrics = self::recalculateTeacherMetrics((int)$t['id']); $t['composite_merit_score'] = $metrics['composite_merit_score'];