public static function getMyKelas($ta)
 {
     $kelas = isset($_SESSION['myKelas' . $ta]->kelas_id) ? $_SESSION['myKelas' . $ta] : 'no';
     if ($kelas == 'no') {
         //kalau belum punya kelas
         $murid = new Murid();
         $murid->default_read_coloms = "murid_id,nama_depan,foto";
         $murid->getByAccountID(Account::getMyID());
         $kelas = $murid->getMyKelas($ta);
         $_SESSION['myKelas' . $ta] = $kelas;
     }
     return $kelas;
 }
Пример #2
0
 public function myJadwal()
 {
     //pr($_SESSION);
     //ambil tahun ajaran utk Matapelajaran
     $ta = TahunAjaran::ta();
     $murid = new Murid();
     $murid->default_read_coloms = "*";
     $murid->getByAccountID(Account::getMyID());
     $kls = $murid->getMyKelas($ta);
     $cmd = isset($_GET['cmd']) ? $_GET['cmd'] : "read";
     $id = $kls->kelas_id;
     $tag = date("N");
     $jadwalMatapelajaran = new Jadwalmatapelajaran($id, $ta, "Weekly", "");
     // pr($jadwalMatapelajaran);
     $return['webClass'] = __CLASS__;
     $return['method'] = __FUNCTION__;
     $return['ta'] = $ta;
     $return['kls'] = $kls;
     $jadwalMatapelajaran->init();
     $return['jadwalMatapelajaran'] = $jadwalMatapelajaran;
     //Mold::both("studentsetup/jadwalmatapelajaran",  $jadwalMatapelajaran);
     //Mold::both("studentsetup/jadwalmatapelajaranDaily",  $jadwalMatapelajaran);
     Mold::both("studentsetup/jadwalmatapelajaranWeekly", $return);
 }