예제 #1
0
function check_editing_rights()
{
    if ($_GET["controller"] == "binet") {
        $binet = $GLOBALS["binet"]["id"];
        $term = current_term($binet);
    } else {
        $binet = binet;
        $term = term;
    }
    header_if(!has_editing_rights($binet, $term), 401);
}
예제 #2
0
파일: classes.php 프로젝트: nwtug/academia
 function manage_classes()
 {
     access_control($this);
     # Get the passed details into the url data array if any
     $urldata = $this->uri->uri_to_assoc(3, array('m', 'i'));
     # Pick all assigned data
     $data = assign_to_data($urldata);
     #Get the paginated list of the students
     $current_term_arr = current_term($this, $this->myschool['id']);
     $current_term_id = !empty($current_term_arr) ? $current_term_arr['id'] : 0;
     $data = paginate_list($this, $data, 'search_classes_register', array('isactive' => 'Y', 'term' => $current_term_id, 'school' => $this->myschool['id']));
     $data = add_msg_if_any($this, $data);
     $this->load->view('classes/manage_classes_view', $data);
 }
예제 #3
0
 function manage_gradebook()
 {
     access_control($this);
     # Get the passed details into the url data array if any
     $urldata = $this->uri->uri_to_assoc(3, array('m', 'i'));
     # Pick all assigned data
     $data = assign_to_data($urldata);
     #Get subjects assigned to the teacher
     #Get the school terms
     $data['terms'] = $this->terms->get_terms('', ' AND startdate<"' . date("Y-m-d") . '"', 'DESC');
     #print_r($data['terms']);
     //Concatenate years to the terms for the user
     foreach ($data['terms'] as $key => $termdetails) {
         $data['terms'][$key]['term'] = $data['terms'][$key]['term'] . ' [' . $termdetails['year'] . ']';
     }
     //get the subjects assigned to the teacher
     $data['subjects'] = $this->db->query($this->Query_reader->get_query_by_code('get_teacher_subjects', array('teacher' => $this->session->userdata('userid'))))->result_array();
     //get the current term info
     $data['current_term'] = current_term($this, $this->myschool['id']);
     $data = add_msg_if_any($this, $data);
     $this->load->view('gradebook/manage_gradebook_view', $data);
 }