?
Current Path : /home1/savoy/public_html/savoyglobal.net/sims/school/application/controllers/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/sims/school/application/controllers/examination.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Examination extends BaseController { function __construct() { parent::BaseController(); $this->load->model('mastermodel'); $this->load->model('examinationmodel'); $this->load->library('Fpaginate'); $this->load->helper('to_pdf'); } function get_post_values() { $data = array(); foreach ($_POST as $key => $value) { if($key != "submit") { $data[$key] = $this->input->post($key); } } return $data; } // function viewinexamination($modelfunction,$page,$pagenum="") // { // /*<---------------- For pagination purpose------------>*/ // $perm=$this->mastermodel->check_user_permission($_SESSION['current_mode'], $_SESSION['userid'],0); // if(!$perm) // { // $this->load->view('Settings/nopermission'); // } // else // { // $perpage= $this->config->item('perpage'); // $data['pagenum']=$pagenum; // $_SESSION['searchdata'] = ''; // if($pagenum==1) // { // $data['id']=1; // } // else // { // $data['id']= (($pagenum-1)*$perpage)+1; // } // /*<---------------- For pagination purpose------------> */ // if(isset($encoded_data)) // { // $decoded_data= urldecode($encoded_data); // $postdata=json_decode($decoded_data, true); // } // else // { // $postdata=""; // } // // $output=$this->examinationmodel->$modelfunction($postdata,$pagenum); // $data['startpage']=$output['startpage']; // $data['endpage']=$output['endpage']; // $data['viewinfo']=$output['results']; // $this->load->view('Examination/'.$page.'',$data); // } // // } function viewinexaminationsearch($modelfunction,$page,$pagenum) { /*<---------------- For pagination purpose------------>*/ $perpage= $this->config->item('perpage'); $_SESSION['pagenum']=$pagenum; $data['pagenum']=$pagenum; if($pagenum==1) { $data['id']=1; } else { $data['id']= (($pagenum-1)*$perpage)+1; } if(isset($_POST['tab_name'])) { $postdata =""; } else { $postdata=$this->get_post_values(); } /*<---------------- For pagination purpose------------> */ if(!empty ($postdata)) $_SESSION['searchdata']=$postdata; else if(!isset($_SESSION['searchdata'])) $_SESSION['searchdata']=""; $output=$this->examinationmodel->$modelfunction($postdata,$pagenum); $data['startpage']=$output['startpage']; $data['endpage']=$output['endpage']; $data['viewinfo']=$output['results']; $this->load->view('Examination/'.$page.'',$data); } function addinexamination($modelfunction,$page) { $postdata=$this->get_post_values(); $data=$this->examinationmodel->$modelfunction($postdata); if($data['res']==1) { $this->viewinexaminationsearch($data['resfunction'],$page,'1'); $this->load->view('insertsuccess'); } else { $this->viewinexaminationsearch($data['resfunction'],$page,'1'); $this->load->view('insertfailure'); } } function editform($controllerfunction,$id) { $perm=$this->mastermodel->check_user_permission($_SESSION['current_mode'], $_SESSION['userid'],1); if(!$perm) { $this->load->view('Settings/nopermission'); } else { $this->$controllerfunction($id); } } function editgradelevel($id) { $data['grade']=$this->mastermodel->get_data_srow('gradelevel',$id,'gradelevel_id'); $this->load->view('Examination/editgradelevel',$data); } function editexammaster($id) { $data['exam']=$this->mastermodel->get_data_srow('exammaster',$id,'exammaster_id'); $this->load->view('Examination/editexammaster',$data); } function loadsubjectdiv($classlevel_id) { $output1=$this->examinationmodel->get_subject_data($classlevel_id); $data['viewinfo1']=$output1['results']; $this->load->view('Examination/loadsubjectlist',$data); } function loadassignmarkdiv($classlevel_id) { $output1=$this->examinationmodel->get_student_data($classlevel_id); $output2=$this->examinationmodel->get_subject_data_class($classlevel_id); $data['student']=$output1['results']; $data['subject']=$output2['results']; $this->load->view('Examination/loadclasslevelsection',$data); } function singleassignmark($id) { $data['assignmark']=$this->examinationmodel->get_data_assignmark($id); $data['assignmarksubj']=$this->examinationmodel->get_data_assignmarksubj($id); $this->load->view('Examination/singleassignmark',$data); } function editassignmark($id) { $data['assignmark']=$this->examinationmodel->get_data_assignmark($id); $data['assignmarksubj']=$this->examinationmodel->get_data_assignmarksubj($id); $output1=$this->examinationmodel->get_student_markunassigned($id); $output2=$this->examinationmodel->get_subject_data_class($output1['classlevel_id']); $data['masterid']=$id; $data['student']=$output1['results']; $data['subject']=$output2['results']; $this->load->view('Examination/editassignmark',$data); } function addkgcategory($id) { $data['kgcategory']=$this->mastermodel->get_data_srow('kgcategory',$id,'kgcategory_id'); $this->load->view('Examination/insertkgcategory',$data); } function editkgcategory($id) { $data['kgcategory']=$this->mastermodel->get_data_srow('kgcategory',$id,'kgcategory_id'); $this->load->view('Examination/editkgcategory',$data); } function addkgactivity($id) { $data['kgactivity']=$this->mastermodel->get_data_srow('kgactivity',$id,'kgactivity_id'); $data['kgcategory']=$this->mastermodel->get_data_srow('kgcategory',$id,'kgcategory_id'); $this->load->view('Examination/insertkgactivity',$data); } function editkgactivity($id) { $data['kgactivity']=$this->mastermodel->get_data_srow('kgactivity',$id,'kgactivity_id'); $data['kgcategory']=$this->mastermodel->get_data_srow('kgcategory',$id,'kgcategory_id'); $data['kgactivityattainment']= $this->mastermodel->get_data_srow('kgactivityattainment',$id,'kgactivity_id'); $data['kgactivityeffort']= $this->mastermodel->get_data_srow('kgactivityeffort',$id,'kgactivity_id'); $this->load->view('Examination/editkgactivity',$data); } function addkgattainment($id) { $data['kgattainment']=$this->mastermodel->get_data_srow('kgattainment',$id,'kgattainment_id'); $this->load->view('Examination/insertkgattainment',$data); } function editkgattainment($id) { $data['kgattainment']=$this->mastermodel->get_data_srow('kgattainment',$id,'kgattainment_id'); $this->load->view('Examination/editkgattainment',$data); } function addkgeffort($id) { $data['kgeffort']=$this->mastermodel->get_data_srow('kgeffort',$id,'kgeffort_id'); $this->load->view('Examination/insertkgeffort',$data); } function editkgeffort($id) { $data['kgeffort']=$this->mastermodel->get_data_srow('kgeffort',$id,'kgeffort_id'); $this->load->view('Examination/editkgeffort',$data); } function singlereport($target) { $this->load->view('Examination/'.$target.''); } function loadreport($modelfunction,$page,$studentid="",$exammasterid="",$ayear="") { $postdata= $this->get_post_values(); if($exammasterid=="") $output=$this->examinationmodel->$modelfunction($postdata); else $output=$this->examinationmodel->$modelfunction($postdata,$studentid,$exammasterid,$ayear); $data['viewinfo']=$output['results']; $data['tbltitle']=$output['tbltitle']; $this->load->view('Examination/'.$page,$data); } function loadclassreportpdf($modelfunction,$page,$studentid="",$exammasterid="",$ayear="",$classlevelid="") { $postdata= $this->get_post_values(); if($studentid=="") $output=$this->examinationmodel->$modelfunction($postdata); else $output=$this->examinationmodel->$modelfunction($postdata,$studentid,$exammasterid,$ayear,$classlevelid); $data['viewinfo']=$output['results']; $data['tbltitle']=$output['tbltitle']; $this->load->view('Examination/'.$page,$data); } function singlekgperfomance($kgperformance_id) { $data = array(); $data['kgperformance_id'] = $kgperformance_id; $data['viewinfo']=$this->mastermodel->get_data_srow('kgperformance',$kgperformance_id,'kgperformance_id'); $this->load->view('Examination/singlekgperfomance',$data); } function editkgperformance($kgperformance_id) { $data = array(); $data['kgperformance_id'] = $kgperformance_id; $data['viewinfo']=$this->mastermodel->get_data_srow('kgperformance',$kgperformance_id,'kgperformance_id'); $this->load->view('Examination/editkgperformance',$data); } function kgperfomancepdf($id) { $data = array(); $data['kgperformance_id'] = $id; $data['studentinfo']=$this->examinationmodel->getstudentdetails($id); $this->load->view('Examination/kgperformancepdf',$data); } function checkmarkentered($classlevel_id,$exammaster_id) { echo $this->mastermodel->number_rows('assignmark','1','assignmark_id','exammaster_id',$exammaster_id,'classlevel_id',$classlevel_id); } }