public function myAbsensiWidget() { $murid = new Murid(); $murid->default_read_coloms = "*"; $murid->getByAccountID(Account::getMyID()); $mon = Absensi::getBulan(); $year = Absensi::getTahun(); $abs = new Absensi(); $murid->absensi = $abs->getAbsensiEinzel($murid->murid_id, $mon, $year); $return['webClass'] = __CLASS__; $return['method'] = __FUNCTION__; $return['murid'] = $murid; $return['absensi'] = $murid->absensi; $return['mon'] = $mon; $return['year'] = $year; $return['ta'] = TahunAjaran::ta(); //ambil kejadian dlm bulan //$cal = new Calendar(); //$return['calendar'] = $cal->getCalinMonth(Absensi::getBulan()); $return['refreshID'] = "myAbsensiWidget"; // get number of day dlm sebulan //$num_of_days = cal_days_in_month(CAL_GREGORIAN, $mon, $year); //$return["numDays"] = $num_of_days; Mold::both("murid/absensi_widget", $return); }
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; }
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); }