ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/var/softaculous/opensis/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/var/softaculous/opensis/sample_data.sql

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `opensis65sd`
--

DELIMITER $$
--
-- Procedures
--
CREATE PROCEDURE `ATTENDANCE_CALC`(IN cp_id INT)
BEGIN
 DELETE FROM missing_attendance WHERE COURSE_PERIOD_ID=cp_id;
 INSERT INTO missing_attendance(SCHOOL_ID,SYEAR,SCHOOL_DATE,COURSE_PERIOD_ID,PERIOD_ID,TEACHER_ID,SECONDARY_TEACHER_ID) 
         SELECT s.ID AS SCHOOL_ID,acc.SYEAR,acc.SCHOOL_DATE,cp.COURSE_PERIOD_ID,cpv.PERIOD_ID, IF(tra.course_period_id=cp.course_period_id AND acc.school_date<tra.assign_date =true,tra.pre_teacher_id,cp.teacher_id) AS TEACHER_ID,
         cp.SECONDARY_TEACHER_ID FROM attendance_calendar acc INNER JOIN course_periods cp ON cp.CALENDAR_ID=acc.CALENDAR_ID INNER JOIN course_period_var cpv ON cp.COURSE_PERIOD_ID=cpv.COURSE_PERIOD_ID 
         AND (cpv.COURSE_PERIOD_DATE IS NULL AND position(substring('UMTWHFS' FROM DAYOFWEEK(acc.SCHOOL_DATE) FOR 1) IN cpv.DAYS)>0 OR cpv.COURSE_PERIOD_DATE IS NOT NULL AND cpv.COURSE_PERIOD_DATE=acc.SCHOOL_DATE) 
         INNER JOIN schools s ON s.ID=acc.SCHOOL_ID LEFT JOIN teacher_reassignment tra ON (cp.course_period_id=tra.course_period_id) INNER JOIN schedule sch ON sch.COURSE_PERIOD_ID=cp.COURSE_PERIOD_ID 
         AND sch.student_id IN(SELECT student_id FROM student_enrollment se WHERE sch.school_id=se.school_id AND sch.syear=se.syear AND start_date<=acc.school_date AND (end_date IS NULL OR end_date>=acc.school_date))
         AND (cp.MARKING_PERIOD_ID IS NOT NULL AND cp.MARKING_PERIOD_ID IN (SELECT MARKING_PERIOD_ID FROM school_years WHERE SCHOOL_ID=acc.SCHOOL_ID AND acc.SCHOOL_DATE BETWEEN START_DATE AND END_DATE UNION SELECT MARKING_PERIOD_ID FROM school_semesters WHERE SCHOOL_ID=acc.SCHOOL_ID AND acc.SCHOOL_DATE BETWEEN START_DATE AND END_DATE UNION SELECT MARKING_PERIOD_ID FROM school_quarters WHERE SCHOOL_ID=acc.SCHOOL_ID AND acc.SCHOOL_DATE BETWEEN START_DATE AND END_DATE) OR (cp.MARKING_PERIOD_ID IS NULL AND acc.school_date BETWEEN cp.begin_date AND cp.end_date))
         AND sch.START_DATE<=acc.SCHOOL_DATE AND (sch.END_DATE IS NULL OR sch.END_DATE>=acc.SCHOOL_DATE ) AND cpv.DOES_ATTENDANCE='Y' AND acc.SCHOOL_DATE<CURDATE() AND cp.course_period_id=cp_id 
         AND NOT EXISTS (SELECT '' FROM  attendance_completed ac WHERE ac.SCHOOL_DATE=acc.SCHOOL_DATE AND ac.COURSE_PERIOD_ID=cp.COURSE_PERIOD_ID AND ac.PERIOD_ID=cpv.PERIOD_ID 
         AND IF(tra.course_period_id=cp.course_period_id AND acc.school_date<=tra.assign_date =true,ac.staff_id=tra.pre_teacher_id,ac.staff_id=cp.teacher_id)) 
         GROUP BY acc.SCHOOL_DATE,cp.COURSE_PERIOD_ID,cp.TEACHER_ID,cpv.PERIOD_ID;
 END$$

CREATE PROCEDURE `ATTENDANCE_CALC_BY_DATE`(IN sch_dt DATE,IN year INT,IN school INT)
BEGIN
  DELETE FROM missing_attendance WHERE SCHOOL_DATE=sch_dt AND SYEAR=year AND SCHOOL_ID=school;
  INSERT INTO missing_attendance(SCHOOL_ID,SYEAR,SCHOOL_DATE,COURSE_PERIOD_ID,PERIOD_ID,TEACHER_ID,SECONDARY_TEACHER_ID) SELECT s.ID AS SCHOOL_ID,acc.SYEAR,acc.SCHOOL_DATE,cp.COURSE_PERIOD_ID,cpv.PERIOD_ID, IF(tra.course_period_id=cp.course_period_id AND acc.school_date<tra.assign_date =true,tra.pre_teacher_id,cp.teacher_id) AS TEACHER_ID,cp.SECONDARY_TEACHER_ID FROM attendance_calendar acc INNER JOIN marking_periods mp ON mp.SYEAR=acc.SYEAR AND mp.SCHOOL_ID=acc.SCHOOL_ID AND acc.SCHOOL_DATE BETWEEN mp.START_DATE AND mp.END_DATE INNER JOIN course_periods cp ON cp.MARKING_PERIOD_ID=mp.MARKING_PERIOD_ID  AND cp.CALENDAR_ID=acc.CALENDAR_ID INNER JOIN course_period_var cpv ON cp.COURSE_PERIOD_ID=cpv.COURSE_PERIOD_ID AND cpv.DOES_ATTENDANCE='Y' LEFT JOIN teacher_reassignment tra ON (cp.course_period_id=tra.course_period_id) INNER JOIN school_periods sp ON sp.SYEAR=acc.SYEAR AND sp.SCHOOL_ID=acc.SCHOOL_ID AND sp.PERIOD_ID=cpv.PERIOD_ID AND (sp.BLOCK IS NULL AND position(substring('UMTWHFS' FROM DAYOFWEEK(acc.SCHOOL_DATE) FOR 1) IN cpv.DAYS)>0 OR sp.BLOCK IS NOT NULL AND acc.BLOCK IS NOT NULL AND sp.BLOCK=acc.BLOCK) INNER JOIN schools s ON s.ID=acc.SCHOOL_ID INNER JOIN schedule sch ON sch.COURSE_PERIOD_ID=cp.COURSE_PERIOD_ID AND sch.START_DATE<=acc.SCHOOL_DATE AND (sch.END_DATE IS NULL OR sch.END_DATE>=acc.SCHOOL_DATE )  LEFT JOIN attendance_completed ac ON ac.SCHOOL_DATE=acc.SCHOOL_DATE AND IF(tra.course_period_id=cp.course_period_id AND acc.school_date<tra.assign_date =true,ac.staff_id=tra.pre_teacher_id,ac.staff_id=cp.teacher_id) AND ac.PERIOD_ID=sp.PERIOD_ID WHERE acc.SYEAR=year AND acc.SCHOOL_ID=school AND (acc.MINUTES IS NOT NULL AND acc.MINUTES>0) AND acc.SCHOOL_DATE=sch_dt AND ac.STAFF_ID IS NULL GROUP BY s.TITLE,acc.SCHOOL_DATE,cp.TITLE,cp.COURSE_PERIOD_ID,cp.TEACHER_ID;
 END$$

CREATE PROCEDURE `SEAT_COUNT`()
BEGIN
 UPDATE course_periods SET filled_seats=filled_seats-1 WHERE COURSE_PERIOD_ID IN (SELECT COURSE_PERIOD_ID FROM schedule WHERE end_date IS NOT NULL AND end_date < CURDATE() AND dropped='N');
 UPDATE schedule SET dropped='Y' WHERE end_date IS NOT NULL AND end_date < CURDATE() AND dropped='N';
 END$$

CREATE PROCEDURE `SEAT_FILL`()
BEGIN
 UPDATE course_periods SET filled_seats=filled_seats+1 WHERE COURSE_PERIOD_ID IN (SELECT COURSE_PERIOD_ID FROM schedule WHERE dropped='Y' AND ( end_date IS NULL OR end_date >= CURDATE()));
 UPDATE schedule SET dropped='N' WHERE dropped='Y' AND ( end_date IS NULL OR end_date >= CURDATE()) ;
 END$$

CREATE PROCEDURE `TEACHER_REASSIGNMENT`()
BEGIN
 UPDATE course_periods cp,course_period_var cpv,teacher_reassignment tr,school_periods sp,marking_periods mp,staff st SET cp.title=CONCAT(sp.title,IF(cp.mp<>'FY',CONCAT(' - ',mp.short_name),''),IF(CHAR_LENGTH(cpv.days)<5,CONCAT(' - ',cpv.days),''),' - ',cp.short_name,' - ',CONCAT_WS(' ',st.first_name,st.middle_name,st.last_name)), cp.teacher_id=tr.teacher_id WHERE cpv.period_id=sp.period_id and cp.marking_period_id=mp.marking_period_id and st.staff_id=tr.teacher_id and cp.course_period_id=tr.course_period_id AND assign_date <= CURDATE() AND updated='N' AND cp.COURSE_PERIOD_ID=cpv.COURSE_PERIOD_ID; 
  UPDATE teacher_reassignment SET updated='Y' WHERE assign_date <=CURDATE() AND updated='N';
 END$$

--
-- Functions
--
CREATE FUNCTION `CALC_CUM_GPA_MP`(
 mp_id int
 ) RETURNS int(11)
BEGIN
 
 DECLARE req_mp INT DEFAULT 0;
 DECLARE done INT DEFAULT 0;
 DECLARE gp_points DECIMAL(10,2);
 DECLARE student_id INT;
 DECLARE gp_points_weighted DECIMAL(10,2);
 DECLARE divisor DECIMAL(10,2);
 DECLARE credit_earned DECIMAL(10,2);
 DECLARE cgpa DECIMAL(10,2);
 
 DECLARE cur1 CURSOR FOR
    SELECT srcg.student_id,
                   IF(ISNULL(sum(srcg.unweighted_gp)),  (SUM(srcg.weighted_gp*srcg.credit_earned)),
                       IF(ISNULL(sum(srcg.weighted_gp)), SUM(srcg.unweighted_gp*srcg.credit_earned),
                          ( SUM(srcg.unweighted_gp*srcg.credit_attempted)+ SUM(srcg.weighted_gp*srcg.credit_earned))
                         ))as gp_points,
 
                       SUM(srcg.weighted_gp*srcg.credit_earned) as gp_points_weighted,
                       SUM(srcg.credit_attempted) as divisor,
                       SUM(srcg.credit_earned) as credit_earned,
    		      IF(ISNULL(sum(srcg.unweighted_gp)),  (SUM(srcg.weighted_gp*srcg.credit_earned))/ sum(srcg.credit_attempted),
                           IF(ISNULL(sum(srcg.weighted_gp)), SUM(srcg.unweighted_gp*srcg.credit_earned)/sum(srcg.credit_attempted),
                              ( SUM(srcg.unweighted_gp*srcg.credit_attempted)+ SUM(srcg.weighted_gp*srcg.credit_earned))/sum(srcg.credit_attempted)
                             )
                          ) as cgpa
 
             FROM marking_periods mp,temp_cum_gpa srcg
             INNER JOIN schools sc ON sc.id=srcg.school_id
             WHERE srcg.marking_period_id= mp.marking_period_id AND srcg.gp_scale<>0 AND srcg.marking_period_id NOT LIKE 'E%'
             AND mp.marking_period_id IN (SELECT marking_period_id  FROM marking_periods WHERE mp_type=req_mp )
             GROUP BY srcg.student_id;
  DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;
 
 
   CREATE TEMPORARY TABLE tmp(
     student_id int,
     sum_weighted_factors decimal(10,6),
     count_weighted_factors int,
     sum_unweighted_factors decimal(10,6),
     count_unweighted_factors int,
     grade_level_short varchar(10)
   );
 
   INSERT INTO tmp(student_id,sum_weighted_factors,count_weighted_factors,
     sum_unweighted_factors, count_unweighted_factors,grade_level_short)
   SELECT
     srcg.student_id,
     SUM(srcg.weighted_gp/s.reporting_gp_scale) AS sum_weighted_factors,
     COUNT(*) AS count_weighted_factors,
     SUM(srcg.unweighted_gp/srcg.gp_scale) AS sum_unweighted_factors,
     COUNT(*) AS count_unweighted_factors,
     eg.short_name
   FROM student_report_card_grades srcg
   INNER JOIN schools s ON s.id=srcg.school_id
   LEFT JOIN enroll_grade eg on eg.student_id=srcg.student_id AND eg.syear=srcg.syear AND eg.school_id=srcg.school_id
   WHERE srcg.marking_period_id=mp_id AND srcg.gp_scale<>0 AND srcg.marking_period_id NOT LIKE 'E%'
   GROUP BY srcg.student_id,eg.short_name;
 
  /* UPDATE student_mp_stats sms
     INNER JOIN tmp t on t.student_id=sms.student_id
   SET
     sms.sum_weighted_factors=t.sum_weighted_factors,
     sms.count_weighted_factors=t.count_weighted_factors,
     sms.sum_unweighted_factors=t.sum_unweighted_factors,
     sms.count_unweighted_factors=t.count_unweighted_factors
   WHERE sms.marking_period_id=mp_id;*/
 
   /*INSERT INTO student_mp_stats(student_id,marking_period_id,sum_weighted_factors,count_weighted_factors,
     sum_unweighted_factors,count_unweighted_factors,grade_level_short)
   SELECT
       t.student_id,
       mp_id,
       t.sum_weighted_factors,
       t.count_weighted_factors,
       t.sum_unweighted_factors,
       t.count_unweighted_factors,
       t.grade_level_short
     FROM tmp t
     LEFT JOIN student_mp_stats sms ON sms.student_id=t.student_id AND sms.marking_period_id=mp_id
     WHERE sms.student_id IS NULL;*/
 
   INSERT INTO student_gpa_calculated (student_id,marking_period_id)
   SELECT
       t.student_id,
       mp_id
     FROM tmp t
     LEFT JOIN student_gpa_calculated sms ON sms.student_id=t.student_id AND sms.marking_period_id=mp_id
     WHERE sms.student_id IS NULL;
 
 /*  UPDATE student_mp_stats g
     INNER JOIN (
 	SELECT s.student_id,
 		SUM(s.weighted_gp/sc.reporting_gp_scale)/COUNT(*) AS cum_weighted_factor,
 		SUM(s.unweighted_gp/s.gp_scale)/COUNT(*) AS cum_unweighted_factor
 	FROM student_report_card_grades s
 	INNER JOIN schools sc ON sc.id=s.school_id
 	LEFT JOIN course_periods p ON p.course_period_id=s.course_period_id
 	WHERE p.marking_period_id IS NULL OR p.marking_period_id=s.marking_period_id
 	GROUP BY student_id) gg ON gg.student_id=g.student_id
     SET g.cum_unweighted_factor=gg.cum_unweighted_factor, g.cum_weighted_factor=gg.cum_weighted_factor;*/
 
   UPDATE student_gpa_calculated g
     INNER JOIN (
 	SELECT s.student_id,
 		SUM(s.weighted_gp/sc.reporting_gp_scale)/COUNT(*) AS cum_weighted_factor,
 		SUM(s.unweighted_gp/s.gp_scale)/COUNT(*) AS cum_unweighted_factor
 	FROM student_report_card_grades s
 	INNER JOIN schools sc ON sc.id=s.school_id
 	LEFT JOIN course_periods p ON p.course_period_id=s.course_period_id
 	WHERE p.marking_period_id IS NULL OR p.marking_period_id=s.marking_period_id
 	GROUP BY student_id) gg ON gg.student_id=g.student_id
     SET g.cum_unweighted_factor=gg.cum_unweighted_factor;
 
 
     SELECT mp_type INTO @mp_type FROM marking_periods WHERE marking_period_id=mp_id;
 
  
     IF @mp_type = 'quarter'  THEN
            set req_mp = 'quarter';
     ELSEIF @mp_type = 'semester'  THEN
         IF EXISTS(SELECT student_id FROM student_report_card_grades srcg WHERE srcg.marking_period_id IN (SELECT marking_period_id  FROM marking_periods WHERE mp_type=@mp_type)) THEN
            set req_mp  = 'semester';
        ELSE
            set req_mp  = 'quarter';
         END IF;
    ELSEIF @mp_type = 'year'  THEN
            IF EXISTS(SELECT student_id FROM student_report_card_grades srcg WHERE srcg.MARKING_PERIOD_ID IN (SELECT marking_period_id  FROM marking_periods WHERE mp_type='semester')
                      UNION  SELECT student_id FROM student_report_card_grades srcg WHERE srcg.MARKING_PERIOD_ID IN (SELECT marking_period_id  FROM history_marking_periods WHERE mp_type='semester')
                      ) THEN
                  set req_mp  = 'semester';
          
           ELSE
                   set req_mp  = 'quarter ';
             END IF;
    END IF;
 
 
 
 open cur1;
 fetch cur1 into student_id, gp_points,gp_points_weighted,divisor,credit_earned,cgpa;
 
 while not done DO
     IF EXISTS(SELECT student_id FROM student_gpa_calculated WHERE  student_gpa_calculated.student_id=student_id) THEN
     UPDATE student_gpa_calculated gc
                SET gc.cgpa=cgpa where gc.student_id=student_id and gc.marking_period_id=mp_id;
     ELSE
         INSERT INTO student_gpa_running(student_id,marking_period_id,mp,cgpa)
           VALUES(student_id,mp_id,mp_id,cgpa);
     END IF;
 fetch cur1 into student_id, gp_points,gp_points_weighted,divisor,credit_earned,cgpa;
 END WHILE;
 /*while not done DO
     IF EXISTS(SELECT student_id FROM student_gpa_running WHERE  student_gpa_running.student_id=student_id) THEN
     UPDATE student_gpa_running gc
                SET gpa_points=gp_points,gpa_points_weighted=gp_points_weighted,gc.divisor=divisor,credit_earned=credit_earned,gc.cgpa=cgpa where gc.student_id=student_id;
     ELSE
         INSERT INTO student_gpa_running(student_id,marking_period_id,gpa_points,gpa_points_weighted, divisor,credit_earned,cgpa)
           VALUES(student_id,mp_id,gp_points,gp_points_weighted,divisor,credit_earned,cgpa);
     END IF;
 fetch cur1 into student_id, gp_points,gp_points_weighted,divisor,credit_earned,cgpa;
 END WHILE;*/
 CLOSE cur1;
 
 
 RETURN 1;
 
 END$$

CREATE FUNCTION `CALC_GPA_MP`(
 	s_id int,
 	mp_id int
 ) RETURNS int(11)
BEGIN
   SELECT
     SUM(srcg.weighted_gp/s.reporting_gp_scale) AS sum_weighted_factors, 
     COUNT(*) AS count_weighted_factors,                        
     SUM(srcg.unweighted_gp/srcg.gp_scale) AS sum_unweighted_factors, 
     COUNT(*) AS count_unweighted_factors,
    IF(ISNULL(sum(srcg.unweighted_gp)),  (SUM(srcg.weighted_gp*srcg.credit_earned))/ sum(srcg.credit_attempted),
                       IF(ISNULL(sum(srcg.weighted_gp)), SUM(srcg.unweighted_gp*srcg.credit_earned)/sum(srcg.credit_attempted),
                          ( SUM(srcg.unweighted_gp*srcg.credit_attempted)+ SUM(srcg.weighted_gp*srcg.credit_earned))/sum(srcg.credit_attempted)
                         )
       ),
     
     SUM(srcg.weighted_gp*srcg.credit_earned)/(select sum(sg.credit_attempted) from student_report_card_grades sg where sg.marking_period_id=mp_id AND sg.student_id=s_id
                                                   AND sg.weighted_gp  IS NOT NULL  AND sg.unweighted_gp IS NULL AND sg.course_period_id IS NOT NULL GROUP BY sg.student_id, sg.marking_period_id) ,
     SUM(srcg.unweighted_gp*srcg.credit_earned)/ (select sum(sg.credit_attempted) from student_report_card_grades sg where sg.marking_period_id=mp_id AND sg.student_id=s_id
                                                      AND sg.unweighted_gp  IS NOT NULL  AND sg.weighted_gp IS NULL AND sg.course_period_id IS NOT NULL GROUP BY sg.student_id, sg.marking_period_id) ,
     eg.short_name
   INTO
     @sum_weighted_factors,
     @count_weighted_factors,
     @sum_unweighted_factors,
     @count_unweighted_factors,
     @gpa,
     @weighted_gpa,
     @unweighted_gpa,
     @grade_level_short
   FROM student_report_card_grades srcg
   INNER JOIN schools s ON s.id=srcg.school_id
 INNER JOIN course_periods cp ON cp.course_period_id=srcg.course_period_id
 INNER JOIN report_card_grade_scales rcgs ON rcgs.id=cp.grade_scale_id
   LEFT JOIN enroll_grade eg on eg.student_id=srcg.student_id AND eg.syear=srcg.syear AND eg.school_id=srcg.school_id
   WHERE srcg.marking_period_id=mp_id AND srcg.student_id=s_id AND srcg.gp_scale<>0 AND srcg.course_period_id IS NOT NULL AND (rcgs.gpa_cal='Y' OR cp.grade_scale_id IS NULL) AND srcg.marking_period_id NOT LIKE 'E%'
   AND (eg.START_DATE IS NULL OR eg.START_DATE='0000-00-00'  OR eg.START_DATE<=CURDATE()) AND (eg.END_DATE IS NULL OR eg.END_DATE='0000-00-00'  OR eg.END_DATE>=CURDATE())  
   GROUP BY srcg.student_id,eg.short_name;
 
   /*IF EXISTS(SELECT NULL FROM student_mp_stats WHERE marking_period_id=mp_id AND student_id=s_id) THEN
     UPDATE student_mp_stats
     SET
       sum_weighted_factors=@sum_weighted_factors,
       count_weighted_factors=@count_weighted_factors,
       sum_unweighted_factors=@sum_unweighted_factors,
       count_unweighted_factors=@count_unweighted_factors
     WHERE marking_period_id=mp_id AND student_id=s_id;
   ELSE
     INSERT INTO student_mp_stats(student_id,marking_period_id,sum_weighted_factors,count_weighted_factors,
         sum_unweighted_factors,count_unweighted_factors,grade_level_short)
       VALUES(s_id,mp_id,@sum_weighted_factors,@count_weighted_factors,@sum_unweighted_factors,
         @count_unweighted_factors,@grade_level_short);
   END IF;
 
   UPDATE student_mp_stats g
     INNER JOIN (
 	SELECT s.student_id,
 		SUM(s.weighted_gp/sc.reporting_gp_scale)/COUNT(*) AS cum_weighted_factor,
 		SUM(s.unweighted_gp/s.gp_scale)/COUNT(*) AS cum_unweighted_factor
 	FROM student_report_card_grades s
 	INNER JOIN schools sc ON sc.id=s.school_id
 	LEFT JOIN course_periods p ON p.course_period_id=s.course_period_id
 	WHERE s.course_period_id IS NOT NULL AND p.marking_period_id IS NULL OR p.marking_period_id=s.marking_period_id
 	GROUP BY student_id) gg ON gg.student_id=g.student_id
     SET g.cum_unweighted_factor=gg.cum_unweighted_factor, g.cum_weighted_factor=gg.cum_weighted_factor
     WHERE g.student_id=s_id;*/
 
   IF NOT EXISTS(SELECT NULL FROM student_gpa_calculated WHERE marking_period_id=mp_id AND student_id=s_id) THEN
     INSERT INTO student_gpa_calculated (student_id,marking_period_id)
       VALUES(s_id,mp_id);
   END IF;
 
   UPDATE student_gpa_calculated g
     INNER JOIN (
 	SELECT s.student_id,
 		SUM(s.unweighted_gp/s.gp_scale)/COUNT(*) AS cum_unweighted_factor
 	FROM student_report_card_grades s
 	INNER JOIN schools sc ON sc.id=s.school_id
 	LEFT JOIN course_periods p ON p.course_period_id=s.course_period_id
 	WHERE s.course_period_id IS NOT NULL AND p.marking_period_id IS NULL OR p.marking_period_id=s.marking_period_id
 	GROUP BY student_id) gg ON gg.student_id=g.student_id
     SET g.cum_unweighted_factor=gg.cum_unweighted_factor
     WHERE g.student_id=s_id;
 
 IF EXISTS(SELECT student_id FROM student_gpa_calculated WHERE marking_period_id=mp_id AND student_id=s_id) THEN
     UPDATE student_gpa_calculated
     SET
       gpa            = @gpa,
       weighted_gpa   =@weighted_gpa,
       unweighted_gpa =@unweighted_gpa
 
     WHERE marking_period_id=mp_id AND student_id=s_id;
   ELSE
         INSERT INTO student_gpa_calculated(student_id,marking_period_id,mp,gpa,weighted_gpa,unweighted_gpa,grade_level_short)
             VALUES(s_id,mp_id,mp_id,@gpa,@weighted_gpa,@unweighted_gpa,@grade_level_short  );
                    
 
    END IF;
 
   RETURN 0;
 END$$

CREATE FUNCTION `CREDIT`(
  	cp_id int,
  	mp_id int
  ) RETURNS decimal(10,3)
BEGIN
   SELECT credits,IF(ISNULL(marking_period_id),'Y',marking_period_id),mp INTO @credits,@marking_period_id,@mp FROM course_periods WHERE course_period_id=cp_id;
    SELECT mp_type INTO @mp_type FROM marking_periods WHERE marking_period_id=mp_id;
   
 IF @marking_period_id='Y' THEN 
 RETURN @credits;
    ELSEIF   @marking_period_id=mp_id THEN
     RETURN @credits;
 ELSEIF @mp = 'QTR' AND @mp_type = 'semester' THEN
      RETURN @credits;
    ELSEIF @mp='FY' AND @mp_type='semester' THEN
      SELECT COUNT(*) INTO @val FROM marking_periods WHERE parent_id=@marking_period_id GROUP BY parent_id;
    ELSEIF @mp = 'FY' AND @mp_type = 'quarter' THEN
      SELECT count(*) into @val FROM marking_periods WHERE grandparent_id=@marking_period_id GROUP BY grandparent_id;
    ELSEIF @mp = 'SEM' AND @mp_type = 'quarter' THEN
      SELECT count(*) into @val FROM marking_periods WHERE parent_id=@marking_period_id GROUP BY parent_id;
    ELSE
      RETURN 0;
    END IF;
    IF @val > 0 THEN
      RETURN @credits/@val;
    END IF;
    RETURN 0;
 END$$

CREATE FUNCTION `fn_marking_period_seq`() RETURNS int(11)
BEGIN
   INSERT INTO marking_period_id_generator VALUES(NULL);
 RETURN LAST_INSERT_ID();
 END$$

CREATE FUNCTION `RE_CALC_GPA_MP`(
 	s_id int,
 	mp_id int,
         sy int,
         sch_id int
 ) RETURNS int(11)
BEGIN
   SELECT
     SUM(srcg.weighted_gp/s.reporting_gp_scale) AS sum_weighted_factors, 
     COUNT(*) AS count_weighted_factors,                        
     SUM(srcg.unweighted_gp/srcg.gp_scale) AS sum_unweighted_factors, 
     COUNT(*) AS count_unweighted_factors,
    IF(ISNULL(sum(srcg.unweighted_gp)),  (SUM(srcg.weighted_gp*srcg.credit_earned))/ sum(srcg.credit_attempted),
                       IF(ISNULL(sum(srcg.weighted_gp)), SUM(srcg.unweighted_gp*srcg.credit_earned)/sum(srcg.credit_attempted),
                          ( SUM(srcg.unweighted_gp*srcg.credit_attempted)+ SUM(srcg.weighted_gp*srcg.credit_earned))/sum(srcg.credit_attempted)
                         )
       ),
     
     SUM(srcg.weighted_gp*srcg.credit_earned)/(select sum(sg.credit_attempted) from student_report_card_grades sg where sg.marking_period_id=mp_id AND sg.student_id=s_id
                                                   AND sg.weighted_gp  IS NOT NULL  AND sg.unweighted_gp IS NULL GROUP BY sg.student_id, sg.marking_period_id) ,
     SUM(srcg.unweighted_gp*srcg.credit_earned)/ (select sum(sg.credit_attempted) from student_report_card_grades sg where sg.marking_period_id=mp_id AND sg.student_id=s_id
                                                      AND sg.unweighted_gp  IS NOT NULL  AND sg.weighted_gp IS NULL GROUP BY sg.student_id, sg.marking_period_id) ,
     eg.short_name
   INTO
     @sum_weighted_factors,
     @count_weighted_factors,
     @sum_unweighted_factors,
     @count_unweighted_factors,
     @gpa,
     @weighted_gpa,
     @unweighted_gpa,
     @grade_level_short
   FROM student_report_card_grades srcg
   INNER JOIN schools s ON s.id=srcg.school_id
   LEFT JOIN enroll_grade eg on eg.student_id=srcg.student_id AND eg.syear=srcg.syear AND eg.school_id=srcg.school_id
   WHERE srcg.marking_period_id=mp_id AND srcg.student_id=s_id AND srcg.gp_scale<>0 AND srcg.school_id=sch_id AND srcg.syear=sy AND srcg.marking_period_id NOT LIKE 'E%'
 AND (eg.START_DATE IS NULL OR eg.START_DATE='0000-00-00'  OR eg.START_DATE<=CURDATE()) AND (eg.END_DATE IS NULL OR eg.END_DATE='0000-00-00'  OR eg.END_DATE>=CURDATE())
   GROUP BY srcg.student_id,eg.short_name;
 
   /*IF EXISTS(SELECT NULL FROM student_mp_stats WHERE marking_period_id=mp_id AND student_id=s_id) THEN
     UPDATE student_mp_stats
     SET
       sum_weighted_factors=@sum_weighted_factors,
       count_weighted_factors=@count_weighted_factors,
       sum_unweighted_factors=@sum_unweighted_factors,
       count_unweighted_factors=@count_unweighted_factors
     WHERE marking_period_id=mp_id AND student_id=s_id;
   ELSE
     INSERT INTO student_mp_stats(student_id,marking_period_id,sum_weighted_factors,count_weighted_factors,
         sum_unweighted_factors,count_unweighted_factors,grade_level_short)
       VALUES(s_id,mp_id,@sum_weighted_factors,@count_weighted_factors,@sum_unweighted_factors,
         @count_unweighted_factors,@grade_level_short);
   END IF;
 
   UPDATE student_mp_stats g
     INNER JOIN (
 	SELECT s.student_id,
 		SUM(s.weighted_gp/sc.reporting_gp_scale)/COUNT(*) AS cum_weighted_factor,
 		SUM(s.unweighted_gp/s.gp_scale)/COUNT(*) AS cum_unweighted_factor
 	FROM student_report_card_grades s
 	INNER JOIN schools sc ON sc.id=s.school_id
 	LEFT JOIN course_periods p ON p.course_period_id=s.course_period_id
 	WHERE p.marking_period_id IS NULL OR p.marking_period_id=s.marking_period_id
 	GROUP BY student_id) gg ON gg.student_id=g.student_id
     SET g.cum_unweighted_factor=gg.cum_unweighted_factor, g.cum_weighted_factor=gg.cum_weighted_factor
     WHERE g.student_id=s_id;*/
 
   IF NOT EXISTS(SELECT NULL FROM student_gpa_calculated WHERE marking_period_id=mp_id AND student_id=s_id) THEN
     INSERT INTO student_mp_stats(student_id,marking_period_id)
       VALUES(s_id,mp_id);
   END IF;
 
   UPDATE student_gpa_calculated g
     INNER JOIN (
 	SELECT s.student_id,
 		SUM(s.unweighted_gp/s.gp_scale)/COUNT(*) AS cum_unweighted_factor
 	FROM student_report_card_grades s
 	INNER JOIN schools sc ON sc.id=s.school_id
 	LEFT JOIN course_periods p ON p.course_period_id=s.course_period_id
 	WHERE p.marking_period_id IS NULL OR p.marking_period_id=s.marking_period_id
 	GROUP BY student_id) gg ON gg.student_id=g.student_id
     SET g.cum_unweighted_factor=gg.cum_unweighted_factor
     WHERE g.student_id=s_id;
 
 IF EXISTS(SELECT student_id FROM student_gpa_calculated WHERE marking_period_id=mp_id AND student_id=s_id) THEN
     UPDATE student_gpa_calculated
     SET
       gpa            = @gpa,
       weighted_gpa   =@weighted_gpa,
       unweighted_gpa =@unweighted_gpa
 
     WHERE marking_period_id=mp_id AND student_id=s_id;
   ELSE
         INSERT INTO student_gpa_calculated(student_id,marking_period_id,mp,gpa,weighted_gpa,unweighted_gpa,grade_level_short)
             VALUES(s_id,mp_id,mp_id,@gpa,@weighted_gpa,@unweighted_gpa,@grade_level_short  );
                    
 
    END IF;
 
   RETURN 0;
 END$$

CREATE FUNCTION `SET_CLASS_RANK_MP`(
 	mp_id int
 ) RETURNS int(11)
BEGIN
 
 DECLARE done INT DEFAULT 0;
 DECLARE marking_period_id INT;
 DECLARE student_id INT;
 DECLARE rank NUMERIC;
 
 declare cur1 cursor for
 select
   mp.marking_period_id,
   sgc.student_id,
  (select count(*)+1 
    from student_gpa_calculated sgc3
    where sgc3.gpa > sgc.gpa
      and sgc3.marking_period_id = mp.marking_period_id 
      and sgc3.student_id in (select distinct sgc2.student_id 
                                                 from student_gpa_calculated sgc2, student_enrollment se2
                                                 where sgc2.student_id = se2.student_id 
                                                 and sgc2.marking_period_id = mp.marking_period_id 
                                                 and se2.grade_id = se.grade_id
                                                 and se2.syear = se.syear
                                                 group by gpa
                                 )
   ) as rank
   from student_enrollment se, student_gpa_calculated sgc, marking_periods mp
   where se.student_id = sgc.student_id
     and sgc.marking_period_id = mp.marking_period_id
     and mp.marking_period_id = mp_id
     and se.syear = mp.syear
     and not sgc.gpa is null
   order by grade_id, rank;
 DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;
 
 open cur1;
 fetch cur1 into marking_period_id,student_id,rank;
 
 while not done DO
 	update student_gpa_calculated sgc
 	  set
 	    class_rank = rank
 	where sgc.marking_period_id = marking_period_id
 	  and sgc.student_id = student_id;
 	fetch cur1 into marking_period_id,student_id,rank;
 END WHILE;
 CLOSE cur1;
 
 RETURN 1;
 END$$

CREATE FUNCTION `STUDENT_DISABLE`(
 stu_id int
 ) RETURNS int(1)
BEGIN
 UPDATE students set is_disable ='Y' where (select end_date from student_enrollment where  student_id=stu_id ORDER BY id DESC LIMIT 1) IS NOT NULL AND (select end_date from student_enrollment where  student_id=stu_id ORDER BY id DESC LIMIT 1)< CURDATE() AND  student_id=stu_id;
 RETURN 1;
 END$$

DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `app`
--

CREATE TABLE `app` (
  `name` varchar(100) NOT NULL,
  `value` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `app`
--

INSERT INTO `app` VALUES
('version', '6.5'),
('date', 'February 05, 2018'),
('build', '20180205001'),
('update', '0'),
('last_updated', 'February 05, 2018');

-- --------------------------------------------------------

--
-- Table structure for table `attendance_calendar`
--

CREATE TABLE `attendance_calendar` (
  `syear` decimal(4,0) NOT NULL,
  `school_id` decimal(10,0) NOT NULL,
  `school_date` date NOT NULL,
  `minutes` decimal(10,0) DEFAULT NULL,
  `block` varchar(10) DEFAULT NULL,
  `calendar_id` decimal(10,0) NOT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`syear`,`school_id`,`school_date`,`calendar_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `attendance_calendar`
--

INSERT INTO `attendance_calendar` VALUES
(2017, 1, '2017-07-03', 999, NULL, 1, '2018-01-22 04:22:23', NULL),
(2017, 1, '2017-07-05', 999, NULL, 1, '2018-01-22 04:22:23', NULL),
(2017, 1, '2017-07-06', 999, NULL, 1, '2018-01-22 04:22:23', NULL),
(2017, 1, '2017-07-07', 999, NULL, 1, '2018-01-22 04:22:23', NULL),
(2017, 1, '2017-07-10', 999, NULL, 1, '2018-01-22 04:22:23', NULL),
(2017, 1, '2017-07-11', 999, NULL, 1, '2018-01-22 04:22:23', NULL),
(2017, 1, '2017-07-12', 999, NULL, 1, '2018-01-22 04:22:23', NULL),
(2017, 1, '2017-07-13', 999, NULL, 1, '2018-01-22 04:22:23', NULL),
(2017, 1, '2017-07-14', 999, NULL, 1, '2018-01-22 04:22:23', NULL),
(2017, 1, '2017-07-17', 999, NULL, 1, '2018-01-22 04:22:24', NULL),
(2017, 1, '2017-07-18', 999, NULL, 1, '2018-01-22 04:22:24', NULL),
(2017, 1, '2017-07-19', 999, NULL, 1, '2018-01-22 04:22:24', NULL),
(2017, 1, '2017-07-20', 999, NULL, 1, '2018-01-22 04:22:24', NULL),
(2017, 1, '2017-07-21', 999, NULL, 1, '2018-01-22 04:22:24', NULL),
(2017, 1, '2017-07-24', 999, NULL, 1, '2018-01-22 04:22:24', NULL),
(2017, 1, '2017-07-25', 999, NULL, 1, '2018-01-22 04:22:24', NULL),
(2017, 1, '2017-07-26', 999, NULL, 1, '2018-01-22 04:22:24', NULL),
(2017, 1, '2017-07-27', 999, NULL, 1, '2018-01-22 04:22:24', NULL),
(2017, 1, '2017-07-28', 999, NULL, 1, '2018-01-22 04:22:24', NULL),
(2017, 1, '2017-07-31', 999, NULL, 1, '2018-01-22 04:22:24', NULL),
(2017, 1, '2017-08-01', 999, NULL, 1, '2018-01-22 04:22:24', NULL),
(2017, 1, '2017-08-02', 999, NULL, 1, '2018-01-22 04:22:24', NULL),
(2017, 1, '2017-08-03', 999, NULL, 1, '2018-01-22 04:22:24', NULL),
(2017, 1, '2017-08-04', 999, NULL, 1, '2018-01-22 04:22:25', NULL),
(2017, 1, '2017-08-07', 999, NULL, 1, '2018-01-22 04:22:25', NULL),
(2017, 1, '2017-08-08', 999, NULL, 1, '2018-01-22 04:22:25', NULL),
(2017, 1, '2017-08-09', 999, NULL, 1, '2018-01-22 04:22:25', NULL),
(2017, 1, '2017-08-10', 999, NULL, 1, '2018-01-22 04:22:25', NULL),
(2017, 1, '2017-08-11', 999, NULL, 1, '2018-01-22 04:22:25', NULL),
(2017, 1, '2017-08-14', 999, NULL, 1, '2018-01-22 04:22:25', NULL),
(2017, 1, '2017-08-15', 999, NULL, 1, '2018-01-22 04:22:25', NULL),
(2017, 1, '2017-08-16', 999, NULL, 1, '2018-01-22 04:22:25', NULL),
(2017, 1, '2017-08-17', 999, NULL, 1, '2018-01-22 04:22:25', NULL),
(2017, 1, '2017-08-18', 999, NULL, 1, '2018-01-22 04:22:25', NULL),
(2017, 1, '2017-08-21', 999, NULL, 1, '2018-01-22 04:22:25', NULL),
(2017, 1, '2017-08-22', 999, NULL, 1, '2018-01-22 04:22:25', NULL),
(2017, 1, '2017-08-23', 999, NULL, 1, '2018-01-22 04:22:25', NULL),
(2017, 1, '2017-08-24', 999, NULL, 1, '2018-01-22 04:22:25', NULL),
(2017, 1, '2017-08-25', 999, NULL, 1, '2018-01-22 04:22:26', NULL),
(2017, 1, '2017-08-28', 999, NULL, 1, '2018-01-22 04:22:26', NULL),
(2017, 1, '2017-08-29', 999, NULL, 1, '2018-01-22 04:22:26', NULL),
(2017, 1, '2017-08-30', 999, NULL, 1, '2018-01-22 04:22:26', NULL),
(2017, 1, '2017-08-31', 999, NULL, 1, '2018-01-22 04:22:26', NULL),
(2017, 1, '2017-09-01', 999, NULL, 1, '2018-01-22 04:22:26', NULL),
(2017, 1, '2017-09-05', 999, NULL, 1, '2018-01-22 04:22:26', NULL),
(2017, 1, '2017-09-06', 999, NULL, 1, '2018-01-22 04:22:26', NULL),
(2017, 1, '2017-09-07', 999, NULL, 1, '2018-01-22 04:22:26', NULL),
(2017, 1, '2017-09-08', 999, NULL, 1, '2018-01-22 04:22:26', NULL),
(2017, 1, '2017-09-11', 999, NULL, 1, '2018-01-22 04:22:26', NULL),
(2017, 1, '2017-09-12', 999, NULL, 1, '2018-01-22 04:22:26', NULL),
(2017, 1, '2017-09-13', 999, NULL, 1, '2018-01-22 04:22:26', NULL),
(2017, 1, '2017-09-14', 999, NULL, 1, '2018-01-22 04:22:27', NULL),
(2017, 1, '2017-09-15', 999, NULL, 1, '2018-01-22 04:22:27', NULL),
(2017, 1, '2017-09-18', 999, NULL, 1, '2018-01-22 04:22:27', NULL),
(2017, 1, '2017-09-19', 999, NULL, 1, '2018-01-22 04:22:27', NULL),
(2017, 1, '2017-09-20', 999, NULL, 1, '2018-01-22 04:22:27', NULL),
(2017, 1, '2017-09-21', 999, NULL, 1, '2018-01-22 04:22:27', NULL),
(2017, 1, '2017-09-22', 999, NULL, 1, '2018-01-22 04:22:27', NULL),
(2017, 1, '2017-09-25', 999, NULL, 1, '2018-01-22 04:22:27', NULL),
(2017, 1, '2017-09-26', 999, NULL, 1, '2018-01-22 04:22:27', NULL),
(2017, 1, '2017-09-27', 999, NULL, 1, '2018-01-22 04:22:27', NULL),
(2017, 1, '2017-09-28', 999, NULL, 1, '2018-01-22 04:22:27', NULL),
(2017, 1, '2017-09-29', 999, NULL, 1, '2018-01-22 04:22:27', NULL),
(2017, 1, '2017-10-02', 999, NULL, 1, '2018-01-22 04:22:27', NULL),
(2017, 1, '2017-10-03', 999, NULL, 1, '2018-01-22 04:22:27', NULL),
(2017, 1, '2017-10-04', 999, NULL, 1, '2018-01-22 04:22:27', NULL),
(2017, 1, '2017-10-05', 999, NULL, 1, '2018-01-22 04:22:27', NULL),
(2017, 1, '2017-10-06', 999, NULL, 1, '2018-01-22 04:22:28', NULL),
(2017, 1, '2017-10-10', 999, NULL, 1, '2018-01-22 04:22:28', NULL),
(2017, 1, '2017-10-11', 999, NULL, 1, '2018-01-22 04:22:28', NULL),
(2017, 1, '2017-10-12', 999, NULL, 1, '2018-01-22 04:22:28', NULL),
(2017, 1, '2017-10-13', 999, NULL, 1, '2018-01-22 04:22:28', NULL),
(2017, 1, '2017-10-16', 999, NULL, 1, '2018-01-22 04:22:28', NULL),
(2017, 1, '2017-10-17', 999, NULL, 1, '2018-01-22 04:22:28', NULL),
(2017, 1, '2017-10-18', 999, NULL, 1, '2018-01-22 04:22:28', NULL),
(2017, 1, '2017-10-19', 999, NULL, 1, '2018-01-22 04:22:28', NULL),
(2017, 1, '2017-10-20', 999, NULL, 1, '2018-01-22 04:22:28', NULL),
(2017, 1, '2017-10-23', 999, NULL, 1, '2018-01-22 04:22:28', NULL),
(2017, 1, '2017-10-24', 999, NULL, 1, '2018-01-22 04:22:28', NULL),
(2017, 1, '2017-10-25', 999, NULL, 1, '2018-01-22 04:22:28', NULL),
(2017, 1, '2017-10-26', 999, NULL, 1, '2018-01-22 04:22:29', NULL),
(2017, 1, '2017-10-27', 999, NULL, 1, '2018-01-22 04:22:29', NULL),
(2017, 1, '2017-10-30', 999, NULL, 1, '2018-01-22 04:22:29', NULL),
(2017, 1, '2017-10-31', 999, NULL, 1, '2018-01-22 04:22:29', NULL),
(2017, 1, '2017-11-01', 999, NULL, 1, '2018-01-22 04:22:29', NULL),
(2017, 1, '2017-11-02', 999, NULL, 1, '2018-01-22 04:22:29', NULL),
(2017, 1, '2017-11-03', 999, NULL, 1, '2018-01-22 04:22:29', NULL),
(2017, 1, '2017-11-06', 999, NULL, 1, '2018-01-22 04:22:29', NULL),
(2017, 1, '2017-11-07', 999, NULL, 1, '2018-01-22 04:22:29', NULL),
(2017, 1, '2017-11-08', 999, NULL, 1, '2018-01-22 04:22:29', NULL),
(2017, 1, '2017-11-09', 999, NULL, 1, '2018-01-22 04:22:29', NULL),
(2017, 1, '2017-11-10', 999, NULL, 1, '2018-01-22 04:22:29', NULL),
(2017, 1, '2017-11-13', 999, NULL, 1, '2018-01-22 04:22:29', NULL),
(2017, 1, '2017-11-14', 999, NULL, 1, '2018-01-22 04:22:29', NULL),
(2017, 1, '2017-11-15', 999, NULL, 1, '2018-01-22 04:22:29', NULL),
(2017, 1, '2017-11-16', 999, NULL, 1, '2018-01-22 04:22:29', NULL),
(2017, 1, '2017-11-17', 999, NULL, 1, '2018-01-22 04:22:29', NULL),
(2017, 1, '2017-11-27', 999, NULL, 1, '2018-01-22 04:22:30', NULL),
(2017, 1, '2017-11-28', 999, NULL, 1, '2018-01-22 04:22:30', NULL),
(2017, 1, '2017-11-29', 999, NULL, 1, '2018-01-22 04:22:30', NULL),
(2017, 1, '2017-11-30', 999, NULL, 1, '2018-01-22 04:22:30', NULL),
(2017, 1, '2017-12-01', 999, NULL, 1, '2018-01-22 04:22:30', NULL),
(2017, 1, '2017-12-04', 999, NULL, 1, '2018-01-22 04:22:30', NULL),
(2017, 1, '2017-12-05', 999, NULL, 1, '2018-01-22 04:22:30', NULL),
(2017, 1, '2017-12-06', 999, NULL, 1, '2018-01-22 04:22:30', NULL),
(2017, 1, '2017-12-07', 999, NULL, 1, '2018-01-22 04:22:30', NULL),
(2017, 1, '2017-12-08', 999, NULL, 1, '2018-01-22 04:22:30', NULL),
(2017, 1, '2017-12-11', 999, NULL, 1, '2018-01-22 04:22:30', NULL),
(2017, 1, '2017-12-12', 999, NULL, 1, '2018-01-22 04:22:30', NULL),
(2017, 1, '2017-12-13', 999, NULL, 1, '2018-01-22 04:22:30', NULL),
(2017, 1, '2017-12-14', 999, NULL, 1, '2018-01-22 04:22:30', NULL),
(2017, 1, '2017-12-15', 999, NULL, 1, '2018-01-22 04:22:30', NULL),
(2017, 1, '2017-12-18', 999, NULL, 1, '2018-01-22 04:22:30', NULL),
(2017, 1, '2017-12-19', 999, NULL, 1, '2018-01-22 04:22:30', NULL),
(2017, 1, '2017-12-20', 999, NULL, 1, '2018-01-22 04:22:31', NULL),
(2017, 1, '2018-01-03', 999, NULL, 1, '2018-01-22 04:22:31', NULL),
(2017, 1, '2018-01-04', 999, NULL, 1, '2018-01-22 04:22:31', NULL),
(2017, 1, '2018-01-05', 999, NULL, 1, '2018-01-22 04:22:31', NULL),
(2017, 1, '2018-01-08', 999, NULL, 1, '2018-01-22 04:22:31', NULL),
(2017, 1, '2018-01-09', 999, NULL, 1, '2018-01-22 04:22:31', NULL),
(2017, 1, '2018-01-10', 999, NULL, 1, '2018-01-22 04:22:31', NULL),
(2017, 1, '2018-01-11', 999, NULL, 1, '2018-01-22 04:22:31', NULL),
(2017, 1, '2018-01-12', 999, NULL, 1, '2018-01-22 04:22:31', NULL),
(2017, 1, '2018-01-16', 999, NULL, 1, '2018-01-22 04:22:32', NULL),
(2017, 1, '2018-01-17', 999, NULL, 1, '2018-01-22 04:22:32', NULL),
(2017, 1, '2018-01-18', 999, NULL, 1, '2018-01-22 04:22:32', NULL),
(2017, 1, '2018-01-19', 999, NULL, 1, '2018-01-22 04:22:32', NULL),
(2017, 1, '2018-01-22', 999, NULL, 1, '2018-01-22 04:22:32', NULL),
(2017, 1, '2018-01-23', 999, NULL, 1, '2018-01-22 04:22:32', NULL),
(2017, 1, '2018-01-24', 999, NULL, 1, '2018-01-22 04:22:32', NULL),
(2017, 1, '2018-01-25', 999, NULL, 1, '2018-01-22 04:22:32', NULL),
(2017, 1, '2018-01-26', 999, NULL, 1, '2018-01-22 04:22:32', NULL),
(2017, 1, '2018-01-29', 999, NULL, 1, '2018-01-22 04:22:32', NULL),
(2017, 1, '2018-01-30', 999, NULL, 1, '2018-01-22 04:22:32', NULL),
(2017, 1, '2018-01-31', 999, NULL, 1, '2018-01-22 04:22:32', NULL),
(2017, 1, '2018-02-01', 999, NULL, 1, '2018-01-22 04:22:32', NULL),
(2017, 1, '2018-02-02', 999, NULL, 1, '2018-01-22 04:22:32', NULL),
(2017, 1, '2018-02-05', 999, NULL, 1, '2018-01-22 04:22:33', NULL),
(2017, 1, '2018-02-06', 999, NULL, 1, '2018-01-22 04:22:33', NULL),
(2017, 1, '2018-02-07', 999, NULL, 1, '2018-01-22 04:22:33', NULL),
(2017, 1, '2018-02-08', 999, NULL, 1, '2018-01-22 04:22:33', NULL),
(2017, 1, '2018-02-12', 999, NULL, 1, '2018-01-22 04:22:33', NULL),
(2017, 1, '2018-02-13', 999, NULL, 1, '2018-01-22 04:22:33', NULL),
(2017, 1, '2018-02-14', 999, NULL, 1, '2018-01-22 04:22:33', NULL),
(2017, 1, '2018-02-15', 999, NULL, 1, '2018-01-22 04:22:33', NULL),
(2017, 1, '2018-02-16', 999, NULL, 1, '2018-01-22 04:22:33', NULL),
(2017, 1, '2018-02-19', 999, NULL, 1, '2018-01-22 04:22:33', NULL),
(2017, 1, '2018-02-20', 999, NULL, 1, '2018-01-22 04:22:33', NULL),
(2017, 1, '2018-02-21', 999, NULL, 1, '2018-01-22 04:22:33', NULL),
(2017, 1, '2018-02-22', 999, NULL, 1, '2018-01-22 04:22:33', NULL),
(2017, 1, '2018-02-26', 999, NULL, 1, '2018-01-22 04:22:34', NULL),
(2017, 1, '2018-02-27', 999, NULL, 1, '2018-01-22 04:22:34', NULL),
(2017, 1, '2018-02-28', 999, NULL, 1, '2018-01-22 04:22:34', NULL),
(2017, 1, '2018-03-01', 999, NULL, 1, '2018-01-22 04:22:34', NULL),
(2017, 1, '2018-03-02', 999, NULL, 1, '2018-01-22 04:22:34', NULL),
(2017, 1, '2018-03-05', 999, NULL, 1, '2018-01-22 04:22:34', NULL),
(2017, 1, '2018-03-06', 999, NULL, 1, '2018-01-22 04:22:34', NULL),
(2017, 1, '2018-03-07', 999, NULL, 1, '2018-01-22 04:22:34', NULL),
(2017, 1, '2018-03-08', 999, NULL, 1, '2018-01-22 04:22:34', NULL),
(2017, 1, '2018-03-12', 999, NULL, 1, '2018-01-22 04:22:34', NULL),
(2017, 1, '2018-03-13', 999, NULL, 1, '2018-01-22 04:22:34', NULL),
(2017, 1, '2018-03-14', 999, NULL, 1, '2018-01-22 04:22:34', NULL),
(2017, 1, '2018-03-15', 999, NULL, 1, '2018-01-22 04:22:34', NULL),
(2017, 1, '2018-03-16', 999, NULL, 1, '2018-01-22 04:22:34', NULL),
(2017, 1, '2018-03-19', 999, NULL, 1, '2018-01-22 04:22:34', NULL),
(2017, 1, '2018-03-20', 999, NULL, 1, '2018-01-22 04:22:34', NULL),
(2017, 1, '2018-03-21', 999, NULL, 1, '2018-01-22 04:22:34', NULL),
(2017, 1, '2018-03-22', 999, NULL, 1, '2018-01-22 04:22:35', NULL),
(2017, 1, '2018-03-26', 999, NULL, 1, '2018-01-22 04:22:35', NULL),
(2017, 1, '2018-03-27', 999, NULL, 1, '2018-01-22 04:22:35', NULL),
(2017, 1, '2018-03-28', 999, NULL, 1, '2018-01-22 04:22:35', NULL),
(2017, 1, '2018-03-29', 999, NULL, 1, '2018-01-22 04:22:35', NULL),
(2017, 1, '2018-03-30', 999, NULL, 1, '2018-01-22 04:22:35', NULL),
(2017, 1, '2018-04-09', 999, NULL, 1, '2018-01-22 04:22:35', NULL),
(2017, 1, '2018-04-10', 999, NULL, 1, '2018-01-22 04:22:35', NULL),
(2017, 1, '2018-04-11', 999, NULL, 1, '2018-01-22 04:22:35', NULL),
(2017, 1, '2018-04-12', 999, NULL, 1, '2018-01-22 04:22:35', NULL),
(2017, 1, '2018-04-13', 999, NULL, 1, '2018-01-22 04:22:36', NULL),
(2017, 1, '2018-04-16', 999, NULL, 1, '2018-01-22 04:22:36', NULL),
(2017, 1, '2018-04-17', 999, NULL, 1, '2018-01-22 04:22:36', NULL),
(2017, 1, '2018-04-18', 999, NULL, 1, '2018-01-22 04:22:36', NULL),
(2017, 1, '2018-04-19', 999, NULL, 1, '2018-01-22 04:22:36', NULL),
(2017, 1, '2018-04-20', 999, NULL, 1, '2018-01-22 04:22:36', NULL),
(2017, 1, '2018-04-23', 999, NULL, 1, '2018-01-22 04:22:36', NULL),
(2017, 1, '2018-04-24', 999, NULL, 1, '2018-01-22 04:22:36', NULL),
(2017, 1, '2018-04-25', 999, NULL, 1, '2018-01-22 04:22:36', NULL),
(2017, 1, '2018-04-26', 999, NULL, 1, '2018-01-22 04:22:36', NULL),
(2017, 1, '2018-04-27', 999, NULL, 1, '2018-01-22 04:22:36', NULL),
(2017, 1, '2018-04-30', 999, NULL, 1, '2018-01-22 04:22:36', NULL),
(2017, 1, '2018-05-01', 999, NULL, 1, '2018-01-22 04:22:36', NULL),
(2017, 1, '2018-05-02', 999, NULL, 1, '2018-01-22 04:22:36', NULL),
(2017, 1, '2018-05-03', 999, NULL, 1, '2018-01-22 04:22:36', NULL),
(2017, 1, '2018-05-04', 999, NULL, 1, '2018-01-22 04:22:36', NULL),
(2017, 1, '2018-05-07', 999, NULL, 1, '2018-01-22 04:22:36', NULL),
(2017, 1, '2018-05-08', 999, NULL, 1, '2018-01-22 04:22:36', NULL),
(2017, 1, '2018-05-09', 999, NULL, 1, '2018-01-22 04:22:37', NULL),
(2017, 1, '2018-05-10', 999, NULL, 1, '2018-01-22 04:22:37', NULL),
(2017, 1, '2018-05-11', 999, NULL, 1, '2018-01-22 04:22:37', NULL),
(2017, 1, '2018-05-14', 999, NULL, 1, '2018-01-22 04:22:37', NULL),
(2017, 1, '2018-05-15', 999, NULL, 1, '2018-01-22 04:22:37', NULL),
(2017, 1, '2018-05-16', 999, NULL, 1, '2018-01-22 04:22:37', NULL),
(2017, 1, '2018-05-17', 999, NULL, 1, '2018-01-22 04:22:37', NULL),
(2017, 1, '2018-05-18', 999, NULL, 1, '2018-01-22 04:22:37', NULL),
(2017, 1, '2018-05-21', 999, NULL, 1, '2018-01-22 04:22:37', NULL),
(2017, 1, '2018-05-22', 999, NULL, 1, '2018-01-22 04:22:37', NULL),
(2017, 1, '2018-05-23', 999, NULL, 1, '2018-01-22 04:22:37', NULL),
(2017, 1, '2018-05-24', 999, NULL, 1, '2018-01-22 04:22:37', NULL),
(2017, 1, '2018-05-25', 999, NULL, 1, '2018-01-22 04:22:37', NULL),
(2017, 1, '2018-05-29', 999, NULL, 1, '2018-01-22 04:22:37', NULL),
(2017, 1, '2018-05-30', 999, NULL, 1, '2018-01-22 04:22:37', NULL),
(2017, 1, '2018-05-31', 999, NULL, 1, '2018-01-22 04:22:37', NULL),
(2017, 1, '2018-06-01', 999, NULL, 1, '2018-01-22 04:22:37', NULL),
(2017, 1, '2018-06-04', 999, NULL, 1, '2018-01-22 04:22:37', NULL),
(2017, 1, '2018-06-05', 999, NULL, 1, '2018-01-22 04:22:38', NULL),
(2017, 1, '2018-06-06', 999, NULL, 1, '2018-01-22 04:22:38', NULL),
(2017, 1, '2018-06-07', 999, NULL, 1, '2018-01-22 04:22:38', NULL),
(2017, 1, '2018-06-08', 999, NULL, 1, '2018-01-22 04:22:38', NULL),
(2017, 1, '2018-06-11', 999, NULL, 1, '2018-01-22 04:22:38', NULL),
(2017, 1, '2018-06-12', 999, NULL, 1, '2018-01-22 04:22:38', NULL),
(2017, 1, '2018-06-13', 999, NULL, 1, '2018-01-22 04:22:38', NULL),
(2017, 1, '2018-06-14', 999, NULL, 1, '2018-01-22 04:22:38', NULL),
(2017, 1, '2018-06-15', 999, NULL, 1, '2018-01-22 04:22:38', NULL),
(2017, 1, '2018-06-18', 999, NULL, 1, '2018-01-22 04:22:38', NULL),
(2017, 1, '2018-06-19', 999, NULL, 1, '2018-01-22 04:22:38', NULL),
(2017, 1, '2018-06-20', 999, NULL, 1, '2018-01-22 04:22:39', NULL),
(2017, 1, '2018-06-21', 999, NULL, 1, '2018-01-22 04:22:39', NULL),
(2017, 1, '2018-06-22', 999, NULL, 1, '2018-01-22 04:22:39', NULL),
(2017, 1, '2018-06-25', 999, NULL, 1, '2018-01-22 04:22:39', NULL),
(2017, 1, '2018-06-26', 999, NULL, 1, '2018-01-22 04:22:39', NULL),
(2017, 1, '2018-06-27', 999, NULL, 1, '2018-01-22 04:22:39', NULL),
(2017, 1, '2018-06-28', 999, NULL, 1, '2018-01-22 04:22:39', NULL),
(2017, 1, '2018-06-29', 999, NULL, 1, '2018-01-22 04:22:39', NULL);

--
-- Triggers `attendance_calendar`
--
DROP TRIGGER IF EXISTS `td_cal_missing_attendance`;
DELIMITER //
CREATE TRIGGER `td_cal_missing_attendance` AFTER DELETE ON `attendance_calendar`
 FOR EACH ROW DELETE mi.* FROM missing_attendance mi,course_periods cp WHERE mi.course_period_id=cp.course_period_id and cp.calendar_id=OLD.calendar_id AND mi.SCHOOL_DATE=OLD.school_date
//
DELIMITER ;
DROP TRIGGER IF EXISTS `ti_cal_missing_attendance`;
DELIMITER //
CREATE TRIGGER `ti_cal_missing_attendance` AFTER INSERT ON `attendance_calendar`
 FOR EACH ROW BEGIN
     DECLARE associations INT;
     SET associations = (SELECT COUNT(course_period_id) FROM `course_periods` WHERE calendar_id=NEW.calendar_id);
     IF associations>0 THEN
 	CALL ATTENDANCE_CALC_BY_DATE(NEW.school_date, NEW.syear,NEW.school_id);
     END IF;
 END
//
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `attendance_codes`
--

CREATE TABLE `attendance_codes` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `syear` decimal(4,0) DEFAULT NULL,
  `school_id` decimal(10,0) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `short_name` varchar(10) DEFAULT NULL,
  `type` varchar(10) DEFAULT NULL,
  `state_code` varchar(1) DEFAULT NULL,
  `default_code` varchar(1) DEFAULT NULL,
  `table_name` decimal(10,0) DEFAULT NULL,
  `sort_order` decimal(10,0) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `attendance_codes_ind2` USING BTREE (`syear`,`school_id`),
  KEY `attendance_codes_ind3` USING BTREE (`short_name`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

--
-- Dumping data for table `attendance_codes`
--

INSERT INTO `attendance_codes` VALUES
(1, 2017, 1, 'Present', 'P', 'teacher', 'P', 'Y', 0, 1, '2018-01-22 04:47:19', NULL),
(2, 2017, 1, 'Absent', 'A', 'teacher', 'A', NULL, 0, 2, '2018-01-22 04:47:32', NULL),
(3, 2017, 1, 'Tardy', 'T', 'teacher', 'H', NULL, 0, 3, '2018-01-22 04:47:56', NULL),
(4, 2017, 1, 'Excused Absence', 'EA', 'official', 'A', NULL, 0, 4, '2018-01-22 04:49:05', NULL),
(5, 2017, 1, 'Late', 'L', 'official', 'P', NULL, 0, 5, '2018-01-22 04:49:22', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `attendance_code_categories`
--

CREATE TABLE `attendance_code_categories` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `syear` decimal(4,0) DEFAULT NULL,
  `school_id` decimal(10,0) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `attendance_code_categories_ind1` USING BTREE (`id`),
  KEY `attendance_code_categories_ind2` USING BTREE (`syear`,`school_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `attendance_completed`
--

CREATE TABLE `attendance_completed` (
  `staff_id` decimal(10,0) NOT NULL,
  `school_date` date NOT NULL,
  `period_id` decimal(10,0) NOT NULL,
  `course_period_id` int(11) NOT NULL,
  `cpv_id` int(11) NOT NULL,
  `substitute_staff_id` decimal(10,0) DEFAULT NULL,
  `is_taken_by_substitute_staff` char(1) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `attendance_completed`
--

INSERT INTO `attendance_completed` VALUES
(3, '2017-11-01', 2, 1, 1, NULL, NULL, '2018-01-23 11:29:03', NULL),
(3, '2017-11-02', 2, 1, 1, NULL, NULL, '2018-01-23 12:05:45', NULL),
(3, '2017-11-03', 2, 1, 1, NULL, NULL, '2018-01-23 12:06:01', NULL),
(3, '2017-11-06', 2, 1, 1, NULL, NULL, '2018-01-23 12:06:18', NULL),
(3, '2017-11-07', 2, 1, 1, NULL, NULL, '2018-01-23 12:09:18', NULL),
(3, '2017-11-08', 2, 1, 1, NULL, NULL, '2018-01-23 12:10:28', NULL),
(3, '2017-11-09', 2, 1, 1, NULL, NULL, '2018-01-23 12:10:39', NULL),
(3, '2017-11-10', 2, 1, 1, NULL, NULL, '2018-01-23 12:10:48', NULL),
(3, '2017-11-13', 2, 1, 1, NULL, NULL, '2018-01-23 12:10:59', NULL),
(3, '2017-11-14', 2, 1, 1, NULL, NULL, '2018-01-23 12:11:07', NULL),
(3, '2017-11-15', 2, 1, 1, NULL, NULL, '2018-01-23 12:11:16', NULL),
(3, '2017-11-16', 2, 1, 1, NULL, NULL, '2018-01-23 12:11:25', NULL),
(3, '2017-11-17', 2, 1, 1, NULL, NULL, '2018-01-23 12:11:33', NULL),
(3, '2017-11-27', 2, 1, 1, NULL, NULL, '2018-01-23 12:11:44', NULL),
(3, '2017-11-28', 2, 1, 1, NULL, NULL, '2018-01-23 12:11:52', NULL),
(3, '2017-11-29', 2, 1, 1, NULL, NULL, '2018-01-23 12:11:59', NULL),
(3, '2017-11-30', 2, 1, 1, NULL, NULL, '2018-01-23 12:12:06', NULL),
(3, '2017-12-01', 2, 1, 1, NULL, NULL, '2018-01-23 12:12:23', NULL),
(3, '2017-12-04', 2, 1, 1, NULL, NULL, '2018-01-23 12:12:34', NULL),
(3, '2017-12-05', 2, 1, 1, NULL, NULL, '2018-01-23 12:12:45', NULL),
(3, '2017-12-06', 2, 1, 1, NULL, NULL, '2018-01-23 12:12:52', NULL),
(3, '2017-12-07', 2, 1, 1, NULL, NULL, '2018-01-23 12:13:02', NULL),
(3, '2017-12-08', 2, 1, 1, NULL, NULL, '2018-01-23 12:13:13', NULL),
(3, '2017-12-11', 2, 1, 1, NULL, NULL, '2018-01-23 12:13:21', NULL),
(3, '2017-12-12', 2, 1, 1, NULL, NULL, '2018-01-23 12:13:29', NULL),
(3, '2017-12-13', 2, 1, 1, NULL, NULL, '2018-01-23 12:13:39', NULL),
(3, '2017-12-14', 2, 1, 1, NULL, NULL, '2018-01-23 12:13:47', NULL),
(3, '2017-12-15', 2, 1, 1, NULL, NULL, '2018-01-23 12:13:56', NULL),
(3, '2017-12-18', 2, 1, 1, NULL, NULL, '2018-01-23 12:14:05', NULL),
(3, '2017-12-19', 2, 1, 1, NULL, NULL, '2018-01-23 12:14:21', NULL),
(3, '2018-01-03', 2, 1, 1, NULL, NULL, '2018-01-23 12:14:34', NULL),
(3, '2018-01-11', 2, 1, 1, NULL, NULL, '2018-01-23 12:14:50', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `attendance_day`
--

CREATE TABLE `attendance_day` (
  `student_id` decimal(10,0) NOT NULL,
  `school_date` date NOT NULL,
  `minutes_present` decimal(10,0) DEFAULT NULL,
  `state_value` decimal(2,1) DEFAULT NULL,
  `syear` decimal(4,0) DEFAULT NULL,
  `marking_period_id` int(11) DEFAULT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`student_id`,`school_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `attendance_day`
--

INSERT INTO `attendance_day` VALUES
(1, '2017-11-01', 5, 1.0, 2017, 16, NULL, '2018-01-23 11:29:02', NULL),
(1, '2017-11-02', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:05:44', NULL),
(1, '2017-11-03', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:06:00', NULL),
(1, '2017-11-06', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:06:17', NULL),
(1, '2017-11-07', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:09:17', NULL),
(1, '2017-11-08', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:27', NULL),
(1, '2017-11-09', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:38', NULL),
(1, '2017-11-10', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:47', NULL),
(1, '2017-11-13', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:58', NULL),
(1, '2017-11-14', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:06', NULL),
(1, '2017-11-15', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:15', NULL),
(1, '2017-11-16', 3, 0.5, 2017, 16, NULL, '2018-01-23 12:11:24', NULL),
(1, '2017-11-17', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:32', NULL),
(1, '2017-11-27', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:43', NULL),
(1, '2017-11-28', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:51', NULL),
(1, '2017-11-29', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:58', NULL),
(1, '2017-11-30', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:05', NULL),
(1, '2017-12-01', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:22', NULL),
(1, '2017-12-04', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:33', NULL),
(1, '2017-12-05', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:44', NULL),
(1, '2017-12-06', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:51', NULL),
(1, '2017-12-07', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:01', NULL),
(1, '2017-12-08', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:12', NULL),
(1, '2017-12-11', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:20', NULL),
(1, '2017-12-12', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:28', NULL),
(1, '2017-12-13', 3, 0.5, 2017, 16, NULL, '2018-01-23 12:13:38', NULL),
(1, '2017-12-14', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:46', NULL),
(1, '2017-12-15', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:55', NULL),
(1, '2017-12-18', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:04', NULL),
(1, '2017-12-19', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:20', NULL),
(1, '2018-01-03', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:33', NULL),
(1, '2018-01-11', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:49', NULL),
(2, '2017-11-01', 5, 1.0, 2017, 16, NULL, '2018-01-23 11:29:02', NULL),
(2, '2017-11-02', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:05:44', NULL),
(2, '2017-11-03', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:06:00', NULL),
(2, '2017-11-06', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:06:17', NULL),
(2, '2017-11-07', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:09:17', NULL),
(2, '2017-11-08', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:27', NULL),
(2, '2017-11-09', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:38', NULL),
(2, '2017-11-10', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:47', NULL),
(2, '2017-11-13', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:58', NULL),
(2, '2017-11-14', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:06', NULL),
(2, '2017-11-15', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:15', NULL),
(2, '2017-11-16', 3, 0.5, 2017, 16, NULL, '2018-01-23 12:11:24', NULL),
(2, '2017-11-17', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:32', NULL),
(2, '2017-11-27', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:43', NULL),
(2, '2017-11-28', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:51', NULL),
(2, '2017-11-29', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:58', NULL),
(2, '2017-11-30', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:05', NULL),
(2, '2017-12-01', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:22', NULL),
(2, '2017-12-04', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:33', NULL),
(2, '2017-12-05', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:44', NULL),
(2, '2017-12-06', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:51', NULL),
(2, '2017-12-07', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:01', NULL),
(2, '2017-12-08', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:12', NULL),
(2, '2017-12-11', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:20', NULL),
(2, '2017-12-12', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:28', NULL),
(2, '2017-12-13', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:38', NULL),
(2, '2017-12-14', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:46', NULL),
(2, '2017-12-15', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:55', NULL),
(2, '2017-12-18', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:04', NULL),
(2, '2017-12-19', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:20', NULL),
(2, '2018-01-03', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:33', NULL),
(2, '2018-01-11', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:49', NULL),
(3, '2017-11-01', 5, 1.0, 2017, 16, NULL, '2018-01-23 11:29:03', NULL),
(3, '2017-11-02', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:05:45', NULL),
(3, '2017-11-03', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:06:01', NULL),
(3, '2017-11-06', 0, 0.0, 2017, 16, NULL, '2018-01-23 12:06:18', NULL),
(3, '2017-11-07', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:09:17', NULL),
(3, '2017-11-08', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:27', NULL),
(3, '2017-11-09', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:39', NULL),
(3, '2017-11-10', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:48', NULL),
(3, '2017-11-13', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:58', NULL),
(3, '2017-11-14', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:06', NULL),
(3, '2017-11-15', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:15', NULL),
(3, '2017-11-16', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:25', NULL),
(3, '2017-11-17', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:33', NULL),
(3, '2017-11-27', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:43', NULL),
(3, '2017-11-28', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:52', NULL),
(3, '2017-11-29', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:58', NULL),
(3, '2017-11-30', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:06', NULL),
(3, '2017-12-01', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:22', NULL),
(3, '2017-12-04', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:33', NULL),
(3, '2017-12-05', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:44', NULL),
(3, '2017-12-06', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:51', NULL),
(3, '2017-12-07', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:01', NULL),
(3, '2017-12-08', 3, 0.5, 2017, 16, NULL, '2018-01-23 12:13:13', NULL),
(3, '2017-12-11', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:21', NULL),
(3, '2017-12-12', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:29', NULL),
(3, '2017-12-13', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:39', NULL),
(3, '2017-12-14', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:47', NULL),
(3, '2017-12-15', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:56', NULL),
(3, '2017-12-18', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:05', NULL),
(3, '2017-12-19', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:20', NULL),
(3, '2018-01-03', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:34', NULL),
(3, '2018-01-11', 0, 0.0, 2017, 17, NULL, '2018-01-23 12:14:50', NULL),
(4, '2017-11-01', 5, 1.0, 2017, 16, NULL, '2018-01-23 11:29:03', NULL),
(4, '2017-11-02', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:05:45', NULL),
(4, '2017-11-03', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:06:01', NULL),
(4, '2017-11-06', 0, 0.0, 2017, 16, NULL, '2018-01-23 12:06:18', NULL),
(4, '2017-11-07', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:09:17', NULL),
(4, '2017-11-08', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:27', NULL),
(4, '2017-11-09', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:39', NULL),
(4, '2017-11-10', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:48', NULL),
(4, '2017-11-13', 0, 0.0, 2017, 16, NULL, '2018-01-23 12:10:58', NULL),
(4, '2017-11-14', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:07', NULL),
(4, '2017-11-15', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:16', NULL),
(4, '2017-11-16', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:25', NULL),
(4, '2017-11-17', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:33', NULL),
(4, '2017-11-27', 0, 0.0, 2017, 16, NULL, '2018-01-23 12:11:43', NULL),
(4, '2017-11-28', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:52', NULL),
(4, '2017-11-29', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:59', NULL),
(4, '2017-11-30', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:06', NULL),
(4, '2017-12-01', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:22', NULL),
(4, '2017-12-04', 0, 0.0, 2017, 16, NULL, '2018-01-23 12:12:33', NULL),
(4, '2017-12-05', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:44', NULL),
(4, '2017-12-06', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:52', NULL),
(4, '2017-12-07', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:02', NULL),
(4, '2017-12-08', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:13', NULL),
(4, '2017-12-11', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:21', NULL),
(4, '2017-12-12', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:29', NULL),
(4, '2017-12-13', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:39', NULL),
(4, '2017-12-14', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:47', NULL),
(4, '2017-12-15', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:56', NULL),
(4, '2017-12-18', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:05', NULL),
(4, '2017-12-19', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:20', NULL),
(4, '2018-01-03', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:34', NULL),
(4, '2018-01-11', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:50', NULL),
(5, '2017-11-01', 5, 1.0, 2017, 16, NULL, '2018-01-23 11:29:02', NULL),
(5, '2017-11-02', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:05:45', NULL),
(5, '2017-11-03', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:06:01', NULL),
(5, '2017-11-06', 0, 0.0, 2017, 16, NULL, '2018-01-23 12:06:18', NULL),
(5, '2017-11-07', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:09:17', NULL),
(5, '2017-11-08', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:27', NULL),
(5, '2017-11-09', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:39', NULL),
(5, '2017-11-10', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:48', NULL),
(5, '2017-11-13', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:58', NULL),
(5, '2017-11-14', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:06', NULL),
(5, '2017-11-15', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:15', NULL),
(5, '2017-11-16', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:25', NULL),
(5, '2017-11-17', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:33', NULL),
(5, '2017-11-27', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:43', NULL),
(5, '2017-11-28', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:51', NULL),
(5, '2017-11-29', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:58', NULL),
(5, '2017-11-30', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:06', NULL),
(5, '2017-12-01', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:22', NULL),
(5, '2017-12-04', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:33', NULL),
(5, '2017-12-05', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:44', NULL),
(5, '2017-12-06', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:51', NULL),
(5, '2017-12-07', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:01', NULL),
(5, '2017-12-08', 0, 0.0, 2017, 16, NULL, '2018-01-23 12:13:12', NULL),
(5, '2017-12-11', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:20', NULL),
(5, '2017-12-12', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:28', NULL),
(5, '2017-12-13', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:39', NULL),
(5, '2017-12-14', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:47', NULL),
(5, '2017-12-15', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:55', NULL),
(5, '2017-12-18', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:05', NULL),
(5, '2017-12-19', 3, 0.5, 2017, 17, NULL, '2018-01-23 12:14:20', NULL),
(5, '2018-01-03', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:34', NULL),
(5, '2018-01-11', 0, 0.0, 2017, 17, NULL, '2018-01-23 12:14:50', NULL),
(6, '2017-11-01', 0, 0.0, 2017, 16, NULL, '2018-01-23 11:29:03', NULL),
(6, '2017-11-02', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:05:45', NULL),
(6, '2017-11-03', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:06:01', NULL),
(6, '2017-11-06', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:06:18', NULL),
(6, '2017-11-07', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:09:18', NULL),
(6, '2017-11-08', 3, 0.5, 2017, 16, NULL, '2018-01-23 12:10:28', NULL),
(6, '2017-11-09', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:39', NULL),
(6, '2017-11-10', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:48', NULL),
(6, '2017-11-13', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:59', NULL),
(6, '2017-11-14', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:07', NULL),
(6, '2017-11-15', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:16', NULL),
(6, '2017-11-16', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:25', NULL),
(6, '2017-11-17', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:33', NULL),
(6, '2017-11-27', 0, 0.0, 2017, 16, NULL, '2018-01-23 12:11:44', NULL),
(6, '2017-11-28', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:52', NULL),
(6, '2017-11-29', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:59', NULL),
(6, '2017-11-30', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:06', NULL),
(6, '2017-12-01', 0, 0.0, 2017, 16, NULL, '2018-01-23 12:12:23', NULL),
(6, '2017-12-04', 3, 0.5, 2017, 16, NULL, '2018-01-23 12:12:34', NULL),
(6, '2017-12-05', 0, 0.0, 2017, 16, NULL, '2018-01-23 12:12:45', NULL),
(6, '2017-12-06', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:52', NULL),
(6, '2017-12-07', 0, 0.0, 2017, 16, NULL, '2018-01-23 12:13:02', NULL),
(6, '2017-12-08', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:13', NULL),
(6, '2017-12-11', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:21', NULL),
(6, '2017-12-12', 0, 0.0, 2017, 16, NULL, '2018-01-23 12:13:29', NULL),
(6, '2017-12-13', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:39', NULL),
(6, '2017-12-14', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:47', NULL),
(6, '2017-12-15', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:56', NULL),
(6, '2017-12-18', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:05', NULL),
(6, '2017-12-19', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:21', NULL),
(6, '2018-01-03', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:34', NULL),
(6, '2018-01-11', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:50', NULL),
(7, '2017-11-01', 5, 1.0, 2017, 16, NULL, '2018-01-23 11:29:03', NULL),
(7, '2017-11-02', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:05:45', NULL),
(7, '2017-11-03', 3, 0.5, 2017, 16, NULL, '2018-01-23 12:06:01', NULL),
(7, '2017-11-06', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:06:18', NULL),
(7, '2017-11-07', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:09:17', NULL),
(7, '2017-11-08', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:28', NULL),
(7, '2017-11-09', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:39', NULL),
(7, '2017-11-10', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:48', NULL),
(7, '2017-11-13', 0, 0.0, 2017, 16, NULL, '2018-01-23 12:10:59', NULL),
(7, '2017-11-14', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:07', NULL),
(7, '2017-11-15', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:16', NULL),
(7, '2017-11-16', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:25', NULL),
(7, '2017-11-17', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:33', NULL),
(7, '2017-11-27', 0, 0.0, 2017, 16, NULL, '2018-01-23 12:11:43', NULL),
(7, '2017-11-28', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:52', NULL),
(7, '2017-11-29', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:59', NULL),
(7, '2017-11-30', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:06', NULL),
(7, '2017-12-01', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:23', NULL),
(7, '2017-12-04', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:34', NULL),
(7, '2017-12-05', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:44', NULL),
(7, '2017-12-06', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:52', NULL),
(7, '2017-12-07', 3, 0.5, 2017, 16, NULL, '2018-01-23 12:13:02', NULL),
(7, '2017-12-08', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:13', NULL),
(7, '2017-12-11', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:21', NULL),
(7, '2017-12-12', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:29', NULL),
(7, '2017-12-13', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:39', NULL),
(7, '2017-12-14', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:47', NULL),
(7, '2017-12-15', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:56', NULL),
(7, '2017-12-18', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:05', NULL),
(7, '2017-12-19', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:20', NULL),
(7, '2018-01-03', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:34', NULL),
(7, '2018-01-11', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:50', NULL),
(8, '2017-11-01', 5, 1.0, 2017, 16, NULL, '2018-01-23 11:29:02', NULL),
(8, '2017-11-02', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:05:44', NULL),
(8, '2017-11-03', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:06:00', NULL),
(8, '2017-11-06', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:06:17', NULL),
(8, '2017-11-07', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:09:17', NULL),
(8, '2017-11-08', 3, 0.5, 2017, 16, NULL, '2018-01-23 12:10:27', NULL),
(8, '2017-11-09', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:39', NULL),
(8, '2017-11-10', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:47', NULL),
(8, '2017-11-13', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:58', NULL),
(8, '2017-11-14', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:06', NULL),
(8, '2017-11-15', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:15', NULL),
(8, '2017-11-16', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:24', NULL),
(8, '2017-11-17', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:33', NULL),
(8, '2017-11-27', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:43', NULL),
(8, '2017-11-28', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:51', NULL),
(8, '2017-11-29', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:58', NULL),
(8, '2017-11-30', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:05', NULL),
(8, '2017-12-01', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:22', NULL),
(8, '2017-12-04', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:33', NULL),
(8, '2017-12-05', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:44', NULL),
(8, '2017-12-06', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:51', NULL),
(8, '2017-12-07', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:01', NULL),
(8, '2017-12-08', 0, 0.0, 2017, 16, NULL, '2018-01-23 12:13:12', NULL),
(8, '2017-12-11', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:20', NULL),
(8, '2017-12-12', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:28', NULL),
(8, '2017-12-13', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:38', NULL),
(8, '2017-12-14', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:46', NULL),
(8, '2017-12-15', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:55', NULL),
(8, '2017-12-18', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:05', NULL),
(8, '2017-12-19', 0, 0.0, 2017, 17, NULL, '2018-01-23 12:14:20', NULL),
(8, '2018-01-03', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:33', NULL),
(8, '2018-01-11', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:50', NULL),
(9, '2017-11-01', 5, 1.0, 2017, 16, NULL, '2018-01-23 11:29:02', NULL),
(9, '2017-11-02', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:05:44', NULL),
(9, '2017-11-03', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:06:00', NULL),
(9, '2017-11-06', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:06:17', NULL),
(9, '2017-11-07', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:09:17', NULL),
(9, '2017-11-08', 3, 0.5, 2017, 16, NULL, '2018-01-23 12:10:27', NULL),
(9, '2017-11-09', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:38', NULL),
(9, '2017-11-10', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:47', NULL),
(9, '2017-11-13', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:58', NULL),
(9, '2017-11-14', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:06', NULL),
(9, '2017-11-15', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:15', NULL),
(9, '2017-11-16', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:24', NULL),
(9, '2017-11-17', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:32', NULL),
(9, '2017-11-27', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:43', NULL),
(9, '2017-11-28', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:51', NULL),
(9, '2017-11-29', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:58', NULL),
(9, '2017-11-30', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:05', NULL),
(9, '2017-12-01', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:22', NULL),
(9, '2017-12-04', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:33', NULL),
(9, '2017-12-05', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:44', NULL),
(9, '2017-12-06', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:51', NULL),
(9, '2017-12-07', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:01', NULL),
(9, '2017-12-08', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:12', NULL),
(9, '2017-12-11', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:20', NULL),
(9, '2017-12-12', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:28', NULL),
(9, '2017-12-13', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:38', NULL),
(9, '2017-12-14', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:46', NULL),
(9, '2017-12-15', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:55', NULL),
(9, '2017-12-18', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:04', NULL),
(9, '2017-12-19', 0, 0.0, 2017, 17, NULL, '2018-01-23 12:14:20', NULL),
(9, '2018-01-03', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:33', NULL),
(9, '2018-01-11', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:50', NULL),
(10, '2017-11-01', 5, 1.0, 2017, 16, NULL, '2018-01-23 11:29:03', NULL),
(10, '2017-11-02', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:05:45', NULL),
(10, '2017-11-03', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:06:01', NULL),
(10, '2017-11-06', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:06:18', NULL),
(10, '2017-11-07', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:09:17', NULL),
(10, '2017-11-08', 0, 0.0, 2017, 16, NULL, '2018-01-23 12:10:28', NULL),
(10, '2017-11-09', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:39', NULL),
(10, '2017-11-10', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:10:48', NULL),
(10, '2017-11-13', 0, 0.0, 2017, 16, NULL, '2018-01-23 12:10:59', NULL),
(10, '2017-11-14', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:07', NULL),
(10, '2017-11-15', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:16', NULL),
(10, '2017-11-16', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:25', NULL),
(10, '2017-11-17', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:33', NULL),
(10, '2017-11-27', 3, 0.5, 2017, 16, NULL, '2018-01-23 12:11:43', NULL),
(10, '2017-11-28', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:52', NULL),
(10, '2017-11-29', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:11:59', NULL),
(10, '2017-11-30', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:06', NULL),
(10, '2017-12-01', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:23', NULL),
(10, '2017-12-04', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:34', NULL),
(10, '2017-12-05', 0, 0.0, 2017, 16, NULL, '2018-01-23 12:12:44', NULL),
(10, '2017-12-06', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:12:52', NULL),
(10, '2017-12-07', 3, 0.5, 2017, 16, NULL, '2018-01-23 12:13:02', NULL),
(10, '2017-12-08', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:13', NULL),
(10, '2017-12-11', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:21', NULL),
(10, '2017-12-12', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:29', NULL),
(10, '2017-12-13', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:39', NULL),
(10, '2017-12-14', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:47', NULL),
(10, '2017-12-15', 5, 1.0, 2017, 16, NULL, '2018-01-23 12:13:56', NULL),
(10, '2017-12-18', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:05', NULL),
(10, '2017-12-19', 3, 0.5, 2017, 17, NULL, '2018-01-23 12:14:21', NULL),
(10, '2018-01-03', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:34', NULL),
(10, '2018-01-11', 5, 1.0, 2017, 17, NULL, '2018-01-23 12:14:50', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `attendance_period`
--

CREATE TABLE `attendance_period` (
  `student_id` decimal(10,0) NOT NULL,
  `school_date` date NOT NULL,
  `period_id` decimal(10,0) NOT NULL,
  `attendance_code` decimal(10,0) DEFAULT NULL,
  `attendance_teacher_code` decimal(10,0) DEFAULT NULL,
  `attendance_reason` varchar(100) DEFAULT NULL,
  `admin` varchar(1) DEFAULT NULL,
  `course_period_id` decimal(10,0) NOT NULL DEFAULT '0',
  `marking_period_id` int(11) DEFAULT NULL,
  `comment` varchar(100) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`student_id`,`school_date`,`period_id`),
  KEY `attendance_period_ind1` USING BTREE (`student_id`),
  KEY `attendance_period_ind2` USING BTREE (`period_id`),
  KEY `attendance_period_ind3` USING BTREE (`attendance_code`),
  KEY `attendance_period_ind4` USING BTREE (`school_date`),
  KEY `attendance_period_ind5` USING BTREE (`attendance_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `attendance_period`
--

INSERT INTO `attendance_period` VALUES
(1, '2017-11-01', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 11:29:02', NULL),
(1, '2017-11-02', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:05:44', NULL),
(1, '2017-11-03', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:06:00', NULL),
(1, '2017-11-06', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:06:17', NULL),
(1, '2017-11-07', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:09:16', NULL),
(1, '2017-11-08', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:27', NULL),
(1, '2017-11-09', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:38', NULL),
(1, '2017-11-10', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:47', NULL),
(1, '2017-11-13', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:58', NULL),
(1, '2017-11-14', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:06', NULL),
(1, '2017-11-15', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:14', NULL),
(1, '2017-11-16', 2, 3, 3, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:24', NULL),
(1, '2017-11-17', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:32', NULL),
(1, '2017-11-27', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:43', NULL),
(1, '2017-11-28', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:51', NULL),
(1, '2017-11-29', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:58', NULL),
(1, '2017-11-30', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:05', NULL),
(1, '2017-12-01', 2, 1, 1, NULL, NULL, 1, 16, 'Present', '2018-01-23 12:12:22', NULL),
(1, '2017-12-04', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:33', NULL),
(1, '2017-12-05', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:43', NULL),
(1, '2017-12-06', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:51', NULL),
(1, '2017-12-07', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:01', NULL),
(1, '2017-12-08', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:12', NULL),
(1, '2017-12-11', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:20', NULL),
(1, '2017-12-12', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:28', NULL),
(1, '2017-12-13', 2, 3, 3, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:38', NULL),
(1, '2017-12-14', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:46', NULL),
(1, '2017-12-15', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:55', NULL),
(1, '2017-12-18', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:04', NULL),
(1, '2017-12-19', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:20', NULL),
(1, '2018-01-03', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:33', NULL),
(1, '2018-01-11', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:49', NULL),
(2, '2017-11-01', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 11:29:02', NULL),
(2, '2017-11-02', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:05:44', NULL),
(2, '2017-11-03', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:06:00', NULL),
(2, '2017-11-06', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:06:17', NULL),
(2, '2017-11-07', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:09:17', NULL),
(2, '2017-11-08', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:27', NULL),
(2, '2017-11-09', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:38', NULL),
(2, '2017-11-10', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:47', NULL),
(2, '2017-11-13', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:58', NULL),
(2, '2017-11-14', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:06', NULL),
(2, '2017-11-15', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:15', NULL),
(2, '2017-11-16', 2, 3, 3, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:24', NULL),
(2, '2017-11-17', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:32', NULL),
(2, '2017-11-27', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:43', NULL),
(2, '2017-11-28', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:51', NULL),
(2, '2017-11-29', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:58', NULL),
(2, '2017-11-30', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:05', NULL),
(2, '2017-12-01', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:22', NULL),
(2, '2017-12-04', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:33', NULL),
(2, '2017-12-05', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:44', NULL),
(2, '2017-12-06', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:51', NULL),
(2, '2017-12-07', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:01', NULL),
(2, '2017-12-08', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:12', NULL),
(2, '2017-12-11', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:20', NULL),
(2, '2017-12-12', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:28', NULL),
(2, '2017-12-13', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:38', NULL),
(2, '2017-12-14', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:46', NULL),
(2, '2017-12-15', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:55', NULL),
(2, '2017-12-18', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:04', NULL),
(2, '2017-12-19', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:20', NULL),
(2, '2018-01-03', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:33', NULL),
(2, '2018-01-11', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:49', NULL),
(3, '2017-11-01', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 11:29:03', NULL),
(3, '2017-11-02', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:05:45', NULL),
(3, '2017-11-03', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:06:01', NULL),
(3, '2017-11-06', 2, 2, 2, NULL, NULL, 1, 16, NULL, '2018-01-23 12:06:18', NULL),
(3, '2017-11-07', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:09:17', NULL),
(3, '2017-11-08', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:27', NULL),
(3, '2017-11-09', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:39', NULL),
(3, '2017-11-10', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:48', NULL),
(3, '2017-11-13', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:58', NULL),
(3, '2017-11-14', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:06', NULL),
(3, '2017-11-15', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:15', NULL),
(3, '2017-11-16', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:25', NULL),
(3, '2017-11-17', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:33', NULL),
(3, '2017-11-27', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:43', NULL),
(3, '2017-11-28', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:52', NULL),
(3, '2017-11-29', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:58', NULL),
(3, '2017-11-30', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:06', NULL),
(3, '2017-12-01', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:22', NULL),
(3, '2017-12-04', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:33', NULL),
(3, '2017-12-05', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:44', NULL),
(3, '2017-12-06', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:51', NULL),
(3, '2017-12-07', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:01', NULL),
(3, '2017-12-08', 2, 3, 3, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:12', NULL),
(3, '2017-12-11', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:21', NULL),
(3, '2017-12-12', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:29', NULL),
(3, '2017-12-13', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:39', NULL),
(3, '2017-12-14', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:47', NULL),
(3, '2017-12-15', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:55', NULL),
(3, '2017-12-18', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:05', NULL),
(3, '2017-12-19', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:20', NULL),
(3, '2018-01-03', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:34', NULL),
(3, '2018-01-11', 2, 2, 2, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:50', NULL),
(4, '2017-11-01', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 11:29:03', NULL),
(4, '2017-11-02', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:05:45', NULL),
(4, '2017-11-03', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:06:01', NULL),
(4, '2017-11-06', 2, 2, 2, NULL, NULL, 1, 16, NULL, '2018-01-23 12:06:18', NULL),
(4, '2017-11-07', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:09:17', NULL),
(4, '2017-11-08', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:27', NULL),
(4, '2017-11-09', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:39', NULL),
(4, '2017-11-10', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:48', NULL),
(4, '2017-11-13', 2, 2, 2, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:58', NULL),
(4, '2017-11-14', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:07', NULL),
(4, '2017-11-15', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:15', NULL),
(4, '2017-11-16', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:25', NULL),
(4, '2017-11-17', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:33', NULL),
(4, '2017-11-27', 2, 2, 2, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:43', NULL),
(4, '2017-11-28', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:52', NULL),
(4, '2017-11-29', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:58', NULL),
(4, '2017-11-30', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:06', NULL),
(4, '2017-12-01', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:22', NULL),
(4, '2017-12-04', 2, 2, 2, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:33', NULL),
(4, '2017-12-05', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:44', NULL),
(4, '2017-12-06', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:52', NULL),
(4, '2017-12-07', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:01', NULL),
(4, '2017-12-08', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:13', NULL),
(4, '2017-12-11', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:21', NULL),
(4, '2017-12-12', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:29', NULL),
(4, '2017-12-13', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:39', NULL),
(4, '2017-12-14', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:47', NULL),
(4, '2017-12-15', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:56', NULL),
(4, '2017-12-18', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:05', NULL),
(4, '2017-12-19', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:20', NULL),
(4, '2018-01-03', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:34', NULL),
(4, '2018-01-11', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:50', NULL),
(5, '2017-11-01', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 11:29:02', NULL),
(5, '2017-11-02', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:05:44', NULL),
(5, '2017-11-03', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:06:01', NULL),
(5, '2017-11-06', 2, 2, 2, NULL, NULL, 1, 16, NULL, '2018-01-23 12:06:18', NULL),
(5, '2017-11-07', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:09:17', NULL),
(5, '2017-11-08', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:27', NULL),
(5, '2017-11-09', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:39', NULL),
(5, '2017-11-10', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:47', NULL),
(5, '2017-11-13', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:58', NULL),
(5, '2017-11-14', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:06', NULL),
(5, '2017-11-15', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:15', NULL),
(5, '2017-11-16', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:25', NULL),
(5, '2017-11-17', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:33', NULL),
(5, '2017-11-27', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:43', NULL),
(5, '2017-11-28', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:51', NULL),
(5, '2017-11-29', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:58', NULL),
(5, '2017-11-30', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:05', NULL),
(5, '2017-12-01', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:22', NULL),
(5, '2017-12-04', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:33', NULL),
(5, '2017-12-05', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:44', NULL),
(5, '2017-12-06', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:51', NULL),
(5, '2017-12-07', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:01', NULL),
(5, '2017-12-08', 2, 2, 2, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:12', NULL),
(5, '2017-12-11', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:20', NULL),
(5, '2017-12-12', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:28', NULL),
(5, '2017-12-13', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:38', NULL),
(5, '2017-12-14', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:46', NULL),
(5, '2017-12-15', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:55', NULL),
(5, '2017-12-18', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:05', NULL),
(5, '2017-12-19', 2, 3, 3, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:20', NULL),
(5, '2018-01-03', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:34', NULL),
(5, '2018-01-11', 2, 2, 2, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:50', NULL),
(6, '2017-11-01', 2, 2, 2, NULL, NULL, 1, 16, NULL, '2018-01-23 11:29:03', NULL),
(6, '2017-11-02', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:05:45', NULL),
(6, '2017-11-03', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:06:01', NULL),
(6, '2017-11-06', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:06:18', NULL),
(6, '2017-11-07', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:09:17', NULL),
(6, '2017-11-08', 2, 3, 3, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:28', NULL),
(6, '2017-11-09', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:39', NULL),
(6, '2017-11-10', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:48', NULL),
(6, '2017-11-13', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:59', NULL),
(6, '2017-11-14', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:07', NULL),
(6, '2017-11-15', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:16', NULL),
(6, '2017-11-16', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:25', NULL),
(6, '2017-11-17', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:33', NULL),
(6, '2017-11-27', 2, 2, 2, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:43', NULL),
(6, '2017-11-28', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:52', NULL),
(6, '2017-11-29', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:59', NULL),
(6, '2017-11-30', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:06', NULL),
(6, '2017-12-01', 2, 2, 2, NULL, NULL, 1, 16, 'Ill', '2018-01-23 12:12:23', NULL),
(6, '2017-12-04', 2, 3, 3, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:34', NULL),
(6, '2017-12-05', 2, 2, 2, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:45', NULL),
(6, '2017-12-06', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:52', NULL),
(6, '2017-12-07', 2, 2, 2, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:02', NULL),
(6, '2017-12-08', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:13', NULL),
(6, '2017-12-11', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:21', NULL),
(6, '2017-12-12', 2, 2, 2, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:29', NULL),
(6, '2017-12-13', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:39', NULL),
(6, '2017-12-14', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:47', NULL),
(6, '2017-12-15', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:56', NULL),
(6, '2017-12-18', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:05', NULL),
(6, '2017-12-19', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:21', NULL),
(6, '2018-01-03', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:34', NULL),
(6, '2018-01-11', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:50', NULL),
(7, '2017-11-01', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 11:29:03', NULL),
(7, '2017-11-02', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:05:45', NULL),
(7, '2017-11-03', 2, 3, 3, NULL, NULL, 1, 16, NULL, '2018-01-23 12:06:01', NULL),
(7, '2017-11-06', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:06:18', NULL),
(7, '2017-11-07', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:09:17', NULL),
(7, '2017-11-08', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:28', NULL),
(7, '2017-11-09', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:39', NULL),
(7, '2017-11-10', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:48', NULL),
(7, '2017-11-13', 2, 2, 2, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:59', NULL),
(7, '2017-11-14', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:07', NULL),
(7, '2017-11-15', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:16', NULL),
(7, '2017-11-16', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:25', NULL),
(7, '2017-11-17', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:33', NULL),
(7, '2017-11-27', 2, 2, 2, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:43', NULL),
(7, '2017-11-28', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:52', NULL),
(7, '2017-11-29', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:59', NULL),
(7, '2017-11-30', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:06', NULL),
(7, '2017-12-01', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:22', NULL),
(7, '2017-12-04', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:34', NULL),
(7, '2017-12-05', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:44', NULL),
(7, '2017-12-06', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:52', NULL),
(7, '2017-12-07', 2, 3, 3, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:02', NULL),
(7, '2017-12-08', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:13', NULL),
(7, '2017-12-11', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:21', NULL),
(7, '2017-12-12', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:29', NULL),
(7, '2017-12-13', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:39', NULL),
(7, '2017-12-14', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:47', NULL),
(7, '2017-12-15', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:56', NULL),
(7, '2017-12-18', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:05', NULL),
(7, '2017-12-19', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:20', NULL),
(7, '2018-01-03', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:34', NULL),
(7, '2018-01-11', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:50', NULL),
(8, '2017-11-01', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 11:29:02', NULL),
(8, '2017-11-02', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:05:44', NULL),
(8, '2017-11-03', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:06:00', NULL),
(8, '2017-11-06', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:06:17', NULL),
(8, '2017-11-07', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:09:17', NULL),
(8, '2017-11-08', 2, 3, 3, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:27', NULL),
(8, '2017-11-09', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:39', NULL),
(8, '2017-11-10', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:47', NULL),
(8, '2017-11-13', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:58', NULL),
(8, '2017-11-14', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:06', NULL),
(8, '2017-11-15', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:15', NULL),
(8, '2017-11-16', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:24', NULL),
(8, '2017-11-17', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:32', NULL),
(8, '2017-11-27', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:43', NULL),
(8, '2017-11-28', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:51', NULL),
(8, '2017-11-29', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:58', NULL),
(8, '2017-11-30', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:05', NULL),
(8, '2017-12-01', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:22', NULL),
(8, '2017-12-04', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:33', NULL),
(8, '2017-12-05', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:44', NULL),
(8, '2017-12-06', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:51', NULL),
(8, '2017-12-07', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:01', NULL),
(8, '2017-12-08', 2, 2, 2, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:12', NULL),
(8, '2017-12-11', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:20', NULL),
(8, '2017-12-12', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:28', NULL),
(8, '2017-12-13', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:38', NULL),
(8, '2017-12-14', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:46', NULL),
(8, '2017-12-15', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:55', NULL),
(8, '2017-12-18', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:04', NULL),
(8, '2017-12-19', 2, 2, 2, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:20', NULL),
(8, '2018-01-03', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:33', NULL),
(8, '2018-01-11', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:50', NULL),
(9, '2017-11-01', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 11:29:02', NULL),
(9, '2017-11-02', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:05:44', NULL),
(9, '2017-11-03', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:06:00', NULL),
(9, '2017-11-06', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:06:17', NULL),
(9, '2017-11-07', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:09:17', NULL),
(9, '2017-11-08', 2, 3, 3, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:27', NULL),
(9, '2017-11-09', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:38', NULL),
(9, '2017-11-10', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:47', NULL),
(9, '2017-11-13', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:58', NULL),
(9, '2017-11-14', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:06', NULL),
(9, '2017-11-15', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:15', NULL),
(9, '2017-11-16', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:24', NULL),
(9, '2017-11-17', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:32', NULL),
(9, '2017-11-27', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:43', NULL),
(9, '2017-11-28', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:51', NULL),
(9, '2017-11-29', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:58', NULL),
(9, '2017-11-30', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:05', NULL),
(9, '2017-12-01', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:22', NULL),
(9, '2017-12-04', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:33', NULL),
(9, '2017-12-05', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:44', NULL),
(9, '2017-12-06', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:51', NULL),
(9, '2017-12-07', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:01', NULL),
(9, '2017-12-08', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:12', NULL),
(9, '2017-12-11', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:20', NULL),
(9, '2017-12-12', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:28', NULL),
(9, '2017-12-13', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:38', NULL),
(9, '2017-12-14', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:46', NULL),
(9, '2017-12-15', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:55', NULL),
(9, '2017-12-18', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:04', NULL),
(9, '2017-12-19', 2, 2, 2, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:20', NULL),
(9, '2018-01-03', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:33', NULL),
(9, '2018-01-11', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:49', NULL),
(10, '2017-11-01', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 11:29:03', NULL),
(10, '2017-11-02', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:05:45', NULL),
(10, '2017-11-03', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:06:01', NULL),
(10, '2017-11-06', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:06:18', NULL),
(10, '2017-11-07', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:09:17', NULL),
(10, '2017-11-08', 2, 2, 2, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:28', NULL),
(10, '2017-11-09', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:39', NULL),
(10, '2017-11-10', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:48', NULL),
(10, '2017-11-13', 2, 2, 2, NULL, NULL, 1, 16, NULL, '2018-01-23 12:10:59', NULL),
(10, '2017-11-14', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:07', NULL),
(10, '2017-11-15', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:16', NULL),
(10, '2017-11-16', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:25', NULL),
(10, '2017-11-17', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:33', NULL),
(10, '2017-11-27', 2, 3, 3, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:43', NULL),
(10, '2017-11-28', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:52', NULL),
(10, '2017-11-29', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:11:59', NULL),
(10, '2017-11-30', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:06', NULL),
(10, '2017-12-01', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:23', NULL),
(10, '2017-12-04', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:34', NULL),
(10, '2017-12-05', 2, 2, 2, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:44', NULL),
(10, '2017-12-06', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:12:52', NULL),
(10, '2017-12-07', 2, 3, 3, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:02', NULL),
(10, '2017-12-08', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:13', NULL),
(10, '2017-12-11', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:21', NULL),
(10, '2017-12-12', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:29', NULL),
(10, '2017-12-13', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:39', NULL),
(10, '2017-12-14', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:47', NULL),
(10, '2017-12-15', 2, 1, 1, NULL, NULL, 1, 16, NULL, '2018-01-23 12:13:56', NULL),
(10, '2017-12-18', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:05', NULL),
(10, '2017-12-19', 2, 3, 3, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:20', NULL),
(10, '2018-01-03', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:34', NULL),
(10, '2018-01-11', 2, 1, 1, NULL, NULL, 1, 17, NULL, '2018-01-23 12:14:50', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `calendar_events`
--

CREATE TABLE `calendar_events` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `syear` decimal(4,0) DEFAULT NULL,
  `school_id` decimal(10,0) DEFAULT NULL,
  `calendar_id` decimal(10,0) DEFAULT NULL,
  `school_date` date DEFAULT NULL,
  `title` varchar(50) DEFAULT NULL,
  `description` text,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=38 ;

--
-- Dumping data for table `calendar_events`
--

INSERT INTO `calendar_events` VALUES
(1, 2017, 1, 0, '2018-01-01', 'New Year Day', 'Happy New Year To All....', '2018-01-22 05:28:35', NULL),
(2, 2017, 1, 1, '2018-01-02', 'Student/Teacher Holiday', 'Student/Teacher Holiday', '2018-01-22 05:29:09', NULL),
(3, 2017, 1, 1, '2018-01-03', 'Staff Planning', 'Staff Planning Day', '2018-01-22 05:29:33', NULL),
(4, 2017, 1, 0, '2017-07-04', 'Independence Day', 'Happy Independence Day', '2018-01-22 05:30:17', NULL),
(5, 2017, 1, 1, '2017-07-18', 'New Teacher Orientation', 'New Teacher Orientation', '2018-01-22 05:31:13', NULL),
(6, 2017, 1, 1, '2017-07-19', 'New Teacher Orientation', 'New Teacher Orientation', '2018-01-22 05:31:26', NULL),
(7, 2017, 1, 1, '2017-07-31', 'Staff Planning Development', 'Staff Planning Development  Program', '2018-01-22 05:32:25', NULL),
(8, 2017, 1, 1, '2017-07-26', 'Administrative Staff Meeting', 'Administrative Staff Meeting.. All staff should come on this day', '2018-01-22 05:33:08', NULL),
(9, 2017, 1, 1, '2017-08-01', 'Pre-Planning', 'Pre-Planning  Staff Development', '2018-01-22 05:34:05', NULL),
(10, 2017, 1, 1, '2017-08-02', 'Pre-Planning', 'Pre-Planning Staff Dev', '2018-01-22 05:34:22', NULL),
(11, 2017, 1, 1, '2017-08-03', 'Pre-Planning', 'Pre-Planning', '2018-01-22 05:34:38', NULL),
(12, 2017, 1, 1, '2017-08-04', 'Pre-Planning', 'Pre-Planning Last day', '2018-01-22 05:34:59', NULL),
(13, 2017, 1, 1, '2017-08-07', 'First Day of School !!!', 'Welcome to a new session.... All the Best', '2018-01-22 05:35:56', NULL),
(14, 2017, 1, 0, '2017-09-04', 'Labor Day', 'Labor Day Holiday', '2018-01-22 05:37:12', NULL),
(15, 2017, 1, 1, '2017-10-09', 'Teacher Planning', 'Teacher Planning Staff development\n \n \n \n Student Holiday', '2018-01-22 05:38:11', NULL),
(16, 2017, 1, 0, '2017-11-20', 'Thanks Giving Break', 'Thanks Giving Break', '2018-01-22 05:39:08', NULL),
(17, 2017, 1, 0, '2017-11-21', 'Thanks Giving Break', 'Thanks Giving Break', '2018-01-22 05:39:20', NULL),
(18, 2017, 1, 0, '2017-11-22', 'Thanks Giving Break', 'Thanks Giving Break', '2018-01-22 05:39:32', NULL),
(19, 2017, 1, 0, '2017-11-23', 'Thanks Giving Break', 'Thanks Giving Break', '2018-01-22 05:39:44', NULL),
(20, 2017, 1, 0, '2017-11-24', 'Thanks Giving Break', 'Thanks Giving Break', '2018-01-22 05:39:56', NULL),
(21, 2017, 1, 0, '2017-12-21', 'Winter Break', 'Winter Break  Start', '2018-01-22 05:48:42', NULL),
(22, 2017, 1, 0, '2017-12-29', 'Winter Break', 'End of Winter Break', '2018-01-22 05:49:03', NULL),
(23, 2017, 1, 0, '2018-01-15', 'MLK Jr. Day', 'MLK Jr. Day', '2018-01-22 05:50:03', NULL),
(24, 2017, 1, 1, '2018-02-09', 'Student Teacher Holiday', 'Student Teacher Holiday', '2018-01-22 05:50:45', NULL),
(25, 2017, 1, 1, '2018-02-19', 'Teacher Planning', 'Teacher Planning', '2018-01-22 05:51:17', NULL),
(26, 2017, 1, 1, '2018-02-23', 'Student/Teacher Holiday', 'Student/Teacher Holiday', '2018-01-22 05:51:44', NULL),
(27, 2017, 1, 1, '2018-03-09', 'Student/Teacher Holiday', 'Student/Teacher Holiday', '2018-01-22 05:52:17', NULL),
(28, 2017, 1, 1, '2018-04-02', 'Spring Break', 'Spring Break Start', '2018-01-22 05:53:17', NULL),
(29, 2017, 1, 1, '2018-04-06', 'Spring Break', 'End of  Spring Break', '2018-01-22 05:53:41', NULL),
(30, 2017, 1, 1, '2018-05-28', 'Memorial Day', 'Memorial Day', '2018-01-22 05:54:10', NULL),
(31, 2017, 1, 1, '2018-05-23', 'Early release for school', 'Early release for school', '2018-01-23 13:41:14', NULL),
(32, 2017, 1, 1, '2018-05-24', 'Staff Meeting', 'Staff Meeting for development', '2018-01-23 13:41:40', NULL),
(33, 2017, 1, 1, '2018-05-25', 'Staff Meeting', 'Staff meeting for development', '2018-01-23 13:41:57', NULL),
(34, 2017, 1, 1, '2018-04-03', 'Spring Break', 'Spring Break', '2018-01-23 13:42:20', NULL),
(35, 2017, 1, 1, '2018-04-04', 'Spring Break', 'Spring Break', '2018-01-23 13:42:26', NULL),
(36, 2017, 1, 1, '2018-04-05', 'Spring Break', 'Spring Break', '2018-01-23 13:42:33', NULL),
(37, 2017, 1, 1, '2018-03-23', 'Teacher/Student Holiday', 'Teacher/Student Holiday.\n \n Inclement weather priority1', '2018-01-23 13:54:23', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `calendar_events_visibility`
--

CREATE TABLE `calendar_events_visibility` (
  `calendar_id` int(11) NOT NULL,
  `profile_id` int(11) DEFAULT NULL,
  `profile` varchar(50) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `calendar_events_visibility`
--

INSERT INTO `calendar_events_visibility` VALUES
(1, 0, NULL, '2018-01-23 13:58:27', NULL),
(1, 1, NULL, '2018-01-23 13:58:27', NULL),
(1, 2, NULL, '2018-01-23 13:58:27', NULL),
(1, 3, NULL, '2018-01-23 13:58:27', NULL),
(1, 4, NULL, '2018-01-23 13:58:27', NULL),
(1, 5, NULL, '2018-01-23 13:58:27', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `courses`
--

CREATE TABLE `courses` (
  `syear` decimal(4,0) NOT NULL,
  `course_id` int(8) NOT NULL AUTO_INCREMENT,
  `subject_id` decimal(10,0) NOT NULL,
  `school_id` decimal(10,0) NOT NULL,
  `grade_level` decimal(10,0) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `short_name` varchar(25) DEFAULT NULL,
  `rollover_id` decimal(10,0) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`course_id`),
  KEY `courses_ind1` USING BTREE (`course_id`,`syear`),
  KEY `courses_ind2` USING BTREE (`subject_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

--
-- Dumping data for table `courses`
--

INSERT INTO `courses` VALUES
(2017, 1, 3, 1, NULL, 'Homeroom Att Period', 'HR', NULL, '2018-01-22 04:57:41', NULL),
(2017, 2, 1, 1, NULL, 'English', 'Eng', NULL, '2018-01-22 04:58:44', NULL),
(2017, 3, 1, 1, NULL, 'Spanish', 'Span', NULL, '2018-01-22 05:02:48', NULL),
(2017, 4, 2, 1, NULL, 'Biology', 'Bio', NULL, '2018-01-22 05:06:34', NULL),
(2017, 5, 2, 1, NULL, 'Chemistry', 'Chem', NULL, '2018-01-22 05:07:38', NULL);

-- --------------------------------------------------------

--
-- Stand-in structure for view `course_details`
--
CREATE TABLE `course_details` (
`school_id` decimal(10,0)
,`syear` int(4)
,`marking_period_id` int(11)
,`subject_id` decimal(10,0)
,`course_id` decimal(10,0)
,`course_period_id` int(11)
,`teacher_id` int(11)
,`secondary_teacher_id` int(11)
,`course_title` varchar(100)
,`cp_title` varchar(100)
,`grade_scale_id` int(11)
,`mp` varchar(3)
,`credits` decimal(10,3)
,`begin_date` date
,`end_date` date
);
-- --------------------------------------------------------

--
-- Table structure for table `course_periods`
--

CREATE TABLE `course_periods` (
  `syear` int(4) NOT NULL,
  `school_id` decimal(10,0) NOT NULL,
  `course_period_id` int(11) NOT NULL AUTO_INCREMENT,
  `course_id` decimal(10,0) NOT NULL,
  `course_weight` varchar(10) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `short_name` text,
  `mp` varchar(3) DEFAULT NULL,
  `marking_period_id` int(11) DEFAULT NULL,
  `begin_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `teacher_id` int(11) DEFAULT NULL,
  `secondary_teacher_id` int(11) DEFAULT NULL,
  `total_seats` int(11) DEFAULT NULL,
  `filled_seats` decimal(10,0) NOT NULL DEFAULT '0',
  `does_honor_roll` varchar(1) DEFAULT NULL,
  `does_class_rank` varchar(1) DEFAULT NULL,
  `gender_restriction` varchar(1) DEFAULT NULL,
  `house_restriction` varchar(1) DEFAULT NULL,
  `availability` int(11) DEFAULT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `calendar_id` int(11) DEFAULT NULL,
  `half_day` varchar(1) DEFAULT NULL,
  `does_breakoff` varchar(1) DEFAULT NULL,
  `rollover_id` int(11) DEFAULT NULL,
  `grade_scale_id` int(11) DEFAULT NULL,
  `credits` decimal(10,3) DEFAULT NULL,
  `schedule_type` enum('FIXED','VARIABLE','BLOCKED') DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) NOT NULL,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`course_period_id`),
  KEY `course_periods_ind1` USING BTREE (`syear`),
  KEY `course_periods_ind2` USING BTREE (`course_id`,`course_weight`,`syear`,`school_id`),
  KEY `course_periods_ind3` USING BTREE (`course_period_id`),
  KEY `course_periods_ind5` USING BTREE (`parent_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ;

--
-- Dumping data for table `course_periods`
--

INSERT INTO `course_periods` VALUES
(2017, 1, 1, 1, NULL, 'HRA - Jennifer   Lawrence ', 'HRA', 'FY', 1, '2017-07-01', '2018-05-31', 3, NULL, 50, 10, NULL, NULL, 'N', NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, 'FIXED', '2018-01-22 04:58:25', 1, NULL),
(2017, 1, 2, 2, NULL, 'S2 - Shakespeare-Drama - Jennifer   Lawrence ', 'Shakespeare-Drama', 'SEM', 13, '2017-12-16', '2018-05-31', 3, NULL, 50, 10, NULL, NULL, 'N', NULL, NULL, 2, 1, NULL, 'Y', NULL, 1, 4.000, 'FIXED', '2018-01-22 05:01:34', 1, NULL),
(2017, 1, 3, 2, NULL, 'Q3 - Composition - Jennifer   Lawrence ', 'Composition', 'QTR', 17, '2017-12-16', '2018-02-28', 3, NULL, 50, 0, NULL, NULL, 'N', NULL, NULL, 3, 1, NULL, NULL, NULL, 1, 4.000, 'VARIABLE', '2018-01-22 05:02:33', 1, NULL),
(2017, 1, 4, 3, NULL, 'Q3 - Span I - Jennifer   Lawrence ', 'Span I', 'QTR', 17, '2017-12-16', '2018-02-28', 3, NULL, 50, 0, NULL, NULL, 'N', NULL, NULL, 4, 1, NULL, NULL, NULL, 1, 4.000, 'BLOCKED', '2018-01-22 05:03:26', 1, NULL),
(2017, 1, 5, 4, NULL, 'Sum Sem - Zoology - Richard   Jones ', 'Zoology', 'SEM', 14, '2018-06-04', '2018-06-30', 2, NULL, 50, 0, NULL, NULL, 'N', NULL, NULL, 5, 1, NULL, NULL, NULL, 1, 4.000, 'FIXED', '2018-01-22 05:07:21', 1, NULL),
(2017, 1, 6, 5, 'Y', 'Custom - Inorganic - Jennifer   Lawrence ', 'Inorganic', 'QTR', NULL, '2017-11-01', '2018-02-28', 3, NULL, 50, 10, NULL, NULL, 'N', NULL, NULL, 6, 1, NULL, 'Y', NULL, 1, 4.000, 'FIXED', '2018-01-22 05:08:51', 1, NULL),
(2017, 1, 7, 5, NULL, 'Custom - Organic Chem - Jennifer   Lawrence ', 'Organic Chem', 'QTR', NULL, '2018-01-01', '2018-04-30', 3, NULL, 50, 0, NULL, NULL, 'N', NULL, NULL, 7, 1, NULL, NULL, NULL, 1, 4.000, 'VARIABLE', '2018-01-22 05:10:24', 1, NULL),
(2017, 1, 8, 2, NULL, 'Writing FY - Jennifer   Lawrence ', 'Writing FY', 'FY', 1, '2017-07-01', '2018-05-31', 3, NULL, 10, 10, NULL, NULL, 'N', NULL, NULL, 8, 1, NULL, NULL, NULL, 1, 4.000, 'FIXED', '2018-01-22 05:27:40', 1, NULL),
(2017, 1, 9, 3, 'Y', 'Spa II - Richard   Jones ', 'Spa II', 'FY', 1, '2017-07-01', '2018-05-31', 2, NULL, 10, 0, NULL, NULL, 'N', NULL, NULL, 9, 1, NULL, NULL, NULL, 1, 4.000, 'FIXED', '2018-01-23 11:24:34', 1, NULL);

--
-- Triggers `course_periods`
--
DROP TRIGGER IF EXISTS `td_course_periods`;
DELIMITER //
CREATE TRIGGER `td_course_periods` AFTER DELETE ON `course_periods`
 FOR EACH ROW BEGIN
 	DELETE FROM course_period_var WHERE course_period_id=OLD.course_period_id;
 END
//
DELIMITER ;
DROP TRIGGER IF EXISTS `tu_course_periods`;
DELIMITER //
CREATE TRIGGER `tu_course_periods` AFTER UPDATE ON `course_periods`
 FOR EACH ROW BEGIN
 	CALL ATTENDANCE_CALC(NEW.course_period_id);
 END
//
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `course_period_var`
--

CREATE TABLE `course_period_var` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `course_period_id` int(11) NOT NULL,
  `days` varchar(7) DEFAULT NULL,
  `course_period_date` date DEFAULT NULL,
  `period_id` int(11) NOT NULL,
  `start_time` time DEFAULT NULL,
  `end_time` time DEFAULT NULL,
  `room_id` int(11) NOT NULL,
  `does_attendance` varchar(1) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=18 ;

--
-- Dumping data for table `course_period_var`
--

INSERT INTO `course_period_var` VALUES
(1, 1, 'MTWHF', NULL, 2, '09:35:00', '09:40:00', 1, 'Y', '2018-01-22 04:58:25', NULL),
(2, 2, 'MT', NULL, 1, '09:00:00', '09:30:00', 1, NULL, '2018-01-22 05:00:57', NULL),
(3, 3, 'H', NULL, 1, '09:00:00', '09:30:00', 1, NULL, '2018-01-22 05:02:33', NULL),
(4, 4, NULL, '2017-12-20', 3, '09:45:00', '10:15:00', 1, NULL, '2018-01-22 05:03:39', NULL),
(5, 4, NULL, '2017-12-21', 3, '09:45:00', '10:15:00', 1, NULL, '2018-01-22 05:03:52', NULL),
(6, 4, NULL, '2017-12-27', 3, '09:45:00', '10:15:00', 2, NULL, '2018-01-22 05:04:06', NULL),
(7, 4, NULL, '2018-01-02', 3, '09:45:00', '10:15:00', 1, NULL, '2018-01-22 05:04:54', NULL),
(8, 4, NULL, '2018-01-04', 3, '09:45:00', '10:15:00', 2, NULL, '2018-01-22 05:05:12', NULL),
(9, 4, NULL, '2018-01-10', 3, '09:45:00', '10:15:00', 2, NULL, '2018-01-22 05:05:34', NULL),
(10, 4, NULL, '2018-01-12', 3, '09:45:00', '10:15:00', 2, NULL, '2018-01-22 05:05:49', NULL),
(11, 4, NULL, '2018-01-24', 3, '09:45:00', '10:15:00', 2, NULL, '2018-01-22 05:06:07', NULL),
(12, 5, 'MT', NULL, 4, '10:20:00', '10:50:00', 3, NULL, '2018-01-22 05:07:21', NULL),
(13, 6, 'HF', NULL, 4, '10:20:00', '10:50:00', 3, NULL, '2018-01-22 05:08:51', NULL),
(14, 7, 'W', NULL, 4, '10:20:00', '10:50:00', 1, NULL, '2018-01-22 05:10:09', NULL),
(15, 7, 'T', NULL, 4, '10:20:00', '10:50:00', 1, NULL, '2018-01-22 05:10:24', NULL),
(16, 8, 'MF', NULL, 6, '11:40:00', '12:10:00', 1, NULL, '2018-01-22 05:27:40', NULL),
(17, 9, 'MF', NULL, 6, '11:40:00', '12:10:00', 4, NULL, '2018-01-23 11:24:34', NULL);

--
-- Triggers `course_period_var`
--
DROP TRIGGER IF EXISTS `td_course_period_var`;
DELIMITER //
CREATE TRIGGER `td_course_period_var` AFTER DELETE ON `course_period_var`
 FOR EACH ROW CALL ATTENDANCE_CALC(OLD.course_period_id)
//
DELIMITER ;
DROP TRIGGER IF EXISTS `ti_course_period_var`;
DELIMITER //
CREATE TRIGGER `ti_course_period_var` AFTER INSERT ON `course_period_var`
 FOR EACH ROW CALL ATTENDANCE_CALC(NEW.course_period_id)
//
DELIMITER ;
DROP TRIGGER IF EXISTS `tu_course_period_var`;
DELIMITER //
CREATE TRIGGER `tu_course_period_var` AFTER UPDATE ON `course_period_var`
 FOR EACH ROW CALL ATTENDANCE_CALC(NEW.course_period_id)
//
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `course_subjects`
--

CREATE TABLE `course_subjects` (
  `syear` decimal(4,0) DEFAULT NULL,
  `school_id` decimal(10,0) DEFAULT NULL,
  `subject_id` int(8) NOT NULL AUTO_INCREMENT,
  `title` text,
  `short_name` text,
  `rollover_id` decimal(10,0) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`subject_id`),
  KEY `course_subjects_ind1` USING BTREE (`syear`,`school_id`,`subject_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `course_subjects`
--

INSERT INTO `course_subjects` VALUES
(2017, 1, 1, 'Literature', NULL, NULL, '2018-01-22 04:56:38', NULL),
(2017, 1, 2, 'Science', NULL, NULL, '2018-01-22 04:56:49', NULL),
(2017, 1, 3, 'Homeroom Attendance', NULL, NULL, '2018-01-22 04:57:15', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `custom_fields`
--

CREATE TABLE `custom_fields` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `type` varchar(10) DEFAULT NULL,
  `search` varchar(1) DEFAULT NULL,
  `title` varchar(30) DEFAULT NULL,
  `sort_order` decimal(10,0) DEFAULT NULL,
  `select_options` varchar(10000) DEFAULT NULL,
  `category_id` decimal(10,0) DEFAULT NULL,
  `system_field` char(1) DEFAULT NULL,
  `required` varchar(1) DEFAULT NULL,
  `default_selection` varchar(255) DEFAULT NULL,
  `hide` varchar(1) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `address_desc_ind2` USING BTREE (`type`),
  KEY `address_fields_ind3` USING BTREE (`category_id`),
  KEY `custom_desc_ind` USING BTREE (`id`),
  KEY `custom_desc_ind2` USING BTREE (`type`),
  KEY `custom_fields_ind3` USING BTREE (`category_id`),
  KEY `people_desc_ind2` USING BTREE (`type`),
  KEY `people_fields_ind3` USING BTREE (`category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `eligibility`
--

CREATE TABLE `eligibility` (
  `student_id` decimal(10,0) DEFAULT NULL,
  `syear` decimal(4,0) DEFAULT NULL,
  `school_date` date DEFAULT NULL,
  `period_id` decimal(10,0) DEFAULT NULL,
  `eligibility_code` varchar(20) DEFAULT NULL,
  `course_period_id` decimal(10,0) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  KEY `eligibility_ind1` USING BTREE (`student_id`,`course_period_id`,`school_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `eligibility`
--

INSERT INTO `eligibility` VALUES
(1, 2017, '2018-01-23', 3, 'PASSING', 4, '2018-01-23 13:38:44', NULL),
(2, 2017, '2018-01-23', 3, 'PASSING', 4, '2018-01-23 13:38:44', NULL),
(3, 2017, '2018-01-23', 3, 'PASSING', 4, '2018-01-23 13:38:44', NULL),
(4, 2017, '2018-01-23', 3, 'BORDERLINE', 4, '2018-01-23 13:38:44', NULL),
(5, 2017, '2018-01-23', 3, 'BORDERLINE', 4, '2018-01-23 13:38:44', NULL),
(6, 2017, '2018-01-23', 3, 'PASSING', 4, '2018-01-23 13:38:44', NULL),
(7, 2017, '2018-01-23', 3, 'FAILING', 4, '2018-01-23 13:38:44', NULL),
(8, 2017, '2018-01-23', 3, 'PASSING', 4, '2018-01-23 13:38:44', NULL),
(9, 2017, '2018-01-23', 3, 'PASSING', 4, '2018-01-23 13:38:44', NULL),
(10, 2017, '2018-01-23', 3, 'FAILING', 4, '2018-01-23 13:38:45', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `eligibility_activities`
--

CREATE TABLE `eligibility_activities` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `syear` decimal(4,0) DEFAULT NULL,
  `school_id` decimal(10,0) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eligibility_activities_ind1` USING BTREE (`school_id`,`syear`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `eligibility_activities`
--

INSERT INTO `eligibility_activities` VALUES
(1, 2017, 1, 'Activity 1', '2018-01-01', '2018-03-31', '2018-01-23 13:05:10', NULL),
(2, 2017, 1, 'Activity 2', '2017-11-01', '2018-04-30', '2018-01-23 13:05:26', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `eligibility_completed`
--

CREATE TABLE `eligibility_completed` (
  `staff_id` decimal(10,0) NOT NULL,
  `school_date` date NOT NULL,
  `period_id` decimal(10,0) NOT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`staff_id`,`school_date`,`period_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `eligibility_completed`
--

INSERT INTO `eligibility_completed` VALUES
(3, '2018-01-23', 3, '2018-01-23 13:38:48', NULL);

-- --------------------------------------------------------

--
-- Stand-in structure for view `enroll_grade`
--
CREATE TABLE `enroll_grade` (
`id` int(8)
,`syear` decimal(4,0)
,`school_id` decimal(10,0)
,`student_id` decimal(10,0)
,`start_date` date
,`end_date` date
,`short_name` varchar(5)
,`title` varchar(50)
);
-- --------------------------------------------------------

--
-- Table structure for table `ethnicity`
--

CREATE TABLE `ethnicity` (
  `ethnicity_id` int(8) NOT NULL AUTO_INCREMENT,
  `ethnicity_name` varchar(255) NOT NULL,
  `sort_order` int(8) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date time ethnicity record modified',
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ethnicity_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=16 ;

--
-- Dumping data for table `ethnicity`
--

INSERT INTO `ethnicity` VALUES
(1, 'White, Non-Hispanic', 1, '0000-00-00 00:00:00', NULL),
(2, 'Black, Non-Hispanic', 2, '0000-00-00 00:00:00', NULL),
(3, 'Hispanic', 3, '0000-00-00 00:00:00', NULL),
(4, 'American Indian or Native Alaskan', 4, '0000-00-00 00:00:00', NULL),
(5, 'Pacific Islander', 5, '0000-00-00 00:00:00', NULL),
(6, 'Asian', 6, '0000-00-00 00:00:00', NULL),
(7, 'Indian', 7, '0000-00-00 00:00:00', NULL),
(8, 'Middle Eastern', 8, '0000-00-00 00:00:00', NULL),
(9, 'African', 9, '0000-00-00 00:00:00', NULL),
(10, 'Mixed Race', 10, '0000-00-00 00:00:00', NULL),
(11, 'Other', 11, '0000-00-00 00:00:00', NULL),
(12, 'Black', 12, '0000-00-00 00:00:00', NULL),
(13, 'White', 13, '0000-00-00 00:00:00', NULL),
(14, 'African', 14, '0000-00-00 00:00:00', NULL),
(15, 'Indigenous', 15, '2013-05-31 04:50:54', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `gradebook_assignments`
--

CREATE TABLE `gradebook_assignments` (
  `assignment_id` int(8) NOT NULL AUTO_INCREMENT,
  `staff_id` decimal(10,0) DEFAULT NULL,
  `marking_period_id` int(11) DEFAULT NULL,
  `course_period_id` decimal(10,0) DEFAULT NULL,
  `course_id` decimal(10,0) DEFAULT NULL,
  `assignment_type_id` decimal(10,0) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `assigned_date` date DEFAULT NULL,
  `due_date` date DEFAULT NULL,
  `points` decimal(10,0) DEFAULT NULL,
  `description` longtext,
  `ungraded` int(8) NOT NULL DEFAULT '1',
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`assignment_id`),
  KEY `gradebook_assignment_types_ind1` USING BTREE (`staff_id`,`course_id`),
  KEY `gradebook_assignments_ind1` USING BTREE (`staff_id`,`marking_period_id`),
  KEY `gradebook_assignments_ind2` USING BTREE (`course_id`,`course_period_id`),
  KEY `gradebook_assignments_ind3` USING BTREE (`assignment_type_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=28 ;

--
-- Dumping data for table `gradebook_assignments`
--

INSERT INTO `gradebook_assignments` VALUES
(1, 3, 17, 2, NULL, 1, 'Assignment 1', '2017-12-20', '2018-01-24', 50, '&lt;p&gt;Lorem Ipsum is placeholder text commonly used in the graphic, print, and  publishing industries for previewing layouts and visual mockups.&lt;/p&gt;', 2, '2018-01-23 12:16:03', NULL),
(2, 3, 17, 2, NULL, 1, 'Assignment 2', '2018-01-02', '2018-01-10', 100, NULL, 2, '2018-01-23 12:16:17', NULL),
(3, 3, 17, 2, NULL, 2, 'Assignment 3', '2018-01-16', '2018-01-25', 100, NULL, 2, '2018-01-23 12:16:32', NULL),
(4, 3, 18, 2, NULL, 1, 'Assignment 1', '2018-04-02', '2018-04-18', 25, NULL, 2, '2018-01-23 12:17:08', NULL),
(5, 3, 18, 2, NULL, 2, 'Assignment 3', '2018-05-01', '2018-05-16', 100, NULL, 2, '2018-01-23 12:17:32', NULL),
(6, 3, 18, 2, NULL, 2, 'Assignment 2', '2018-05-01', '2018-05-16', 75, NULL, 2, '2018-01-23 12:17:54', NULL),
(7, 3, 1, 6, NULL, 3, 'Assignment 1', '2018-01-01', '2018-01-16', 50, NULL, 2, '2018-01-23 12:19:01', NULL),
(8, 3, 1, 6, NULL, 5, 'Test Assignment', '2018-01-23', '2018-01-24', 100, NULL, 2, '2018-01-23 12:19:25', NULL),
(9, 3, 1, 6, NULL, 4, 'Assignment 3', '2018-01-02', '2018-01-16', 50, NULL, 2, '2018-01-23 12:19:49', NULL),
(10, 3, 1, 6, NULL, 4, 'Assignment 2', '2018-01-10', '2018-01-24', 25, NULL, 2, '2018-01-23 12:20:06', NULL),
(11, 3, 15, 8, NULL, 6, 'Assignment 1', '2017-07-12', '2017-08-02', 20, NULL, 2, '2018-01-23 12:20:56', NULL),
(12, 3, 15, 8, NULL, 6, 'Assignment 2', '2017-08-01', '2017-08-30', 50, NULL, 2, '2018-01-23 12:21:17', NULL),
(13, 3, 15, 8, NULL, 7, 'Assignment 3', '2017-08-16', '2017-08-24', 50, NULL, 2, '2018-01-23 12:21:43', NULL),
(14, 3, 16, 8, NULL, 6, 'Assignment 2', '2017-10-04', '2017-10-26', 100, NULL, 2, '2018-01-23 12:22:16', NULL),
(15, 3, 16, 8, NULL, 6, 'Assignment 1', '2017-10-26', '2017-11-02', 25, NULL, 2, '2018-01-23 12:22:37', NULL),
(16, 3, 16, 8, NULL, 7, 'Assignment 3', '2017-11-06', '2017-11-16', 50, NULL, 2, '2018-01-23 12:23:00', NULL),
(17, 3, 17, 8, NULL, 6, 'Assignment 2', '2018-01-02', '2018-01-16', 100, NULL, 2, '2018-01-23 12:23:40', NULL),
(18, 3, 17, 8, NULL, 6, 'Assignment 1', '2018-01-16', '2018-01-22', 10, NULL, 2, '2018-01-23 12:23:58', NULL),
(19, 3, 17, 8, NULL, 7, 'Assignment 4', '2018-01-10', '2018-01-24', 50, NULL, 2, '2018-01-23 12:24:18', NULL),
(20, 3, 17, 8, NULL, 7, 'Assignment 3', '2018-01-23', '2018-01-26', 75, NULL, 2, '2018-01-23 12:24:39', NULL),
(21, 3, 17, 4, NULL, 8, 'Assignment 1', '2018-01-02', '2018-01-23', 50, NULL, 2, '2018-01-23 12:25:27', NULL),
(22, 3, 17, 4, NULL, 9, 'Assignment 10', '2018-01-15', '2018-01-16', 20, NULL, 2, '2018-01-23 12:25:44', NULL),
(23, 3, 17, 4, NULL, 9, 'Assignment 20', '2018-01-22', '2018-01-24', 25, NULL, 2, '2018-01-23 12:26:01', NULL),
(24, 3, 17, 4, NULL, 10, 'Pre- Test', '2018-01-25', '2018-01-25', 15, NULL, 2, '2018-01-23 12:26:27', NULL),
(25, 3, 17, 3, NULL, 11, 'Assignment 1', '2018-01-16', '2018-01-24', 50, NULL, 2, '2018-01-23 12:32:26', NULL),
(26, 3, 17, 3, NULL, 12, 'Assignment 3', '2018-01-12', '2018-01-25', 25, NULL, 2, '2018-01-23 12:32:42', NULL),
(27, 3, 17, 3, NULL, 12, 'Assignment 2', '2018-01-02', '2018-01-31', 100, NULL, 2, '2018-01-23 12:32:54', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `gradebook_assignment_types`
--

CREATE TABLE `gradebook_assignment_types` (
  `assignment_type_id` int(8) NOT NULL AUTO_INCREMENT,
  `staff_id` decimal(10,0) DEFAULT NULL,
  `course_id` decimal(10,0) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `final_grade_percent` decimal(6,5) DEFAULT NULL,
  `course_period_id` decimal(10,0) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`assignment_type_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=13 ;

--
-- Dumping data for table `gradebook_assignment_types`
--

INSERT INTO `gradebook_assignment_types` VALUES
(1, 3, 2, 'Homework', NULL, 2, '2018-01-23 12:15:09', NULL),
(2, 3, 2, 'Classwork', NULL, 2, '2018-01-23 12:15:14', NULL),
(3, 3, 5, 'Homework', NULL, 6, '2018-01-23 12:18:18', NULL),
(4, 3, 5, 'Classwork', NULL, 6, '2018-01-23 12:18:24', NULL),
(5, 3, 5, 'Test', NULL, 6, '2018-01-23 12:19:09', NULL),
(6, 3, 2, 'Homework', NULL, 8, '2018-01-23 12:20:30', NULL),
(7, 3, 2, 'Classwork', NULL, 8, '2018-01-23 12:20:36', NULL),
(8, 3, 3, 'Homework Spanish', NULL, 4, '2018-01-23 12:24:52', NULL),
(9, 3, 3, 'Classwork Spanish', NULL, 4, '2018-01-23 12:24:58', NULL),
(10, 3, 3, 'Test', NULL, 4, '2018-01-23 12:25:13', NULL),
(11, 3, 2, 'Homework', NULL, 3, '2018-01-23 12:32:07', NULL),
(12, 3, 2, 'Classwork', NULL, 3, '2018-01-23 12:32:12', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `gradebook_grades`
--

CREATE TABLE `gradebook_grades` (
  `student_id` decimal(10,0) NOT NULL,
  `period_id` decimal(10,0) DEFAULT NULL,
  `course_period_id` decimal(10,0) NOT NULL,
  `assignment_id` decimal(10,0) NOT NULL,
  `points` decimal(6,2) DEFAULT NULL,
  `comment` longtext,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`student_id`,`assignment_id`,`course_period_id`),
  KEY `gradebook_grades_ind1` USING BTREE (`assignment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `gradebook_grades`
--

INSERT INTO `gradebook_grades` VALUES
(1, 6, 2, 1, 45.00, NULL, '2018-01-23 12:27:57', NULL),
(1, 6, 2, 2, 89.00, NULL, '2018-01-23 12:27:57', NULL),
(1, 6, 2, 3, 95.00, NULL, '2018-01-23 12:27:57', NULL),
(1, 4, 6, 7, 44.00, NULL, '2018-01-23 12:48:09', NULL),
(1, 4, 6, 8, 98.00, NULL, '2018-01-23 12:48:09', NULL),
(1, 4, 6, 9, 45.00, NULL, '2018-01-23 12:48:09', NULL),
(1, 4, 6, 10, 22.00, NULL, '2018-01-23 12:48:09', NULL),
(1, 6, 8, 11, 18.00, NULL, '2018-01-23 12:50:02', NULL),
(1, 6, 8, 12, 48.00, NULL, '2018-01-23 12:50:02', NULL),
(1, 6, 8, 13, 48.00, NULL, '2018-01-23 12:50:02', NULL),
(1, 6, 8, 14, 98.00, NULL, '2018-01-23 12:53:03', NULL),
(1, 6, 8, 15, 22.00, NULL, '2018-01-23 12:53:03', NULL),
(1, 6, 8, 16, 48.00, NULL, '2018-01-23 12:53:02', NULL),
(1, 6, 8, 17, 90.00, NULL, '2018-01-23 12:36:05', NULL),
(1, 6, 8, 18, 9.00, NULL, '2018-01-23 12:36:04', NULL),
(1, 6, 8, 19, 45.00, NULL, '2018-01-23 12:36:04', NULL),
(1, 6, 8, 20, 68.00, NULL, '2018-01-23 12:36:04', NULL),
(1, 3, 4, 21, 45.00, NULL, '2018-01-23 12:43:38', NULL),
(1, 3, 4, 22, 18.00, NULL, '2018-01-23 12:43:38', NULL),
(1, 3, 4, 23, 24.00, NULL, '2018-01-23 12:43:38', NULL),
(1, 3, 4, 24, 14.00, NULL, '2018-01-23 12:43:38', NULL),
(1, 6, 3, 25, 48.00, NULL, '2018-01-23 12:33:52', NULL),
(1, 6, 3, 26, 21.00, NULL, '2018-01-23 12:33:52', NULL),
(1, 6, 3, 27, 92.00, NULL, '2018-01-23 12:33:51', NULL),
(2, 6, 2, 1, 40.00, NULL, '2018-01-23 12:27:58', NULL),
(2, 6, 2, 2, 96.00, NULL, '2018-01-23 12:27:58', NULL),
(2, 6, 2, 3, 85.00, NULL, '2018-01-23 12:27:57', NULL),
(2, 4, 6, 7, 47.00, NULL, '2018-01-23 12:48:10', NULL),
(2, 4, 6, 8, 59.00, NULL, '2018-01-23 12:48:09', NULL),
(2, 4, 6, 9, 48.00, NULL, '2018-01-23 12:48:09', NULL),
(2, 4, 6, 10, 25.00, NULL, '2018-01-23 12:48:09', NULL),
(2, 6, 8, 11, 17.00, NULL, '2018-01-23 12:50:02', NULL),
(2, 6, 8, 12, 38.00, NULL, '2018-01-23 12:50:02', NULL),
(2, 6, 8, 13, 45.00, NULL, '2018-01-23 12:50:02', NULL),
(2, 6, 8, 14, 85.00, NULL, '2018-01-23 12:53:03', NULL),
(2, 6, 8, 15, 21.00, NULL, '2018-01-23 12:53:03', NULL),
(2, 6, 8, 16, 38.00, NULL, '2018-01-23 12:53:03', NULL),
(2, 6, 8, 17, 85.00, NULL, '2018-01-23 12:36:05', NULL),
(2, 6, 8, 18, 8.00, NULL, '2018-01-23 12:36:05', NULL),
(2, 6, 8, 19, 35.00, NULL, '2018-01-23 12:36:05', NULL),
(2, 6, 8, 20, 71.00, NULL, '2018-01-23 12:36:05', NULL),
(2, 3, 4, 21, 40.00, NULL, '2018-01-23 12:44:57', NULL),
(2, 3, 4, 22, 18.00, NULL, '2018-01-23 12:43:38', NULL),
(2, 3, 4, 23, 20.00, NULL, '2018-01-23 12:43:38', NULL),
(2, 3, 4, 24, 14.00, NULL, '2018-01-23 12:43:38', NULL),
(2, 6, 3, 25, 45.00, NULL, '2018-01-23 12:33:52', NULL),
(2, 6, 3, 26, 19.00, NULL, '2018-01-23 12:33:52', NULL),
(2, 6, 3, 27, 85.00, NULL, '2018-01-23 12:33:52', NULL),
(3, 6, 2, 1, 29.00, NULL, '2018-01-23 12:27:58', NULL),
(3, 6, 2, 2, 66.00, NULL, '2018-01-23 12:27:58', NULL),
(3, 6, 2, 3, 48.00, NULL, '2018-01-23 12:27:58', NULL),
(3, 4, 6, 7, 44.00, NULL, '2018-01-23 12:48:12', NULL),
(3, 4, 6, 8, 28.00, NULL, '2018-01-23 12:48:11', NULL),
(3, 4, 6, 9, 25.00, NULL, '2018-01-23 12:48:11', NULL),
(3, 4, 6, 10, 22.00, NULL, '2018-01-23 12:48:11', NULL),
(3, 6, 8, 11, 6.00, NULL, '2018-01-23 12:50:04', NULL),
(3, 6, 8, 12, 44.00, NULL, '2018-01-23 12:50:03', NULL),
(3, 6, 8, 13, 44.00, NULL, '2018-01-23 12:50:03', NULL),
(3, 6, 8, 14, 77.00, NULL, '2018-01-23 12:53:04', NULL),
(3, 6, 8, 15, 18.00, NULL, '2018-01-23 12:53:04', NULL),
(3, 6, 8, 16, 32.00, NULL, '2018-01-23 12:53:04', NULL),
(3, 6, 8, 17, 6.00, NULL, '2018-01-23 12:36:07', NULL),
(3, 6, 8, 18, 0.00, NULL, '2018-01-23 12:36:06', NULL),
(3, 6, 8, 19, 10.00, NULL, '2018-01-23 12:36:06', NULL),
(3, 6, 8, 20, 0.00, NULL, '2018-01-23 12:36:06', NULL),
(3, 3, 4, 21, 39.00, NULL, '2018-01-23 12:43:40', NULL),
(3, 3, 4, 22, 12.00, NULL, '2018-01-23 12:43:40', NULL),
(3, 3, 4, 23, 17.00, NULL, '2018-01-23 12:43:40', NULL),
(3, 3, 4, 24, 11.00, NULL, '2018-01-23 12:43:40', NULL),
(3, 6, 3, 25, 29.00, NULL, '2018-01-23 12:33:53', NULL),
(3, 6, 3, 26, 0.00, NULL, '2018-01-23 12:33:53', NULL),
(3, 6, 3, 27, 55.00, NULL, '2018-01-23 12:33:53', NULL),
(4, 6, 2, 1, 48.00, NULL, '2018-01-23 12:27:59', NULL),
(4, 6, 2, 2, 90.00, NULL, '2018-01-23 12:27:59', NULL),
(4, 6, 2, 3, 96.00, NULL, '2018-01-23 12:27:59', NULL),
(4, 4, 6, 7, 41.00, NULL, '2018-01-23 12:48:12', NULL),
(4, 4, 6, 8, 93.00, NULL, '2018-01-23 12:48:12', NULL),
(4, 4, 6, 9, 22.00, NULL, '2018-01-23 12:48:12', NULL),
(4, 4, 6, 10, 15.00, NULL, '2018-01-23 12:48:12', NULL),
(4, 6, 8, 11, 18.00, NULL, '2018-01-23 12:50:04', NULL),
(4, 6, 8, 12, 45.00, NULL, '2018-01-23 12:50:04', NULL),
(4, 6, 8, 13, 45.00, NULL, '2018-01-23 12:50:04', NULL),
(4, 6, 8, 14, 85.00, NULL, '2018-01-23 12:53:05', NULL),
(4, 6, 8, 15, 5.00, NULL, '2018-01-23 12:53:05', NULL),
(4, 6, 8, 16, 28.00, NULL, '2018-01-23 12:53:04', NULL),
(4, 6, 8, 17, 55.00, NULL, '2018-01-23 12:36:07', NULL),
(4, 6, 8, 18, 4.50, NULL, '2018-01-23 12:36:07', NULL),
(4, 6, 8, 19, 15.00, NULL, '2018-01-23 12:36:07', NULL),
(4, 6, 8, 20, 69.00, NULL, '2018-01-23 12:36:07', NULL),
(4, 3, 4, 21, 38.00, NULL, '2018-01-23 12:43:40', NULL),
(4, 3, 4, 22, 10.00, NULL, '2018-01-23 12:43:40', NULL),
(4, 3, 4, 23, 11.00, NULL, '2018-01-23 12:43:40', NULL),
(4, 3, 4, 24, 10.00, NULL, '2018-01-23 12:43:40', NULL),
(4, 6, 3, 25, 30.00, NULL, '2018-01-23 12:33:54', NULL),
(4, 6, 3, 26, 19.00, NULL, '2018-01-23 12:33:54', NULL),
(4, 6, 3, 27, 90.00, NULL, '2018-01-23 12:33:53', NULL),
(5, 6, 2, 1, 25.00, NULL, '2018-01-23 12:27:58', NULL),
(5, 6, 2, 2, 65.00, NULL, '2018-01-23 12:27:58', NULL),
(5, 6, 2, 3, 55.00, NULL, '2018-01-23 12:27:58', NULL),
(5, 4, 6, 7, 50.00, NULL, '2018-01-23 12:48:11', NULL),
(5, 4, 6, 8, 45.00, NULL, '2018-01-23 12:48:11', NULL),
(5, 4, 6, 9, 36.00, NULL, '2018-01-23 12:48:11', NULL),
(5, 4, 6, 10, 21.00, NULL, '2018-01-23 12:48:11', NULL),
(5, 6, 8, 11, 12.00, NULL, '2018-01-23 12:50:03', NULL),
(5, 6, 8, 12, 28.00, NULL, '2018-01-23 12:50:03', NULL),
(5, 6, 8, 13, 39.00, NULL, '2018-01-23 12:50:03', NULL),
(5, 6, 8, 14, 65.00, NULL, '2018-01-23 12:53:04', NULL),
(5, 6, 8, 15, 17.00, NULL, '2018-01-23 12:53:04', NULL),
(5, 6, 8, 16, 36.00, NULL, '2018-01-23 12:53:04', NULL),
(5, 6, 8, 17, 35.00, NULL, '2018-01-23 12:36:06', NULL),
(5, 6, 8, 18, 6.00, NULL, '2018-01-23 12:36:06', NULL),
(5, 6, 8, 19, 25.00, NULL, '2018-01-23 12:36:06', NULL),
(5, 6, 8, 20, 49.00, NULL, '2018-01-23 12:36:06', NULL),
(5, 3, 4, 21, 35.00, NULL, '2018-01-23 12:43:40', NULL),
(5, 3, 4, 22, 11.00, NULL, '2018-01-23 12:43:40', NULL),
(5, 3, 4, 23, 15.00, NULL, '2018-01-23 12:43:39', NULL),
(5, 3, 4, 24, 14.00, NULL, '2018-01-23 12:43:39', NULL),
(5, 6, 3, 25, 25.00, NULL, '2018-01-23 12:33:53', NULL),
(5, 6, 3, 26, 25.00, NULL, '2018-01-23 12:33:53', NULL),
(5, 6, 3, 27, 45.00, NULL, '2018-01-23 12:33:53', NULL),
(6, 6, 2, 1, 37.00, NULL, '2018-01-23 12:28:00', NULL),
(6, 6, 2, 2, 65.00, NULL, '2018-01-23 12:27:59', NULL),
(6, 6, 2, 3, 65.00, NULL, '2018-01-23 12:27:59', NULL),
(6, 4, 6, 7, 17.00, NULL, '2018-01-23 12:48:13', NULL),
(6, 4, 6, 8, 88.00, NULL, '2018-01-23 12:48:13', NULL),
(6, 4, 6, 9, 49.00, NULL, '2018-01-23 12:48:13', NULL),
(6, 4, 6, 10, 16.00, NULL, '2018-01-23 12:48:13', NULL),
(6, 6, 8, 11, 14.00, NULL, '2018-01-23 12:50:05', NULL),
(6, 6, 8, 12, 39.00, NULL, '2018-01-23 12:50:05', NULL),
(6, 6, 8, 13, 43.00, NULL, '2018-01-23 12:50:05', NULL),
(6, 6, 8, 14, 74.00, NULL, '2018-01-23 12:53:06', NULL),
(6, 6, 8, 15, 18.00, NULL, '2018-01-23 12:53:06', NULL),
(6, 6, 8, 16, 49.00, NULL, '2018-01-23 12:53:06', NULL),
(6, 6, 8, 17, 71.00, NULL, '2018-01-23 12:36:08', NULL),
(6, 6, 8, 18, 5.00, NULL, '2018-01-23 12:36:08', NULL),
(6, 6, 8, 19, 39.00, NULL, '2018-01-23 12:36:08', NULL),
(6, 6, 8, 20, 48.00, NULL, '2018-01-23 12:36:08', NULL),
(6, 3, 4, 21, 38.00, NULL, '2018-01-23 12:43:42', NULL),
(6, 3, 4, 22, 15.00, NULL, '2018-01-23 12:43:41', NULL),
(6, 3, 4, 23, 24.00, NULL, '2018-01-23 12:43:41', NULL),
(6, 3, 4, 24, 8.00, NULL, '2018-01-23 12:43:41', NULL),
(6, 6, 3, 25, 15.00, NULL, '2018-01-23 12:33:54', NULL),
(6, 6, 3, 26, 11.00, NULL, '2018-01-23 12:33:54', NULL),
(6, 6, 3, 27, 78.00, NULL, '2018-01-23 12:33:54', NULL),
(7, 6, 2, 1, 18.00, NULL, '2018-01-23 12:27:59', NULL),
(7, 6, 2, 2, 71.00, NULL, '2018-01-23 12:27:59', NULL),
(7, 6, 2, 3, 91.00, NULL, '2018-01-23 12:27:59', NULL),
(7, 4, 6, 7, 28.00, NULL, '2018-01-23 12:48:12', NULL),
(7, 4, 6, 8, 91.00, NULL, '2018-01-23 12:48:12', NULL),
(7, 4, 6, 9, 32.00, NULL, '2018-01-23 12:48:12', NULL),
(7, 4, 6, 10, 17.00, NULL, '2018-01-23 12:48:12', NULL),
(7, 6, 8, 11, 3.00, NULL, '2018-01-23 12:50:04', NULL),
(7, 6, 8, 12, 47.00, NULL, '2018-01-23 12:50:04', NULL),
(7, 6, 8, 13, 18.00, NULL, '2018-01-23 12:50:04', NULL),
(7, 6, 8, 14, 52.00, NULL, '2018-01-23 12:53:05', NULL),
(7, 6, 8, 15, 6.00, NULL, '2018-01-23 12:53:05', NULL),
(7, 6, 8, 16, 29.00, NULL, '2018-01-23 12:53:05', NULL),
(7, 6, 8, 17, 65.00, NULL, '2018-01-23 12:36:07', NULL),
(7, 6, 8, 18, 8.00, NULL, '2018-01-23 12:36:07', NULL),
(7, 6, 8, 19, 39.00, NULL, '2018-01-23 12:36:07', NULL),
(7, 6, 8, 20, 72.00, NULL, '2018-01-23 12:36:07', NULL),
(7, 3, 4, 21, 30.00, NULL, '2018-01-23 12:43:41', NULL),
(7, 3, 4, 22, 9.00, NULL, '2018-01-23 12:43:41', NULL),
(7, 3, 4, 23, 8.00, NULL, '2018-01-23 12:43:41', NULL),
(7, 3, 4, 24, 12.00, NULL, '2018-01-23 12:43:41', NULL),
(7, 6, 3, 25, 14.00, NULL, '2018-01-23 12:33:54', NULL),
(7, 6, 3, 26, 22.00, NULL, '2018-01-23 12:33:54', NULL),
(7, 6, 3, 27, 89.00, NULL, '2018-01-23 12:33:54', NULL),
(8, 6, 2, 1, 39.00, NULL, '2018-01-23 12:27:58', NULL),
(8, 6, 2, 2, 85.00, NULL, '2018-01-23 12:27:58', NULL),
(8, 6, 2, 3, 65.00, NULL, '2018-01-23 12:27:58', NULL),
(8, 4, 6, 7, 38.00, NULL, '2018-01-23 12:48:11', NULL),
(8, 4, 6, 8, 78.00, NULL, '2018-01-23 12:48:11', NULL),
(8, 4, 6, 9, 35.00, NULL, '2018-01-23 12:48:10', NULL),
(8, 4, 6, 10, 19.00, NULL, '2018-01-23 12:48:10', NULL),
(8, 6, 8, 11, 11.00, NULL, '2018-01-23 12:50:03', NULL),
(8, 6, 8, 12, 15.00, NULL, '2018-01-23 12:50:03', NULL),
(8, 6, 8, 13, 36.00, NULL, '2018-01-23 12:50:03', NULL),
(8, 6, 8, 14, 75.00, NULL, '2018-01-23 12:53:04', NULL),
(8, 6, 8, 15, 22.00, NULL, '2018-01-23 12:53:04', NULL),
(8, 6, 8, 16, 47.00, NULL, '2018-01-23 12:53:04', NULL),
(8, 6, 8, 17, 32.00, NULL, '2018-01-23 12:36:06', NULL),
(8, 6, 8, 18, 5.50, NULL, '2018-01-23 12:36:05', NULL),
(8, 6, 8, 19, 39.00, NULL, '2018-01-23 12:36:05', NULL),
(8, 6, 8, 20, 60.00, NULL, '2018-01-23 12:36:05', NULL),
(8, 3, 4, 21, 47.00, NULL, '2018-01-23 12:43:39', NULL),
(8, 3, 4, 22, 15.00, NULL, '2018-01-23 12:43:39', NULL),
(8, 3, 4, 23, 14.00, NULL, '2018-01-23 12:43:39', NULL),
(8, 3, 4, 24, 6.00, NULL, '2018-01-23 12:43:39', NULL),
(8, 6, 3, 25, 45.00, NULL, '2018-01-23 12:33:53', NULL),
(8, 6, 3, 26, 25.00, NULL, '2018-01-23 12:33:53', NULL),
(8, 6, 3, 27, 65.00, NULL, '2018-01-23 12:33:53', NULL),
(9, 6, 2, 1, 35.00, NULL, '2018-01-23 12:27:58', NULL),
(9, 6, 2, 2, 45.00, NULL, '2018-01-23 12:27:58', NULL),
(9, 6, 2, 3, 75.00, NULL, '2018-01-23 12:27:58', NULL),
(9, 4, 6, 7, 36.00, NULL, '2018-01-23 12:48:10', NULL),
(9, 4, 6, 8, 68.00, NULL, '2018-01-23 12:48:10', NULL),
(9, 4, 6, 9, 38.00, NULL, '2018-01-23 12:48:10', NULL),
(9, 4, 6, 10, 18.00, NULL, '2018-01-23 12:48:10', NULL),
(9, 6, 8, 11, 14.00, NULL, '2018-01-23 12:50:03', NULL),
(9, 6, 8, 12, 36.00, NULL, '2018-01-23 12:50:03', NULL),
(9, 6, 8, 13, 40.00, NULL, '2018-01-23 12:50:03', NULL),
(9, 6, 8, 14, 68.00, NULL, '2018-01-23 12:53:03', NULL),
(9, 6, 8, 15, 24.00, NULL, '2018-01-23 12:53:03', NULL),
(9, 6, 8, 16, 45.00, NULL, '2018-01-23 12:53:03', NULL),
(9, 6, 8, 17, 96.00, NULL, '2018-01-23 12:36:05', NULL),
(9, 6, 8, 18, 4.00, NULL, '2018-01-23 12:36:05', NULL),
(9, 6, 8, 19, 36.00, NULL, '2018-01-23 12:36:05', NULL),
(9, 6, 8, 20, 55.00, NULL, '2018-01-23 12:36:05', NULL),
(9, 3, 4, 21, 41.00, NULL, '2018-01-23 12:43:39', NULL),
(9, 3, 4, 22, 14.00, NULL, '2018-01-23 12:43:39', NULL),
(9, 3, 4, 23, 18.00, NULL, '2018-01-23 12:43:39', NULL),
(9, 3, 4, 24, 5.00, NULL, '2018-01-23 12:43:38', NULL),
(9, 6, 3, 25, 30.00, NULL, '2018-01-23 12:33:52', NULL),
(9, 6, 3, 26, 15.00, NULL, '2018-01-23 12:33:52', NULL),
(9, 6, 3, 27, 65.00, NULL, '2018-01-23 12:33:52', NULL),
(10, 6, 2, 1, 33.00, NULL, '2018-01-23 12:27:59', NULL),
(10, 6, 2, 2, 28.00, NULL, '2018-01-23 12:27:59', NULL),
(10, 6, 2, 3, 72.00, NULL, '2018-01-23 12:27:59', NULL),
(10, 4, 6, 7, 18.00, NULL, '2018-01-23 12:48:13', NULL),
(10, 4, 6, 8, 75.00, NULL, '2018-01-23 12:48:13', NULL),
(10, 4, 6, 9, 42.00, NULL, '2018-01-23 12:48:13', NULL),
(10, 4, 6, 10, 20.00, NULL, '2018-01-23 12:48:12', NULL),
(10, 6, 8, 11, 18.00, NULL, '2018-01-23 12:50:05', NULL),
(10, 6, 8, 12, 45.00, NULL, '2018-01-23 12:50:04', NULL),
(10, 6, 8, 13, 33.00, NULL, '2018-01-23 12:50:04', NULL),
(10, 6, 8, 14, 32.00, NULL, '2018-01-23 12:53:05', NULL),
(10, 6, 8, 15, 14.00, NULL, '2018-01-23 12:53:05', NULL),
(10, 6, 8, 16, 33.00, NULL, '2018-01-23 12:53:05', NULL),
(10, 6, 8, 17, 67.00, NULL, '2018-01-23 12:36:08', NULL),
(10, 6, 8, 18, 1.00, NULL, '2018-01-23 12:36:07', NULL),
(10, 6, 8, 19, 0.00, NULL, '2018-01-23 12:36:07', NULL),
(10, 6, 8, 20, 70.00, NULL, '2018-01-23 12:36:07', NULL),
(10, 3, 4, 21, 25.00, NULL, '2018-01-23 12:43:41', NULL),
(10, 3, 4, 22, 19.00, NULL, '2018-01-23 12:43:41', NULL),
(10, 3, 4, 23, 5.00, NULL, '2018-01-23 12:43:41', NULL),
(10, 3, 4, 24, 13.00, NULL, '2018-01-23 12:43:41', NULL),
(10, 6, 3, 25, 18.00, NULL, '2018-01-23 12:33:54', NULL),
(10, 6, 3, 26, 23.00, NULL, '2018-01-23 12:33:54', NULL),
(10, 6, 3, 27, 19.00, NULL, '2018-01-23 12:33:54', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `grades_completed`
--

CREATE TABLE `grades_completed` (
  `staff_id` decimal(10,0) NOT NULL,
  `marking_period_id` int(11) NOT NULL,
  `period_id` decimal(10,0) NOT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`staff_id`,`marking_period_id`,`period_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `grades_completed`
--

INSERT INTO `grades_completed` VALUES
(3, 1, 4, '2018-01-23 12:48:49', NULL),
(3, 12, 6, '2018-01-23 12:55:06', NULL),
(3, 15, 6, '2018-01-23 12:51:42', NULL),
(3, 16, 6, '2018-01-23 12:54:29', NULL),
(3, 17, 3, '2018-01-23 12:43:55', NULL),
(3, 17, 6, '2018-01-23 12:45:59', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `hacking_log`
--

CREATE TABLE `hacking_log` (
  `host_name` varchar(20) DEFAULT NULL,
  `ip_address` varchar(20) DEFAULT NULL,
  `login_date` date DEFAULT NULL,
  `version` varchar(20) DEFAULT NULL,
  `php_self` varchar(20) DEFAULT NULL,
  `document_root` varchar(100) DEFAULT NULL,
  `script_name` varchar(100) DEFAULT NULL,
  `modname` varchar(100) DEFAULT NULL,
  `username` varchar(20) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `history_marking_periods`
--

CREATE TABLE `history_marking_periods` (
  `parent_id` int(11) DEFAULT NULL,
  `mp_type` char(20) DEFAULT NULL,
  `name` char(30) DEFAULT NULL,
  `post_end_date` date DEFAULT NULL,
  `school_id` int(11) DEFAULT NULL,
  `syear` int(11) DEFAULT NULL,
  `marking_period_id` int(11) NOT NULL DEFAULT '0',
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`marking_period_id`),
  KEY `history_marking_period_ind1` USING BTREE (`school_id`),
  KEY `history_marking_period_ind2` USING BTREE (`syear`),
  KEY `history_marking_period_ind3` USING BTREE (`mp_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `history_school`
--

CREATE TABLE `history_school` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `marking_period_id` int(11) NOT NULL,
  `school_name` varchar(100) NOT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `honor_roll`
--

CREATE TABLE `honor_roll` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `syear` int(4) NOT NULL,
  `title` varchar(100) NOT NULL,
  `value` varchar(100) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `language`
--

CREATE TABLE `language` (
  `language_id` int(8) NOT NULL AUTO_INCREMENT,
  `language_name` varchar(127) NOT NULL,
  `sort_order` int(8) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`language_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=22 ;

--
-- Dumping data for table `language`
--

INSERT INTO `language` VALUES
(1, 'English', 1, '2015-07-28 11:26:33', NULL),
(2, 'Arabic', 2, '2015-07-28 11:26:33', NULL),
(3, 'Bengali', 3, '2015-07-28 11:26:33', NULL),
(4, 'Chinese', 4, '2015-07-28 11:26:33', NULL),
(5, 'French', 5, '2015-07-28 11:26:33', NULL),
(6, 'German', 6, '2015-07-28 11:26:33', NULL),
(7, 'Haitian Creole', 7, '2015-07-28 11:26:33', NULL),
(8, 'Hindi', 8, '2015-07-28 11:26:33', NULL),
(9, 'Italian', 9, '2015-07-28 11:26:33', NULL),
(10, 'Japanese', 10, '2015-07-28 11:26:33', NULL),
(11, 'Korean', 11, '2015-07-28 11:26:33', NULL),
(12, 'Malay', 12, '2015-07-28 11:26:33', NULL),
(13, 'Polish', 13, '2015-07-28 11:26:33', NULL),
(14, 'Portuguese', 14, '2015-07-28 11:26:33', NULL),
(15, 'Russian', 15, '2015-07-28 11:26:33', NULL),
(16, 'Spanish', 16, '2015-07-28 11:26:33', NULL),
(17, 'Thai', 17, '2015-07-28 11:26:33', NULL),
(18, 'Turkish', 18, '2015-07-28 11:26:33', NULL),
(19, 'Urdu', 19, '2015-07-28 11:26:33', NULL),
(20, 'Vietnamese', 20, '2015-07-28 11:26:33', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `login_authentication`
--

CREATE TABLE `login_authentication` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `profile_id` int(11) NOT NULL,
  `username` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `last_login` datetime DEFAULT NULL,
  `failed_login` int(3) NOT NULL DEFAULT '0',
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `COMPOSITE` (`user_id`,`profile_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=23 ;

--
-- Dumping data for table `login_authentication`
--

INSERT INTO `login_authentication` VALUES
(1, 1, 0, '[[admin_username]]', '[[admin_pass]]', '2018-01-23 16:45:45', 0, '2015-07-28 05:56:33', NULL),
(2, 1, 3, 'daniel', 'c7f8f8ad9b4256e5f41321c3083d9667', NULL, 0, '2018-01-22 04:46:26', NULL),
(3, 2, 2, 'richard', '8348ffdf6e90e68f42a64c0669d1e68b', NULL, 0, '2018-01-22 04:51:09', NULL),
(4, 3, 2, 'teacher', '8d788385431273d11e8b43bb78f3aa41', '2018-01-23 16:43:57', 0, '2018-01-22 04:53:33', NULL),
(5, 2, 3, 'justin', '5d9e2637cb051d0ab5ae3b7637a3293c', NULL, 0, '2018-01-22 05:11:57', NULL),
(6, 1, 4, 'george', '4bc9a9caad572fd65efdea49f8297fc3', NULL, 0, '2018-01-22 05:14:27', NULL),
(7, 3, 3, 'laura', '24c02e195722d14e68f97f4cbc498839', NULL, 0, '2018-01-22 05:15:27', NULL),
(8, 4, 3, 'student', 'cd73502828457d15655bbd7a63fb0bc8', '2018-01-23 16:44:05', 0, '2018-01-22 05:17:04', NULL),
(9, 3, 4, 'parent', 'd0e45878043844ffc41aac437e86b602', '2018-01-23 16:44:53', 0, '2018-01-22 05:20:07', NULL),
(10, 5, 3, 'roman', '02c8dba07dff23b9434e5bd088bfafa6', NULL, 0, '2018-01-22 05:20:52', NULL),
(11, 6, 3, 'luna', '472558aa413540388e35bf87f0593f24', NULL, 0, '2018-01-22 05:22:16', NULL),
(12, 7, 3, 'james', '7cd2fc39f1b866d314bd17348e554ec2', NULL, 0, '2018-01-22 05:23:25', NULL),
(13, 8, 3, 'javier', '114f9be6d0637c5c958978cb73188ae6', NULL, 0, '2018-01-22 05:25:41', NULL),
(14, 4, 2, 'kim', '053ff99ddcf6d09ad315e944728c4b5f', NULL, 0, '2018-01-22 05:45:02', NULL),
(15, 9, 3, 'ronnie', 'a8ac19b96e16b1d313b21674313a9862', NULL, 0, '2018-01-23 11:07:29', NULL),
(16, 5, 4, 'peter', '9f4df23ee2d7cc4234c671440a2c72ec', NULL, 0, '2018-01-23 11:08:51', NULL),
(17, 10, 3, 'mark_ro', '764ab44e603363edd05f9c5962e7aafe', NULL, 0, '2018-01-23 11:13:05', NULL),
(18, 7, 4, 'peter01', '0d753de263c446e45b5e8832edd628e2', NULL, 0, '2018-01-23 11:22:12', NULL),
(19, 5, 2, 'steve', '50af985e0b3f269fad93db694a4775d8', NULL, 0, '2018-01-23 13:10:16', NULL),
(20, 9, 4, 'vivian', 'faf704bca20c031771fd828008f47b35', NULL, 0, '2018-01-23 13:27:52', NULL),
(21, 10, 4, 'leeza', 'a500ffe75f6d7138edad36af81b58356', NULL, 0, '2018-01-23 13:27:52', NULL),
(22, 6, 1, 'admin', '21232f297a57a5a743894a0e4a801fc3', '2018-02-02 11:59:00', 0, '2018-01-23 16:22:31', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `login_message`
--

CREATE TABLE `login_message` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `message` longtext,
  `display` char(1) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `login_message`
--

INSERT INTO `login_message` VALUES
(1, 'This is a restricted network. Use of this network, its equipment, and resources is monitored at all times and requires explicit permission from the network administrator. If you do not have this permission in writing, you are violating the regulations of this network and can and will be prosecuted to the fullest extent of law. By continuing into this system, you are acknowledging that you are aware of and agree to these terms.', 'Y');

-- --------------------------------------------------------

--
-- Table structure for table `login_records`
--

CREATE TABLE `login_records` (
  `syear` decimal(5,0) DEFAULT NULL,
  `first_name` varchar(100) DEFAULT NULL,
  `last_name` varchar(100) DEFAULT NULL,
  `profile` varchar(50) DEFAULT NULL,
  `user_name` varchar(100) DEFAULT NULL,
  `login_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `faillog_count` decimal(4,0) DEFAULT NULL,
  `staff_id` decimal(10,0) DEFAULT NULL,
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `faillog_time` varchar(255) DEFAULT NULL,
  `ip_address` varchar(20) DEFAULT NULL,
  `status` varchar(50) DEFAULT NULL,
  `school_id` decimal(10,0) DEFAULT NULL,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `log_maintain`
--

CREATE TABLE `log_maintain` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `value` decimal(30,0) DEFAULT NULL,
  `session_id` varchar(100) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=29 ;

--
-- Dumping data for table `log_maintain`
--

INSERT INTO `log_maintain` VALUES
(1, 31965, 'm4digviqlaoau37kk24gk9cgk1', '2018-01-22 04:21:30', NULL),
(27, 16952, 'or872bfrl7n4i0omigfufcfcd3', '2018-01-23 16:45:45', NULL),
(28, 11535, '1o4b5qrqud3pk0vhccsvhqco54', '2018-02-02 16:59:00', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `lunch_period`
--

CREATE TABLE `lunch_period` (
  `student_id` decimal(10,0) DEFAULT NULL,
  `school_date` date DEFAULT NULL,
  `period_id` decimal(10,0) DEFAULT NULL,
  `attendance_code` decimal(10,0) DEFAULT NULL,
  `attendance_teacher_code` decimal(10,0) DEFAULT NULL,
  `attendance_reason` varchar(100) DEFAULT NULL,
  `admin` varchar(1) DEFAULT NULL,
  `course_period_id` decimal(10,0) DEFAULT NULL,
  `marking_period_id` int(11) DEFAULT NULL,
  `lunch_period` varchar(100) DEFAULT NULL,
  `table_name` decimal(10,0) DEFAULT NULL,
  `comment` varchar(100) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `mail_group`
--

CREATE TABLE `mail_group` (
  `group_id` int(11) NOT NULL AUTO_INCREMENT,
  `group_name` varchar(255) NOT NULL,
  `description` varchar(255) NOT NULL,
  `user_name` varchar(255) NOT NULL,
  `creation_date` datetime NOT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`group_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `mail_group`
--

INSERT INTO `mail_group` VALUES
(1, 'Teachers', 'All teacher', 'os4ed', '2018-01-23 11:27:18', '2018-01-23 11:27:18', NULL),
(2, 'Students', 'All Students', 'os4ed', '2018-01-23 13:08:25', '2018-01-23 13:08:25', NULL),
(3, 'My Students', 'Class Students', 'teacher', '2018-01-23 13:48:06', '2018-01-23 13:48:06', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `mail_groupmembers`
--

CREATE TABLE `mail_groupmembers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `group_id` int(11) NOT NULL,
  `user_name` varchar(255) NOT NULL,
  `profile` varchar(255) NOT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ;

--
-- Dumping data for table `mail_groupmembers`
--

INSERT INTO `mail_groupmembers` VALUES
(1, 1, 'richard', '2', '2018-01-23 11:27:30', NULL),
(2, 1, 'kim', '2', '2018-01-23 11:27:30', NULL),
(3, 2, 'daniel', '3', '2018-01-23 13:08:43', NULL),
(4, 2, 'justin', '3', '2018-01-23 13:08:43', NULL),
(5, 2, 'laura', '3', '2018-01-23 13:08:43', NULL),
(6, 2, 'roman', '3', '2018-01-23 13:08:43', NULL),
(7, 2, 'luna', '3', '2018-01-23 13:08:43', NULL),
(8, 2, 'james', '3', '2018-01-23 13:08:43', NULL),
(9, 2, 'ronnie', '3', '2018-01-23 13:08:43', NULL),
(10, 2, 'mark_ro', '3', '2018-01-23 13:08:43', NULL),
(11, 3, 'daniel', '3', '2018-01-23 13:48:28', NULL),
(12, 3, 'justin', '3', '2018-01-23 13:48:29', NULL),
(13, 3, 'laura', '3', '2018-01-23 13:48:29', NULL),
(14, 3, 'roman', '3', '2018-01-23 13:48:29', NULL),
(15, 3, 'luna', '3', '2018-01-23 13:48:29', NULL),
(16, 3, 'james', '3', '2018-01-23 13:48:29', NULL),
(17, 3, 'javier', '3', '2018-01-23 13:48:29', NULL),
(18, 3, 'ronnie', '3', '2018-01-23 13:48:29', NULL),
(19, 3, 'mark_ro', '3', '2018-01-23 13:48:29', NULL);

-- --------------------------------------------------------

--
-- Stand-in structure for view `marking_periods`
--
CREATE TABLE `marking_periods` (
`marking_period_id` int(11)
,`mp_source` varchar(7)
,`syear` decimal(10,0)
,`school_id` decimal(10,0)
,`mp_type` varchar(20)
,`title` varchar(50)
,`short_name` varchar(10)
,`sort_order` decimal(10,0)
,`parent_id` decimal(19,0)
,`grandparent_id` decimal(19,0)
,`start_date` date
,`end_date` date
,`post_start_date` date
,`post_end_date` date
,`does_grades` varchar(1)
,`does_exam` varchar(1)
,`does_comments` varchar(1)
);
-- --------------------------------------------------------

--
-- Table structure for table `marking_period_id_generator`
--

CREATE TABLE `marking_period_id_generator` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ;

--
-- Dumping data for table `marking_period_id_generator`
--

INSERT INTO `marking_period_id_generator` VALUES
(1),
(12),
(13),
(14),
(15),
(16),
(17),
(18),
(19);

-- --------------------------------------------------------

--
-- Table structure for table `medical_info`
--

CREATE TABLE `medical_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `syear` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  `physician` varchar(255) DEFAULT NULL,
  `physician_phone` varchar(255) DEFAULT NULL,
  `preferred_hospital` varchar(255) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;

--
-- Dumping data for table `medical_info`
--

INSERT INTO `medical_info` VALUES
(1, 1, 2017, 1, 'Dr. Morgan', '444-656-8945', 'General', '2018-01-22 04:46:26', NULL),
(2, 2, 2017, 1, NULL, NULL, NULL, '2018-01-22 05:11:58', NULL),
(3, 3, 2017, 1, NULL, NULL, NULL, '2018-01-22 05:15:27', NULL),
(4, 4, 2017, 1, 'Dr. Morgan', '444-656-8945', 'General', '2018-01-22 05:17:04', NULL),
(5, 5, 2017, 1, 'Dr. Morgan', '444-656-8945', 'General', '2018-01-22 05:20:53', NULL),
(6, 6, 2017, 1, 'Dr. Morgan', '444-656-8945', 'General', '2018-01-22 05:22:16', NULL),
(7, 7, 2017, 1, 'Dr. Morgan', '444-656-8945', 'General', '2018-01-22 05:23:25', NULL),
(8, 8, 2017, 1, NULL, NULL, NULL, '2018-01-22 05:25:41', NULL),
(9, 9, 2017, 1, NULL, NULL, NULL, '2018-01-23 11:07:29', NULL),
(10, 10, 2017, 1, NULL, NULL, NULL, '2018-01-23 11:13:05', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `missing_attendance`
--

CREATE TABLE `missing_attendance` (
  `school_id` int(11) NOT NULL,
  `syear` varchar(6) NOT NULL,
  `school_date` date NOT NULL,
  `course_period_id` int(11) NOT NULL,
  `period_id` int(11) NOT NULL,
  `teacher_id` int(11) NOT NULL,
  `secondary_teacher_id` int(11) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `missing_attendance`
--

INSERT INTO `missing_attendance` VALUES
(1, '2017', '2017-12-20', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL),
(1, '2017', '2018-01-04', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL),
(1, '2017', '2018-01-05', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL),
(1, '2017', '2018-01-08', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL),
(1, '2017', '2018-01-09', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL),
(1, '2017', '2018-01-10', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL),
(1, '2017', '2018-01-12', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL),
(1, '2017', '2018-01-16', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL),
(1, '2017', '2018-01-17', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL),
(1, '2017', '2018-01-18', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL),
(1, '2017', '2018-01-19', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL),
(1, '2017', '2018-01-22', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL),
(1, '2017', '2018-01-23', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL),
(1, '2017', '2018-01-24', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL),
(1, '2017', '2018-01-25', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL),
(1, '2017', '2018-01-26', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL),
(1, '2017', '2018-01-29', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL),
(1, '2017', '2018-01-30', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL),
(1, '2017', '2018-01-31', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL),
(1, '2017', '2018-02-01', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL),
(1, '2017', '2018-02-02', 1, 2, 3, NULL, '2018-02-02 18:18:49', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `msg_inbox`
--

CREATE TABLE `msg_inbox` (
  `mail_id` int(11) NOT NULL AUTO_INCREMENT,
  `to_user` varchar(211) NOT NULL,
  `from_user` varchar(211) NOT NULL,
  `mail_Subject` varchar(211) DEFAULT NULL,
  `mail_body` longtext NOT NULL,
  `mail_datetime` datetime DEFAULT NULL,
  `mail_attachment` varchar(211) DEFAULT NULL,
  `isdraft` int(11) DEFAULT NULL,
  `istrash` varchar(255) DEFAULT NULL,
  `to_multiple_users` varchar(255) DEFAULT NULL,
  `to_cc` varchar(255) DEFAULT NULL,
  `to_cc_multiple` varchar(255) DEFAULT NULL,
  `to_bcc` varchar(255) DEFAULT NULL,
  `to_bcc_multiple` varchar(255) DEFAULT NULL,
  `mail_read_unread` varchar(255) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`mail_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `msg_inbox`
--

INSERT INTO `msg_inbox` VALUES
(1, 'richard,kim', 'os4ed', 'Welcome', '<p>Hello All,</p>\n\n<p>&nbsp;</p>\n\n<p>Welcome to our new session...</p>\n\n<p>&nbsp;</p>\n\n<p>Regards,</p>\n\n<p>Os4ed Administrator.</p>\n\n<p>Peach Tree School</p>', '2018-01-23 13:07:18', NULL, NULL, NULL, 'richard,kim', NULL, NULL, NULL, NULL, NULL, '2018-01-23 13:07:18', NULL),
(2, 'student', 'os4ed', 'Hello', '<p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and  typesetting industry. Lorem Ipsum has been the industry''s standard dummy  text ever since the 1500s, when an unknown printer took a galley of  type and scrambled it to make a type specimen book.</p>', '2018-01-23 13:08:10', NULL, NULL, NULL, 'student', NULL, NULL, NULL, NULL, NULL, '2018-01-23 13:08:10', NULL),
(3, 'os4ed', 'teacher', 'Thank you', '<p>Thak you sir... Sure.</p>\n\n<p>&nbsp;</p>\n\n<p>Regrads,</p>\n\n<p>Jennifer Lawrence.</p>\n\n<p>Asst. Professor</p>\n\n<p>Peach Tree School</p>', '2018-01-23 13:47:44', NULL, NULL, NULL, 'os4ed', NULL, NULL, NULL, NULL, NULL, '2018-01-23 13:47:44', NULL),
(4, 'teacher', 'student', 'Hello', '<p>Hello Madam,</p>\n\n<p>&nbsp;&nbsp; I have submitted my assignment please check .</p>\n\n<p>Yours faithfully,</p>\n\n<p>Colin Parker.</p>', '2018-01-23 13:50:37', NULL, NULL, NULL, 'teacher', NULL, NULL, NULL, NULL, NULL, '2018-01-23 13:50:37', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `msg_outbox`
--

CREATE TABLE `msg_outbox` (
  `mail_id` int(11) NOT NULL AUTO_INCREMENT,
  `from_user` varchar(211) NOT NULL,
  `to_user` varchar(211) NOT NULL,
  `mail_subject` varchar(211) DEFAULT NULL,
  `mail_body` longtext NOT NULL,
  `mail_datetime` datetime DEFAULT NULL,
  `mail_attachment` varchar(211) DEFAULT NULL,
  `istrash` int(11) DEFAULT NULL,
  `to_cc` varchar(255) DEFAULT NULL,
  `to_bcc` varchar(255) DEFAULT NULL,
  `to_grpName` varchar(255) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`mail_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `msg_outbox`
--

INSERT INTO `msg_outbox` VALUES
(1, 'os4ed', 'richard,kim', 'Welcome', '<p>Hello All,</p>\n\n<p>&nbsp;</p>\n\n<p>Welcome to our new session...</p>\n\n<p>&nbsp;</p>\n\n<p>Regards,</p>\n\n<p>Os4ed Administrator.</p>\n\n<p>Peach Tree School</p>', '2018-01-23 13:07:18', NULL, NULL, NULL, NULL, NULL, '2018-01-23 13:07:18', NULL),
(2, 'os4ed', 'student', 'Hello', '<p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and  typesetting industry. Lorem Ipsum has been the industry''s standard dummy  text ever since the 1500s, when an unknown printer took a galley of  type and scrambled it to make a type specimen book.</p>', '2018-01-23 13:08:10', NULL, NULL, NULL, NULL, NULL, '2018-01-23 13:08:10', NULL),
(3, 'teacher', 'os4ed', 'Thank you', '<p>Thak you sir... Sure.</p>\n\n<p>&nbsp;</p>\n\n<p>Regrads,</p>\n\n<p>Jennifer Lawrence.</p>\n\n<p>Asst. Professor</p>\n\n<p>Peach Tree School</p>', '2018-01-23 13:47:44', NULL, NULL, NULL, NULL, NULL, '2018-01-23 13:47:44', NULL),
(4, 'student', 'teacher', 'Hello', '<p>Hello Madam,</p>\n\n<p>&nbsp;&nbsp; I have submitted my assignment please check .</p>\n\n<p>Yours faithfully,</p>\n\n<p>Colin Parker.</p>', '2018-01-23 13:50:37', NULL, NULL, NULL, NULL, NULL, '2018-01-23 13:50:37', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `people`
--

CREATE TABLE `people` (
  `staff_id` int(11) NOT NULL AUTO_INCREMENT,
  `current_school_id` decimal(10,0) DEFAULT NULL,
  `title` varchar(5) DEFAULT NULL,
  `first_name` varchar(100) DEFAULT NULL,
  `last_name` varchar(100) DEFAULT NULL,
  `middle_name` varchar(100) DEFAULT NULL,
  `home_phone` varchar(255) DEFAULT NULL,
  `work_phone` varchar(255) DEFAULT NULL,
  `cell_phone` varchar(255) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `custody` varchar(1) DEFAULT NULL,
  `profile` varchar(30) DEFAULT NULL,
  `profile_id` decimal(10,0) DEFAULT NULL,
  `is_disable` varchar(10) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`staff_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;

--
-- Dumping data for table `people`
--

INSERT INTO `people` VALUES
(1, 1, NULL, 'George', 'Aponte', NULL, NULL, NULL, NULL, 'george@example.com', NULL, 'parent', 4, NULL, '2018-01-22 05:14:27', NULL),
(2, 1, NULL, 'Lisa', 'Aponte', NULL, NULL, NULL, NULL, 'lisaa@example.com', NULL, 'parent', 4, NULL, '2018-01-22 05:14:28', NULL),
(3, 1, NULL, 'Abraham', 'Parker', NULL, '4767588576', '4445656356', NULL, 'abraham@example.com', NULL, 'parent', 4, NULL, '2018-01-22 05:20:07', NULL),
(4, 1, NULL, 'Patricia', 'Parker', NULL, '65465456', NULL, NULL, 'patrica@gmail.com', NULL, 'parent', 4, NULL, '2018-01-22 05:20:07', NULL),
(5, 1, NULL, 'Peter', 'Davis', NULL, '440-656-9898', '444-785-4502', NULL, 'peter@gmail.com', NULL, 'parent', 4, NULL, '2018-01-23 11:08:51', NULL),
(6, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'parent', 4, NULL, '2018-01-23 11:08:51', NULL),
(7, 1, NULL, 'Peter', 'Anderson', NULL, '444-656-3265', NULL, '98124565', 'peter@example.com', NULL, 'parent', 4, NULL, '2018-01-23 11:22:12', NULL),
(8, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'parent', 4, NULL, '2018-01-23 11:22:12', NULL),
(9, 1, NULL, 'Vivian', 'Holmes', NULL, '444-340-1234', NULL, '14090842', 'vivian@example.com', NULL, 'parent', 4, NULL, '2018-01-23 13:27:52', NULL),
(10, 1, NULL, 'Liza', 'Mathew', NULL, '444-090-9834', NULL, '1407865545', 'leeza@example.com', NULL, 'parent', 4, NULL, '2018-01-23 13:27:52', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `people_fields`
--

CREATE TABLE `people_fields` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `type` varchar(10) DEFAULT NULL,
  `search` varchar(1) DEFAULT NULL,
  `title` varchar(30) DEFAULT NULL,
  `sort_order` decimal(10,0) DEFAULT NULL,
  `select_options` varchar(10000) DEFAULT NULL,
  `category_id` decimal(10,0) DEFAULT NULL,
  `system_field` char(1) DEFAULT NULL,
  `required` varchar(1) DEFAULT NULL,
  `default_selection` varchar(255) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `people_desc_ind` USING BTREE (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `people_field_categories`
--

CREATE TABLE `people_field_categories` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) DEFAULT NULL,
  `sort_order` decimal(10,0) DEFAULT NULL,
  `include` varchar(100) DEFAULT NULL,
  `admin` char(1) DEFAULT NULL,
  `teacher` char(1) DEFAULT NULL,
  `parent` char(1) DEFAULT NULL,
  `none` char(1) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `people_field_categories`
--

INSERT INTO `people_field_categories` VALUES
(1, 'General Info', 1, NULL, 'Y', 'Y', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(2, 'Address Info', 2, NULL, 'Y', 'Y', 'Y', 'Y', '2015-07-28 11:26:33', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `portal_notes`
--

CREATE TABLE `portal_notes` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `school_id` decimal(10,0) DEFAULT NULL,
  `syear` decimal(4,0) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `content` longtext,
  `sort_order` decimal(10,0) DEFAULT NULL,
  `published_user` decimal(10,0) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `published_profiles` varchar(255) DEFAULT NULL,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `portal_notes`
--

INSERT INTO `portal_notes` VALUES
(1, NULL, 2017, 'Welcome note', 'Welcome to Peach Tree School !!!', 1, 1, '2018-01-23 11:28:28', '2017-10-02', '2018-06-30', ',all,0,1,2,3,4,5,', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `profile_exceptions`
--

CREATE TABLE `profile_exceptions` (
  `profile_id` decimal(10,0) DEFAULT NULL,
  `modname` varchar(255) DEFAULT NULL,
  `can_use` varchar(1) DEFAULT NULL,
  `can_edit` varchar(1) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `profile_exceptions`
--

INSERT INTO `profile_exceptions` VALUES
(2, 'students/Student.php&category_id=6', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'students/Student.php&category_id=7', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'students/Student.php&category_id=6', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'students/Student.php&category_id=6', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'users/User.php&category_id=5', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'schoolsetup/Schools.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'schoolsetup/Calendar.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'students/Student.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'students/Student.php&category_id=1', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'students/Student.php&category_id=3', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'students/ChangePassword.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'scheduling/ViewSchedule.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'scheduling/PrintSchedules.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'scheduling/Requests.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(3, 'grades/StudentGrades.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'grades/FinalGrades.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'grades/ReportCards.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'grades/Transcripts.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'grades/GPARankList.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'attendance/StudentSummary.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'attendance/DailySummary.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'eligibility/Student.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'eligibility/StudentList.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'schoolsetup/Schools.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'schoolsetup/MarkingPeriods.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'schoolsetup/Calendar.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'students/Student.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'students/AddUsers.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'students/AdvancedReport.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'students/StudentLabels.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'students/Student.php&category_id=1', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'students/Student.php&category_id=3', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'students/Student.php&category_id=4', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(2, 'users/User.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'schoolsetup/Rooms.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(2, 'grades/Grades.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'users/Preferences.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'scheduling/Schedule.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'scheduling/PrintSchedules.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'scheduling/PrintClassLists.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'scheduling/PrintClassPictures.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'grades/InputFinalGrades.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'grades/ReportCards.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'grades/Grades.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'grades/Assignments.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'grades/AnomalousGrades.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'grades/Configuration.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'grades/ProgressReports.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'grades/StudentGrades.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'grades/FinalGrades.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'grades/ReportCardGrades.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'grades/ReportCardComments.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'attendance/TakeAttendance.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'attendance/DailySummary.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'attendance/StudentSummary.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'eligibility/EnterEligibility.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'scheduling/ViewSchedule.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'attendance/StudentSummary.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'attendance/DailySummary.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'eligibility/Student.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'eligibility/StudentList.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'schoolsetup/Schools.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'schoolsetup/Calendar.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'students/Student.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'students/Student.php&category_id=1', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'students/Student.php&category_id=3', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(4, 'users/User.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'users/User.php&category_id=1', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(4, 'users/Preferences.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'scheduling/ViewSchedule.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'scheduling/Requests.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(4, 'grades/StudentGrades.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'grades/FinalGrades.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'grades/ReportCards.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'grades/Transcripts.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'grades/GPARankList.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'users/User.php&category_id=2', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(4, 'users/User.php&category_id=3', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'schoolsetup/Courses.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'schoolsetup/CourseCatalog.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'schoolsetup/PrintCatalog.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'schoolsetup/PrintAllCourses.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'students/Student.php&category_id=5', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(4, 'students/ChangePassword.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'scheduling/StudentScheduleReport.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'grades/ParentProgressReports.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'scheduling/StudentScheduleReport.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'Billing/Fee.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'Billing/Balance_Report.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'Billing/DailyTransactions.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'Billing/Fee.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'Billing/Balance_Report.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'Billing/DailyTransactions.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'schoolsetup/PortalNotes.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'schoolsetup/MarkingPeriods.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'schoolsetup/Calendar.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'schoolsetup/Periods.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'schoolsetup/GradeLevels.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'schoolsetup/Schools.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'schoolsetup/UploadLogo.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'schoolsetup/Schools.php?new_school=true', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'schoolsetup/CopySchool.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'schoolsetup/SystemPreference.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'schoolsetup/Courses.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'schoolsetup/CourseCatalog.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'schoolsetup/PrintCatalog.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'schoolsetup/PrintCatalogGradeLevel.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'schoolsetup/PrintAllCourses.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'schoolsetup/TeacherReassignment.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'students/Student.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'students/Student.php&include=GeneralInfoInc&student_id=new', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'students/AssignOtherInfo.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'students/AddUsers.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'students/AdvancedReport.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'students/AddDrop.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'students/Letters.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'students/MailingLabels.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'students/StudentLabels.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'students/PrintStudentInfo.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'students/PrintStudentContactInfo.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'students/GoalReport.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'students/StudentFields.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'students/EnrollmentCodes.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'students/Upload.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'students/Upload.php?modfunc=edit', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'students/Student.php&category_id=1', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'students/Student.php&category_id=2', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'students/Student.php&category_id=3', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'students/Student.php&category_id=4', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'students/Student.php&category_id=5', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'users/User.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'users/User.php&staff_id=new', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'users/AddStudents.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'users/Preferences.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'users/Profiles.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'users/Exceptions.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'users/UserFields.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'users/TeacherPrograms.php?include=grades/InputFinalGrades.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'users/TeacherPrograms.php?include=grades/Grades.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'users/TeacherPrograms.php?include=grades/ProgressReports.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'users/TeacherPrograms.php?include=attendance/TakeAttendance.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'users/TeacherPrograms.php?include=attendance/Missing_Attendance.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'users/TeacherPrograms.php?include=eligibility/EnterEligibility.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'users/User.php&category_id=1', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'users/User.php&category_id=2', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'scheduling/Schedule.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'scheduling/ViewSchedule.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'scheduling/Requests.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'scheduling/MassSchedule.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'scheduling/MassRequests.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'scheduling/MassDrops.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'scheduling/PrintSchedules.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'scheduling/PrintClassLists.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'scheduling/PrintClassPictures.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'scheduling/PrintRequests.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'scheduling/ScheduleReport.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'scheduling/RequestsReport.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'scheduling/UnfilledRequests.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'scheduling/IncompleteSchedules.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'scheduling/AddDrop.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'scheduling/Scheduler.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'grades/ReportCards.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'grades/CalcGPA.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'grades/Transcripts.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'grades/TeacherCompletion.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'grades/GradeBreakdown.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'grades/FinalGrades.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'grades/GPARankList.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'grades/AdminProgressReports.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'grades/HonorRoll.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'grades/ReportCardGrades.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'grades/ReportCardComments.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'grades/HonorRollSetup.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'grades/FixGPA.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'grades/EditReportCardGrades.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'grades/EditHistoryMarkingPeriods.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'attendance/Administration.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'attendance/AddAbsences.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'attendance/AttendanceData.php?list_by_day=true', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'attendance/Percent.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'attendance/Percent.php?list_by_day=true', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'attendance/DailySummary.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'attendance/StudentSummary.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'attendance/TeacherCompletion.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'attendance/FixDailyAttendance.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'attendance/DuplicateAttendance.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'attendance/AttendanceCodes.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'eligibility/Student.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'eligibility/AddActivity.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'eligibility/StudentList.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'eligibility/TeacherCompletion.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'eligibility/Activities.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'eligibility/EntryTimes.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(5, 'Billing/LedgerCard.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'Billing/Balance_Report.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'Billing/DailyTransactions.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'Billing/PaymentHistory.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'Billing/Fee.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'Billing/StudentPayments.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'Billing/MassAssignFees.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'Billing/MassAssignPayments.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'Billing/SetUp.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'Billing/SetUp_FeeType.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'Billing/SetUp_PayPal.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'tools/LogDetails.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'tools/DeleteLog.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'tools/Rollover.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(2, 'users/Staff.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(1, 'schoolsetup/SchoolCustomFields.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/Student.php&category_id=6', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/Student.php&category_id=7', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/User.php&category_id=5', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'schoolsetup/PortalNotes.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'schoolsetup/Schools.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'schoolsetup/Schools.php?new_school=true', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'schoolsetup/CopySchool.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'schoolsetup/MarkingPeriods.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'schoolsetup/Calendar.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'schoolsetup/Periods.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'schoolsetup/GradeLevels.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'schoolsetup/Rollover.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'schoolsetup/Courses.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'schoolsetup/CourseCatalog.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'schoolsetup/PrintCatalog.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'schoolsetup/PrintCatalogGradeLevel.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'schoolsetup/PrintAllCourses.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'schoolsetup/UploadLogo.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'schoolsetup/TeacherReassignment.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/Student.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/Student.php&include=GeneralInfoInc&student_id=new', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/AssignOtherInfo.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/AddUsers.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/AdvancedReport.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/AddDrop.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/Letters.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/MailingLabels.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/StudentLabels.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/PrintStudentInfo.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/PrintStudentContactInfo.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/GoalReport.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/StudentFields.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/AddressFields.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/PeopleFields.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/EnrollmentCodes.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/Upload.php?modfunc=edit', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/Upload.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/Student.php&category_id=1', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/Student.php&category_id=3', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/Student.php&category_id=2', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/Student.php&category_id=4', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/StudentReenroll.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/EnrollmentReport.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/User.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/User.php&category_id=1', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/User.php&category_id=2', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/User.php&staff_id=new', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/AddStudents.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/Preferences.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/Profiles.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/Exceptions.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/UserFields.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/TeacherPrograms.php?include=grades/InputFinalGrades.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/TeacherPrograms.php?include=grades/Grades.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/TeacherPrograms.php?include=attendance/TakeAttendance.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/TeacherPrograms.php?include=attendance/Missing_Attendance.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/TeacherPrograms.php?include=eligibility/EnterEligibility.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/UploadUserPhoto.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/UploadUserPhoto.php?modfunc=edit', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/UserAdvancedReport.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/UserAdvancedReportStaff.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'scheduling/Schedule.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'scheduling/Requests.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'scheduling/MassSchedule.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'scheduling/MassRequests.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'scheduling/MassDrops.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'scheduling/ScheduleReport.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'scheduling/RequestsReport.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'scheduling/UnfilledRequests.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'scheduling/IncompleteSchedules.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'scheduling/AddDrop.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'scheduling/PrintSchedules.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'scheduling/PrintRequests.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'scheduling/PrintClassLists.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'scheduling/PrintClassPictures.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'scheduling/Courses.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'scheduling/Scheduler.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'scheduling/ViewSchedule.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'grades/ReportCards.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'grades/CalcGPA.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'grades/Transcripts.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'grades/TeacherCompletion.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'grades/GradeBreakdown.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'grades/FinalGrades.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'grades/GPARankList.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'grades/ReportCardGrades.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'grades/ReportCardComments.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'grades/FixGPA.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'grades/EditReportCardGrades.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'grades/EditHistoryMarkingPeriods.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'grades/HistoricalReportCardGrades.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'attendance/Administration.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'attendance/AddAbsences.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'attendance/AttendanceData.php?list_by_day=true', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'attendance/Percent.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'attendance/Percent.php?list_by_day=true', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'attendance/DailySummary.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'attendance/StudentSummary.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'attendance/TeacherCompletion.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'attendance/DuplicateAttendance.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'attendance/AttendanceCodes.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'attendance/FixDailyAttendance.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'eligibility/Student.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'eligibility/AddActivity.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'eligibility/StudentList.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'eligibility/TeacherCompletion.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'eligibility/Activities.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'eligibility/EntryTimes.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'tools/LogDetails.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'tools/DeleteLog.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'schoolsetup/SchoolCustomFields.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'tools/Rollover.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/Upload.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/Upload.php?modfunc=edit', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'schoolsetup/SystemPreference.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'students/Student.php&category_id=5', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'grades/HonorRoll.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/TeacherPrograms.php?include=grades/ProgressReports.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/User.php&category_id=2', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'grades/HonorRollSetup.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'grades/AdminProgressReports.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'Billing/LedgerCard.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'Billing/Balance_Report.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'Billing/DailyTransactions.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'Billing/PaymentHistory.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'Billing/Fee.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'Billing/StudentPayments.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'Billing/MassAssignFees.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'Billing/MassAssignPayments.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'Billing/SetUp.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'Billing/SetUp_FeeType.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'Billing/SetUp_PayPal.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/Staff.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/Staff.php&staff_id=new', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/Exceptions_staff.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/StaffFields.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/Staff.php&category_id=1', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/Staff.php&category_id=2', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/Staff.php&category_id=3', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/Staff.php&category_id=4', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'messaging/Inbox.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'messaging/Compose.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'messaging/SentMail.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'messaging/Trash.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'messaging/Group.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(4, 'messaging/Inbox.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'messaging/Compose.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'messaging/SentMail.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'messaging/Trash.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(4, 'messaging/Group.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'messaging/Inbox.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'messaging/Compose.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'messaging/SentMail.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'messaging/Trash.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'messaging/Group.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'messaging/Inbox.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'messaging/Compose.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'messaging/SentMail.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'messaging/Trash.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(3, 'messaging/Group.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(0, 'students/Student.php&category_id=6', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/Student.php&category_id=7', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/User.php&category_id=5', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/PortalNotes.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/Schools.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/Schools.php?new_school=true', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/CopySchool.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/MarkingPeriods.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/Calendar.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/Periods.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/GradeLevels.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/Rollover.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/Courses.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/CourseCatalog.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/PrintCatalog.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/PrintCatalogGradeLevel.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/PrintAllCourses.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/UploadLogo.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/TeacherReassignment.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/Student.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/Student.php&include=GeneralInfoInc&student_id=new', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/AssignOtherInfo.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/AddUsers.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/AdvancedReport.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/AddDrop.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/Letters.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/MailingLabels.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/StudentLabels.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/PrintStudentInfo.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/PrintStudentContactInfo.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/GoalReport.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/StudentFields.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/AddressFields.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/PeopleFields.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/EnrollmentCodes.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/Upload.php?modfunc=edit', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/Upload.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/Student.php&category_id=1', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/Student.php&category_id=3', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/Student.php&category_id=2', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/Student.php&category_id=4', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/StudentReenroll.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/EnrollmentReport.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/User.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/User.php&category_id=1', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/User.php&category_id=2', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/User.php&staff_id=new', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/AddStudents.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/Preferences.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/Profiles.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/Exceptions.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/UserFields.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/TeacherPrograms.php?include=grades/InputFinalGrades.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/TeacherPrograms.php?include=grades/Grades.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/TeacherPrograms.php?include=attendance/TakeAttendance.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/TeacherPrograms.php?include=attendance/Missing_Attendance.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/TeacherPrograms.php?include=eligibility/EnterEligibility.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/UploadUserPhoto.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/UploadUserPhoto.php?modfunc=edit', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/UserAdvancedReport.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/UserAdvancedReportStaff.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'scheduling/Schedule.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'scheduling/Requests.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'scheduling/MassSchedule.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'scheduling/MassRequests.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'scheduling/MassDrops.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'scheduling/ScheduleReport.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'scheduling/RequestsReport.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'scheduling/UnfilledRequests.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'scheduling/IncompleteSchedules.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'scheduling/AddDrop.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'scheduling/PrintSchedules.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'scheduling/PrintRequests.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'scheduling/PrintClassLists.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'scheduling/PrintClassPictures.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'scheduling/Courses.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'scheduling/Scheduler.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'scheduling/ViewSchedule.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'grades/ReportCards.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'grades/CalcGPA.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'grades/Transcripts.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'grades/TeacherCompletion.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'grades/GradeBreakdown.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'grades/FinalGrades.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'grades/GPARankList.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'grades/ReportCardGrades.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'grades/ReportCardComments.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'grades/FixGPA.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'grades/EditReportCardGrades.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'grades/EditHistoryMarkingPeriods.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'grades/HistoricalReportCardGrades.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'attendance/Administration.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'attendance/AddAbsences.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'attendance/AttendanceData.php?list_by_day=true', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'attendance/Percent.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'attendance/Percent.php?list_by_day=true', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'attendance/DailySummary.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'attendance/StudentSummary.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'attendance/TeacherCompletion.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'attendance/DuplicateAttendance.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'attendance/AttendanceCodes.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'attendance/FixDailyAttendance.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'eligibility/Student.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'eligibility/AddActivity.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'eligibility/StudentList.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'eligibility/TeacherCompletion.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'eligibility/Activities.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'eligibility/EntryTimes.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'tools/LogDetails.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'tools/DeleteLog.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'tools/Backup.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'tools/Rollover.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/Upload.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/Upload.php?modfunc=edit', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/SystemPreference.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'students/Student.php&category_id=5', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'grades/HonorRoll.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/TeacherPrograms.php?include=grades/ProgressReports.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/User.php&category_id=2', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'grades/HonorRollSetup.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'grades/AdminProgressReports.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'Billing/LedgerCard.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'Billing/Balance_Report.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'Billing/DailyTransactions.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'Billing/PaymentHistory.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'Billing/Fee.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'Billing/StudentPayments.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'Billing/MassAssignFees.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'Billing/MassAssignPayments.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'Billing/SetUp.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'Billing/SetUp_FeeType.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'Billing/SetUp_PayPal.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/Staff.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/Staff.php&staff_id=new', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/Exceptions_staff.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/StaffFields.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/Staff.php&category_id=1', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/Staff.php&category_id=2', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/Staff.php&category_id=3', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/Staff.php&category_id=4', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/SchoolCustomFields.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'messaging/Inbox.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'messaging/Compose.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'messaging/SentMail.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'messaging/Trash.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'messaging/Group.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/Rooms.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/school_specific_standards.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/TeacherPrograms.php?include=grades/AdminProgressReports.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'tools/Reports.php?func=Basic', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'tools/Reports.php?func=Ins_r', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'tools/Reports.php?func=Ins_cf', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/us_common_standards.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/EffortGradeLibrary.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'grades/EffortGradeSetup.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(4, 'scheduling/PrintSchedules.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(0, 'users/TeacherPrograms.php?include=attendance/MissingAttendance.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(0, 'users/Staff.php&category_id=5', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'schoolsetup/Rooms.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/TeacherPrograms.php?include=attendance/MissingAttendance.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(1, 'users/Staff.php&category_id=5', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'students/EnrollmentReport.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'users/TeacherPrograms.php?include=attendance/MissingAttendance.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'messaging/Inbox.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'messaging/Compose.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'messaging/SentMail.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'messaging/Trash.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'messaging/Group.php', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(2, 'users/Staff.php&category_id=1', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(2, 'users/Staff.php&category_id=2', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(2, 'users/Staff.php&category_id=3', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(2, 'users/Staff.php&category_id=4', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(2, 'users/Staff.php&category_id=5', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(4, 'grades/ParentProgressReports.php', 'Y', NULL, '2015-07-28 11:26:33', NULL),
(0, 'schoolsetup/Sections.php', 'Y', 'Y', '2017-07-25 17:53:00', NULL),
(1, 'schoolsetup/Sections.php', 'Y', 'Y', '2017-07-25 17:53:25', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `program_config`
--

CREATE TABLE `program_config` (
  `syear` decimal(4,0) DEFAULT NULL,
  `school_id` decimal(10,0) DEFAULT NULL,
  `program` varchar(255) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `value` varchar(100) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  KEY `program_config_ind1` USING BTREE (`program`,`school_id`,`syear`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `program_config`
--

INSERT INTO `program_config` VALUES
(2015, NULL, 'Currency', 'US Dollar (USD)', '1', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'British Pound (GBP)', '2', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Euro (EUR)', '3', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Canadian Dollar (CAD)', '4', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Australian Dollar (AUD)', '5', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Brazilian Real (BRL)', '6', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Chinese Yuan Renminbi (CNY)', '7', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Danish Krone (DKK)', '8', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Japanese Yen (JPY)', '9', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Indian Rupee (INR)', '10', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Indonesian Rupiah (IDR)', '11', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Korean Won  (KRW)', '12', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Malaysian Ringit (MYR)', '13', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Mexican Peso (MXN)', '14', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'New Zealand Dollar (NZD)', '15', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Norwegian Krone  (NOK)', '16', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Pakistan Rupee  (PKR)', '17', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Philippino Peso (PHP)', '18', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Saudi Riyal (SAR)', '19', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Singapore Dollar (SGD)', '20', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'South African Rand  (ZAR)', '21', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Swedish Krona  (SEK)', '22', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Swiss Franc  (CHF)', '23', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Thai Bhat  (THB)', '24', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'Turkish Lira  (TRY)', '25', '2015-07-28 11:26:33', NULL),
(2015, NULL, 'Currency', 'United Arab Emirates Dirham (AED)', '26', '2015-07-28 11:26:33', NULL),
(2015, 1, 'MissingAttendance', 'LAST_UPDATE', '2018-02-02', '2015-07-28 11:26:33', NULL),
(2015, 1, 'eligibility', 'START_DAY', '1', '2015-07-28 11:26:33', NULL),
(2015, 1, 'eligibility', 'START_HOUR', '8', '2015-07-28 11:26:33', NULL),
(2015, 1, 'eligibility', 'START_MINUTE', '00', '2015-07-28 11:26:33', NULL),
(2015, 1, 'eligibility', 'START_M', 'AM', '2015-07-28 11:26:33', NULL),
(2015, 1, 'eligibility', 'END_DAY', '5', '2015-07-28 11:26:33', NULL),
(2015, 1, 'eligibility', 'END_HOUR', '16', '2015-07-28 11:26:33', NULL),
(2015, 1, 'eligibility', 'END_MINUTE', '00', '2015-07-28 11:26:33', NULL),
(2015, 1, 'eligibility', 'END_M', 'PM', '2015-07-28 11:26:33', NULL),
(2015, 1, 'UPDATENOTIFY', 'display', 'Y', '2016-05-14 14:56:51', NULL),
(2015, 1, 'UPDATENOTIFY', 'display_school', 'Y', '2016-05-14 14:56:51', NULL),
(2015, 1, 'SeatFill', 'LAST_UPDATE', '2017-07-14', '2015-07-28 11:26:33', NULL),
(2016, 1, 'eligibility', 'START_DAY', '1', '2017-07-14 18:30:31', NULL),
(2016, 1, 'eligibility', 'START_HOUR', '8', '2017-07-14 18:30:31', NULL),
(2016, 1, 'eligibility', 'START_MINUTE', '00', '2017-07-14 18:30:31', NULL),
(2016, 1, 'eligibility', 'START_M', 'AM', '2017-07-14 18:30:31', NULL),
(2016, 1, 'eligibility', 'END_DAY', '5', '2017-07-14 18:30:31', NULL),
(2016, 1, 'eligibility', 'END_HOUR', '16', '2017-07-14 18:30:31', NULL),
(2016, 1, 'eligibility', 'END_MINUTE', '00', '2017-07-14 18:30:31', NULL),
(2016, 1, 'eligibility', 'END_M', 'PM', '2017-07-14 18:30:31', NULL),
(2017, 1, 'MissingAttendance', 'LAST_UPDATE', '2018-02-02', '2018-01-22 04:18:02', NULL),
(2017, 1, 'eligibility', 'START_DAY', '1', '2018-01-22 04:18:02', NULL),
(2017, 1, 'eligibility', 'START_HOUR', '8', '2018-01-22 04:18:02', NULL),
(2017, 1, 'eligibility', 'START_MINUTE', '00', '2018-01-22 04:18:02', NULL),
(2017, 1, 'eligibility', 'START_M', 'AM', '2018-01-22 04:18:02', NULL),
(2017, 1, 'eligibility', 'END_DAY', '5', '2018-01-22 04:18:02', NULL),
(2017, 1, 'eligibility', 'END_HOUR', '16', '2018-01-22 04:18:02', NULL),
(2017, 1, 'eligibility', 'END_MINUTE', '00', '2018-01-22 04:18:02', NULL),
(2017, 1, 'eligibility', 'END_M', 'PM', '2018-01-22 04:18:02', NULL),
(2017, 1, 'UPDATENOTIFY', 'display', 'Y', '2018-01-22 04:18:02', NULL),
(2017, 1, 'UPDATENOTIFY', 'display_school', 'Y', '2018-01-22 04:18:02', NULL),
(2017, 1, 'SeatFill', 'LAST_UPDATE', '2018-02-02', '2018-01-22 04:18:02', NULL),
([[beg_year]], 2, 'MissingAttendance', 'LAST_UPDATE', '2015-06-01', '[[regtime]]', NULL),
([[beg_year]], 2, 'eligibility', 'START_DAY', '1', '[[regtime]]', NULL),
([[beg_year]], 2, 'eligibility', 'START_HOUR', '8', '[[regtime]]', NULL),
([[beg_year]], 2, 'eligibility', 'START_MINUTE', '00', '[[regtime]]', NULL),
([[beg_year]], 2, 'eligibility', 'START_M', 'AM', '[[regtime]]', NULL),
([[beg_year]], 2, 'eligibility', 'END_DAY', '5', '[[regtime]]', NULL),
([[beg_year]], 2, 'eligibility', 'END_HOUR', '16', '[[regtime]]', NULL),
([[beg_year]], 2, 'eligibility', 'END_MINUTE', '00', '[[regtime]]', NULL),
([[beg_year]], 2, 'eligibility', 'END_M', 'PM', '[[regtime]]', NULL),
([[beg_year]], 2, 'UPDATENOTIFY', 'display', 'Y', '[[regtime]]', NULL),
([[beg_year]], 2, 'UPDATENOTIFY', 'display_school', 'Y', '[[regtime]]', NULL),
([[beg_year]], 2, 'SeatFill', 'LAST_UPDATE', '[[Beg_date]]', '[[regtime]]', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `program_user_config`
--

CREATE TABLE `program_user_config` (
  `user_id` decimal(10,0) NOT NULL,
  `school_id` decimal(10,0) DEFAULT NULL,
  `program` varchar(255) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `value` varchar(100) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  KEY `program_user_config_ind1` USING BTREE (`user_id`,`program`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `program_user_config`
--

INSERT INTO `program_user_config` VALUES
(1, NULL, 'Preferences', 'THEME', 'blue', '2015-07-28 05:56:33', NULL),
(1, NULL, 'Preferences', 'MONTH', 'M', '2015-07-28 05:56:33', NULL),
(1, NULL, 'Preferences', 'DAY', 'j', '2015-07-28 05:56:33', NULL),
(1, NULL, 'Preferences', 'YEAR', 'Y', '2015-07-28 05:56:33', NULL),
(1, NULL, 'Preferences', 'HIDDEN', 'Y', '2015-07-28 05:56:33', NULL),
(1, NULL, 'Preferences', 'CURRENCY', '1', '2015-07-28 05:56:33', NULL),
(1, NULL, 'Preferences', 'HIDE_ALERTS', 'N', '2015-07-28 05:56:33', NULL),
(3, 1, 'Gradebook', 'ASSIGNMENT_SORTING', 'ASSIGNMENT_ID_2', '2018-01-23 12:31:34', NULL),
(3, 1, 'Gradebook', 'ANOMALOUS_MAX', '100_2', '2018-01-23 12:31:34', NULL),
(3, 1, 'Gradebook', 'LATENCY', '0_2', '2018-01-23 12:31:34', NULL),
(3, 1, 'Gradebook', '2-1', '85_2', '2018-01-23 12:31:34', NULL),
(3, 1, 'Gradebook', '2-2', '75_2', '2018-01-23 12:31:34', NULL),
(3, 1, 'Gradebook', '2-3', '65_2', '2018-01-23 12:31:34', NULL),
(3, 1, 'Gradebook', '2-4', '55_2', '2018-01-23 12:31:34', NULL),
(3, 1, 'Gradebook', '2-5', '40_2', '2018-01-23 12:31:34', NULL),
(3, 1, 'Gradebook', '2-6', '0_2', '2018-01-23 12:31:34', NULL),
(3, 1, 'Gradebook', '6-1', '85_2', '2018-01-23 12:31:34', NULL),
(3, 1, 'Gradebook', '6-2', '75_2', '2018-01-23 12:31:34', NULL),
(3, 1, 'Gradebook', '6-3', '65_2', '2018-01-23 12:31:34', NULL),
(3, 1, 'Gradebook', '6-4', '50_2', '2018-01-23 12:31:34', NULL),
(3, 1, 'Gradebook', '6-5', '40_2', '2018-01-23 12:31:34', NULL),
(3, 1, 'Gradebook', '6-6', '0_2', '2018-01-23 12:31:35', NULL),
(3, 1, 'Gradebook', 'SEM-15', '50_2', '2018-01-23 12:31:35', NULL),
(3, 1, 'Gradebook', 'SEM-16', '50_2', '2018-01-23 12:31:35', NULL),
(3, 1, 'Gradebook', 'SEM-17', '65_2', '2018-01-23 12:31:35', NULL),
(3, 1, 'Gradebook', 'SEM-18', '35_2', '2018-01-23 12:31:35', NULL),
(3, 1, 'Gradebook', 'ASSIGNMENT_SORTING', 'ASSIGNMENT_ID_6', '2018-01-23 12:48:29', NULL),
(3, 1, 'Gradebook', 'ANOMALOUS_MAX', '100_6', '2018-01-23 12:48:29', NULL),
(3, 1, 'Gradebook', 'LATENCY', '0_6', '2018-01-23 12:48:29', NULL),
(3, 1, 'Gradebook', '6-1', '85_6', '2018-01-23 12:48:29', NULL),
(3, 1, 'Gradebook', '6-2', '75_6', '2018-01-23 12:48:29', NULL),
(3, 1, 'Gradebook', '6-3', '65_6', '2018-01-23 12:48:30', NULL),
(3, 1, 'Gradebook', '6-4', '55_6', '2018-01-23 12:48:30', NULL),
(3, 1, 'Gradebook', '6-5', '40_6', '2018-01-23 12:48:30', NULL),
(3, 1, 'Gradebook', '6-6', '0_6', '2018-01-23 12:48:30', NULL),
(3, 1, 'Gradebook', 'ASSIGNMENT_SORTING', 'ASSIGNMENT_ID_8', '2018-01-23 12:54:52', NULL),
(3, 1, 'Gradebook', 'ANOMALOUS_MAX', '100_8', '2018-01-23 12:54:52', NULL),
(3, 1, 'Gradebook', 'LATENCY', '0_8', '2018-01-23 12:54:52', NULL),
(3, 1, 'Gradebook', 'SEM-15', '45_8', '2018-01-23 12:54:52', NULL),
(3, 1, 'Gradebook', 'SEM-16', '55_8', '2018-01-23 12:54:52', NULL),
(3, 1, 'Gradebook', 'SEM-17', '50_8', '2018-01-23 12:54:53', NULL),
(3, 1, 'Gradebook', 'SEM-18', '50_8', '2018-01-23 12:54:53', NULL),
(3, 1, 'Gradebook', 'ASSIGNMENT_SORTING', 'ASSIGNMENT_ID_1', '2018-01-23 16:34:20', NULL),
(3, 1, 'Gradebook', 'ANOMALOUS_MAX', '100_1', '2018-01-23 16:34:20', NULL),
(3, 1, 'Gradebook', 'LATENCY', '0_1', '2018-01-23 16:34:21', NULL),
(3, 1, 'Gradebook', 'FY-12', '40_1', '2018-01-23 16:34:21', NULL),
(3, 1, 'Gradebook', 'FY-13', '40_1', '2018-01-23 16:34:21', NULL),
(3, 1, 'Gradebook', 'FY-14', '20_1', '2018-01-23 16:34:21', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `report_card_comments`
--

CREATE TABLE `report_card_comments` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `syear` decimal(4,0) DEFAULT NULL,
  `school_id` decimal(10,0) DEFAULT NULL,
  `course_id` decimal(10,0) DEFAULT NULL,
  `sort_order` decimal(10,0) DEFAULT NULL,
  `title` text,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `report_card_comments_ind1` USING BTREE (`syear`,`school_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `report_card_grades`
--

CREATE TABLE `report_card_grades` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `syear` decimal(4,0) DEFAULT NULL,
  `school_id` decimal(10,0) DEFAULT NULL,
  `title` varchar(15) DEFAULT NULL,
  `sort_order` decimal(10,0) DEFAULT NULL,
  `gpa_value` decimal(4,2) DEFAULT NULL,
  `break_off` decimal(10,0) DEFAULT NULL,
  `comment` longtext,
  `grade_scale_id` decimal(10,0) DEFAULT NULL,
  `unweighted_gp` decimal(4,2) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `report_card_grades_ind1` USING BTREE (`syear`,`school_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;

--
-- Dumping data for table `report_card_grades`
--

INSERT INTO `report_card_grades` VALUES
(1, 2017, 1, 'A', 1, 4.00, 90, NULL, 1, 3.00, '2018-01-23 12:28:38', NULL),
(2, 2017, 1, 'B', 2, 3.00, 80, NULL, 1, 2.00, '2018-01-23 12:28:45', NULL),
(3, 2017, 1, 'C', 3, 2.00, 70, NULL, 1, 1.00, '2018-01-23 12:29:04', NULL),
(4, 2017, 1, 'D', 4, 1.00, 60, NULL, 1, 1.00, '2018-01-23 12:29:16', NULL),
(5, 2017, 1, 'F', 5, 0.00, 20, NULL, 1, 0.00, '2018-01-23 12:29:47', NULL),
(6, 2017, 1, 'Inc.', 6, 0.00, 0, NULL, 1, 0.00, '2018-01-23 12:30:01', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `report_card_grade_scales`
--

CREATE TABLE `report_card_grade_scales` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `syear` decimal(4,0) DEFAULT NULL,
  `school_id` decimal(10,0) NOT NULL,
  `title` varchar(25) DEFAULT NULL,
  `comment` varchar(100) DEFAULT NULL,
  `sort_order` decimal(10,0) DEFAULT NULL,
  `rollover_id` decimal(10,0) DEFAULT NULL,
  `gp_scale` decimal(10,3) DEFAULT NULL,
  `gpa_cal` enum('Y','N') NOT NULL DEFAULT 'Y',
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `report_card_grade_scales`
--

INSERT INTO `report_card_grade_scales` VALUES
(1, 2017, 1, 'Main', NULL, 1, NULL, 4.000, 'Y', '2018-01-22 05:01:12', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `rooms`
--

CREATE TABLE `rooms` (
  `room_id` int(11) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `title` varchar(50) NOT NULL,
  `capacity` int(11) DEFAULT NULL,
  `description` text,
  `sort_order` int(11) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`room_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

--
-- Dumping data for table `rooms`
--

INSERT INTO `rooms` VALUES
(1, 1, 'Room 1 ', 50, 'Large Room ', 1, '2018-01-22 04:44:17', NULL),
(2, 1, 'Room 2 ', 50, ' ', 2, '2018-01-22 04:44:31', NULL),
(3, 1, 'Room 3 ', 50, ' ', 3, '2018-01-22 04:44:43', NULL),
(4, 1, 'Room 4 ', 50, ' ', 4, '2018-01-22 04:44:53', NULL),
(5, 1, 'Room 5 ', 30, 'Medium Class room ', 5, '2018-01-23 13:57:01', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `schedule`
--

CREATE TABLE `schedule` (
  `syear` decimal(4,0) NOT NULL,
  `school_id` decimal(10,0) DEFAULT NULL,
  `student_id` decimal(10,0) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date DEFAULT NULL,
  `modified_date` date DEFAULT NULL,
  `modified_by` varchar(255) DEFAULT NULL,
  `course_id` decimal(10,0) NOT NULL,
  `course_weight` varchar(10) DEFAULT NULL,
  `course_period_id` decimal(10,0) NOT NULL,
  `mp` varchar(3) DEFAULT NULL,
  `marking_period_id` int(11) DEFAULT NULL,
  `scheduler_lock` varchar(1) DEFAULT NULL,
  `dropped` varchar(1) DEFAULT 'N',
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `schedule_ind1` USING BTREE (`course_id`,`course_weight`),
  KEY `schedule_ind2` USING BTREE (`course_period_id`),
  KEY `schedule_ind3` USING BTREE (`student_id`,`marking_period_id`,`start_date`,`end_date`),
  KEY `schedule_ind4` USING BTREE (`syear`,`school_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=61 ;

--
-- Dumping data for table `schedule`
--

INSERT INTO `schedule` VALUES
(2017, 1, 1, '2017-11-01', '2018-06-30', '2018-01-23', '1', 1, NULL, 1, 'FY', 1, NULL, 'N', 1, '2018-01-23 11:18:10', NULL),
(2017, 1, 2, '2017-11-01', '2018-06-30', '2018-01-23', '1', 1, NULL, 1, 'FY', 1, NULL, 'N', 2, '2018-01-23 11:18:10', NULL),
(2017, 1, 9, '2017-11-01', '2018-06-30', '2018-01-23', '1', 1, NULL, 1, 'FY', 1, NULL, 'N', 3, '2018-01-23 11:18:10', NULL),
(2017, 1, 8, '2017-11-01', '2018-06-30', '2018-01-23', '1', 1, NULL, 1, 'FY', 1, NULL, 'N', 4, '2018-01-23 11:18:10', NULL),
(2017, 1, 5, '2017-11-01', '2018-06-30', '2018-01-23', '1', 1, NULL, 1, 'FY', 1, NULL, 'N', 5, '2018-01-23 11:18:10', NULL),
(2017, 1, 3, '2017-11-01', '2018-06-30', '2018-01-23', '1', 1, NULL, 1, 'FY', 1, NULL, 'N', 6, '2018-01-23 11:18:11', NULL),
(2017, 1, 4, '2017-11-01', '2018-06-30', '2018-01-23', '1', 1, NULL, 1, 'FY', 1, NULL, 'N', 7, '2018-01-23 11:18:11', NULL),
(2017, 1, 7, '2017-11-01', '2018-06-30', '2018-01-23', '1', 1, NULL, 1, 'FY', 1, NULL, 'N', 8, '2018-01-23 11:18:11', NULL),
(2017, 1, 10, '2017-11-01', '2018-06-30', '2018-01-23', '1', 1, NULL, 1, 'FY', 1, NULL, 'N', 9, '2018-01-23 11:18:11', NULL),
(2017, 1, 6, '2017-11-01', '2018-06-30', '2018-01-23', '1', 1, NULL, 1, 'FY', 1, NULL, 'N', 10, '2018-01-23 11:18:11', NULL),
(2017, 1, 1, '2017-12-16', '2018-01-31', '2018-01-23', '1', 2, NULL, 3, 'QTR', 17, NULL, 'N', 11, '2018-01-23 11:19:11', NULL),
(2017, 1, 2, '2017-12-16', '2018-01-31', '2018-01-23', '1', 2, NULL, 3, 'QTR', 17, NULL, 'N', 12, '2018-01-23 11:19:11', NULL),
(2017, 1, 9, '2017-12-16', '2018-01-31', '2018-01-23', '1', 2, NULL, 3, 'QTR', 17, NULL, 'N', 13, '2018-01-23 11:19:11', NULL),
(2017, 1, 8, '2017-12-16', '2018-01-31', '2018-01-23', '1', 2, NULL, 3, 'QTR', 17, NULL, 'N', 14, '2018-01-23 11:19:11', NULL),
(2017, 1, 5, '2017-12-16', '2018-01-31', '2018-01-23', '1', 2, NULL, 3, 'QTR', 17, NULL, 'N', 15, '2018-01-23 11:19:11', NULL),
(2017, 1, 3, '2017-12-16', '2018-01-31', '2018-01-23', '1', 2, NULL, 3, 'QTR', 17, NULL, 'N', 16, '2018-01-23 11:19:11', NULL),
(2017, 1, 4, '2017-12-16', '2018-01-31', '2018-01-23', '1', 2, NULL, 3, 'QTR', 17, NULL, 'N', 17, '2018-01-23 11:19:12', NULL),
(2017, 1, 7, '2017-12-16', '2018-01-31', '2018-01-23', '1', 2, NULL, 3, 'QTR', 17, NULL, 'N', 18, '2018-01-23 11:19:12', NULL),
(2017, 1, 10, '2017-12-16', '2018-01-31', '2018-01-23', '1', 2, NULL, 3, 'QTR', 17, NULL, 'N', 19, '2018-01-23 11:19:12', NULL),
(2017, 1, 6, '2017-12-16', '2018-01-31', '2018-01-23', '1', 2, NULL, 3, 'QTR', 17, NULL, 'N', 20, '2018-01-23 11:19:12', NULL),
(2017, 1, 1, '2017-12-16', '2018-04-30', '2018-01-23', '1', 2, NULL, 2, 'SEM', 13, NULL, 'N', 21, '2018-01-23 11:19:55', NULL),
(2017, 1, 2, '2017-12-16', '2018-04-30', '2018-01-23', '1', 2, NULL, 2, 'SEM', 13, NULL, 'N', 22, '2018-01-23 11:19:55', NULL),
(2017, 1, 9, '2017-12-16', '2018-04-30', '2018-01-23', '1', 2, NULL, 2, 'SEM', 13, NULL, 'N', 23, '2018-01-23 11:19:55', NULL),
(2017, 1, 8, '2017-12-16', '2018-04-30', '2018-01-23', '1', 2, NULL, 2, 'SEM', 13, NULL, 'N', 24, '2018-01-23 11:19:55', NULL),
(2017, 1, 5, '2017-12-16', '2018-04-30', '2018-01-23', '1', 2, NULL, 2, 'SEM', 13, NULL, 'N', 25, '2018-01-23 11:19:56', NULL),
(2017, 1, 3, '2017-12-16', '2018-04-30', '2018-01-23', '1', 2, NULL, 2, 'SEM', 13, NULL, 'N', 26, '2018-01-23 11:19:56', NULL),
(2017, 1, 4, '2017-12-16', '2018-04-30', '2018-01-23', '1', 2, NULL, 2, 'SEM', 13, NULL, 'N', 27, '2018-01-23 11:19:56', NULL),
(2017, 1, 7, '2017-12-16', '2018-04-30', '2018-01-23', '1', 2, NULL, 2, 'SEM', 13, NULL, 'N', 28, '2018-01-23 11:19:56', NULL),
(2017, 1, 10, '2017-12-16', '2018-04-30', '2018-01-23', '1', 2, NULL, 2, 'SEM', 13, NULL, 'N', 29, '2018-01-23 11:19:56', NULL),
(2017, 1, 6, '2017-12-16', '2018-04-30', '2018-01-23', '1', 2, NULL, 2, 'SEM', 13, NULL, 'N', 30, '2018-01-23 11:19:56', NULL),
(2017, 1, 1, '2017-07-03', '2018-06-30', '2018-01-23', '1', 2, NULL, 8, 'FY', 1, NULL, 'N', 31, '2018-01-23 11:20:24', NULL),
(2017, 1, 2, '2017-07-03', '2018-06-30', '2018-01-23', '1', 2, NULL, 8, 'FY', 1, NULL, 'N', 32, '2018-01-23 11:20:24', NULL),
(2017, 1, 9, '2017-07-03', '2018-06-30', '2018-01-23', '1', 2, NULL, 8, 'FY', 1, NULL, 'N', 33, '2018-01-23 11:20:24', NULL),
(2017, 1, 8, '2017-07-03', '2018-06-30', '2018-01-23', '1', 2, NULL, 8, 'FY', 1, NULL, 'N', 34, '2018-01-23 11:20:24', NULL),
(2017, 1, 5, '2017-07-03', '2018-06-30', '2018-01-23', '1', 2, NULL, 8, 'FY', 1, NULL, 'N', 35, '2018-01-23 11:20:24', NULL),
(2017, 1, 3, '2017-07-03', '2018-06-30', '2018-01-23', '1', 2, NULL, 8, 'FY', 1, NULL, 'N', 36, '2018-01-23 11:20:24', NULL),
(2017, 1, 4, '2017-07-03', '2018-06-30', '2018-01-23', '1', 2, NULL, 8, 'FY', 1, NULL, 'N', 37, '2018-01-23 11:20:24', NULL),
(2017, 1, 7, '2017-07-03', '2018-06-30', '2018-01-23', '1', 2, NULL, 8, 'FY', 1, NULL, 'N', 38, '2018-01-23 11:20:25', NULL),
(2017, 1, 10, '2017-07-03', '2018-06-30', '2018-01-23', '1', 2, NULL, 8, 'FY', 1, NULL, 'N', 39, '2018-01-23 11:20:25', NULL),
(2017, 1, 6, '2017-07-03', '2018-06-30', '2018-01-23', '1', 2, NULL, 8, 'FY', 1, NULL, 'N', 40, '2018-01-23 11:20:25', NULL),
(2017, 1, 1, '2017-12-16', '2018-01-31', '2018-01-23', '1', 3, NULL, 4, 'QTR', 17, NULL, 'N', 41, '2018-01-23 11:20:44', NULL),
(2017, 1, 2, '2017-12-16', '2018-01-31', '2018-01-23', '1', 3, NULL, 4, 'QTR', 17, NULL, 'N', 42, '2018-01-23 11:20:44', NULL),
(2017, 1, 9, '2017-12-16', '2018-01-31', '2018-01-23', '1', 3, NULL, 4, 'QTR', 17, NULL, 'N', 43, '2018-01-23 11:20:44', NULL),
(2017, 1, 8, '2017-12-16', '2018-01-31', '2018-01-23', '1', 3, NULL, 4, 'QTR', 17, NULL, 'N', 44, '2018-01-23 11:20:44', NULL),
(2017, 1, 5, '2017-12-16', '2018-01-31', '2018-01-23', '1', 3, NULL, 4, 'QTR', 17, NULL, 'N', 45, '2018-01-23 11:20:44', NULL),
(2017, 1, 3, '2017-12-16', '2018-01-31', '2018-01-23', '1', 3, NULL, 4, 'QTR', 17, NULL, 'N', 46, '2018-01-23 11:20:44', NULL),
(2017, 1, 4, '2017-12-16', '2018-01-31', '2018-01-23', '1', 3, NULL, 4, 'QTR', 17, NULL, 'N', 47, '2018-01-23 11:20:45', NULL),
(2017, 1, 7, '2017-12-16', '2018-01-31', '2018-01-23', '1', 3, NULL, 4, 'QTR', 17, NULL, 'N', 48, '2018-01-23 11:20:45', NULL),
(2017, 1, 10, '2017-12-16', '2018-01-31', '2018-01-23', '1', 3, NULL, 4, 'QTR', 17, NULL, 'N', 49, '2018-01-23 11:20:45', NULL),
(2017, 1, 6, '2017-12-16', '2018-01-31', '2018-01-23', '1', 3, NULL, 4, 'QTR', 17, NULL, 'N', 50, '2018-01-23 11:20:45', NULL),
(2017, 1, 1, '2018-01-01', '2018-02-28', '2018-01-23', '1', 5, NULL, 6, 'FY', 1, NULL, 'N', 51, '2018-01-23 11:21:05', NULL),
(2017, 1, 2, '2018-01-01', '2018-02-28', '2018-01-23', '1', 5, NULL, 6, 'FY', 1, NULL, 'N', 52, '2018-01-23 11:21:05', NULL),
(2017, 1, 9, '2018-01-01', '2018-02-28', '2018-01-23', '1', 5, NULL, 6, 'FY', 1, NULL, 'N', 53, '2018-01-23 11:21:05', NULL),
(2017, 1, 8, '2018-01-01', '2018-02-28', '2018-01-23', '1', 5, NULL, 6, 'FY', 1, NULL, 'N', 54, '2018-01-23 11:21:05', NULL),
(2017, 1, 5, '2018-01-01', '2018-02-28', '2018-01-23', '1', 5, NULL, 6, 'FY', 1, NULL, 'N', 55, '2018-01-23 11:21:05', NULL),
(2017, 1, 3, '2018-01-01', '2018-02-28', '2018-01-23', '1', 5, NULL, 6, 'FY', 1, NULL, 'N', 56, '2018-01-23 11:21:05', NULL),
(2017, 1, 4, '2018-01-01', '2018-02-28', '2018-01-23', '1', 5, NULL, 6, 'FY', 1, NULL, 'N', 57, '2018-01-23 11:21:05', NULL),
(2017, 1, 7, '2018-01-01', '2018-02-28', '2018-01-23', '1', 5, NULL, 6, 'FY', 1, NULL, 'N', 58, '2018-01-23 11:21:06', NULL),
(2017, 1, 10, '2018-01-01', '2018-02-28', '2018-01-23', '1', 5, NULL, 6, 'FY', 1, NULL, 'N', 59, '2018-01-23 11:21:06', NULL),
(2017, 1, 6, '2018-01-01', '2018-02-28', '2018-01-23', '1', 5, NULL, 6, 'FY', 1, NULL, 'N', 60, '2018-01-23 11:21:06', NULL);

--
-- Triggers `schedule`
--
DROP TRIGGER IF EXISTS `td_schedule`;
DELIMITER //
CREATE TRIGGER `td_schedule` AFTER DELETE ON `schedule`
 FOR EACH ROW BEGIN
         UPDATE course_periods SET filled_seats=filled_seats-1 WHERE course_period_id=OLD.course_period_id AND OLD.dropped='N';
 	CALL ATTENDANCE_CALC(OLD.course_period_id);
 END
//
DELIMITER ;
DROP TRIGGER IF EXISTS `ti_schdule`;
DELIMITER //
CREATE TRIGGER `ti_schdule` AFTER INSERT ON `schedule`
 FOR EACH ROW BEGIN
         UPDATE course_periods SET filled_seats=filled_seats+1 WHERE course_period_id=NEW.course_period_id;
 	CALL ATTENDANCE_CALC(NEW.course_period_id);
 END
//
DELIMITER ;
DROP TRIGGER IF EXISTS `tu_schedule`;
DELIMITER //
CREATE TRIGGER `tu_schedule` AFTER UPDATE ON `schedule`
 FOR EACH ROW CALL ATTENDANCE_CALC(NEW.course_period_id)
//
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `schedule_requests`
--

CREATE TABLE `schedule_requests` (
  `syear` decimal(4,0) DEFAULT NULL,
  `school_id` decimal(10,0) DEFAULT NULL,
  `request_id` int(8) NOT NULL AUTO_INCREMENT,
  `student_id` decimal(10,0) DEFAULT NULL,
  `subject_id` decimal(10,0) DEFAULT NULL,
  `course_id` decimal(10,0) DEFAULT NULL,
  `course_weight` varchar(10) DEFAULT NULL,
  `marking_period_id` int(11) DEFAULT NULL,
  `priority` decimal(10,0) DEFAULT NULL,
  `with_teacher_id` decimal(10,0) DEFAULT NULL,
  `not_teacher_id` decimal(10,0) DEFAULT NULL,
  `with_period_id` decimal(10,0) DEFAULT NULL,
  `not_period_id` decimal(10,0) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`request_id`),
  KEY `schedule_requests_ind1` USING BTREE (`student_id`,`course_id`,`course_weight`,`syear`,`school_id`),
  KEY `schedule_requests_ind2` USING BTREE (`syear`,`school_id`),
  KEY `schedule_requests_ind3` USING BTREE (`course_id`,`course_weight`,`syear`,`school_id`),
  KEY `schedule_requests_ind4` USING BTREE (`with_teacher_id`),
  KEY `schedule_requests_ind5` USING BTREE (`not_teacher_id`),
  KEY `schedule_requests_ind6` USING BTREE (`with_period_id`),
  KEY `schedule_requests_ind7` USING BTREE (`not_period_id`),
  KEY `schedule_requests_ind8` USING BTREE (`request_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `schools`
--

CREATE TABLE `schools` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `syear` decimal(4,0) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `address` varchar(100) DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
  `state` varchar(10) DEFAULT NULL,
  `zipcode` varchar(255) DEFAULT NULL,
  `area_code` decimal(3,0) DEFAULT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `principal` varchar(100) DEFAULT NULL,
  `www_address` varchar(100) DEFAULT NULL,
  `e_mail` varchar(100) DEFAULT NULL,
  `reporting_gp_scale` decimal(10,3) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `schools_ind1` USING BTREE (`syear`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `schools`
--

INSERT INTO `schools` VALUES
(1, 2017, 'Peach Tree School', '123 Main Street', 'Atlanta', 'Georgia', '78990', NULL, '860-347-6971', 'P. Lawrence', NULL, NULL, 4.000, '2018-01-22 04:18:02', NULL),
(2, [[beg_year]], '[[site_name]]', '', '', '', '', NULL, NULL, '', '', NULL, NULL, '2015-07-28 00:26:33', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `school_calendars`
--

CREATE TABLE `school_calendars` (
  `school_id` decimal(10,0) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `syear` decimal(4,0) DEFAULT NULL,
  `calendar_id` int(8) NOT NULL AUTO_INCREMENT,
  `default_calendar` varchar(1) DEFAULT NULL,
  `days` varchar(7) DEFAULT NULL,
  `rollover_id` decimal(10,0) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`calendar_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `school_calendars`
--

INSERT INTO `school_calendars` VALUES
(1, 'Calendar 2017-2018', 2017, 1, 'Y', 'MTWHF', NULL, '2018-01-22 04:22:39', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `school_custom_fields`
--

CREATE TABLE `school_custom_fields` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `type` varchar(10) DEFAULT NULL,
  `search` varchar(1) DEFAULT NULL,
  `title` varchar(30) DEFAULT NULL,
  `sort_order` decimal(10,0) DEFAULT NULL,
  `select_options` varchar(10000) DEFAULT NULL,
  `category_id` decimal(10,0) DEFAULT NULL,
  `system_field` char(1) DEFAULT NULL,
  `required` varchar(1) DEFAULT NULL,
  `default_selection` varchar(255) DEFAULT NULL,
  `hide` varchar(1) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `school_gradelevels`
--

CREATE TABLE `school_gradelevels` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `school_id` decimal(10,0) DEFAULT NULL,
  `short_name` varchar(5) DEFAULT NULL,
  `title` varchar(50) DEFAULT NULL,
  `next_grade_id` decimal(10,0) DEFAULT NULL,
  `sort_order` decimal(10,0) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `school_gradelevels_ind1` USING BTREE (`school_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `school_gradelevels`
--

INSERT INTO `school_gradelevels` VALUES
(1, 1, '5th', 'Fifth Grade', 2, 1, '2018-01-22 04:42:59', NULL),
(2, 1, '6th', 'Sixth Grade', 3, 2, '2018-01-22 04:43:10', NULL),
(3, 1, '7th', 'Seventh Grade', NULL, 3, '2018-01-22 04:43:21', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `school_gradelevel_sections`
--

CREATE TABLE `school_gradelevel_sections` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `school_id` decimal(10,0) DEFAULT NULL,
  `name` varchar(50) DEFAULT NULL,
  `sort_order` decimal(10,0) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `school_gradelevels_ind1` (`school_id`) USING BTREE
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `school_gradelevel_sections`
--

INSERT INTO `school_gradelevel_sections` VALUES
(1, 1, 'Section A', 1, '2018-01-22 04:43:42', NULL),
(2, 1, 'Section B', 2, '2018-01-22 04:43:56', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `school_periods`
--

CREATE TABLE `school_periods` (
  `period_id` int(8) NOT NULL AUTO_INCREMENT,
  `syear` decimal(4,0) DEFAULT NULL,
  `school_id` decimal(10,0) DEFAULT NULL,
  `sort_order` decimal(10,0) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `short_name` varchar(10) DEFAULT NULL,
  `length` decimal(10,0) DEFAULT NULL,
  `block` varchar(10) DEFAULT NULL,
  `ignore_scheduling` varchar(10) DEFAULT NULL,
  `attendance` varchar(1) DEFAULT NULL,
  `rollover_id` decimal(10,0) DEFAULT NULL,
  `start_time` time NOT NULL,
  `end_time` time NOT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`period_id`),
  KEY `school_periods_ind1` USING BTREE (`period_id`,`syear`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;

--
-- Dumping data for table `school_periods`
--

INSERT INTO `school_periods` VALUES
(1, 2017, 1, 2, 'Homeroom Period 1', 'HRA1', 30, NULL, NULL, NULL, NULL, '09:00:00', '09:30:00', '2018-01-22 04:37:55', NULL),
(2, 2017, 1, 1, 'Homeroom Attendance Period', 'HRA', 5, NULL, NULL, 'Y', NULL, '09:35:00', '09:40:00', '2018-01-22 04:38:42', NULL),
(3, 2017, 1, 3, 'Homeroom Period 2', 'HRA2', 30, NULL, NULL, NULL, NULL, '09:45:00', '10:15:00', '2018-01-22 04:39:34', NULL),
(4, 2017, 1, 4, 'Homeroom Period 3', 'HRA3', 30, NULL, NULL, NULL, NULL, '10:20:00', '10:50:00', '2018-01-22 04:41:15', NULL),
(5, 2017, 1, 5, 'Homeroom Period 4', 'HRA4', 30, NULL, NULL, NULL, NULL, '11:00:00', '11:30:00', '2018-01-22 04:41:40', NULL),
(6, 2017, 1, 6, 'Homeroom Period 5', 'HRA5', 30, NULL, NULL, NULL, NULL, '11:40:00', '12:10:00', '2018-01-22 04:42:30', NULL),
(7, 2017, 1, 7, 'Homeroom Period 6', 'HRA6', 45, NULL, NULL, NULL, NULL, '12:15:00', '13:00:00', '2018-01-23 11:25:18', NULL),
(8, 2017, 1, 8, 'Break', 'Br', 45, NULL, NULL, NULL, NULL, '13:05:00', '13:50:00', '2018-01-23 11:25:54', NULL),
(9, 2017, 1, 9, 'Homeroom Period 7', 'HRA7', 25, NULL, NULL, NULL, NULL, '13:55:00', '14:20:00', '2018-01-23 11:26:36', NULL),
(10, 2017, 1, 10, 'Homeroom Period 8', 'HRA8', 35, NULL, NULL, NULL, NULL, '14:25:00', '15:00:00', '2018-01-23 11:26:54', NULL);

--
-- Triggers `school_periods`
--
DROP TRIGGER IF EXISTS `tu_periods`;
DELIMITER //
CREATE TRIGGER `tu_periods` AFTER UPDATE ON `school_periods`
 FOR EACH ROW UPDATE course_period_var SET start_time=NEW.start_time,end_time=NEW.end_time WHERE period_id=NEW.period_id
//
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `school_progress_periods`
--

CREATE TABLE `school_progress_periods` (
  `marking_period_id` int(11) NOT NULL,
  `syear` decimal(4,0) DEFAULT NULL,
  `school_id` decimal(10,0) DEFAULT NULL,
  `quarter_id` decimal(10,0) DEFAULT NULL,
  `title` varchar(50) DEFAULT NULL,
  `short_name` varchar(10) DEFAULT NULL,
  `sort_order` decimal(10,0) DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `post_start_date` date DEFAULT NULL,
  `post_end_date` date DEFAULT NULL,
  `does_grades` varchar(1) DEFAULT NULL,
  `does_exam` varchar(1) DEFAULT NULL,
  `does_comments` varchar(1) DEFAULT NULL,
  `rollover_id` decimal(10,0) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`marking_period_id`),
  KEY `school_progress_periods_ind1` USING BTREE (`quarter_id`),
  KEY `school_progress_periods_ind2` USING BTREE (`syear`,`school_id`,`start_date`,`end_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `school_quarters`
--

CREATE TABLE `school_quarters` (
  `marking_period_id` int(11) NOT NULL,
  `syear` decimal(4,0) DEFAULT NULL,
  `school_id` decimal(10,0) DEFAULT NULL,
  `semester_id` decimal(10,0) DEFAULT NULL,
  `title` varchar(50) DEFAULT NULL,
  `short_name` varchar(10) DEFAULT NULL,
  `sort_order` decimal(10,0) DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `post_start_date` date DEFAULT NULL,
  `post_end_date` date DEFAULT NULL,
  `does_grades` varchar(1) DEFAULT NULL,
  `does_exam` varchar(1) DEFAULT NULL,
  `does_comments` varchar(1) DEFAULT NULL,
  `rollover_id` decimal(10,0) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`marking_period_id`),
  KEY `school_quarters_ind1` USING BTREE (`semester_id`),
  KEY `school_quarters_ind2` USING BTREE (`syear`,`school_id`,`start_date`,`end_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `school_quarters`
--

INSERT INTO `school_quarters` VALUES
(15, 2017, 1, 12, 'Quarter 1', 'Q1', 3, '2017-07-01', '2017-09-20', '2017-09-11', '2017-09-30', 'Y', NULL, NULL, NULL, '2018-01-22 04:30:19', NULL),
(16, 2017, 1, 12, 'Quarter 2', 'Q2', 4, '2017-09-21', '2017-12-15', '2017-12-01', '2017-12-30', 'Y', NULL, NULL, NULL, '2018-01-22 04:31:45', NULL),
(17, 2017, 1, 13, 'Quarter 3', 'Q3', 6, '2017-12-16', '2018-02-28', '2018-02-19', '2018-03-09', 'Y', NULL, NULL, NULL, '2018-01-22 04:33:22', NULL),
(18, 2017, 1, 13, 'Quarter 4', 'Q4', 7, '2018-03-01', '2018-05-31', '2018-05-14', '2018-06-08', 'Y', NULL, 'Y', NULL, '2018-01-22 04:36:04', NULL);

--
-- Triggers `school_quarters`
--
DROP TRIGGER IF EXISTS `tu_school_quarters`;
DELIMITER //
CREATE TRIGGER `tu_school_quarters` AFTER UPDATE ON `school_quarters`
 FOR EACH ROW UPDATE course_periods SET begin_date=NEW.start_date,end_date=NEW.end_date WHERE marking_period_id=NEW.marking_period_id
//
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `school_semesters`
--

CREATE TABLE `school_semesters` (
  `marking_period_id` int(11) NOT NULL,
  `syear` decimal(4,0) DEFAULT NULL,
  `school_id` decimal(10,0) DEFAULT NULL,
  `year_id` decimal(10,0) DEFAULT NULL,
  `title` varchar(50) DEFAULT NULL,
  `short_name` varchar(10) DEFAULT NULL,
  `sort_order` decimal(10,0) DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `post_start_date` date DEFAULT NULL,
  `post_end_date` date DEFAULT NULL,
  `does_grades` varchar(1) DEFAULT NULL,
  `does_exam` varchar(1) DEFAULT NULL,
  `does_comments` varchar(1) DEFAULT NULL,
  `rollover_id` decimal(10,0) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`marking_period_id`),
  KEY `school_semesters_ind1` USING BTREE (`year_id`),
  KEY `school_semesters_ind2` USING BTREE (`syear`,`school_id`,`start_date`,`end_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `school_semesters`
--

INSERT INTO `school_semesters` VALUES
(12, 2017, 1, 1, 'Semester 1', 'S1', 2, '2017-07-01', '2017-12-15', '2017-12-01', '2017-12-30', 'Y', NULL, NULL, NULL, '2018-01-22 04:25:35', NULL),
(13, 2017, 1, 1, 'Semester 2', 'S2', 5, '2017-12-16', '2018-05-31', '2018-05-21', '2018-06-08', 'Y', NULL, NULL, NULL, '2018-01-22 04:26:47', NULL);

--
-- Triggers `school_semesters`
--
DROP TRIGGER IF EXISTS `tu_school_semesters`;
DELIMITER //
CREATE TRIGGER `tu_school_semesters` AFTER UPDATE ON `school_semesters`
 FOR EACH ROW UPDATE course_periods SET begin_date=NEW.start_date,end_date=NEW.end_date WHERE marking_period_id=NEW.marking_period_id
//
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `school_years`
--

CREATE TABLE `school_years` (
  `marking_period_id` int(11) NOT NULL,
  `syear` decimal(4,0) DEFAULT NULL,
  `school_id` decimal(10,0) DEFAULT NULL,
  `title` varchar(50) DEFAULT NULL,
  `short_name` varchar(10) DEFAULT NULL,
  `sort_order` decimal(10,0) DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `post_start_date` date DEFAULT NULL,
  `post_end_date` date DEFAULT NULL,
  `does_grades` varchar(1) DEFAULT NULL,
  `does_exam` varchar(1) DEFAULT NULL,
  `does_comments` varchar(1) DEFAULT NULL,
  `rollover_id` decimal(10,0) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`marking_period_id`),
  KEY `school_years_ind2` USING BTREE (`syear`,`school_id`,`start_date`,`end_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `school_years`
--

INSERT INTO `school_years` VALUES
(1, 2017, 1, 'Full Year', 'FY', 1, '2017-07-01', '2018-05-31', '2018-05-21', '2018-06-08', 'Y', NULL, 'Y', NULL, '2018-01-22 04:18:02', NULL),
(19, [[beg_year]], 2, 'Full Year', 'FY', 1, '[[Beg_date]]', '[[End_date]]', NULL, NULL, NULL, NULL, NULL, NULL, '2015-07-28 00:26:33', NULL);

--
-- Triggers `school_years`
--
DROP TRIGGER IF EXISTS `tu_school_years`;
DELIMITER //
CREATE TRIGGER `tu_school_years` AFTER UPDATE ON `school_years`
 FOR EACH ROW UPDATE course_periods SET begin_date=NEW.start_date,end_date=NEW.end_date WHERE marking_period_id=NEW.marking_period_id
//
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `staff`
--

CREATE TABLE `staff` (
  `staff_id` int(8) NOT NULL AUTO_INCREMENT,
  `current_school_id` decimal(10,0) DEFAULT NULL,
  `title` varchar(10) CHARACTER SET utf8 DEFAULT NULL,
  `first_name` varchar(100) CHARACTER SET utf8 DEFAULT NULL,
  `last_name` varchar(100) CHARACTER SET utf8 DEFAULT NULL,
  `middle_name` varchar(100) CHARACTER SET utf8 DEFAULT NULL,
  `phone` varchar(100) CHARACTER SET utf8 DEFAULT NULL,
  `email` varchar(100) CHARACTER SET utf8 DEFAULT NULL,
  `profile` varchar(30) CHARACTER SET utf8 DEFAULT NULL,
  `homeroom` varchar(5) CHARACTER SET utf8 DEFAULT NULL,
  `profile_id` decimal(10,0) DEFAULT NULL,
  `primary_language_id` int(8) DEFAULT NULL,
  `gender` varchar(8) CHARACTER SET utf8 DEFAULT NULL,
  `ethnicity_id` int(8) DEFAULT NULL,
  `birthdate` date DEFAULT NULL,
  `alternate_id` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
  `name_suffix` varchar(32) CHARACTER SET utf8 DEFAULT NULL,
  `second_language_id` int(8) DEFAULT NULL,
  `third_language_id` int(8) DEFAULT NULL,
  `is_disable` varchar(10) CHARACTER SET utf8 DEFAULT NULL,
  `physical_disability` varchar(1) CHARACTER SET utf8 DEFAULT NULL,
  `disability_desc` varchar(225) COLLATE utf8_unicode_ci DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`staff_id`),
  KEY `staff_ind2` USING BTREE (`last_name`,`first_name`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=7 ;

--
-- Dumping data for table `staff`
--

INSERT INTO `staff` VALUES
(1, 1, NULL, '[[admin_fname]]', '[[admin_lname]]', '', NULL, NULL, 'admin', NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'N', NULL, NULL, '2015-07-28 05:56:33', NULL),
(2, 1, 'Mr.', 'Richard ', 'Jones ', NULL, NULL, 'richard@example.edu', 'teacher', NULL, 2, 1, 'Male', NULL, '1988-01-06', NULL, NULL, 16, NULL, NULL, 'N', NULL, '2018-01-22 04:50:22', NULL),
(3, 1, 'Ms.', 'Jennifer ', 'Lawrence ', NULL, NULL, 'info@os4ed.com', 'teacher', NULL, 2, 1, 'Female', 1, '1993-01-01', 'JR0986', NULL, 16, 5, 'N', 'N', NULL, '2018-01-22 04:52:50', NULL),
(4, 1, 'Mrs.', 'Kim ', 'Hall ', NULL, NULL, 'kim@opensis.com', 'teacher', NULL, 2, NULL, 'Female', 1, NULL, NULL, NULL, NULL, NULL, NULL, 'N', NULL, '2018-01-22 05:44:34', NULL),
(5, 1, 'Mr.', 'Steve ', 'Johnson ', NULL, NULL, 'steve@info.edu', 'teacher', NULL, 2, 1, 'Male', NULL, '1982-01-05', NULL, NULL, NULL, NULL, NULL, 'N', NULL, '2018-01-23 13:09:49', NULL),
(6, 1, 'Mr.', 'Admin ', 'Administrator ', NULL, NULL, 'admin@peachtree.edu', 'admin', NULL, 1, 1, 'Male', 1, '1972-01-20', NULL, NULL, 5, 16, NULL, 'N', NULL, '2018-01-23 16:22:06', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `staff_address`
--

CREATE TABLE `staff_address` (
  `staff_address_id` int(8) NOT NULL AUTO_INCREMENT,
  `staff_id` int(8) NOT NULL,
  `staff_address1_primary` text NOT NULL,
  `staff_address2_primary` text,
  `staff_city_primary` varchar(255) NOT NULL,
  `staff_state_primary` varchar(255) NOT NULL,
  `staff_zip_primary` varchar(255) NOT NULL,
  `staff_address1_mail` text NOT NULL,
  `staff_address2_mail` text,
  `staff_city_mail` varchar(255) NOT NULL,
  `staff_state_mail` varchar(255) NOT NULL,
  `staff_zip_mail` varchar(255) NOT NULL,
  `last_update` datetime NOT NULL,
  `staff_pobox_mail` varchar(255) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date time staff address record modified',
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`staff_address_id`),
  UNIQUE KEY `staff_id` (`staff_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `staff_address`
--

INSERT INTO `staff_address` VALUES
(1, 3, '122 Main Link Down', NULL, 'Atlanta', 'Georgia', '1234', '122 Main Link Down', NULL, 'Atlanta', 'Georgia', '1234', '0000-00-00 00:00:00', NULL, '2018-01-22 05:41:50', NULL),
(2, 4, '123 Main Street', 'Street 2', 'Atlanta', 'Georgia', '5678', '123 Main Street', 'Street 2', 'Atlanta', 'Georgia', '5678', '0000-00-00 00:00:00', NULL, '2018-01-22 05:46:13', NULL),
(3, 5, '1234 Link Down street', NULL, 'Altanta', 'Georgia', '32650', '1234 Link Down street', NULL, 'Altanta', 'Georgia', '32650', '0000-00-00 00:00:00', NULL, '2018-01-23 13:11:51', NULL),
(4, 2, '123 Link  street', NULL, 'Altanta', 'Georgia', '3264', '123 Main Street', NULL, 'Atlanta', 'Georgia', '4598', '0000-00-00 00:00:00', NULL, '2018-01-23 13:14:38', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `staff_certification`
--

CREATE TABLE `staff_certification` (
  `staff_certification_id` int(8) NOT NULL AUTO_INCREMENT,
  `staff_id` int(8) NOT NULL,
  `staff_certification_date` date DEFAULT NULL,
  `staff_certification_expiry_date` date DEFAULT NULL,
  `staff_certification_code` varchar(127) DEFAULT NULL,
  `staff_certification_short_name` varchar(127) DEFAULT NULL,
  `staff_certification_name` varchar(255) DEFAULT NULL,
  `staff_primary_certification_indicator` char(1) DEFAULT NULL,
  `last_update` datetime DEFAULT NULL,
  `staff_certification_description` text,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`staff_certification_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `staff_certification`
--

INSERT INTO `staff_certification` VALUES
(1, 3, '2010-01-31', NULL, 'M342', 'MSc. in Computer', 'Master Degree', NULL, NULL, NULL, '2018-01-22 05:43:52', NULL),
(2, 5, '2008-06-04', NULL, 'CS-302', 'B.Tech in CSE', 'B.Tech in Computer Science', 'Y', NULL, 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry''s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.', '2018-01-23 13:12:55', NULL),
(3, 2, '2010-03-31', NULL, 'MCA 306', 'MCA', 'Masters in Computer Application', 'Y', NULL, NULL, '2018-01-23 13:15:31', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `staff_contact`
--

CREATE TABLE `staff_contact` (
  `staff_phone_id` int(8) NOT NULL AUTO_INCREMENT,
  `staff_id` int(8) NOT NULL,
  `last_update` datetime NOT NULL,
  `staff_home_phone` varchar(62) DEFAULT NULL,
  `staff_mobile_phone` varchar(62) DEFAULT NULL,
  `staff_work_phone` varchar(62) DEFAULT NULL,
  `staff_work_email` varchar(127) DEFAULT NULL,
  `staff_personal_email` varchar(127) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`staff_phone_id`),
  UNIQUE KEY `staff_id` (`staff_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `staff_contact`
--

INSERT INTO `staff_contact` VALUES
(1, 3, '0000-00-00 00:00:00', '36534375', '4443432368', '0987611256', 'work@example.com', 'personal@gmail.com', '2018-01-22 05:41:51', NULL),
(2, 4, '0000-00-00 00:00:00', '6789800', '4445654354', NULL, NULL, NULL, '2018-01-22 05:46:13', NULL),
(3, 5, '0000-00-00 00:00:00', '440-656-9636', '1405236', '444-989-3210', 'steve@workmail.com', 'steves20@gmail.com', '2018-01-23 13:11:51', NULL),
(4, 2, '0000-00-00 00:00:00', '440-656-9630', NULL, NULL, NULL, NULL, '2018-01-23 13:14:38', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `staff_emergency_contact`
--

CREATE TABLE `staff_emergency_contact` (
  `staff_emergency_contact_id` int(8) NOT NULL AUTO_INCREMENT,
  `staff_id` int(8) NOT NULL,
  `staff_emergency_first_name` varchar(255) NOT NULL,
  `staff_emergency_last_name` varchar(255) NOT NULL,
  `staff_emergency_relationship` varchar(255) NOT NULL,
  `staff_emergency_home_phone` varchar(64) DEFAULT NULL,
  `staff_emergency_mobile_phone` varchar(64) DEFAULT NULL,
  `staff_emergency_work_phone` varchar(64) DEFAULT NULL,
  `staff_emergency_email` varchar(255) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`staff_emergency_contact_id`),
  UNIQUE KEY `staff_id` (`staff_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `staff_emergency_contact`
--

INSERT INTO `staff_emergency_contact` VALUES
(1, 3, 'Evana', 'Lawrence', 'Mother', '65654534', '098976542', '4443432312', 'evana@info.us', '2018-01-22 05:41:51', NULL),
(2, 4, '', '', '', NULL, NULL, NULL, NULL, '2018-01-22 05:46:13', NULL),
(3, 5, 'James', 'Johnson', 'Uncle', '444-656-8525', '140525652', NULL, NULL, '2018-01-23 13:11:51', NULL),
(4, 2, '', '', '', NULL, NULL, NULL, NULL, '2018-01-23 13:14:38', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `staff_fields`
--

CREATE TABLE `staff_fields` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `type` varchar(10) DEFAULT NULL,
  `search` varchar(1) DEFAULT NULL,
  `title` varchar(30) DEFAULT NULL,
  `sort_order` decimal(10,0) DEFAULT NULL,
  `select_options` varchar(10000) DEFAULT NULL,
  `category_id` decimal(10,0) DEFAULT NULL,
  `system_field` char(1) DEFAULT NULL,
  `required` varchar(1) DEFAULT NULL,
  `default_selection` varchar(255) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `staff_desc_ind1` USING BTREE (`id`),
  KEY `staff_desc_ind2` USING BTREE (`type`),
  KEY `staff_fields_ind3` USING BTREE (`category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `staff_field_categories`
--

CREATE TABLE `staff_field_categories` (
  `id` int(8) NOT NULL DEFAULT '0',
  `title` varchar(100) DEFAULT NULL,
  `sort_order` decimal(10,0) DEFAULT NULL,
  `include` varchar(100) DEFAULT NULL,
  `admin` char(1) DEFAULT NULL,
  `teacher` char(1) DEFAULT NULL,
  `parent` char(1) DEFAULT NULL,
  `none` char(1) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `staff_field_categories`
--

INSERT INTO `staff_field_categories` VALUES
(1, 'Demographic Info', 1, NULL, 'Y', 'Y', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(2, 'Addresses & Contacts', 2, NULL, 'Y', 'Y', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(3, 'School Information', 3, NULL, 'Y', 'Y', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(4, 'Certification Information', 4, NULL, 'Y', 'Y', 'Y', 'Y', '2015-07-28 11:26:33', NULL),
(5, 'Schedule', 5, NULL, 'Y', 'Y', NULL, NULL, '2015-07-28 11:26:33', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `staff_school_info`
--

CREATE TABLE `staff_school_info` (
  `staff_school_info_id` int(8) NOT NULL AUTO_INCREMENT,
  `staff_id` int(8) NOT NULL,
  `category` varchar(255) NOT NULL,
  `job_title` varchar(255) DEFAULT NULL,
  `joining_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `home_school` int(8) NOT NULL,
  `opensis_access` char(1) NOT NULL DEFAULT 'N',
  `opensis_profile` varchar(255) DEFAULT NULL,
  `school_access` varchar(255) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date and time staff school info was modified',
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`staff_school_info_id`),
  UNIQUE KEY `staff_id` (`staff_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;

--
-- Dumping data for table `staff_school_info`
--

INSERT INTO `staff_school_info` VALUES
(1, 1, 'Super Administrator', 'Super Administrator', '2018-01-21', NULL, 1, 'Y', '0', ',1,', '2018-01-22 04:18:03', NULL),
(2, 2, 'Teacher', 'Teacher', '2017-07-01', NULL, 1, 'Y', '2', ',1,', '2018-01-22 04:51:09', NULL),
(3, 3, 'Teacher', 'Teacher', '2017-01-02', NULL, 1, 'Y', '2', ',1,', '2018-01-22 04:53:33', NULL),
(4, 4, 'Teacher', 'Teacher asst', '2017-01-02', NULL, 1, 'Y', '2', ',1,', '2018-01-22 05:45:02', NULL),
(5, 5, 'Teacher', 'Teacher', '2017-01-02', NULL, 1, 'Y', '2', ',1,', '2018-01-23 13:10:16', NULL),
(6, 6, 'Administrator', 'Admin', '2016-01-01', NULL, 1, 'Y', '1', ',1,', '2018-01-23 16:22:31', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `staff_school_relationship`
--

CREATE TABLE `staff_school_relationship` (
  `staff_id` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  `syear` int(4) NOT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  PRIMARY KEY (`staff_id`,`school_id`,`syear`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `staff_school_relationship`
--

INSERT INTO `staff_school_relationship` VALUES
(1, 1, 2017, '2018-01-22 04:18:03', NULL, '0000-00-00', '0000-00-00'),
(1, 2, 2018, '2015-07-28 00:26:33', NULL, '0000-00-00', '0000-00-00'),
(2, 1, 2017, '2018-01-22 04:50:22', NULL, '2017-07-01', NULL),
(3, 1, 2017, '2018-01-22 04:52:50', NULL, '2017-01-02', NULL),
(4, 1, 2017, '2018-01-22 05:44:35', NULL, '2017-01-02', NULL),
(5, 1, 2017, '2018-01-23 13:09:49', NULL, '2017-01-02', NULL),
(6, 1, 2017, '2018-01-23 16:22:06', NULL, '2016-01-01', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `students`
--

CREATE TABLE `students` (
  `student_id` int(8) NOT NULL AUTO_INCREMENT,
  `last_name` varchar(50) NOT NULL,
  `first_name` varchar(50) NOT NULL,
  `middle_name` varchar(50) DEFAULT NULL,
  `name_suffix` varchar(3) DEFAULT NULL,
  `gender` varchar(255) DEFAULT NULL,
  `ethnicity` varchar(255) DEFAULT NULL,
  `common_name` varchar(255) DEFAULT NULL,
  `social_security` varchar(255) DEFAULT NULL,
  `birthdate` varchar(255) DEFAULT NULL,
  `language` varchar(255) DEFAULT NULL,
  `estimated_grad_date` varchar(255) DEFAULT NULL,
  `alt_id` varchar(50) DEFAULT NULL,
  `email` varchar(50) DEFAULT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `is_disable` varchar(10) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`student_id`),
  KEY `name` USING BTREE (`last_name`,`first_name`,`middle_name`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;

--
-- Dumping data for table `students`
--

INSERT INTO `students` VALUES
(1, 'Anderson', 'Daniel', NULL, NULL, 'Male', 'White, Non-Hispanic', NULL, NULL, '2008-09-02', 'English', NULL, NULL, NULL, NULL, NULL, '2018-01-22 04:46:26', NULL),
(2, 'Aponte', 'Justin', NULL, NULL, NULL, NULL, NULL, NULL, '2006-01-02', 'English', NULL, NULL, NULL, NULL, NULL, '2018-01-22 05:11:57', NULL),
(3, 'Paiva', 'Laura', NULL, NULL, 'Female', 'White, Non-Hispanic', NULL, NULL, '2008-01-08', 'English', NULL, NULL, NULL, NULL, NULL, '2018-01-22 05:15:27', NULL),
(4, 'Parker', 'Colin', NULL, NULL, 'Male', 'White, Non-Hispanic', NULL, NULL, '2008-01-02', 'English', '2024-07-31', NULL, 'colin@example.com', '440-656-6320', NULL, '2018-01-22 05:17:03', NULL),
(5, 'Loafer', 'Roman', NULL, NULL, 'Male', NULL, 'Rommy', NULL, '2006-01-25', 'English', NULL, NULL, NULL, NULL, NULL, '2018-01-22 05:20:52', NULL),
(6, 'Wallace', 'Luna', NULL, NULL, 'Female', NULL, NULL, NULL, '2008-01-02', 'English', NULL, NULL, 'luna@example.edu', '440-656-6328', NULL, '2018-01-22 05:22:16', NULL),
(7, 'Parker', 'James', NULL, NULL, 'Male', NULL, NULL, NULL, '2006-01-24', 'English', NULL, NULL, NULL, '440-656-6325', NULL, '2018-01-22 05:23:24', NULL),
(8, 'Holmes', 'Javier', NULL, NULL, 'Male', 'White, Non-Hispanic', NULL, NULL, '2006-01-18', NULL, NULL, NULL, NULL, NULL, NULL, '2018-01-22 05:25:41', NULL),
(9, 'Davis', 'Ronnie', NULL, NULL, 'Male', 'White, Non-Hispanic', 'Ron', NULL, '2010-01-06', 'English', NULL, NULL, 'ronnie@gmail.com', NULL, NULL, '2018-01-23 11:07:28', NULL),
(10, 'Rodger', 'Mark', NULL, NULL, 'Male', NULL, NULL, NULL, '2006-01-05', 'English', NULL, NULL, 'mark@gmail.com', NULL, NULL, '2018-01-23 11:13:05', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `students_join_people`
--

CREATE TABLE `students_join_people` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `student_id` decimal(10,0) NOT NULL,
  `person_id` decimal(10,0) NOT NULL,
  `is_emergency` varchar(10) DEFAULT NULL,
  `emergency_type` varchar(100) DEFAULT NULL,
  `relationship` varchar(100) NOT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=13 ;

--
-- Dumping data for table `students_join_people`
--

INSERT INTO `students_join_people` VALUES
(1, 2, 1, NULL, 'Primary', 'Father', '2018-01-22 05:14:27', NULL),
(2, 2, 2, NULL, 'Secondary', 'Mother', '2018-01-22 05:14:28', NULL),
(3, 4, 3, NULL, 'Primary', 'Father', '2018-01-22 05:20:07', NULL),
(4, 4, 4, NULL, 'Secondary', 'Mother', '2018-01-22 05:20:07', NULL),
(5, 7, 3, NULL, 'Primary', 'Father', '2018-01-22 05:24:49', NULL),
(6, 7, 4, NULL, 'Secondary', 'Mother', '2018-01-22 05:24:50', NULL),
(7, 9, 5, NULL, 'Primary', 'Father', '2018-01-23 11:08:50', NULL),
(8, 9, 6, NULL, 'Secondary', '', '2018-01-23 11:08:51', NULL),
(9, 1, 7, NULL, 'Primary', 'Father', '2018-01-23 11:22:12', NULL),
(10, 1, 8, NULL, 'Secondary', '', '2018-01-23 11:22:12', NULL),
(11, 8, 9, NULL, 'Primary', 'Father', '2018-01-23 13:27:52', NULL),
(12, 8, 10, NULL, 'Secondary', 'Mother', '2018-01-23 13:27:52', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `student_address`
--

CREATE TABLE `student_address` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `syear` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  `street_address_1` varchar(5000) DEFAULT NULL,
  `street_address_2` varchar(5000) DEFAULT NULL,
  `city` varchar(255) DEFAULT NULL,
  `state` varchar(255) DEFAULT NULL,
  `zipcode` varchar(255) DEFAULT NULL,
  `bus_pickup` varchar(1) DEFAULT NULL,
  `bus_dropoff` varchar(1) DEFAULT NULL,
  `bus_no` varchar(255) DEFAULT NULL,
  `type` varchar(500) NOT NULL,
  `people_id` int(11) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=23 ;

--
-- Dumping data for table `student_address`
--

INSERT INTO `student_address` VALUES
(1, 2, 2017, 1, '123 Main Street', NULL, 'Atlanta', 'Georgia', '30097', NULL, NULL, NULL, 'Home Address', NULL, '2018-01-22 05:14:27', NULL),
(2, 2, 2017, 1, '123 Main Street', NULL, 'Atlanta', 'Georgia', '30097', NULL, NULL, NULL, 'Mail', NULL, '2018-01-22 05:14:27', NULL),
(3, 2, 2017, 1, '123 Main Street', NULL, 'Atlanta', 'Georgia', '30097', NULL, NULL, NULL, 'Secondary', 2, '2018-01-22 05:14:27', NULL),
(4, 2, 2017, 1, '123 Main Street', NULL, 'Atlanta', 'Georgia', '30097', NULL, NULL, NULL, 'Primary', 1, '2018-01-22 05:14:27', NULL),
(5, 4, 2017, 1, '23 Kinfield st', NULL, 'Atlanta', 'Georgia', '2908', NULL, NULL, NULL, 'Home Address', NULL, '2018-01-22 05:20:06', NULL),
(6, 4, 2017, 1, '23 Kinfield st', NULL, 'Atlanta', 'Georgia', '2908', NULL, NULL, NULL, 'Mail', NULL, '2018-01-22 05:20:07', NULL),
(7, 4, 2017, 1, '23 Kinfield st', NULL, 'Atlanta', 'Georgia', '2908', NULL, NULL, NULL, 'Secondary', 4, '2018-01-22 05:20:07', NULL),
(8, 4, 2017, 1, '23 Kinfield st', NULL, 'Atlanta', 'Georgia', '2908', NULL, NULL, NULL, 'Primary', 3, '2018-01-22 05:20:07', NULL),
(9, 7, 2017, 1, '123 Main Street', NULL, 'Atlanta', 'Georgia', '30097', NULL, NULL, NULL, 'Home Address', NULL, '2018-01-22 05:24:49', NULL),
(10, 7, 2017, 1, '123 Main Street', NULL, 'Atlanta', 'Georgia', '30097', NULL, NULL, NULL, 'Mail', NULL, '2018-01-22 05:24:49', NULL),
(11, 9, 2017, 1, '123 Main Street', NULL, 'Atlanta', 'Georgia', '12345', NULL, NULL, NULL, 'Home Address', NULL, '2018-01-23 11:08:50', NULL),
(12, 9, 2017, 1, '123 Main Street', NULL, 'Atlanta', 'Georgia', '12345', NULL, NULL, NULL, 'Mail', NULL, '2018-01-23 11:08:50', NULL),
(13, 9, 2017, 1, '123 Main Street', NULL, 'Atlanta', 'Georgia', '12345', NULL, NULL, NULL, 'Secondary', 6, '2018-01-23 11:08:50', NULL),
(14, 9, 2017, 1, '123 Main Street', NULL, 'Atlanta', 'Georgia', '12345', NULL, NULL, NULL, 'Primary', 5, '2018-01-23 11:08:50', NULL),
(15, 1, 2017, 1, '123 Main Street', NULL, 'Atlanta', 'Georgia', '123456', NULL, NULL, NULL, 'Home Address', NULL, '2018-01-23 11:22:12', NULL),
(16, 1, 2017, 1, '123 Main Street', NULL, 'Atlanta', 'Georgia', '123456', NULL, NULL, NULL, 'Mail', NULL, '2018-01-23 11:22:12', NULL),
(17, 1, 2017, 1, '123 Main Street', NULL, 'Atlanta', 'Georgia', '123456', NULL, NULL, NULL, 'Secondary', 8, '2018-01-23 11:22:12', NULL),
(18, 1, 2017, 1, '123 Main Street', NULL, 'Atlanta', 'Georgia', '123456', NULL, NULL, NULL, 'Primary', 7, '2018-01-23 11:22:12', NULL),
(19, 8, 2017, 1, '342 Main Street', NULL, 'Atlanta', 'Georgia', '12345', NULL, NULL, NULL, 'Home Address', NULL, '2018-01-23 13:27:51', NULL),
(20, 8, 2017, 1, '342 Main Street', NULL, 'Atlanta', 'Georgia', '12345', NULL, NULL, NULL, 'Mail', NULL, '2018-01-23 13:27:51', NULL),
(21, 8, 2017, 1, '34, Jaw Street', 'Beside Frozen Lane ', 'Atlanta', 'Georgia', '7890', NULL, NULL, NULL, 'Secondary', 10, '2018-01-23 13:27:51', NULL),
(22, 8, 2017, 1, '342 Main Street', NULL, 'Atlanta', 'Georgia', '12345', NULL, NULL, NULL, 'Primary', 9, '2018-01-23 13:27:51', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `student_eligibility_activities`
--

CREATE TABLE `student_eligibility_activities` (
  `syear` decimal(4,0) DEFAULT NULL,
  `student_id` decimal(10,0) DEFAULT NULL,
  `activity_id` decimal(10,0) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  KEY `student_eligibility_activities_ind1` USING BTREE (`student_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `student_eligibility_activities`
--

INSERT INTO `student_eligibility_activities` VALUES
(2017, 1, 1, '2018-01-23 13:05:43', NULL),
(2017, 4, 1, '2018-01-23 13:05:51', NULL),
(2017, 4, 2, '2018-01-23 13:05:54', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `student_enrollment`
--

CREATE TABLE `student_enrollment` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `syear` decimal(4,0) DEFAULT NULL,
  `school_id` decimal(10,0) DEFAULT NULL,
  `student_id` decimal(10,0) DEFAULT NULL,
  `grade_id` decimal(10,0) DEFAULT NULL,
  `section_id` varchar(255) DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `enrollment_code` decimal(10,0) DEFAULT NULL,
  `drop_code` decimal(10,0) DEFAULT NULL,
  `next_school` decimal(10,0) DEFAULT NULL,
  `calendar_id` decimal(10,0) DEFAULT NULL,
  `last_school` decimal(10,0) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `student_enrollment_1` USING BTREE (`student_id`,`enrollment_code`),
  KEY `student_enrollment_2` USING BTREE (`grade_id`),
  KEY `student_enrollment_3` USING BTREE (`syear`,`student_id`,`school_id`,`grade_id`),
  KEY `student_enrollment_6` USING BTREE (`syear`,`student_id`,`start_date`,`end_date`),
  KEY `student_enrollment_7` USING BTREE (`school_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;

--
-- Dumping data for table `student_enrollment`
--

INSERT INTO `student_enrollment` VALUES
(1, 2017, 1, 1, 1, '1', '2017-07-03', NULL, 5, NULL, 1, 1, NULL, '2018-01-22 04:46:26', NULL),
(2, 2017, 1, 2, 2, '1', '2017-07-03', NULL, 5, NULL, 1, 1, NULL, '2018-01-22 05:11:58', NULL),
(3, 2017, 1, 3, 1, '2', '2017-07-03', NULL, 5, NULL, 1, 1, NULL, '2018-01-22 05:15:27', NULL),
(4, 2017, 1, 4, 2, '2', '2017-07-03', NULL, 5, NULL, 1, 1, NULL, '2018-01-22 05:17:04', NULL),
(5, 2017, 1, 5, 2, '1', '2017-07-03', NULL, 5, NULL, 1, 1, NULL, '2018-01-22 05:20:53', NULL),
(6, 2017, 1, 6, 2, '1', '2017-07-03', NULL, 5, NULL, 1, 1, NULL, '2018-01-22 05:22:16', NULL),
(7, 2017, 1, 7, 1, '1', '2017-07-03', NULL, 5, NULL, 1, 1, NULL, '2018-01-22 05:23:25', NULL),
(8, 2017, 1, 8, 1, '1', '2017-07-03', NULL, 5, NULL, 1, 1, NULL, '2018-01-22 05:25:42', NULL),
(9, 2017, 1, 9, 1, '1', '2017-07-03', NULL, 5, NULL, 1, 1, NULL, '2018-01-23 11:07:29', NULL),
(10, 2017, 1, 10, 2, '2', '2017-07-03', NULL, 5, NULL, 1, 1, NULL, '2018-01-23 11:13:05', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `student_enrollment_codes`
--

CREATE TABLE `student_enrollment_codes` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `syear` decimal(4,0) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `short_name` varchar(10) DEFAULT NULL,
  `type` varchar(4) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;

--
-- Dumping data for table `student_enrollment_codes`
--

INSERT INTO `student_enrollment_codes` VALUES
(1, 2017, 'Transferred out', 'TRAN', 'TrnD', '2015-07-28 05:56:33', NULL),
(2, 2017, 'Transferred in', 'TRAN', 'TrnE', '2015-07-28 05:56:33', NULL),
(3, 2017, 'Rolled over', 'ROLL', 'Roll', '2015-07-28 05:56:33', NULL),
(4, 2017, 'Dropped Out', 'DROP', 'Drop', '2015-07-28 05:56:33', NULL),
(5, 2017, 'New', 'NEW', 'Add', '2015-07-28 05:56:33', NULL),
(6, [[beg_year]], 'Transferred out', 'TRAN', 'TrnD', '[[regtime]]', NULL),
(7, [[beg_year]], 'Transferred in', 'TRAN', 'TrnE', '[[regtime]]', NULL),
(8, [[beg_year]], 'Rolled over', 'ROLL', 'Roll', '[[regtime]]', NULL),
(9, [[beg_year]], 'Dropped Out', 'Drop', 'Drop', '[[regtime]]', NULL),
(10, [[beg_year]], 'New', 'NEW', 'Add', '[[regtime]]', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `student_field_categories`
--

CREATE TABLE `student_field_categories` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) DEFAULT NULL,
  `sort_order` decimal(10,0) DEFAULT NULL,
  `include` varchar(100) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;

--
-- Dumping data for table `student_field_categories`
--

INSERT INTO `student_field_categories` VALUES
(1, 'General Info', 1, NULL, '2015-07-28 11:26:33', NULL),
(2, 'Medical', 3, NULL, '2015-07-28 11:26:33', NULL),
(3, 'Addresses & Contacts', 2, NULL, '2015-07-28 11:26:33', NULL),
(4, 'Comments', 4, NULL, '2015-07-28 11:26:33', NULL),
(5, 'Goals', 5, NULL, '2015-07-28 11:26:33', NULL),
(6, 'Enrollment Info', 6, NULL, '2015-07-28 11:26:33', NULL),
(7, 'Files', 7, NULL, '2015-07-28 11:26:33', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `student_goal`
--

CREATE TABLE `student_goal` (
  `goal_id` int(8) NOT NULL AUTO_INCREMENT,
  `student_id` decimal(10,0) NOT NULL,
  `goal_title` varchar(100) DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `goal_description` text,
  `school_id` decimal(10,0) DEFAULT NULL,
  `syear` decimal(10,0) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`goal_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `student_goal`
--

INSERT INTO `student_goal` VALUES
(1, 4, 'Chemistry', '2018-01-10', '2018-01-22', 'Inorganic Chemistry', 1, 2017, '2018-01-23 13:22:27', NULL),
(2, 6, 'Spanish', '2018-01-16', '2018-01-19', 'Spanish Reading Skill', 1, 2017, '2018-01-23 13:30:37', NULL),
(3, 6, 'Chemistry In', '2018-01-22', '2018-02-06', 'Try to remember Atomic Chart properly..', 1, 2017, '2018-01-23 13:38:34', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `student_goal_progress`
--

CREATE TABLE `student_goal_progress` (
  `progress_id` int(8) NOT NULL AUTO_INCREMENT,
  `goal_id` decimal(10,0) NOT NULL,
  `student_id` decimal(10,0) NOT NULL,
  `start_date` date DEFAULT NULL,
  `progress_name` text NOT NULL,
  `proficiency` varchar(100) NOT NULL,
  `progress_description` text NOT NULL,
  `course_period_id` decimal(10,0) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`progress_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `student_goal_progress`
--

INSERT INTO `student_goal_progress` VALUES
(1, 1, 4, '2018-01-22', 'Inorganic Extra Class', '61-70%', 'You need to improve more. But you are improving. Keep trying. All the best !!!', 6, '2018-01-23 13:23:31', NULL),
(2, 2, 6, '2018-01-18', 'Span Reading improvement', '71-80%', 'Well done you are doing good.. Keep Practicing.', 4, '2018-01-23 13:31:26', NULL),
(3, 2, 6, '2018-01-22', 'Span I Reading improvement', '81-90%', 'Keep watching Spanish educational movies & also keep reading news papers for more efficiency. Todo lo Mejor !!!', 4, '2018-01-23 13:36:16', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `student_gpa_calculated`
--

CREATE TABLE `student_gpa_calculated` (
  `student_id` decimal(10,0) DEFAULT NULL,
  `marking_period_id` int(11) DEFAULT NULL,
  `mp` varchar(4) DEFAULT NULL,
  `gpa` decimal(10,2) DEFAULT NULL,
  `weighted_gpa` decimal(10,2) DEFAULT NULL,
  `unweighted_gpa` decimal(10,2) DEFAULT NULL,
  `class_rank` decimal(10,0) DEFAULT NULL,
  `grade_level_short` varchar(100) DEFAULT NULL,
  `cgpa` decimal(10,2) DEFAULT NULL,
  `cum_unweighted_factor` decimal(10,6) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  KEY `student_gpa_calculated_ind1` USING BTREE (`marking_period_id`,`student_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `student_gpa_calculated`
--

INSERT INTO `student_gpa_calculated` VALUES
(1, 17, NULL, 3.00, NULL, 3.00, 1, NULL, NULL, 0.500000, '2018-01-23 12:43:52', NULL),
(2, 17, NULL, 2.18, NULL, 2.18, 1, NULL, NULL, 0.333333, '2018-01-23 12:43:52', NULL),
(9, 17, NULL, 1.09, NULL, 1.09, 2, NULL, NULL, 0.166667, '2018-01-23 12:43:52', NULL),
(8, 17, NULL, 1.09, NULL, 1.09, 2, NULL, NULL, 0.166667, '2018-01-23 12:43:53', NULL),
(5, 17, NULL, 0.55, NULL, 0.55, 4, NULL, NULL, 0.083333, '2018-01-23 12:43:53', NULL),
(3, 17, NULL, 0.55, NULL, 0.55, 4, NULL, NULL, 0.083333, '2018-01-23 12:43:53', NULL),
(4, 17, NULL, 1.36, NULL, 1.36, 2, NULL, NULL, 0.166667, '2018-01-23 12:43:54', NULL),
(7, 17, NULL, 0.64, NULL, 0.64, 3, NULL, NULL, 0.083333, '2018-01-23 12:43:54', NULL),
(10, 17, NULL, 0.00, NULL, 0.00, 5, NULL, NULL, 0.000000, '2018-01-23 12:43:54', NULL),
(6, 17, NULL, 0.64, NULL, 0.64, 3, NULL, NULL, 0.083333, '2018-01-23 12:43:54', NULL),
(1, 1, NULL, 4.00, 4.00, NULL, 1, NULL, NULL, 0.500000, '2018-01-23 12:48:45', NULL),
(2, 1, NULL, 3.00, 3.00, NULL, 1, NULL, NULL, 0.333333, '2018-01-23 12:48:46', NULL),
(9, 1, NULL, 2.00, 2.00, NULL, 3, NULL, NULL, 0.166667, '2018-01-23 12:48:46', NULL),
(8, 1, NULL, 3.00, 3.00, NULL, 2, NULL, NULL, 0.166667, '2018-01-23 12:48:46', NULL),
(5, 1, NULL, 2.00, 2.00, NULL, 2, NULL, NULL, 0.083333, '2018-01-23 12:48:47', NULL),
(3, 1, NULL, 0.00, 0.00, NULL, 4, NULL, NULL, 0.083333, '2018-01-23 12:48:47', NULL),
(4, 1, NULL, 3.00, 3.00, NULL, 1, NULL, NULL, 0.166667, '2018-01-23 12:48:47', NULL),
(7, 1, NULL, 2.00, 2.00, NULL, 3, NULL, NULL, 0.083333, '2018-01-23 12:48:47', NULL),
(10, 1, NULL, 2.00, 2.00, NULL, 2, NULL, NULL, 0.000000, '2018-01-23 12:48:48', NULL),
(6, 1, NULL, 3.00, 3.00, NULL, 1, NULL, NULL, 0.083333, '2018-01-23 12:48:48', NULL),
(1, 15, NULL, 3.00, NULL, 3.00, 1, NULL, NULL, 0.500000, '2018-01-23 12:51:39', NULL),
(2, 15, NULL, 2.00, NULL, 2.00, 2, NULL, NULL, 0.333333, '2018-01-23 12:51:39', NULL),
(9, 15, NULL, 1.00, NULL, 1.00, 2, NULL, NULL, 0.166667, '2018-01-23 12:51:39', NULL),
(8, 15, NULL, 0.00, NULL, 0.00, 3, NULL, NULL, 0.166667, '2018-01-23 12:51:39', NULL),
(5, 15, NULL, 1.00, NULL, 1.00, 3, NULL, NULL, 0.083333, '2018-01-23 12:51:40', NULL),
(3, 15, NULL, 1.00, NULL, 1.00, 2, NULL, NULL, 0.083333, '2018-01-23 12:51:40', NULL),
(4, 15, NULL, 3.00, NULL, 3.00, 1, NULL, NULL, 0.166667, '2018-01-23 12:51:40', NULL),
(7, 15, NULL, 0.00, NULL, 0.00, 3, NULL, NULL, 0.083333, '2018-01-23 12:51:41', NULL),
(10, 15, NULL, 2.00, NULL, 2.00, 2, NULL, NULL, 0.000000, '2018-01-23 12:51:41', NULL),
(6, 15, NULL, 2.00, NULL, 2.00, 2, NULL, NULL, 0.083333, '2018-01-23 12:51:41', NULL),
(1, 16, NULL, 3.00, NULL, 3.00, 1, NULL, NULL, 0.500000, '2018-01-23 12:54:26', NULL),
(2, 16, NULL, 2.00, NULL, 2.00, 1, NULL, NULL, 0.333333, '2018-01-23 12:54:26', NULL),
(9, 16, NULL, 1.00, NULL, 1.00, 3, NULL, NULL, 0.166667, '2018-01-23 12:54:26', NULL),
(8, 16, NULL, 2.00, NULL, 2.00, 2, NULL, NULL, 0.166667, '2018-01-23 12:54:26', NULL),
(5, 16, NULL, 1.00, NULL, 1.00, 2, NULL, NULL, 0.083333, '2018-01-23 12:54:27', NULL),
(3, 16, NULL, 1.00, NULL, 1.00, 3, NULL, NULL, 0.083333, '2018-01-23 12:54:27', NULL),
(4, 16, NULL, 1.00, NULL, 1.00, 2, NULL, NULL, 0.166667, '2018-01-23 12:54:27', NULL),
(7, 16, NULL, 0.00, NULL, 0.00, 4, NULL, NULL, 0.083333, '2018-01-23 12:54:28', NULL),
(10, 16, NULL, 0.00, NULL, 0.00, 3, NULL, NULL, 0.000000, '2018-01-23 12:54:28', NULL),
(6, 16, NULL, 2.00, NULL, 2.00, 1, NULL, NULL, 0.083333, '2018-01-23 12:54:29', NULL),
(1, 12, NULL, 3.00, NULL, 3.00, 1, NULL, NULL, 0.500000, '2018-01-23 12:55:03', NULL),
(2, 12, NULL, 2.00, NULL, 2.00, 1, NULL, NULL, 0.333333, '2018-01-23 12:55:03', NULL),
(9, 12, NULL, 1.00, NULL, 1.00, 2, NULL, NULL, 0.166667, '2018-01-23 12:55:03', NULL),
(8, 12, NULL, 1.00, NULL, 1.00, 2, NULL, NULL, 0.166667, '2018-01-23 12:55:03', NULL),
(5, 12, NULL, 1.00, NULL, 1.00, 2, NULL, NULL, 0.083333, '2018-01-23 12:55:04', NULL),
(3, 12, NULL, 1.00, NULL, 1.00, 2, NULL, NULL, 0.083333, '2018-01-23 12:55:04', NULL),
(4, 12, NULL, 1.00, NULL, 1.00, 2, NULL, NULL, 0.166667, '2018-01-23 12:55:04', NULL),
(7, 12, NULL, 0.00, NULL, 0.00, 3, NULL, NULL, 0.083333, '2018-01-23 12:55:04', NULL),
(10, 12, NULL, 1.00, NULL, 1.00, 2, NULL, NULL, 0.000000, '2018-01-23 12:55:05', NULL),
(6, 12, NULL, 2.00, NULL, 2.00, 1, NULL, NULL, 0.083333, '2018-01-23 12:55:06', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `student_immunization`
--

CREATE TABLE `student_immunization` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `student_id` decimal(10,0) DEFAULT NULL,
  `type` varchar(25) DEFAULT NULL,
  `medical_date` date DEFAULT NULL,
  `comments` longtext,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `student_medical_ind1` USING BTREE (`student_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `student_immunization`
--

INSERT INTO `student_immunization` VALUES
(1, 4, 'Immunization', '2018-01-02', 'Take syrup properly', '2018-01-23 11:16:00', NULL),
(2, 4, 'Physical', '2018-01-23', 'Hep II vaccination', '2018-01-23 13:20:31', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `student_medical_alerts`
--

CREATE TABLE `student_medical_alerts` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `student_id` decimal(10,0) DEFAULT NULL,
  `title` text,
  `alert_date` date DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `student_medical_alerts_ind1` USING BTREE (`student_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `student_medical_alerts`
--

INSERT INTO `student_medical_alerts` VALUES
(1, 4, 'Avoid street food & take medicine properly.', '2018-01-10', '2018-01-23 11:16:00', NULL),
(2, 1, 'Take care of your knee', '2018-01-23', '2018-01-23 13:04:34', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `student_medical_notes`
--

CREATE TABLE `student_medical_notes` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `student_id` decimal(10,0) NOT NULL,
  `doctors_note_date` date DEFAULT NULL,
  `doctors_note_comments` longtext,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `student_medical_notes`
--

INSERT INTO `student_medical_notes` VALUES
(1, 4, '2018-01-02', 'Need to take healthy food. Avoid Street food.', '2018-01-23 11:16:00', NULL),
(2, 1, '2018-01-02', 'Need to take healthy food. Avoid Street food.', '2018-01-23 11:22:29', NULL),
(3, 6, '2018-01-16', 'Need to take healthy food. Avoid Street food.', '2018-01-23 13:30:07', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `student_medical_visits`
--

CREATE TABLE `student_medical_visits` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `student_id` decimal(10,0) DEFAULT NULL,
  `school_date` date DEFAULT NULL,
  `time_in` varchar(20) DEFAULT NULL,
  `time_out` varchar(20) DEFAULT NULL,
  `reason` text,
  `result` text,
  `comments` longtext,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `student_medical_visits_ind1` USING BTREE (`student_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `student_medical_visits`
--

INSERT INTO `student_medical_visits` VALUES
(1, 4, '2018-01-02', '1:00', '1:15', 'General Check up', 'Normal', 'Take all medicines properly', '2018-01-23 13:21:29', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `student_mp_comments`
--

CREATE TABLE `student_mp_comments` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `student_id` decimal(10,0) NOT NULL,
  `syear` decimal(4,0) NOT NULL,
  `marking_period_id` int(11) NOT NULL,
  `staff_id` int(11) DEFAULT NULL,
  `comment` longtext,
  `comment_date` date DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `student_mp_comments`
--

INSERT INTO `student_mp_comments` VALUES
(1, 4, 2017, 17, 1, 'Colin gets distracted and disturbs the class when he is sitting next to his best friends. Isolate him to a corner in the classroom so that he can focus on his work. ', '2017-11-14', '2018-01-23 11:17:23', NULL),
(2, 1, 2017, 17, 1, 'Need to improve skills.', '2018-01-10', '2018-01-23 11:22:46', NULL),
(3, 6, 2017, 17, 3, 'Good you are improving.', '2018-01-23', '2018-01-23 13:33:21', NULL),
(4, 6, 2017, 17, 3, 'Todo lo Mejor... But be more attentive in chemistry class.', '2018-01-24', '2018-01-23 13:37:05', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `student_report_card_comments`
--

CREATE TABLE `student_report_card_comments` (
  `syear` decimal(4,0) NOT NULL,
  `school_id` decimal(10,0) DEFAULT NULL,
  `student_id` decimal(10,0) NOT NULL,
  `course_period_id` decimal(10,0) NOT NULL,
  `report_card_comment_id` decimal(10,0) NOT NULL,
  `comment` varchar(1) DEFAULT NULL,
  `marking_period_id` int(11) NOT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`syear`,`student_id`,`course_period_id`,`marking_period_id`,`report_card_comment_id`),
  KEY `student_report_card_comments_ind1` USING BTREE (`school_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `student_report_card_grades`
--

CREATE TABLE `student_report_card_grades` (
  `syear` decimal(4,0) DEFAULT NULL,
  `school_id` decimal(10,0) DEFAULT NULL,
  `student_id` decimal(10,0) NOT NULL,
  `course_period_id` decimal(10,0) DEFAULT NULL,
  `report_card_grade_id` decimal(10,0) DEFAULT NULL,
  `report_card_comment_id` decimal(10,0) DEFAULT NULL,
  `comment` longtext,
  `grade_percent` decimal(5,2) DEFAULT NULL,
  `marking_period_id` varchar(10) NOT NULL,
  `grade_letter` varchar(5) DEFAULT NULL,
  `weighted_gp` decimal(10,3) DEFAULT NULL,
  `unweighted_gp` decimal(10,3) DEFAULT NULL,
  `gp_scale` decimal(10,3) DEFAULT NULL,
  `gpa_cal` varchar(2) DEFAULT NULL,
  `credit_attempted` decimal(10,3) DEFAULT NULL,
  `credit_earned` decimal(10,3) DEFAULT NULL,
  `credit_category` varchar(10) DEFAULT NULL,
  `course_code` varchar(100) DEFAULT NULL,
  `course_title` text,
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `student_report_card_grades_ind1` USING BTREE (`school_id`),
  KEY `student_report_card_grades_ind2` USING BTREE (`student_id`),
  KEY `student_report_card_grades_ind3` USING BTREE (`course_period_id`),
  KEY `student_report_card_grades_ind4` USING BTREE (`marking_period_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=81 ;

--
-- Dumping data for table `student_report_card_grades`
--

INSERT INTO `student_report_card_grades` VALUES
(2017, 1, 1, 4, 1, NULL, ' ', 91.82, '17', 'A', NULL, 3.000, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'Spanish', 1, '2018-01-23 12:43:52', NULL),
(2017, 1, 2, 4, 2, NULL, ' ', 83.64, '17', 'B', NULL, 2.000, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'Spanish', 2, '2018-01-23 12:43:52', NULL),
(2017, 1, 9, 4, 3, NULL, ' ', 70.91, '17', 'C', NULL, 1.000, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'Spanish', 3, '2018-01-23 12:43:52', NULL),
(2017, 1, 8, 4, 3, NULL, ' ', 74.55, '17', 'C', NULL, 1.000, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'Spanish', 4, '2018-01-23 12:43:53', NULL),
(2017, 1, 5, 4, 4, NULL, ' ', 68.18, '17', 'D', NULL, 1.000, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'Spanish', 5, '2018-01-23 12:43:53', NULL),
(2017, 1, 3, 4, 3, NULL, ' ', 71.82, '17', 'C', NULL, 1.000, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'Spanish', 6, '2018-01-23 12:43:53', NULL),
(2017, 1, 4, 4, 4, NULL, ' ', 62.73, '17', 'D', NULL, 1.000, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'Spanish', 7, '2018-01-23 12:43:54', NULL),
(2017, 1, 7, 4, 5, NULL, ' ', 53.64, '17', 'F', NULL, 0.000, 4.000, NULL, 4.000, 0.000, NULL, NULL, 'Spanish', 8, '2018-01-23 12:43:54', NULL),
(2017, 1, 10, 4, 5, NULL, ' ', 56.36, '17', 'F', NULL, 0.000, 4.000, NULL, 4.000, 0.000, NULL, NULL, 'Spanish', 9, '2018-01-23 12:43:54', NULL),
(2017, 1, 6, 4, 3, NULL, ' ', 77.27, '17', 'C', NULL, 1.000, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'Spanish', 10, '2018-01-23 12:43:54', NULL),
(2017, 1, 1, 2, 1, NULL, ' ', 91.60, '17', 'A', NULL, 3.000, 4.000, NULL, 2.000, 2.000, NULL, NULL, 'English', 11, '2018-01-23 12:45:55', NULL),
(2017, 1, 2, 2, 1, NULL, ' ', 88.40, '17', 'A', NULL, 3.000, 4.000, NULL, 2.000, 2.000, NULL, NULL, 'English', 12, '2018-01-23 12:45:55', NULL),
(2017, 1, 9, 2, 4, NULL, ' ', 62.00, '17', 'D', NULL, 1.000, 4.000, NULL, 2.000, 2.000, NULL, NULL, 'English', 13, '2018-01-23 12:45:56', NULL),
(2017, 1, 8, 2, 2, NULL, ' ', 75.60, '17', 'B', NULL, 2.000, 4.000, NULL, 2.000, 2.000, NULL, NULL, 'English', 14, '2018-01-23 12:45:56', NULL),
(2017, 1, 5, 2, 4, NULL, ' ', 58.00, '17', 'D', NULL, 1.000, 4.000, NULL, 2.000, 2.000, NULL, NULL, 'English', 15, '2018-01-23 12:45:57', NULL),
(2017, 1, 3, 2, 4, NULL, ' ', 57.20, '17', 'D', NULL, 1.000, 4.000, NULL, 2.000, 2.000, NULL, NULL, 'English', 16, '2018-01-23 12:45:57', NULL),
(2017, 1, 4, 2, 1, NULL, ' ', 93.60, '17', 'A', NULL, 3.000, 4.000, NULL, 2.000, 2.000, NULL, NULL, 'English', 17, '2018-01-23 12:45:58', NULL),
(2017, 1, 7, 2, 3, NULL, ' ', 72.00, '17', 'C', NULL, 1.000, 4.000, NULL, 2.000, 2.000, NULL, NULL, 'English', 18, '2018-01-23 12:45:58', NULL),
(2017, 1, 10, 2, 5, NULL, ' ', 53.20, '17', 'F', NULL, 0.000, 4.000, NULL, 2.000, 0.000, NULL, NULL, 'English', 19, '2018-01-23 12:45:58', NULL),
(2017, 1, 6, 2, 3, NULL, ' ', 66.80, '17', 'C', NULL, 1.000, 4.000, NULL, 2.000, 2.000, NULL, NULL, 'English', 20, '2018-01-23 12:45:59', NULL),
(2017, 1, 1, 3, 1, NULL, ' ', 92.00, '17', 'A', NULL, 3.000, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'English', 21, '2018-01-23 12:46:16', NULL),
(2017, 1, 2, 3, 2, NULL, ' ', 85.14, '17', 'B', NULL, 2.000, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'English', 22, '2018-01-23 12:46:16', NULL),
(2017, 1, 9, 3, 4, NULL, ' ', 62.86, '17', 'D', NULL, 1.000, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'English', 23, '2018-01-23 12:46:17', NULL),
(2017, 1, 8, 3, 3, NULL, ' ', 77.14, '17', 'C', NULL, 1.000, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'English', 24, '2018-01-23 12:46:17', NULL),
(2017, 1, 5, 3, 5, NULL, ' ', 54.29, '17', 'F', NULL, 0.000, 4.000, NULL, 4.000, 0.000, NULL, NULL, 'English', 25, '2018-01-23 12:46:18', NULL),
(2017, 1, 3, 3, 5, NULL, ' ', 48.00, '17', 'F', NULL, 0.000, 4.000, NULL, 4.000, 0.000, NULL, NULL, 'English', 26, '2018-01-23 12:46:18', NULL),
(2017, 1, 4, 3, 3, NULL, ' ', 79.43, '17', 'C', NULL, 1.000, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'English', 27, '2018-01-23 12:46:19', NULL),
(2017, 1, 7, 3, 3, NULL, ' ', 71.43, '17', 'C', NULL, 1.000, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'English', 28, '2018-01-23 12:46:19', NULL),
(2017, 1, 10, 3, 5, NULL, ' ', 34.29, '17', 'F', NULL, 0.000, 4.000, NULL, 4.000, 0.000, NULL, NULL, 'English', 29, '2018-01-23 12:46:20', NULL),
(2017, 1, 6, 3, 5, NULL, ' ', 59.43, '17', 'F', NULL, 0.000, 4.000, NULL, 4.000, 0.000, NULL, NULL, 'English', 30, '2018-01-23 12:46:20', NULL),
(2017, 1, 1, 8, 1, NULL, ' ', 90.21, '17', 'A', NULL, 3.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 31, '2018-01-23 12:46:37', NULL),
(2017, 1, 2, 8, 2, NULL, ' ', 84.68, '17', 'B', NULL, 2.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 32, '2018-01-23 12:46:37', NULL),
(2017, 1, 9, 8, 2, NULL, ' ', 81.28, '17', 'B', NULL, 2.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 33, '2018-01-23 12:46:37', NULL),
(2017, 1, 8, 8, 5, NULL, ' ', 58.09, '17', 'F', NULL, 0.000, 4.000, NULL, 1.000, 0.000, NULL, NULL, 'English', 34, '2018-01-23 12:46:38', NULL),
(2017, 1, 5, 8, 5, NULL, ' ', 48.94, '17', 'F', NULL, 0.000, 4.000, NULL, 1.000, 0.000, NULL, NULL, 'English', 35, '2018-01-23 12:46:38', NULL),
(2017, 1, 3, 8, 6, NULL, ' ', 6.81, '17', 'Inc.', NULL, 0.000, 4.000, NULL, 1.000, 0.000, NULL, NULL, 'English', 36, '2018-01-23 12:46:39', NULL),
(2017, 1, 4, 8, 4, NULL, ' ', 61.06, '17', 'D', NULL, 1.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 37, '2018-01-23 12:46:39', NULL),
(2017, 1, 7, 8, 3, NULL, ' ', 78.30, '17', 'C', NULL, 1.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 38, '2018-01-23 12:46:40', NULL),
(2017, 1, 10, 8, 5, NULL, ' ', 58.72, '17', 'F', NULL, 0.000, 4.000, NULL, 1.000, 0.000, NULL, NULL, 'English', 39, '2018-01-23 12:46:40', NULL),
(2017, 1, 6, 8, 4, NULL, ' ', 69.36, '17', 'D', NULL, 1.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 40, '2018-01-23 12:46:41', NULL),
(2017, 1, 1, 6, 1, NULL, ' ', 92.89, '1', 'A', 4.000, NULL, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'Chemistry', 41, '2018-01-23 12:48:45', NULL),
(2017, 1, 2, 6, 2, NULL, ' ', 79.56, '1', 'B', 3.000, NULL, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'Chemistry', 42, '2018-01-23 12:48:46', NULL),
(2017, 1, 9, 6, 3, NULL, ' ', 71.11, '1', 'C', 2.000, NULL, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'Chemistry', 43, '2018-01-23 12:48:46', NULL),
(2017, 1, 8, 6, 2, NULL, ' ', 75.56, '1', 'B', 3.000, NULL, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'Chemistry', 44, '2018-01-23 12:48:46', NULL),
(2017, 1, 5, 6, 3, NULL, ' ', 67.56, '1', 'C', 2.000, NULL, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'Chemistry', 45, '2018-01-23 12:48:47', NULL),
(2017, 1, 3, 6, 5, NULL, ' ', 52.89, '1', 'F', 0.000, NULL, 4.000, NULL, 4.000, 0.000, NULL, NULL, 'Chemistry', 46, '2018-01-23 12:48:47', NULL),
(2017, 1, 4, 6, 2, NULL, ' ', 76.00, '1', 'B', 3.000, NULL, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'Chemistry', 47, '2018-01-23 12:48:47', NULL),
(2017, 1, 7, 6, 3, NULL, ' ', 74.67, '1', 'C', 2.000, NULL, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'Chemistry', 48, '2018-01-23 12:48:47', NULL),
(2017, 1, 10, 6, 3, NULL, ' ', 68.89, '1', 'C', 2.000, NULL, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'Chemistry', 49, '2018-01-23 12:48:48', NULL),
(2017, 1, 6, 6, 2, NULL, ' ', 75.56, '1', 'B', 3.000, NULL, 4.000, NULL, 4.000, 4.000, NULL, NULL, 'Chemistry', 50, '2018-01-23 12:48:48', NULL),
(2017, 1, 1, 8, 1, NULL, ' ', 95.00, '15', 'A', NULL, 3.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 51, '2018-01-23 12:51:39', NULL),
(2017, 1, 2, 8, 2, NULL, ' ', 83.33, '15', 'B', NULL, 2.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 52, '2018-01-23 12:51:39', NULL),
(2017, 1, 9, 8, 3, NULL, ' ', 75.00, '15', 'C', NULL, 1.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 53, '2018-01-23 12:51:39', NULL),
(2017, 1, 8, 8, 5, NULL, ' ', 51.67, '15', 'F', NULL, 0.000, 4.000, NULL, 1.000, 0.000, NULL, NULL, 'English', 54, '2018-01-23 12:51:39', NULL),
(2017, 1, 5, 8, 4, NULL, ' ', 65.83, '15', 'D', NULL, 1.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 55, '2018-01-23 12:51:40', NULL),
(2017, 1, 3, 8, 3, NULL, ' ', 78.33, '15', 'C', NULL, 1.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 56, '2018-01-23 12:51:40', NULL),
(2017, 1, 4, 8, 1, NULL, ' ', 90.00, '15', 'A', NULL, 3.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 57, '2018-01-23 12:51:40', NULL),
(2017, 1, 7, 8, 5, NULL, ' ', 56.67, '15', 'F', NULL, 0.000, 4.000, NULL, 1.000, 0.000, NULL, NULL, 'English', 58, '2018-01-23 12:51:41', NULL),
(2017, 1, 10, 8, 2, NULL, ' ', 80.00, '15', 'B', NULL, 2.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 59, '2018-01-23 12:51:41', NULL),
(2017, 1, 6, 8, 2, NULL, ' ', 80.00, '15', 'B', NULL, 2.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 60, '2018-01-23 12:51:41', NULL),
(2017, 1, 1, 8, 1, NULL, ' ', 96.00, '16', 'A', NULL, 3.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 61, '2018-01-23 12:54:26', NULL),
(2017, 1, 2, 8, 2, NULL, ' ', 82.29, '16', 'B', NULL, 2.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 62, '2018-01-23 12:54:26', NULL),
(2017, 1, 9, 8, 3, NULL, ' ', 78.29, '16', 'C', NULL, 1.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 63, '2018-01-23 12:54:26', NULL),
(2017, 1, 8, 8, 2, NULL, ' ', 82.29, '16', 'B', NULL, 2.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 64, '2018-01-23 12:54:26', NULL),
(2017, 1, 5, 8, 4, NULL, ' ', 67.43, '16', 'D', NULL, 1.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 65, '2018-01-23 12:54:27', NULL),
(2017, 1, 3, 8, 3, NULL, ' ', 72.57, '16', 'C', NULL, 1.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 66, '2018-01-23 12:54:27', NULL),
(2017, 1, 4, 8, 4, NULL, ' ', 67.43, '16', 'D', NULL, 1.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 67, '2018-01-23 12:54:27', NULL),
(2017, 1, 7, 8, 5, NULL, ' ', 49.71, '16', 'F', NULL, 0.000, 4.000, NULL, 1.000, 0.000, NULL, NULL, 'English', 68, '2018-01-23 12:54:28', NULL),
(2017, 1, 10, 8, 5, NULL, ' ', 45.14, '16', 'F', NULL, 0.000, 4.000, NULL, 1.000, 0.000, NULL, NULL, 'English', 69, '2018-01-23 12:54:28', NULL),
(2017, 1, 6, 8, 2, NULL, ' ', 80.57, '16', 'B', NULL, 2.000, 4.000, NULL, 1.000, 1.000, NULL, NULL, 'English', 70, '2018-01-23 12:54:29', NULL),
(2017, 1, 1, 8, 1, NULL, ' ', 95.55, '12', 'A', NULL, 3.000, 4.000, NULL, 1.333, 1.333, NULL, NULL, 'English', 71, '2018-01-23 12:55:03', NULL),
(2017, 1, 2, 8, 2, NULL, ' ', 82.76, '12', 'B', NULL, 2.000, 4.000, NULL, 1.333, 1.333, NULL, NULL, 'English', 72, '2018-01-23 12:55:03', NULL),
(2017, 1, 9, 8, 3, NULL, ' ', 76.81, '12', 'C', NULL, 1.000, 4.000, NULL, 1.333, 1.333, NULL, NULL, 'English', 73, '2018-01-23 12:55:03', NULL),
(2017, 1, 8, 8, 4, NULL, ' ', 68.51, '12', 'D', NULL, 1.000, 4.000, NULL, 1.333, 1.333, NULL, NULL, 'English', 74, '2018-01-23 12:55:03', NULL),
(2017, 1, 5, 8, 4, NULL, ' ', 66.71, '12', 'D', NULL, 1.000, 4.000, NULL, 1.333, 1.333, NULL, NULL, 'English', 75, '2018-01-23 12:55:04', NULL),
(2017, 1, 3, 8, 3, NULL, ' ', 75.16, '12', 'C', NULL, 1.000, 4.000, NULL, 1.333, 1.333, NULL, NULL, 'English', 76, '2018-01-23 12:55:04', NULL),
(2017, 1, 4, 8, 3, NULL, ' ', 77.59, '12', 'C', NULL, 1.000, 4.000, NULL, 1.333, 1.333, NULL, NULL, 'English', 77, '2018-01-23 12:55:04', NULL),
(2017, 1, 7, 8, 5, NULL, ' ', 52.84, '12', 'F', NULL, 0.000, 4.000, NULL, 1.333, 0.000, NULL, NULL, 'English', 78, '2018-01-23 12:55:04', NULL),
(2017, 1, 10, 8, 4, NULL, ' ', 60.83, '12', 'D', NULL, 1.000, 4.000, NULL, 1.333, 1.333, NULL, NULL, 'English', 79, '2018-01-23 12:55:05', NULL),
(2017, 1, 6, 8, 2, NULL, ' ', 80.31, '12', 'B', NULL, 2.000, 4.000, NULL, 1.333, 1.333, NULL, NULL, 'English', 80, '2018-01-23 12:55:06', NULL);



-- --------------------------------------------------------

--
-- Table structure for table `system_preference`
--

CREATE TABLE `system_preference` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `school_id` int(8) NOT NULL,
  `full_day_minute` int(8) DEFAULT NULL,
  `half_day_minute` int(8) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `system_preference`
--

INSERT INTO `system_preference` VALUES
(1, 1, 5, 2, '2015-07-28 11:26:33', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `system_preference_misc`
--

CREATE TABLE `system_preference_misc` (
  `fail_count` decimal(5,0) NOT NULL DEFAULT '3',
  `activity_days` decimal(5,0) NOT NULL DEFAULT '30',
  `system_maintenance_switch` char(1) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `teacher_reassignment`
--

CREATE TABLE `teacher_reassignment` (
  `course_period_id` int(11) NOT NULL,
  `teacher_id` int(11) NOT NULL,
  `assign_date` date NOT NULL,
  `modified_date` date NOT NULL,
  `pre_teacher_id` int(11) NOT NULL,
  `modified_by` int(11) NOT NULL,
  `updated` enum('Y','N') NOT NULL DEFAULT 'N',
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Stand-in structure for view `transcript_grades`
--
CREATE TABLE `transcript_grades` (
`school_id` int(8)
,`school_name` varchar(100)
,`mp_source` varchar(7)
,`mp_id` int(11)
,`mp_name` varchar(50)
,`syear` decimal(10,0)
,`posted` date
,`student_id` decimal(10,0)
,`gradelevel` varchar(100)
,`grade_letter` varchar(5)
,`gp_value` decimal(10,3)
,`weighting` decimal(10,3)
,`gp_scale` decimal(10,3)
,`credit_attempted` decimal(10,3)
,`credit_earned` decimal(10,3)
,`credit_category` varchar(10)
,`course_period_id` decimal(10,0)
,`course_name` text
,`course_short_name` varchar(25)
,`gpa_cal` varchar(2)
,`weighted_gpa` decimal(10,2)
,`unweighted_gpa` decimal(10,2)
,`gpa` decimal(10,2)
,`class_rank` decimal(10,0)
,`sort_order` decimal(10,0)
);
-- --------------------------------------------------------

--
-- Table structure for table `user_profiles`
--

CREATE TABLE `user_profiles` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `profile` varchar(30) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

--
-- Dumping data for table `user_profiles`
--

INSERT INTO `user_profiles` VALUES
(0, 'admin', 'Super Administrator', '2015-07-28 05:56:33', NULL),
(1, 'admin', 'Administrator', '2015-07-28 05:56:33', NULL),
(2, 'teacher', 'Teacher', '2015-07-28 05:56:33', NULL),
(3, 'student', 'Student', '2015-07-28 05:56:33', NULL),
(4, 'parent', 'Parent', '2015-07-28 05:56:33', NULL),
(5, 'admin', 'Admin Asst', '2015-07-28 05:56:33', NULL);

-- --------------------------------------------------------

--
-- Structure for view `course_details`
--
DROP TABLE IF EXISTS `course_details`;

CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `course_details` AS select `cp`.`school_id` AS `school_id`,`cp`.`syear` AS `syear`,`cp`.`marking_period_id` AS `marking_period_id`,`c`.`subject_id` AS `subject_id`,`cp`.`course_id` AS `course_id`,`cp`.`course_period_id` AS `course_period_id`,`cp`.`teacher_id` AS `teacher_id`,`cp`.`secondary_teacher_id` AS `secondary_teacher_id`,`c`.`title` AS `course_title`,`cp`.`title` AS `cp_title`,`cp`.`grade_scale_id` AS `grade_scale_id`,`cp`.`mp` AS `mp`,`cp`.`credits` AS `credits`,`cp`.`begin_date` AS `begin_date`,`cp`.`end_date` AS `end_date` from (`course_periods` `cp` join `courses` `c`) where (`cp`.`course_id` = `c`.`course_id`);

-- --------------------------------------------------------

--
-- Structure for view `enroll_grade`
--
DROP TABLE IF EXISTS `enroll_grade`;

CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `enroll_grade` AS select `e`.`id` AS `id`,`e`.`syear` AS `syear`,`e`.`school_id` AS `school_id`,`e`.`student_id` AS `student_id`,`e`.`start_date` AS `start_date`,`e`.`end_date` AS `end_date`,`sg`.`short_name` AS `short_name`,`sg`.`title` AS `title` from (`student_enrollment` `e` join `school_gradelevels` `sg`) where (`e`.`grade_id` = `sg`.`id`);

-- --------------------------------------------------------

--
-- Structure for view `marking_periods`
--
DROP TABLE IF EXISTS `marking_periods`;

CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `marking_periods` AS select `q`.`marking_period_id` AS `marking_period_id`,'openSIS' AS `mp_source`,`q`.`syear` AS `syear`,`q`.`school_id` AS `school_id`,'quarter' AS `mp_type`,`q`.`title` AS `title`,`q`.`short_name` AS `short_name`,`q`.`sort_order` AS `sort_order`,`q`.`semester_id` AS `parent_id`,`s`.`year_id` AS `grandparent_id`,`q`.`start_date` AS `start_date`,`q`.`end_date` AS `end_date`,`q`.`post_start_date` AS `post_start_date`,`q`.`post_end_date` AS `post_end_date`,`q`.`does_grades` AS `does_grades`,`q`.`does_exam` AS `does_exam`,`q`.`does_comments` AS `does_comments` from (`school_quarters` `q` join `school_semesters` `s` on((`q`.`semester_id` = `s`.`marking_period_id`))) union select `school_semesters`.`marking_period_id` AS `marking_period_id`,'openSIS' AS `mp_source`,`school_semesters`.`syear` AS `syear`,`school_semesters`.`school_id` AS `school_id`,'semester' AS `mp_type`,`school_semesters`.`title` AS `title`,`school_semesters`.`short_name` AS `short_name`,`school_semesters`.`sort_order` AS `sort_order`,`school_semesters`.`year_id` AS `parent_id`,-(1) AS `grandparent_id`,`school_semesters`.`start_date` AS `start_date`,`school_semesters`.`end_date` AS `end_date`,`school_semesters`.`post_start_date` AS `post_start_date`,`school_semesters`.`post_end_date` AS `post_end_date`,`school_semesters`.`does_grades` AS `does_grades`,`school_semesters`.`does_exam` AS `does_exam`,`school_semesters`.`does_comments` AS `does_comments` from `school_semesters` union select `school_years`.`marking_period_id` AS `marking_period_id`,'openSIS' AS `mp_source`,`school_years`.`syear` AS `syear`,`school_years`.`school_id` AS `school_id`,'year' AS `mp_type`,`school_years`.`title` AS `title`,`school_years`.`short_name` AS `short_name`,`school_years`.`sort_order` AS `sort_order`,-(1) AS `parent_id`,-(1) AS `grandparent_id`,`school_years`.`start_date` AS `start_date`,`school_years`.`end_date` AS `end_date`,`school_years`.`post_start_date` AS `post_start_date`,`school_years`.`post_end_date` AS `post_end_date`,`school_years`.`does_grades` AS `does_grades`,`school_years`.`does_exam` AS `does_exam`,`school_years`.`does_comments` AS `does_comments` from `school_years` union select `history_marking_periods`.`marking_period_id` AS `marking_period_id`,'History' AS `mp_source`,`history_marking_periods`.`syear` AS `syear`,`history_marking_periods`.`school_id` AS `school_id`,`history_marking_periods`.`mp_type` AS `mp_type`,`history_marking_periods`.`name` AS `title`,NULL AS `short_name`,NULL AS `sort_order`,`history_marking_periods`.`parent_id` AS `parent_id`,-(1) AS `grandparent_id`,NULL AS `start_date`,`history_marking_periods`.`post_end_date` AS `end_date`,NULL AS `post_start_date`,`history_marking_periods`.`post_end_date` AS `post_end_date`,'Y' AS `does_grades`,NULL AS `does_exam`,NULL AS `does_comments` from `history_marking_periods`;

-- --------------------------------------------------------

--
-- Structure for view `transcript_grades`
--
DROP TABLE IF EXISTS `transcript_grades`;

CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `transcript_grades` AS select `s`.`id` AS `school_id`,if((`mp`.`mp_source` = 'history'),(select `history_school`.`school_name` from `history_school` where ((`history_school`.`student_id` = `rcg`.`student_id`) and (`history_school`.`marking_period_id` = `mp`.`marking_period_id`))),`s`.`title`) AS `school_name`,`mp`.`mp_source` AS `mp_source`,`mp`.`marking_period_id` AS `mp_id`,`mp`.`title` AS `mp_name`,`mp`.`syear` AS `syear`,`mp`.`end_date` AS `posted`,`rcg`.`student_id` AS `student_id`,`sgc`.`grade_level_short` AS `gradelevel`,`rcg`.`grade_letter` AS `grade_letter`,`rcg`.`unweighted_gp` AS `gp_value`,`rcg`.`weighted_gp` AS `weighting`,`rcg`.`gp_scale` AS `gp_scale`,`rcg`.`credit_attempted` AS `credit_attempted`,`rcg`.`credit_earned` AS `credit_earned`,`rcg`.`credit_category` AS `credit_category`,`rcg`.`course_period_id` AS `course_period_id`,`rcg`.`course_title` AS `course_name`,(select `courses`.`short_name` from (`course_periods` join `courses`) where ((`course_periods`.`course_id` = `courses`.`course_id`) and (`course_periods`.`course_period_id` = `rcg`.`course_period_id`))) AS `course_short_name`,`rcg`.`gpa_cal` AS `gpa_cal`,`sgc`.`weighted_gpa` AS `weighted_gpa`,`sgc`.`unweighted_gpa` AS `unweighted_gpa`,`sgc`.`gpa` AS `gpa`,`sgc`.`class_rank` AS `class_rank`,`mp`.`sort_order` AS `sort_order` from (((`student_report_card_grades` `rcg` join `marking_periods` `mp` on(((`mp`.`marking_period_id` = `rcg`.`marking_period_id`) and (`mp`.`mp_type` in ('year','semester','quarter'))))) join `student_gpa_calculated` `sgc` on(((`sgc`.`student_id` = `rcg`.`student_id`) and (`sgc`.`marking_period_id` = `rcg`.`marking_period_id`)))) join `schools` `s` on((`s`.`id` = `mp`.`school_id`)));
--
-- Triggers `student_report_card_grades`
--
DROP TRIGGER IF EXISTS `td_student_report_card_grades`;
DELIMITER //
CREATE TRIGGER `td_student_report_card_grades` AFTER DELETE ON `student_report_card_grades`
 FOR EACH ROW SELECT CALC_GPA_MP(OLD.student_id, OLD.marking_period_id) INTO @return$$
//
DELIMITER ;
DROP TRIGGER IF EXISTS `ti_student_report_card_grades`;
DELIMITER //
CREATE TRIGGER `ti_student_report_card_grades` AFTER INSERT ON `student_report_card_grades`
 FOR EACH ROW SELECT CALC_GPA_MP(NEW.student_id, NEW.marking_period_id) INTO @return$$
//
DELIMITER ;
DROP TRIGGER IF EXISTS `tu_student_report_card_grades`;
DELIMITER //
CREATE TRIGGER `tu_student_report_card_grades` AFTER UPDATE ON `student_report_card_grades`
 FOR EACH ROW SELECT CALC_GPA_MP(NEW.student_id, NEW.marking_period_id) INTO @return$$
//
DELIMITER ;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

Zerion Mini Shell 1.0