@extends('layouts.app', ['title' => 'Informasi Kurikulum Prodi']) @section('content')
@include('admin.partials.export-excel-button', ['section' => 'curriculum', 'label' => 'Export Excel Kurikulum'])
@php $normalizeInlineText = function ($value) { return trim(preg_replace('/\s+/u', ' ', (string) $value) ?? ''); }; $normalizeBkCode = function ($value) use ($normalizeInlineText) { $normalized = $normalizeInlineText($value); return preg_replace('/\s*-\s*/u', '-', $normalized) ?? $normalized; }; $normalizeCplCode = function ($value) use ($normalizeInlineText) { $normalized = $normalizeInlineText($value); return preg_replace('/\s*-\s*/u', '-', $normalized) ?? $normalized; }; $normalizeCurriculumBkLabel = function ($value) use ($normalizeInlineText, $normalizeBkCode) { $normalized = $normalizeInlineText($value); if (preg_match('/^(BK)\s*-\s*(\d+)\s*(?:-\s*)?(.*)$/ui', $normalized, $matches)) { $code = $normalizeBkCode($matches[1].'-'.$matches[2]); $material = $normalizeInlineText($matches[3] ?? ''); return $material !== '' ? $code.'-'.$material : $code; } return $normalized; }; $stripParentheticalText = function ($value) use ($normalizeInlineText) { return $normalizeInlineText(preg_replace('/\s*\([^)]*\)/u', '', (string) $value) ?? ''); }; $parseStoredOptionValues = function ($rawValue) use ($normalizeInlineText) { $rawValue = trim((string) $rawValue); if ($rawValue === '') { return []; } $decoded = json_decode($rawValue, true); if (json_last_error() === JSON_ERROR_NONE && is_array($decoded)) { return collect($decoded) ->map(fn ($value) => $normalizeInlineText($value)) ->filter() ->values() ->all(); } return collect(explode(',', $rawValue)) ->map(fn ($value) => $normalizeInlineText($value)) ->filter() ->values() ->all(); }; $graduateProfileRows = old('graduate_profiles', $settings->graduate_profiles ?? []); $learningOutcomeRows = old('learning_outcomes', $settings->learning_outcomes ?? []); $studyMaterialMapRows = old('study_material_cpl_map', $settings->study_material_cpl_map ?? []); $studyMaterialCourseWeightRows = old('study_material_course_weights', $settings->study_material_course_weights ?? []); $curriculumMatrixRows = old('curriculum_matrix', $settings->curriculum_matrix ?? []); $graduateProfileOptions = collect($graduateProfileRows) ->map(function ($row) { $code = trim((string) ($row['graduate_code'] ?? '')); $profile = trim((string) ($row['graduate_profile'] ?? '')); if ($code === '' && $profile === '') { return null; } $label = trim($code.($profile !== '' ? ' - '.$profile : '')); return [ 'value' => $label, 'label' => $label, ]; }) ->filter() ->unique('value') ->values() ->mapWithKeys(fn ($item) => [$item['value'] => $item['label']]) ->all(); $supportedCplOptions = collect($learningOutcomeRows) ->map(function ($row) { $code = trim((string) ($row['code'] ?? '')); if ($code === '') { return null; } return [ 'value' => $code, 'label' => $code, ]; }) ->filter() ->unique('value') ->values() ->mapWithKeys(fn ($item) => [$item['value'] => $item['label']]) ->all(); $learningOutcomeDisplayOptions = collect($learningOutcomeRows) ->map(function ($row) { $code = trim((string) ($row['code'] ?? '')); $description = trim((string) ($row['description'] ?? '')); if ($code === '' && $description === '') { return null; } $label = $code !== '' && $description !== '' ? $code.' - '.$description : ($code !== '' ? $code : $description); return [ 'value' => $label, 'label' => $label, ]; }) ->filter() ->unique('value') ->values() ->mapWithKeys(fn ($item) => [$item['value'] => $item['label']]) ->all(); $curriculumMatrixSupportedCplOptions = collect($learningOutcomeRows) ->map(function ($row) use ($stripParentheticalText) { $code = $stripParentheticalText($row['code'] ?? ''); if ($code === '') { return null; } return [ 'value' => $code, 'label' => $code, ]; }) ->filter() ->unique('value') ->values() ->mapWithKeys(fn ($item) => [$item['value'] => $item['label']]) ->all(); $studyMaterialCodeOptions = collect($studyMaterialMapRows) ->pluck('study_material_code') ->map(fn ($value) => $normalizeInlineText($value)) ->filter() ->unique() ->values() ->mapWithKeys(fn ($value) => [$value => $value]) ->all(); $studyMaterialOptions = collect($studyMaterialMapRows) ->pluck('study_material') ->map(fn ($value) => $normalizeInlineText($value)) ->filter() ->unique() ->values() ->mapWithKeys(fn ($value) => [$value => $value]) ->all(); $studyMaterialPairs = collect($studyMaterialMapRows) ->mapWithKeys(function ($row) use ($normalizeInlineText) { $code = $normalizeInlineText($row['study_material_code'] ?? ''); $material = $normalizeInlineText($row['study_material'] ?? ''); if ($code === '' || $material === '') { return []; } return [$code => $material]; }) ->all(); $studyMaterialCodeToMaterialOptions = collect($studyMaterialPairs) ->map(fn ($material, $code) => ['code' => $code, 'material' => $material]) ->values() ->all(); $courseStructureRows = old('course_structure', $settings->course_structure ?? []); $courseStructureSksByCourseName = collect($courseStructureRows) ->mapWithKeys(function ($row) use ($normalizeInlineText) { $courseName = $normalizeInlineText($row['course_name'] ?? ''); $sks = $normalizeInlineText($row['sks'] ?? ''); if ($courseName === '' || $sks === '') { return []; } return [$courseName => $sks]; }) ->all(); $curriculumMatrixSourceRows = collect($studyMaterialCourseWeightRows) ->map(function ($row) use ($normalizeInlineText, $normalizeBkCode, $normalizeCurriculumBkLabel, $courseStructureSksByCourseName) { $code = $normalizeBkCode($row['study_material_code'] ?? ''); $material = $normalizeInlineText($row['study_material'] ?? ''); $courseName = $normalizeInlineText($row['course_name'] ?? ''); $sks = $normalizeInlineText($row['sks'] ?? '') ?: ($courseStructureSksByCourseName[$courseName] ?? ''); if ($code === '' && $material === '' && $courseName === '' && $sks === '') { return null; } $bkLabel = trim($code.($material !== '' ? '-'.$material : '')); return [ 'bk_label' => $bkLabel, 'bk_label_normalized' => $normalizeCurriculumBkLabel($bkLabel), 'study_material_code' => $code, 'study_material' => $material, 'course_name' => $courseName, 'sks' => $sks, ]; }) ->filter() ->values() ->all(); $curriculumMatrixBkOptions = collect($curriculumMatrixSourceRows) ->pluck('bk_label') ->map(fn ($value) => trim((string) $value)) ->filter() ->unique() ->values() ->mapWithKeys(fn ($value) => [$value => $value]) ->all(); $curriculumMatrixBkOptionsLookup = collect($curriculumMatrixSourceRows) ->mapWithKeys(function ($row) { $label = trim((string) ($row['bk_label'] ?? '')); $normalizedLabel = trim((string) ($row['bk_label_normalized'] ?? '')); if ($label === '' && $normalizedLabel === '') { return []; } return [ $label => $label, $normalizedLabel => $label, ]; }) ->all(); $curriculumMatrixCourseOptionsByBk = collect($curriculumMatrixSourceRows) ->groupBy('bk_label_normalized') ->map(function ($rows) { return collect($rows) ->pluck('course_name') ->map(fn ($value) => trim((string) $value)) ->filter() ->unique() ->values() ->all(); }) ->all(); $curriculumMatrixSksOptionsByBkCourse = collect($curriculumMatrixSourceRows) ->groupBy('bk_label_normalized') ->map(function ($rows) { return collect($rows) ->groupBy('course_name') ->map(function ($courseRows) { return collect($courseRows) ->pluck('sks') ->map(fn ($value) => trim((string) $value)) ->filter() ->unique() ->values() ->all(); }) ->all(); }) ->all(); $curriculumMapCourseOptions = collect($curriculumMatrixRows) ->pluck('course_name') ->map(fn ($value) => $normalizeInlineText($value)) ->filter() ->unique() ->values() ->mapWithKeys(fn ($value) => [$value => $value]) ->all(); $curriculumMapSksByCourseName = collect($curriculumMatrixRows) ->mapWithKeys(function ($row) use ($normalizeInlineText) { $courseName = $normalizeInlineText($row['course_name'] ?? ''); $sks = $normalizeInlineText($row['sks'] ?? ''); if ($courseName === '' || $sks === '') { return []; } return [$courseName => $sks]; }) ->all(); $curriculumMapSupportedCplByCourseName = collect($curriculumMatrixRows) ->mapWithKeys(function ($row) use ($normalizeInlineText, $stripParentheticalText, $parseStoredOptionValues, $normalizeCplCode) { $courseName = $normalizeInlineText($row['course_name'] ?? ''); if ($courseName === '') { return []; } $supportedCpls = collect($parseStoredOptionValues($row['supported_cpl'] ?? '')) ->map(fn ($value) => $normalizeCplCode($stripParentheticalText($value))) ->filter() ->unique() ->values() ->all(); return [$courseName => $supportedCpls]; }) ->all(); $curriculumMapSeedRows = collect($curriculumMatrixRows) ->map(function ($row, $index) use ($normalizeInlineText, $stripParentheticalText, $parseStoredOptionValues, $normalizeCplCode) { $courseName = $normalizeInlineText($row['course_name'] ?? ''); $sks = $normalizeInlineText($row['sks'] ?? ''); if ($courseName === '' && $sks === '') { return null; } $supportedCpls = collect($parseStoredOptionValues($row['supported_cpl'] ?? '')) ->map(fn ($value) => $normalizeCplCode($stripParentheticalText($value))) ->filter() ->unique() ->values() ->all(); $seedRow = [ 'number' => (string) ($index + 1), 'course_name' => $courseName, 'sks' => $sks, ]; foreach (range(1, 12) as $cplNumber) { $seedRow['cpl_'.$cplNumber] = in_array('CPL-'.$cplNumber, $supportedCpls, true) ? '1' : ''; } return $seedRow; }) ->filter() ->values() ->all(); $courseCplCpmkCourseOptions = collect($curriculumMatrixRows) ->pluck('course_name') ->map(fn ($value) => $normalizeInlineText($value)) ->filter() ->unique() ->values() ->mapWithKeys(fn ($value) => [$value => $value]) ->all(); $courseCplCpmkCplByCourseName = collect($curriculumMatrixRows) ->mapWithKeys(function ($row) use ($normalizeInlineText, $parseStoredOptionValues, $stripParentheticalText) { $courseName = $normalizeInlineText($row['course_name'] ?? ''); if ($courseName === '') { return []; } $cplValues = collect($parseStoredOptionValues($row['supported_cpl'] ?? '')) ->map(fn ($value) => $stripParentheticalText($value)) ->filter() ->unique() ->values() ->all(); return [$courseName => $cplValues]; }) ->all(); $courseCplCpmkSeedRows = collect($curriculumMatrixRows) ->map(function ($row, $index) use ($normalizeInlineText, $parseStoredOptionValues, $stripParentheticalText) { $courseName = $normalizeInlineText($row['course_name'] ?? ''); if ($courseName === '') { return null; } $cplValues = collect($parseStoredOptionValues($row['supported_cpl'] ?? '')) ->map(fn ($value) => $stripParentheticalText($value)) ->filter() ->unique() ->values() ->all(); return [ 'number' => (string) ($index + 1), 'course_name' => $courseName, 'cpl' => implode(', ', $cplValues), 'cpmk' => '', ]; }) ->filter() ->values() ->all(); $syncCourseCplCpmkRows = function (array $existingRows) use ($courseCplCpmkSeedRows, $normalizeInlineText) { $existingCpmkByCourse = collect($existingRows) ->mapWithKeys(function ($row) use ($normalizeInlineText) { $courseName = $normalizeInlineText($row['course_name'] ?? ''); if ($courseName === '') { return []; } return [$courseName => (string) ($row['cpmk'] ?? '')]; }) ->all(); if (blank($courseCplCpmkSeedRows)) { return $existingRows; } return collect($courseCplCpmkSeedRows) ->map(function ($seedRow, $index) use ($existingCpmkByCourse, $normalizeInlineText) { $courseName = $normalizeInlineText($seedRow['course_name'] ?? ''); return [ 'number' => (string) ($index + 1), 'course_name' => $seedRow['course_name'] ?? '', 'cpl' => $seedRow['cpl'] ?? '', 'cpmk' => $existingCpmkByCourse[$courseName] ?? '', ]; }) ->all(); }; $semesterOptions = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII']; $courseOptionsByStudyMaterialCode = [ 'BK-1' => [ 'Al Islam Kemuhammadiyahan I', 'Al Islam Kemuhammadiyahan II', 'Al Islam Kemuhammadiyahan III', 'Al Islam Kemuhammadiyahan IV', 'Al Islam Kemuhammadiyahan V', 'Al Islam Kemuhammadiyahan VI', 'Pendidikan Agama', 'Pendidikan Pancasila', 'Bahasa Indonesia', 'Bahasa Arab', 'Pendidikan Kewarganegaraan', 'Pendidikan Anti Korupsi dan Narkoba', 'Khazanah Bugis', ], 'BK-2' => [ 'Trigonometri', 'Dasar-dasar Matematika', 'Teori Bilangan', 'Aljabar Elementer', 'Statistika Dasar', 'Kalkulus I', 'Kalkulus II', 'Kalkulus Lanjutan', 'Geometri Dasar', 'Geometri Analitik Datar', 'Geometri Analitik Ruang', 'Persamaan Differensial Biasa', 'Aljabar Linear', 'Program Linear', 'Analisis Kompleks', 'Pengantar Analisis Real', 'Statistika Matematika', 'Geometri Transformasi', 'Teori Grup', 'Statistika Terapan', 'Matematika Diskrit', 'Matematika Ekonomi', ], 'BK-3' => [ 'Pengantar Pendidikan', 'Perkembangan Peserta Didik', 'Profesi Keguruan', 'Belajar dan Pembelajaran Matematika', 'Pendidikan Inklusif', 'Matematika Sekolah dan Pembelajarannya', 'Ethnomatematika', 'Assesmen Pembelajaran Matematika', 'Microteaching', 'PLP 1', 'PLP 2', ], 'BK-4' => [ 'Media Pembelajaran Matematika Berbasis TIK', 'Aplikasi Komputer', 'Coding Matematika', ], 'BK-5' => [ 'Metodologi Penelitian Kualitatif', 'Metodologi Penelitian Kuantitatif', 'Filsafat Pendidikan Matematika', 'Tugas Akhir/Skripsi', ], 'BK-6' => [ 'Entrepreneurship Digital', 'English For Math', 'Kokurikuler', 'KKN', ], ]; $courseOptionsByStudyMaterialCodeLookup = collect($courseOptionsByStudyMaterialCode) ->mapWithKeys(function ($courses, $code) use ($normalizeBkCode, $normalizeInlineText) { $normalizedCode = $normalizeBkCode($code); $spacedCode = str_replace('-', ' - ', $normalizedCode); $normalizedCourses = collect($courses) ->map(fn ($course) => $normalizeInlineText($course)) ->filter() ->values() ->all(); return [ $normalizedCode => $normalizedCourses, $spacedCode => $normalizedCourses, ]; }) ->all(); $courseStructureSeedRows = collect($studyMaterialCourseWeightRows) ->map(function ($row, $index) { $courseName = trim((string) ($row['course_name'] ?? '')); $sks = trim((string) ($row['sks'] ?? '')); if ($courseName === '' && $sks === '') { return null; } return [ 'number' => (string) ($index + 1), 'course_name' => $courseName, 'course_type' => '', 'type_code' => '', 'sks' => $sks, 'course_code' => '', 'semester' => '', ]; }) ->filter() ->values() ->all(); if (blank($courseStructureRows) && ! blank($courseStructureSeedRows)) { $courseStructureRows = $courseStructureSeedRows; } $courseStructureAllCourseOptions = collect($courseStructureRows) ->pluck('course_name') ->map(fn ($value) => trim((string) $value)) ->filter() ->unique() ->values() ->mapWithKeys(fn ($value) => [$value => $value]) ->all(); $courseStructureCourseOptions = collect($courseStructureRows) ->filter(function ($row) { return trim((string) ($row['course_type'] ?? '')) === 'Mata Kuliah Wajib Fakultas'; }) ->pluck('course_name') ->map(fn ($value) => trim((string) $value)) ->filter() ->unique() ->values() ->mapWithKeys(fn ($value) => [$value => $value]) ->all(); $courseStructureSemesterSksMap = collect($courseStructureRows) ->filter(function ($row) { return trim((string) ($row['course_type'] ?? '')) === 'Mata Kuliah Wajib Fakultas'; }) ->mapWithKeys(function ($row) { $courseName = trim((string) ($row['course_name'] ?? '')); $semester = trim((string) ($row['semester'] ?? '')); $sks = trim((string) ($row['sks'] ?? '')); if ($courseName === '') { return []; } $label = trim($semester.($sks !== '' ? ' ('.$sks.')' : '')); return [$courseName => $label]; }) ->all(); $parseStoredTagValues = function ($rawValue, array $availableOptions = []) { $rawValue = trim((string) $rawValue); if ($rawValue === '') { return []; } $decoded = json_decode($rawValue, true); if (json_last_error() === JSON_ERROR_NONE && is_array($decoded)) { return collect($decoded) ->map(fn ($value) => trim((string) $value)) ->filter() ->values() ->all(); } $matchedOptions = collect(array_keys($availableOptions)) ->map(function ($optionValue) use ($rawValue) { $position = mb_strpos($rawValue, $optionValue); return $position === false ? null : ['value' => $optionValue, 'position' => $position]; }) ->filter() ->sortBy('position') ->pluck('value') ->values() ->all(); if ($matchedOptions !== []) { return $matchedOptions; } return collect(explode(',', $rawValue)) ->map(fn ($value) => trim((string) $value)) ->filter() ->values() ->all(); }; $columnStyleMap = [ 'default' => [ 'number' => 'min-width: 64px; width: 64px;', ], 'graduate_profiles' => [ 'code' => 'min-width: 180px; width: 180px;', 'profile' => 'min-width: 340px; width: 24%;', 'description' => 'min-width: 760px; width: 60%;', ], 'learning_outcomes' => [ 'code' => 'min-width: 260px; width: 20%;', 'description' => 'min-width: 920px; width: 72%;', ], 'study_material_cpl_map' => [ 'study_material_code' => 'min-width: 180px; width: 12%;', 'study_material' => 'min-width: 560px; width: 42%;', 'supported_cpl_code' => 'min-width: 520px; width: 40%;', ], 'study_material_course_weights' => [ 'study_material_code' => 'min-width: 140px; width: 10%;', 'study_material' => 'min-width: 520px; width: 36%;', 'course_name' => 'min-width: 420px; width: 30%;', 'sks' => 'min-width: 90px; width: 7%;', ], 'course_structure' => [ 'course_name' => 'min-width: 340px; width: 24%;', 'course_type' => 'min-width: 260px; width: 18%;', 'type_code' => 'min-width: 150px; width: 10%;', 'sks' => 'min-width: 90px; width: 7%;', 'course_code' => 'min-width: 190px; width: 13%;', 'semester' => 'min-width: 110px; width: 8%;', ], 'course_prerequisites' => [ 'course_name' => 'min-width: 420px; width: 30%;', 'prerequisite_courses' => 'min-width: 820px; width: 62%;', ], 'faculty_course_cpl_cpmk_map' => [ 'faculty_course' => 'min-width: 360px; width: 22%;', 'semester_sks' => 'min-width: 170px; width: 10%;', 'faculty_cpl_supported' => 'min-width: 360px; width: 22%;', 'study_program_cpl_relation' => 'min-width: 460px; width: 30%;', 'course_cpmk' => 'min-width: 420px; width: 28%;', ], 'curriculum_matrix' => [ 'number' => 'min-width: 78px; width: 78px; max-width: 78px;', 'study_material' => 'min-width: 420px; width: 26%;', 'course_name' => 'min-width: 420px; width: 26%;', 'sks' => 'min-width: 90px; width: 7%;', 'supported_cpl' => 'min-width: 520px; width: 35%;', ], 'curriculum_map' => [ 'course_name' => 'min-width: 420px; width: 28%;', 'sks' => 'min-width: 90px; width: 6%;', 'cpl_1' => 'min-width: 76px; width: 4.9%; text-align: center;', 'cpl_2' => 'min-width: 76px; width: 4.9%; text-align: center;', 'cpl_3' => 'min-width: 76px; width: 4.9%; text-align: center;', 'cpl_4' => 'min-width: 76px; width: 4.9%; text-align: center;', 'cpl_5' => 'min-width: 76px; width: 4.9%; text-align: center;', 'cpl_6' => 'min-width: 76px; width: 4.9%; text-align: center;', 'cpl_7' => 'min-width: 76px; width: 4.9%; text-align: center;', 'cpl_8' => 'min-width: 76px; width: 4.9%; text-align: center;', 'cpl_9' => 'min-width: 76px; width: 4.9%; text-align: center;', 'cpl_10' => 'min-width: 76px; width: 4.9%; text-align: center;', 'cpl_11' => 'min-width: 76px; width: 4.9%; text-align: center;', 'cpl_12' => 'min-width: 76px; width: 4.9%; text-align: center;', ], 'course_cpl_cpmk_map' => [ 'course_name' => 'min-width: 360px; width: 24%;', 'cpl' => 'min-width: 260px; width: 16%;', 'cpmk' => 'min-width: 760px; width: 54%;', ], 'course_descriptions' => [ 'course_name' => 'min-width: 380px; width: 24%;', 'description' => 'min-width: 920px; width: 68%;', ], ]; $getColumnStyle = function ($sectionKey, $columnKey) use ($columnStyleMap) { $defaultStyle = $columnStyleMap['default'][$columnKey] ?? null; $sectionStyle = $columnStyleMap[$sectionKey][$columnKey] ?? null; return $sectionStyle ?? $defaultStyle ?? ''; }; $getActionStyle = function ($sectionKey) { return $sectionKey === 'course_structure' ? 'width: 190px; min-width: 190px; max-width: 190px;' : 'width: 68px; min-width: 68px; max-width: 68px;'; }; @endphp

Informasi Kurikulum Prodi

Halaman ini khusus untuk mengelola data kurikulum Program Studi Pendidikan Matematika. Data ini dipisahkan dari identitas dan logo agar lebih fokus, mudah dipelihara, dan siap dipakai sebagai basis AI RPS.

Export Backup Kurikulum
@csrf

Gunakan export untuk menyimpan satu file backup semua data pada halaman ini. File JSON yang sama bisa diimpor kembali untuk memulihkan seluruh Informasi Kurikulum Prodi.

Upload Data Kurikulum (PDF/Excel)

Upload file kurikulum `PDF` atau `Excel`, lalu sistem akan membaca isinya dan memakai AI untuk memetakan data ke section `Informasi Kurikulum Prodi`. Format yang didukung: `pdf`, `xlsx`, `xls`, dan `csv`.

@csrf
@if (! blank($settings->curriculum_last_import_meta))
Batch {{ $settings->curriculum_last_import_meta['batch_id'] ?? '-' }} Diproses {{ $settings->curriculum_last_import_meta['processed_at'] ?? '-' }} Model {{ $settings->curriculum_last_import_meta['model'] ?? '-' }} Dokumen {{ $settings->curriculum_last_import_meta['document_count'] ?? 0 }}
@endif @if (! blank($settings->curriculum_source_documents))
@foreach (array_reverse($settings->curriculum_source_documents ?? []) as $document) @endforeach
Nama File Jenis Format Ukuran Cuplikan Hasil Baca Diproses
{{ $document['original_name'] ?? '-' }} {{ strtoupper($document['source_kind'] ?? '-') }} {{ strtoupper($document['extension'] ?? '-') }} {{ isset($document['size']) ? number_format(((int) $document['size']) / 1024, 1).' KB' : '-' }} {{ $document['extracted_excerpt'] ?? '-' }} {{ $document['uploaded_at'] ?? '-' }}
@endif
@foreach ($curriculumSections as $sectionKey => $section) @php $sectionRows = old($sectionKey, $settings->{$sectionKey} ?? []); if ($sectionKey === 'course_structure' && blank($sectionRows) && ! blank($courseStructureSeedRows)) { $sectionRows = $courseStructureSeedRows; } elseif ($sectionKey === 'curriculum_map' && ! blank($curriculumMapSeedRows)) { $sectionRows = $curriculumMapSeedRows; } elseif ($sectionKey === 'course_cpl_cpmk_map') { $sectionRows = $syncCourseCplCpmkRows($sectionRows); } elseif (blank($sectionRows)) { $sectionRows = [array_fill_keys(array_keys($section['columns']), '')]; if (array_key_exists('number', $section['columns'])) { $sectionRows[0]['number'] = '1'; } } if (array_key_exists('number', $section['columns'])) { $sectionRows = collect($sectionRows) ->values() ->map(function ($row, $index) { $row['number'] = (string) ($index + 1); return $row; }) ->all(); } @endphp
@csrf @method('PUT')

{{ $section['title'] }}

{{ $section['description'] }}

@foreach ($section['columns'] as $columnKey => $label) @endforeach @foreach ($sectionRows as $rowIndex => $row) @foreach ($section['columns'] as $columnKey => $label) @endforeach @endforeach
{{ $label }}Aksi
@if ($columnKey === 'number') @elseif ($columnKey === 'supported_cpl_code') @php $selectedCplValues = $parseStoredTagValues($row[$columnKey] ?? '', $supportedCplOptions); @endphp
@elseif ($sectionKey === 'study_material_course_weights' && $columnKey === 'study_material_code') @elseif ($sectionKey === 'study_material_course_weights' && $columnKey === 'study_material') @elseif ($sectionKey === 'study_material_course_weights' && $columnKey === 'course_name') @php $selectedStudyMaterialCode = (string) ($row['study_material_code'] ?? ''); $normalizedSelectedStudyMaterialCode = $normalizeBkCode($selectedStudyMaterialCode); $availableCourseOptions = $courseOptionsByStudyMaterialCodeLookup[$selectedStudyMaterialCode] ?? $courseOptionsByStudyMaterialCodeLookup[$normalizedSelectedStudyMaterialCode] ?? []; @endphp @elseif ($sectionKey === 'curriculum_matrix' && $columnKey === 'study_material') @elseif ($sectionKey === 'curriculum_matrix' && $columnKey === 'course_name') @php $selectedBkLabel = (string) ($row['study_material'] ?? ''); $normalizedSelectedBkLabel = $normalizeCurriculumBkLabel($selectedBkLabel); $availableMatrixCourseOptions = $curriculumMatrixCourseOptionsByBk[$normalizedSelectedBkLabel] ?? []; @endphp @elseif ($sectionKey === 'curriculum_matrix' && $columnKey === 'sks') @php $selectedBkLabel = (string) ($row['study_material'] ?? ''); $normalizedSelectedBkLabel = $normalizeCurriculumBkLabel($selectedBkLabel); $selectedMatrixCourse = (string) ($row['course_name'] ?? ''); $availableMatrixSksOptions = $curriculumMatrixSksOptionsByBkCourse[$normalizedSelectedBkLabel][$selectedMatrixCourse] ?? []; $matrixSksPlaceholder = $selectedMatrixCourse !== '' ? (blank($availableMatrixSksOptions) ? 'SKS belum diisi di data sumber' : 'Pilih SKS') : 'Pilih Mata Kuliah terlebih dahulu'; @endphp @elseif ($sectionKey === 'curriculum_matrix' && $columnKey === 'supported_cpl') @php $selectedSupportedCplValues = $parseStoredTagValues( $stripParentheticalText($row[$columnKey] ?? ''), $curriculumMatrixSupportedCplOptions, ); @endphp
@elseif ($sectionKey === 'curriculum_map' && $columnKey === 'number') @elseif ($sectionKey === 'curriculum_map' && $columnKey === 'course_name') @elseif ($sectionKey === 'curriculum_map' && $columnKey === 'sks') @elseif ($sectionKey === 'curriculum_map' && preg_match('/^cpl_(\d+)$/', $columnKey, $curriculumMapCplMatches)) @php $cplCode = 'CPL-'.$curriculumMapCplMatches[1]; $selectedCourseName = (string) ($row['course_name'] ?? ''); $supportedCplsForCourse = $curriculumMapSupportedCplByCourseName[$selectedCourseName] ?? []; $isChecked = ($row[$columnKey] ?? '') !== '' || in_array($cplCode, $supportedCplsForCourse, true); @endphp @elseif ($sectionKey === 'course_cpl_cpmk_map' && $columnKey === 'course_name') @elseif ($sectionKey === 'course_cpl_cpmk_map' && $columnKey === 'cpl') @php $cplTextValue = (string) ($row[$columnKey] ?? ''); @endphp @elseif ($sectionKey === 'course_cpl_cpmk_map' && $columnKey === 'cpmk')
@elseif ($sectionKey === 'course_structure' && $columnKey === 'number') @elseif ($sectionKey === 'course_structure' && $columnKey === 'course_name') @elseif ($sectionKey === 'course_structure' && $columnKey === 'semester') @elseif ($sectionKey === 'course_prerequisites' && $columnKey === 'course_name') @elseif ($sectionKey === 'course_prerequisites' && $columnKey === 'prerequisite_courses') @php $selectedPrerequisiteCourses = $parseStoredTagValues($row[$columnKey] ?? '', $courseStructureAllCourseOptions); @endphp
@elseif ($sectionKey === 'faculty_course_cpl_cpmk_map' && $columnKey === 'faculty_course') @elseif ($sectionKey === 'faculty_course_cpl_cpmk_map' && $columnKey === 'semester_sks') @elseif ($sectionKey === 'faculty_course_cpl_cpmk_map' && $columnKey === 'faculty_cpl_supported') @php $selectedGraduateProfiles = $parseStoredTagValues($row[$columnKey] ?? '', $graduateProfileOptions); @endphp
@elseif ($sectionKey === 'faculty_course_cpl_cpmk_map' && $columnKey === 'study_program_cpl_relation') @php $selectedCplRelations = $parseStoredTagValues($row[$columnKey] ?? '', $learningOutcomeDisplayOptions); @endphp
@elseif ($sectionKey === 'faculty_course_cpl_cpmk_map' && $columnKey === 'course_cpmk')
@elseif (str_contains(strtolower($label), 'deskripsi') || str_contains(strtolower($label), 'profil') || str_contains(strtolower($label), 'mata kuliah') || str_contains(strtolower($label), 'bahan kajian') || str_contains(strtolower($label), 'cpl') || str_contains(strtolower($label), 'cpmk')) @else @endif
@if ($sectionKey === 'course_structure')
@endif
Export PDF
@endforeach
Buka Identitas & Logo Atur Prioritas Sumber AI Kembali ke Dashboard
@endsection