From 077b6b979d76b8113a78cc2cdf7916266772a667 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Wed, 30 Jan 2019 18:52:13 +0530 Subject: [PATCH] sem/year display in view page issue no : 1639 --- .../application/models/Hallticket_model.php | 12 ++-- .../assets/views/hallticket/editShedule.html | 67 +++++++++++-------- 2 files changed, 46 insertions(+), 33 deletions(-) diff --git a/Apollo/api/application/models/Hallticket_model.php b/Apollo/api/application/models/Hallticket_model.php index f02f41d5..7d836175 100644 --- a/Apollo/api/application/models/Hallticket_model.php +++ b/Apollo/api/application/models/Hallticket_model.php @@ -115,7 +115,7 @@ class Hallticket_model extends CI_Model public function get_unShedules($mapid,$subid,$branchcode,$CourseID,$universityID) { //echo $mapid; - $sql="SELECT semchild.SubjectID,semchild.MapID,bsc.ScheduleDate,bsc.FromTime,bsc.ToTime,sm.SubjectName + $sql="SELECT semchild.SubjectID,semchild.MapID,bsc.ScheduleDate,bsc.FromTime,bsc.ToTime,sm.SubjectName,SemesterID,SemesterID FROM T_SemSubMap_Child semchild LEFT JOIN T_SemSubMap_Master semmaster ON semmaster.MapID = semchild.MapID LEFT JOIN T_Batch_Schedule_Master bsm ON bsm.UniversityID = semmaster.UniversityID @@ -125,14 +125,16 @@ class Hallticket_model extends CI_Model WHERE semchild.isActive = '1' and bsm.SchId='".$mapid."' group by semchild.SubjectID,semchild.MapID"; $b=$this->db->query($sql); - //print_r($b); + // print_r($b->result());die(); + + //print_r($this->db->last_query());die(); if($b->result()){ $resultShedule['status']=true; $mastScheduleID=""; foreach($b->result() as $row) { - $this->db->select('T_Batch_Schedule_Child.SchId,T_Batch_Schedule_Child.SubjectID,T_Batch_Schedule_Child.ScheduleDate,T_Batch_Schedule_Child.FromTime,T_Batch_Schedule_Child.ToTime,T_Batch_Schedule_Child.SchChildId,T_Batch_Schedule_Child.SchId'); + $this->db->select('T_Batch_Schedule_Child.SchId,T_Batch_Schedule_Child.SubjectID,T_Batch_Schedule_Child.ScheduleDate,T_Batch_Schedule_Child.FromTime,T_Batch_Schedule_Child.ToTime,T_Batch_Schedule_Child.SchChildId,T_Batch_Schedule_Child.SchId,SCM.SEM_Year as Sem_year'); $this->db->from('T_Batch_Schedule_Master SCM'); $this->db->join('T_Batch_Schedule_Child','T_Batch_Schedule_Child.SchId = SCM.SchId'); $this->db->where('SCM.BranchCode',$branchcode); @@ -140,7 +142,7 @@ group by semchild.SubjectID,semchild.MapID"; // $this->db->where('T_Batch_Schedule_Child.SchId',$mapid); $this->db->where('T_Batch_Schedule_Child.SubjectID',$row->SubjectID); $existsheduledetails = $this->db->get(); - //print_r($existsheduledetails); + //print_r($existsheduledetails->result);die(); if($existData=$existsheduledetails->result()) { @@ -152,6 +154,7 @@ group by semchild.SubjectID,semchild.MapID"; $fetchData['ToTime']=$existData[0]->ToTime; $fetchData['SchChildId']=$existData[0]->SchChildId; $fetchData['SchId']=$existData[0]->SchId; + $fetchData['Sem_year'] = $existData[0]->Sem_year; $mastScheduleID=$existData[0]->SchId; } @@ -166,6 +169,7 @@ group by semchild.SubjectID,semchild.MapID"; $fetchData['ToTime']=""; $fetchData['SchChildId']=""; $fetchData['SchId']= $mastScheduleID; + $fetchData['Sem_year'] = ""; } $fetchshedule[]=$fetchData; diff --git a/Apollo/assets/views/hallticket/editShedule.html b/Apollo/assets/views/hallticket/editShedule.html index 5f792e9a..f0169a57 100644 --- a/Apollo/assets/views/hallticket/editShedule.html +++ b/Apollo/assets/views/hallticket/editShedule.html @@ -11,25 +11,30 @@
-
+

Subject

-
+
+

Sem/Year

+
+

Date

-
+

Start Time

-
+

End Time

+ +
-
-
+
+
-
+
-
- Shedule Date is required. -
+
-
+
-