status updation screen changes : kdk

This commit is contained in:
dineshkumarkannan 2018-04-26 11:51:02 +05:30
parent 118c65bde2
commit 062b103cc1
4 changed files with 1699 additions and 2437 deletions

View File

@ -1,11 +1,9 @@
<?php <?php
defined('BASEPATH') OR exit('No direct script access allowed'); defined('BASEPATH') OR exit('No direct script access allowed');
// This can be removed if you use __autoload() in config.php OR use Modular Extensions // This can be removed if you use __autoload() in config.php OR use Modular Extensions
/** @noinspection PhpIncludeInspection */ /** @noinspection PhpIncludeInspection */
require_once APPPATH . '/libraries/REST_Controller.php'; require_once APPPATH . '/libraries/REST_Controller.php';
/** /**
* This is an example of a few basic user interaction methods you could use * This is an example of a few basic user interaction methods you could use
* all done with a hardcoded array * all done with a hardcoded array
@ -18,14 +16,12 @@ require_once APPPATH . '/libraries/REST_Controller.php';
* @link * @link
*/ */
class StatusUpdation_Controller extends REST_Controller { class StatusUpdation_Controller extends REST_Controller {
/*
/*
* status Updation details * status Updation details
* params: * params:
* created by kdk * created by kdk
* */ * */
function __construct() function __construct() {
{
// Construct the parent class // Construct the parent class
parent::__construct(); parent::__construct();
$this->methods['getUniversity_post']['limit'] = 100; $this->methods['getUniversity_post']['limit'] = 100;
@ -40,20 +36,16 @@ class StatusUpdation_Controller extends REST_Controller {
$loginUserId = $reqData['localUserID']; $loginUserId = $reqData['localUserID'];
$loginUserBranchId = $reqData['localBranchID']; $loginUserBranchId = $reqData['localBranchID'];
$loginUserType = $reqData['localType']; $loginUserType = $reqData['localType'];
$getUniversityListDetails = $this->statusupdation_model->get_university_course_batch($loginUserBranchId);// Check if the employee exist $getUniversityListDetails = $this->statusupdation_model->get_university_course_batch($loginUserBranchId); // Check if the employee exist
if ($getUniversityListDetails) if ($getUniversityListDetails) {
{ $getUniversityListDetails['status'] = REST_Controller::HTTP_OK;
$getUniversityListDetails['status'] = REST_Controller::HTTP_OK; // Set the response and exit
// Set the response and exit $this->response($getUniversityListDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
$this->response($getUniversityListDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
} } else {
else // Set the response and exit
{ $this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
// Set the response and exit
$this->response([
'message' => 'No list were found',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
} }
} }
@ -61,22 +53,16 @@ class StatusUpdation_Controller extends REST_Controller {
public function getSearchDetails_post() { public function getSearchDetails_post() {
$reqSearchData = $this->post('data'); $reqSearchData = $this->post('data');
$reqData = $this->post('requestDetails'); $reqData = $this->post('requestDetails');
// print_r($reqSearchData);exit(); $getSearchDetails = $this->statusupdation_model->get_search_result($reqSearchData, $reqData); // Check if the employee exist
if ($getSearchDetails) {
$getSearchDetails['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getSearchDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
} else {
// Set the response and exit
$this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
$getSearchDetails = $this->statusupdation_model->get_search_result($reqSearchData, $reqData);// Check if the employee exist
if ($getSearchDetails)
{
$getSearchDetails['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getSearchDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'No list were found',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
} }
} }
@ -85,64 +71,39 @@ class StatusUpdation_Controller extends REST_Controller {
$reqData = $this->post('data'); $reqData = $this->post('data');
$stuFor = $this->post('stuFor'); $stuFor = $this->post('stuFor');
$reqBranch = $this->post('reqBranch'); $reqBranch = $this->post('reqBranch');
$getSemYeatList = $this->statusupdation_model->get_semyear_result($reqData, $stuFor, $reqBranch);// Check if the employee exist $getSemYeatList = $this->statusupdation_model->get_semyear_result($reqData, $stuFor, $reqBranch); // Check if the employee exist
if ($getSemYeatList) if ($getSemYeatList) {
{ $getSemYeatList['status'] = REST_Controller::HTTP_OK;
$getSemYeatList['status'] = REST_Controller::HTTP_OK; // Set the response and exit
// Set the response and exit $this->response($getSemYeatList, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
$this->response($getSemYeatList, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'No list were found',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
} else {
// Set the response and exit
$this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
} }
// update the study material Status // update the study material Status
public function updateStudentMaterialStatus_post() { public function updateStudentMaterialStatus_post() {
$reqData = $this->post('data'); $reqData = $this->post('data');
$reqDetails = $this->post('requestDetails'); $reqDetails = $this->post('requestDetails');
$time = date('Y-m-d H:i:s'); $time = date('Y-m-d H:i:s');
$dateTime = $time; $dateTime = $time;
$count = count($reqData); $count = count($reqData);
// echo $reqDetails['localUserID'];exit(); for ($i = 0;$i < $count;$i++) {
$data[] = array('StudentID' => $reqData[$i]['StudentID'], 'CourseID' => $reqData[$i]['CourseID'], 'BranchCode' => $reqData[$i]['BranchCode'], 'ListCode' => $reqData[$i]['ListCode'], 'SDate' => $reqData[$i]['SDate'], 'Coursedetail' => $reqData[$i]['Coursedetail'], 'Comments' => $reqData[$i]['Comments'], 'Sem' => $reqData[$i]['Sem'], 'CreatedBy' => $reqDetails['localUserID'], 'CreatedOn' => $dateTime,);
for($i=0; $i < $count; $i++) {
$data[] = array(
'StudentID' => $reqData[$i]['StudentID'],
'CourseID' => $reqData[$i]['CourseID'],
'BranchCode' => $reqData[$i]['BranchCode'],
'ListCode' => $reqData[$i]['ListCode'],
'SDate' => $reqData[$i]['SDate'],
'Coursedetail' => $reqData[$i]['Coursedetail'],
'Comments' => $reqData[$i]['Comments'],
'Sem' => $reqData[$i]['Sem'],
'CreatedBy' => $reqDetails['localUserID'],
'CreatedOn' => $dateTime,
);
} }
$updateStudentMaterialSta = $this->statusupdation_model->update_semyear($data); // Check if the employee exist
if ($updateStudentMaterialSta) {
$updateStudentMaterialSta['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($updateStudentMaterialSta, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
} else {
// Set the response and exit
$this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
$updateStudentMaterialSta = $this->statusupdation_model->update_semyear($data);// Check if the employee exist
if ($updateStudentMaterialSta)
{
$updateStudentMaterialSta['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($updateStudentMaterialSta, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'No list were found',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
} }
} }
@ -150,110 +111,63 @@ class StatusUpdation_Controller extends REST_Controller {
public function updateAnswerBookLetStatus_post() { public function updateAnswerBookLetStatus_post() {
$reqData = $this->post('data'); $reqData = $this->post('data');
$reqDetails = $this->post('requestDetails'); $reqDetails = $this->post('requestDetails');
$time = date('Y-m-d H:i:s'); $time = date('Y-m-d H:i:s');
$dateTime = $time; $dateTime = $time;
$count = count($reqData); $count = count($reqData);
// echo $reqDetails['localUserID'];exit(); for ($i = 0;$i < $count;$i++) {
$data[] = array('StudentID' => $reqData[$i]['StudentID'], 'CourseID' => $reqData[$i]['CourseID'], 'BranchCode' => $reqData[$i]['BranchCode'], 'ListCode' => $reqData[$i]['ListCode'], 'AnsDate' => $reqData[$i]['SDate'], 'Coursedetail' => $reqData[$i]['Coursedetail'], 'Comments' => $reqData[$i]['Comments'], 'Sem' => $reqData[$i]['Sem'], 'CreatedBy' => $reqDetails['localUserID'], 'CreatedOn' => $dateTime,);
for($i=0; $i < $count; $i++) {
$data[] = array(
'StudentID' => $reqData[$i]['StudentID'],
'CourseID' => $reqData[$i]['CourseID'],
'BranchCode' => $reqData[$i]['BranchCode'],
'ListCode' => $reqData[$i]['ListCode'],
'AnsDate' => $reqData[$i]['SDate'],
'Coursedetail' => $reqData[$i]['Coursedetail'],
'Comments' => $reqData[$i]['Comments'],
'Sem' => $reqData[$i]['Sem'],
'CreatedBy' => $reqDetails['localUserID'],
'CreatedOn' => $dateTime,
);
} }
$updateAnswerBookletStat = $this->statusupdation_model->update_answerbooklet($data, $reqDetails); // Check if the employee exist
if ($updateAnswerBookletStat) {
$updateAnswerBookletStat['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($updateAnswerBookletStat, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
} else {
// Set the response and exit
$this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
$updateAnswerBookletStat = $this->statusupdation_model->update_answerbooklet($data,$reqDetails);// Check if the employee exist
if ($updateAnswerBookletStat)
{
$updateAnswerBookletStat['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($updateAnswerBookletStat, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'No list were found',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
} }
} }
// get certification type list // get certification type list
public function getCertificateList_post() { public function getCertificateList_post() {
$reqData = $this->post('data'); $reqData = $this->post('data');
$certificateList = $this->statusupdation_model->get_certificate_list($reqData['localBranchID']); // Check if the employee exist
if ($certificateList) {
$certificateList['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($certificateList, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
} else {
// Set the response and exit
$this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
$certificateList = $this->statusupdation_model->get_certificate_list();// Check if the employee exist
if ($certificateList)
{
$certificateList['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($certificateList, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'No list were found',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
} }
} }
// update certification status // update certification status
public function updateCertificationStatus_post() { public function updateCertificationStatus_post() {
$reqData = $this->post('data'); $reqData = $this->post('data');
$reqDetails = $this->post('requestDetails'); $reqDetails = $this->post('requestDetails');
$time = date('Y-m-d H:i:s'); $time = date('Y-m-d H:i:s');
$dateTime = $time; $dateTime = $time;
$count = count($reqData); $count = count($reqData);
// echo $reqDetails['localUserID'];exit(); for ($i = 0;$i < $count;$i++) {
$data[] = array('StudentID' => $reqData[$i]['StudentID'], 'CourseID' => $reqData[$i]['CourseID'], 'BranchCode' => $reqData[$i]['BranchCode'], 'ListCode' => $reqData[$i]['ListCode'], 'CDate' => $reqData[$i]['SDate'], 'Coursedetail' => $reqData[$i]['Coursedetail'], 'Comments' => $reqData[$i]['Comments'], 'Sem' => $reqData[$i]['Sem'], 'CreatedBy' => $reqDetails['localUserID'], 'CreatedOn' => $dateTime,
for($i=0; $i < $count; $i++) { // 'CertificationType' => $reqData[$i]['CertificateType'],
$data[] = array( 'CertificationType' => 'MARK CARD', 'CertificationNo' => $reqData[$i]['CertificateNumber'],);
'StudentID' => $reqData[$i]['StudentID'],
'CourseID' => $reqData[$i]['CourseID'],
'BranchCode' => $reqData[$i]['BranchCode'],
'ListCode' => $reqData[$i]['ListCode'],
'CDate' => $reqData[$i]['SDate'],
'Coursedetail' => $reqData[$i]['Coursedetail'],
'Comments' => $reqData[$i]['Comments'],
'Sem' => $reqData[$i]['Sem'],
'CreatedBy' => $reqDetails['localUserID'],
'CreatedOn' => $dateTime,
// 'CertificationType' => $reqData[$i]['CertificateType'],
'CertificationType' => 'MARK CARD',
'CertificationNo' =>$reqData[$i]['CertificateNumber'],
);
} }
$updateCertificateStatus = $this->statusupdation_model->update_certificateStatus($data); // Check if the employee exist
if ($updateCertificateStatus) {
$updateCertificateStatus['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($updateCertificateStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
} else {
// Set the response and exit
$this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
$updateCertificateStatus = $this->statusupdation_model->update_certificateStatus($data);// Check if the employee exist
if ($updateCertificateStatus)
{
$updateCertificateStatus['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($updateCertificateStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'No list were found',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
} }
} }
@ -261,42 +175,22 @@ class StatusUpdation_Controller extends REST_Controller {
public function updateApplicationStatus_post() { public function updateApplicationStatus_post() {
$reqData = $this->post('data'); $reqData = $this->post('data');
$reqDetails = $this->post('requestDetails'); $reqDetails = $this->post('requestDetails');
$time = date('Y-m-d H:i:s'); $time = date('Y-m-d H:i:s');
$dateTime = $time; $dateTime = $time;
$count = count($reqData); $count = count($reqData);
// echo $reqDetails['localUserID'];exit(); for ($i = 0;$i < $count;$i++) {
$data[] = array('StudentID' => $reqData[$i]['StudentID'], 'CourseID' => $reqData[$i]['CourseID'], 'BranchCode' => $reqData[$i]['BranchCode'], 'ListCode' => $reqData[$i]['ListCode'], 'AppDate' => $reqData[$i]['SDate'], 'Comments' => $reqData[$i]['Comments'], 'CreatedBy' => $reqDetails['localUserID'], 'CreatedOn' => $dateTime, 'CertificationType' => $reqData[$i]['CertificateType'], 'CertificationNo' => $reqData[$i]['CertificateNumber'],);
for($i=0; $i < $count; $i++) {
$data[] = array(
'StudentID' => $reqData[$i]['StudentID'],
'CourseID' => $reqData[$i]['CourseID'],
'BranchCode' => $reqData[$i]['BranchCode'],
'ListCode' => $reqData[$i]['ListCode'],
'AppDate' => $reqData[$i]['SDate'],
'Comments' => $reqData[$i]['Comments'],
'CreatedBy' => $reqDetails['localUserID'],
'CreatedOn' => $dateTime,
'CertificationType' => $reqData[$i]['CertificateType'],
'CertificationNo' =>$reqData[$i]['CertificateNumber'],
);
} }
$updateApplicationStatus = $this->statusupdation_model->update_applicationStatus($data, $reqDetails); // Check if the employee exist
if ($updateApplicationStatus) {
$updateApplicationStatus['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($updateApplicationStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
} else {
// Set the response and exit
$this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
$updateApplicationStatus = $this->statusupdation_model->update_applicationStatus($data,$reqDetails);// Check if the employee exist
if ($updateApplicationStatus)
{
$updateApplicationStatus['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($updateApplicationStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'No list were found',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
} }
} }
@ -305,20 +199,16 @@ class StatusUpdation_Controller extends REST_Controller {
$reqData = $this->post('data'); $reqData = $this->post('data');
$reqDetails = $this->post('statusFor'); $reqDetails = $this->post('statusFor');
$reqBranch = $this->post('reqBranch'); $reqBranch = $this->post('reqBranch');
$getStatusList = $this->statusupdation_model->get_status_list($reqData, $reqBranch);// Check if the employee exist $getStatusList = $this->statusupdation_model->get_status_list($reqData, $reqBranch); // Check if the employee exist
if ($getStatusList) if ($getStatusList) {
{ $getStatusList['status'] = REST_Controller::HTTP_OK;
$getStatusList['status'] = REST_Controller::HTTP_OK; // Set the response and exit
// Set the response and exit $this->response($getStatusList, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
$this->response($getStatusList, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
} } else {
else // Set the response and exit
{ $this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
// Set the response and exit
$this->response([
'message' => 'No list were found',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
} }
} }
@ -326,23 +216,16 @@ class StatusUpdation_Controller extends REST_Controller {
$reqData = $this->post('data'); $reqData = $this->post('data');
$reqDetailsFor = $this->post('statusFor'); $reqDetailsFor = $this->post('statusFor');
$reqDetails = $this->post('getDetailsFor'); $reqDetails = $this->post('getDetailsFor');
$getPrevStatusList = $this->statusupdation_model->get_prev_status_list($reqDetailsFor, $reqDetails); // Check if the employee exist
if ($getPrevStatusList) {
$getPrevStatusList['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getPrevStatusList, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
} else {
// Set the response and exit
$this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
$getPrevStatusList = $this->statusupdation_model->get_prev_status_list($reqDetailsFor, $reqDetails);// Check if the employee exist
if ($getPrevStatusList)
{
$getPrevStatusList['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getPrevStatusList, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'No list were found',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
} }
} }
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff