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

$token = get_token();
$url = get_service_url();


$id_jur = $_POST['jurusan'];

    $filter_kelas = "id_prodi='".$id_jur."'";

                $temp_data_kelas = [
      'act' => 'GetListKurikulum',
        '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_kurikulum] = $data_kelas->nama_kurikulum.' '.$data_kelas->id_semester;
}
$kode_mk_group = array_unique($array_kode_mk);

/*  foreach ($kode_mk_group as $key) {
   

     $filter_mat = "id_mk='".$key."'";
        $data_mat = $proxy->GetRecord($token,'mata_kuliah',$filter_mat);

      $matkul[] = array(
        'id_mk' => $data_mat['result']['id_mk'],
        'nm_mk' => $data_mat['result']['nm_mk']
        );

  }*/

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