<?php
class Pelajaran extends CI_Controller {
    function __construct() {
        parent::__construct();
        $this->load->model('m_materi');
    }

    function index($pelajaran) {
        if (empty($this->session->user)) return redirect('elearning/login');
        if ($this->session->user_status == '1') return redirect('elearning/home');
        $data['materi'] = $this->m_materi->get_all_materi($pelajaran, $this->session->kelas);
        $this->load->view('elearning/v_pelajaran', $data);
    }
}
?>