<?php
include "../../inc/config.php";

$token = get_token();
 $url = $db->get_service_url('rest');


    $filter_kelas = "id_prodi='".$_POST['jurusan']."' and id_semester='".$_POST['semester']."'";

                $temp_data_kelas = [
      'act' => 'GetDetailKelasKuliah',
        'token' => $token,
        'filter' => $filter_kelas,
        'order' => "id_semester DESC",
        'limit' => "",
        'offset' => ""

    ];


    $kelas = json_decode($db->run($temp_data_kelas,$url));



foreach ($kelas->data as $data_kelas) {
    $array_kode_mk[$data_kelas->id_matkul] = $data_kelas->kode_mata_kuliah.' '.$data_kelas->nama_mata_kuliah;
}
$kode_mk_group = array_unique($array_kode_mk);

echo '<option value="all">Semua</option>';
foreach ($kode_mk_group as $isi => $data) {
echo "<option value='".$isi."'>".$data."</option>";
} 
