@php $currentFilter = $currentFilter ?? 'all'; $currentType = $currentType ?? 'all'; $curriculumCourses = $curriculumCourses ?? $courses->where('resolved_type', 'curriculum')->values(); $skillCourses = $skillCourses ?? $courses->where('resolved_type', 'skill')->values(); $showCurriculumSection = ($currentType === 'all' || $currentType === 'curriculum'); $showSkillSection = ($currentType === 'all' || $currentType === 'skill'); $renderCourseCard = function ($course) { $isSkill = (($course->resolved_type ?? 'curriculum') === 'skill'); $percentage = max(0, min(100, (int) ($course->progress_pct ?? 0))); $starsLit = $percentage >= 100 ? 3 : ($percentage >= 66 ? 2 : ($percentage >= 25 ? 1 : 0)); $barWidth = $percentage > 0 ? max(8, $percentage) : 4; $hasSyllabus = !empty($course->syllabus) && strtoupper((string) $course->syllabus) !== 'NULL'; $langText = $course->language ? strtoupper($course->language) : 'CODING'; $searchBlob = strtolower(trim(($course->coursename ?? '') . ' ' . ($course->coursecode ?? '') . ' ' . ($course->language ?? '') . ' ' . ($isSkill ? 'skill' : 'curriculum'))); return compact('isSkill', 'percentage', 'starsLit', 'barWidth', 'hasSyllabus', 'langText', 'searchBlob'); }; @endphp @if($courses->isEmpty())
@if($currentFilter === 'completed') Solve coding puzzles & quizzes inside your courses to earn all 3 golden stars! @elseif($currentFilter === 'current') Superstar! You finished every course in this category! @else No class tracks or skill quests have been added yet. Check back soon! @endif
Your main coding adventures — collect all 3 stars on each track!
No curriculum courses match this filter right now. Check Skill Quests below to keep coding!
Extra coding adventures open for every Little Buds coder!
No skill quests match this filter right now. New bonus tracks will appear here automatically!