@php
$studentName = is_array($userInfo ?? null) ? ($userInfo['name'] ?? 'Học viên') : ($userInfo->name ?? 'Học viên');
$studentPhone = is_array($userInfo ?? null) ? ($userInfo['phone'] ?? 'N/A') : ($userInfo->phone ?? 'N/A');
$scoreId = $studentScoreId ?? ($idHistoryContest ?? 'N/A');
$defaultBrand = in_array($formula ?? null, [3, 4]) ? 'Easy IELTS' : 'Easy PASS';
$brandName = !empty($branding['brandName']) ? $branding['brandName'] : $defaultBrand;
$brandLogoUrl = $branding['logoUrl'] ?? null;
$zaloUrl = $branding['zaloUrl'] ?? 'https://zalo.me/2076043233870145957';
$hotline = $branding['hotline'] ?? '1900 9399 nhấn phím 2';
$iccLogoSrc = asset('images/logo_icc.png');
$brandLogoFile = in_array($formula ?? null, [3, 4]) ? 'logo_footer_EI.png' : 'logo_footer_EP.png';
$epLogoSrc = asset('images/' . $brandLogoFile);
$footerLogoSrc = !empty($brandLogoUrl) ? $brandLogoUrl : $epLogoSrc;
$bgMoSrc = asset('images/Mo.png');
$layer1Src = asset('images/student_banner.png');
// Ánh xạ tên Tiếng Việt cho các kỹ năng
// Chỗ này biến Vocab thành Viết thì phía chị Linh yêu cầu thế
// Chỉ có writing hoặc vocab trong 1 bài , ko xuất hiện cả 2
$skillNameMap = [
'vocabulary' => 'Viết',
'listening' => 'Nghe',
'reading' => 'Đọc',
'writing' => 'Viết',
'speaking' => 'Nói',
'grammar' => 'Ngữ pháp',
13 => 'Nghe',
14 => 'Đọc',
15 => 'Viết',
16 => 'Nói',
17 => 'Viết',
];
$getSkillNameVi = function($skill) use ($skillNameMap) {
$skillId = $skill['skill'] ?? null;
$rawName = strtolower(trim($skill['name'] ?? ''));
return $skillNameMap[$rawName] ?? $skillNameMap[$skillId] ?? ($skill['name'] ?? 'Kỹ năng');
};
$skillsList = $skillsDetail ?? [];
$skillsCount = count($skillsList);
$overallWidth = $skillsCount > 0 ? 20 : 50;
$courseWidth = 32;
$skillWidth = $skillsCount > 0 ? floor((100 - $overallWidth - $courseWidth) / $skillsCount) : 0;
@endphp
Kết quả bài thi – {{ $studentName }}
@if(!empty($forwardInfo))
|
Chuyển tiếp bởi: {{ $forwardInfo['forwarder_name'] ?? 'Người dùng' }}
@if(!empty($forwardInfo['forwarder_email']))
({{ $forwardInfo['forwarder_email'] }})
@endif
|
|
Thời gian: {{ $forwardInfo['time'] ?? '' }}
|
@if(!empty($forwardInfo['note']))
|
Lời nhắn: {!! nl2br(e(trim($forwardInfo['note']))) !!}
|
@endif
@endif
|
Kết quả đánh giá năng lực
Tiếng Anh
|
|
|
{{ $brandName }} kính chào Quý Học viên/Quý Phụ huynh,
Cảm ơn Quý Học viên/Quý Phụ huynh đã tin tưởng và lựa chọn {{ $brandName }} là đơn vị đồng hành trong quá trình học tập và phát triển năng lực Tiếng Anh.
{{ $brandName }} xin gửi Quý Học viên/Quý Phụ huynh kết quả bài đánh giá năng lực Tiếng Anh. Thông tin chi tiết như sau:
|
|
Họ tên Học viên: {{ $studentName }}
|
Ngày thi: {{ $testDate ?? '—' }}
|
|
Mã bài thi: {{ $scoreId }}
|
Số điện thoại: {{ $studentPhone }}
|
Kết quả đánh giá cụ thể
|
|
ĐIỂM BÀI THI
|
@foreach($skillsList as $idx => $s)
{{ $getSkillNameVi($s) }}
|
@endforeach
KHÓA HỌC ĐỀ XUẤT
|
|
{{ ($overallScore ?? -1) == -1 ? '—' : $overallScore }}
|
@foreach($skillsList as $idx => $s)
{{ isset($s['score']) && $s['score'] != -1 ? $s['score'] : '—' }}
|
@endforeach
{{ $overallRec['recommended_course'] ?? '—' }}
|
|
@foreach($skillsList as $index => $skill)
@php
$skillDisplayName = $getSkillNameVi($skill);
$skillScoreDisplay = ($skill['score'] ?? -1) == -1 ? '—' : $skill['score'];
@endphp
|
NHẬN XÉT CHI TIẾT KỸ NĂNG: {{ mb_strtoupper($skillDisplayName) }} (Điểm số: {{ $skillScoreDisplay }})
|
|
Nhận xét
|
@if(($skill['skill'] ?? null) == EMS_SKILL_SPEAKING || strtolower($skill['name'] ?? '') === 'speaking')
@php $fb = $skill['feedback'] ?? []; @endphp
@if(!empty($fb['fluency']) || !empty($fb['vocabulary']) || !empty($fb['grammar']) || !empty($fb['pronunciation']))
@if(!empty($fb['fluency']))
Fluency: {!! nl2br(e($fb['fluency'])) !!}
@endif
@if(!empty($fb['vocabulary']))
Vocabulary: {!! nl2br(e($fb['vocabulary'])) !!}
@endif
@if(!empty($fb['grammar']))
Grammar: {!! nl2br(e($fb['grammar'])) !!}
@endif
@if(!empty($fb['pronunciation']))
Pronunciation: {!! nl2br(e($fb['pronunciation'])) !!}
@endif
@else
{!! nl2br(e($fb['review'] ?? '')) !!}
@endif
@elseif(($skill['skill'] ?? null) == EMS_SKILL_WRITING || strtolower($skill['name'] ?? '') === 'writing')
@php $fb = $skill['feedback'] ?? []; @endphp
@if(!empty($fb['stopMessage']))
Lưu ý: {!! nl2br(e($fb['stopMessage'])) !!}
@endif
@if(!empty($fb['criteria']) && is_array($fb['criteria']))
@foreach($fb['criteria'] as $crit)
{{ $crit['name'] ?? 'Tiêu chí' }}: {!! nl2br(e($crit['text'] ?? '')) !!}
@endforeach
@else
{!! nl2br(e($fb['review'] ?? '')) !!}
@endif
@else
{!! nl2br(e($skill['feedback']['review'] ?? '')) !!}
@endif
|
|
Đề xuất
|
{!! nl2br(e($skill['feedback']['recommendation'] ?? '')) !!}
|
|
@endforeach
|
Giải pháp từ {{ mb_strtoupper($brandName) }} dành cho học viên
|
|
Định hướng học tập
|
{!! nl2br(e($overallRec['route_and_proposal'] ?? '')) !!}
|
|
Đầu ra tương đương
|
{{ $overallRec['expected_output'] ?? '' }}
|
|
|
Mọi thông tin chi tiết cần hỗ trợ & giải đáp, Quý Học viên/Quý Phụ huynh vui lòng liên hệ với {{ $brandName }} theo thông tin dưới đây:
|
|
|
|
Trân trọng cảm ơn,
{{ $brandName }}
|
|
|
Giải pháp Học tiếng Anh trực tuyến toàn diện Cả kỹ năng Nghe - Nói - Đọc - Viết dành cho học viên từ 12-18 tuổi được phát triển bởi ICANCONNECT.
|
|
|
|