DEBUG LOG CLEARED - TESTING FIXUNIQUE DEBUG LINE AT TOP POST DATA: {"student_id":13,"advisory_id":2,"quarter_id":1,"user_id":5} DEBUG: Entered foreach for student 13 DEBUG: Feedbacks found: 4, Subjects needed: 4 {"advisory_id":2,"student_id":13,"quarter_id":1,"subjects":[2,4,6,1],"feedbacks":[{"subject_id":1,"visual_feedback_id":1},{"subject_id":2,"visual_feedback_id":1},{"subject_id":4,"visual_feedback_id":2},{"subject_id":6,"visual_feedback_id":2}],"shapeScores":[4.6,4.6,3.7995,3.7995],"averageScore":4.2,"quarter_avg_score":91.304,"quarter_visual_feedback_id":1,"risk_id":1,"finalized_by":5} === INSERT ATTEMPT START === student_id: 13 advisory_id: 2 quarter_id: 1 quarter_visual_feedback_id: 1 risk_id: 1 quarter_avg_score: 91.304 finalized_by: 5 Insert SQL: INSERT INTO tbl_progress_cards (student_id, advisory_id, quarter_id, quarter_visual_feedback_id, risk_id, quarter_avg_score, is_finalized, finalized_by, report_date) VALUES (?, ?, ?, ?, ?, ?, 1, ?, NOW()) ON DUPLICATE KEY UPDATE quarter_visual_feedback_id=VALUES(quarter_visual_feedback_id), risk_id=VALUES(risk_id), quarter_avg_score=VALUES(quarter_avg_score), is_finalized=1, finalized_by=VALUES(finalized_by), report_date=VALUES(report_date) Params: [13,2,1,1,1,91.304,5] OK: 1, Affected: 1 === INSERT ATTEMPT END === === NOTIFICATION CREATION START === Student ID: 13, Quarter ID: 1, Teacher ID: 5 Check Query: SELECT n.notification_id FROM tbl_notifications n INNER JOIN tbl_notification_recipients nr ON n.notification_id = nr.notification_id INNER JOIN tbl_progress_notification pn ON n.notification_id = pn.notification_id WHERE n.created_by = ? AND nr.recipient_type = 'Teacher' AND nr.user_id = ? AND pn.student_id = ? AND pn.quarter_id = ? AND n.notif_message LIKE '%[QUARTERLY PROGRESS]%' Check Params: [5,5,13,1] Existing notification found: NO Creating new notification Inserted into tbl_notifications, ID: 137 Parent row: {"parent_id":29} Inserted parent recipient Inserted teacher recipient Inserted into tbl_progress_notification === NOTIFICATION CREATION SUCCESS === SUCCESS: Progress card(s) inserted/updated for: Gleiah Jimenez Madrenos UNIQUE DEBUG LINE AT TOP POST DATA: {"student_id":13,"advisory_id":2,"quarter_id":2,"user_id":5} DEBUG: Entered foreach for student 13 DEBUG: Feedbacks found: 4, Subjects needed: 4 {"advisory_id":2,"student_id":13,"quarter_id":2,"subjects":[2,4,6,1],"feedbacks":[{"subject_id":1,"visual_feedback_id":1},{"subject_id":2,"visual_feedback_id":3},{"subject_id":4,"visual_feedback_id":1},{"subject_id":6,"visual_feedback_id":1}],"shapeScores":[4.6,2.9995,4.6,4.6],"averageScore":4.2,"quarter_avg_score":91.304,"quarter_visual_feedback_id":1,"risk_id":1,"finalized_by":5} === INSERT ATTEMPT START === student_id: 13 advisory_id: 2 quarter_id: 2 quarter_visual_feedback_id: 1 risk_id: 1 quarter_avg_score: 91.304 finalized_by: 5 Insert SQL: INSERT INTO tbl_progress_cards (student_id, advisory_id, quarter_id, quarter_visual_feedback_id, risk_id, quarter_avg_score, is_finalized, finalized_by, report_date) VALUES (?, ?, ?, ?, ?, ?, 1, ?, NOW()) ON DUPLICATE KEY UPDATE quarter_visual_feedback_id=VALUES(quarter_visual_feedback_id), risk_id=VALUES(risk_id), quarter_avg_score=VALUES(quarter_avg_score), is_finalized=1, finalized_by=VALUES(finalized_by), report_date=VALUES(report_date) Params: [13,2,2,1,1,91.304,5] OK: 1, Affected: 1 === INSERT ATTEMPT END === === NOTIFICATION CREATION START === Student ID: 13, Quarter ID: 2, Teacher ID: 5 Check Query: SELECT n.notification_id FROM tbl_notifications n INNER JOIN tbl_notification_recipients nr ON n.notification_id = nr.notification_id INNER JOIN tbl_progress_notification pn ON n.notification_id = pn.notification_id WHERE n.created_by = ? AND nr.recipient_type = 'Teacher' AND nr.user_id = ? AND pn.student_id = ? AND pn.quarter_id = ? AND n.notif_message LIKE '%[QUARTERLY PROGRESS]%' Check Params: [5,5,13,2] Existing notification found: NO Creating new notification Inserted into tbl_notifications, ID: 138 Parent row: {"parent_id":29} Inserted parent recipient Inserted teacher recipient Inserted into tbl_progress_notification === NOTIFICATION CREATION SUCCESS === SUCCESS: Progress card(s) inserted/updated for: Gleiah Jimenez Madrenos UNIQUE DEBUG LINE AT TOP POST DATA: {"student_id":13,"advisory_id":2,"quarter_id":1,"user_id":"5"} DEBUG: Entered foreach for student 13 DEBUG: Feedbacks found: 4, Subjects needed: 4 {"advisory_id":2,"student_id":13,"quarter_id":1,"subjects":[2,4,6,1],"feedbacks":[{"subject_id":1,"visual_feedback_id":1},{"subject_id":2,"visual_feedback_id":1},{"subject_id":4,"visual_feedback_id":2},{"subject_id":6,"visual_feedback_id":2}],"shapeScores":[4.6,4.6,3.7995,3.7995],"averageScore":4.2,"quarter_avg_score":91.304,"quarter_visual_feedback_id":1,"risk_id":1,"finalized_by":"5"} === INSERT ATTEMPT START === student_id: 13 advisory_id: 2 quarter_id: 1 quarter_visual_feedback_id: 1 risk_id: 1 quarter_avg_score: 91.304 finalized_by: '5' Insert SQL: INSERT INTO tbl_progress_cards (student_id, advisory_id, quarter_id, quarter_visual_feedback_id, risk_id, quarter_avg_score, is_finalized, finalized_by, report_date) VALUES (?, ?, ?, ?, ?, ?, 1, ?, NOW()) ON DUPLICATE KEY UPDATE quarter_visual_feedback_id=VALUES(quarter_visual_feedback_id), risk_id=VALUES(risk_id), quarter_avg_score=VALUES(quarter_avg_score), is_finalized=1, finalized_by=VALUES(finalized_by), report_date=VALUES(report_date) Params: [13,2,1,1,1,91.304,"5"] OK: 1, Affected: 2 === INSERT ATTEMPT END === === NOTIFICATION CREATION START === Student ID: 13, Quarter ID: 1, Teacher ID: 5 Check Query: SELECT n.notification_id FROM tbl_notifications n INNER JOIN tbl_notification_recipients nr ON n.notification_id = nr.notification_id INNER JOIN tbl_progress_notification pn ON n.notification_id = pn.notification_id WHERE n.created_by = ? AND nr.recipient_type = 'Teacher' AND nr.user_id = ? AND pn.student_id = ? AND pn.quarter_id = ? AND n.notif_message LIKE '%[QUARTERLY PROGRESS]%' Check Params: ["5","5",13,1] Existing notification found: YES Updating existing notification ID: 137 Updated existing notification message to: [QUARTERLY PROGRESS] Updated a Quarterly Progress SUCCESS: Progress card(s) inserted/updated for: Gleiah Jimenez Madrenos UNIQUE DEBUG LINE AT TOP POST DATA: {"student_id":13,"advisory_id":2,"quarter_id":3,"user_id":"5"} DEBUG: Entered foreach for student 13 DEBUG: Feedbacks found: 4, Subjects needed: 4 {"advisory_id":2,"student_id":13,"quarter_id":3,"subjects":[2,4,6,1],"feedbacks":[{"subject_id":1,"visual_feedback_id":4},{"subject_id":2,"visual_feedback_id":1},{"subject_id":4,"visual_feedback_id":5},{"subject_id":6,"visual_feedback_id":2}],"shapeScores":[2.1995,4.6,1.3995,3.7995],"averageScore":3,"quarter_avg_score":65.217,"quarter_visual_feedback_id":3,"risk_id":2,"finalized_by":"5"} === INSERT ATTEMPT START === student_id: 13 advisory_id: 2 quarter_id: 3 quarter_visual_feedback_id: 3 risk_id: 2 quarter_avg_score: 65.217 finalized_by: '5' Insert SQL: INSERT INTO tbl_progress_cards (student_id, advisory_id, quarter_id, quarter_visual_feedback_id, risk_id, quarter_avg_score, is_finalized, finalized_by, report_date) VALUES (?, ?, ?, ?, ?, ?, 1, ?, NOW()) ON DUPLICATE KEY UPDATE quarter_visual_feedback_id=VALUES(quarter_visual_feedback_id), risk_id=VALUES(risk_id), quarter_avg_score=VALUES(quarter_avg_score), is_finalized=1, finalized_by=VALUES(finalized_by), report_date=VALUES(report_date) Params: [13,2,3,3,2,65.217,"5"] OK: 1, Affected: 1 === INSERT ATTEMPT END === === NOTIFICATION CREATION START === Student ID: 13, Quarter ID: 3, Teacher ID: 5 Check Query: SELECT n.notification_id FROM tbl_notifications n INNER JOIN tbl_notification_recipients nr ON n.notification_id = nr.notification_id INNER JOIN tbl_progress_notification pn ON n.notification_id = pn.notification_id WHERE n.created_by = ? AND nr.recipient_type = 'Teacher' AND nr.user_id = ? AND pn.student_id = ? AND pn.quarter_id = ? AND n.notif_message LIKE '%[QUARTERLY PROGRESS]%' Check Params: ["5","5",13,3] Existing notification found: NO Creating new notification Inserted into tbl_notifications, ID: 139 Parent row: {"parent_id":29} Inserted parent recipient Inserted teacher recipient Inserted into tbl_progress_notification === NOTIFICATION CREATION SUCCESS === SUCCESS: Progress card(s) inserted/updated for: Gleiah Jimenez Madrenos UNIQUE DEBUG LINE AT TOP POST DATA: {"student_id":13,"advisory_id":2,"quarter_id":4,"user_id":"5"} DEBUG: Entered foreach for student 13 DEBUG: Feedbacks found: 4, Subjects needed: 4 {"advisory_id":2,"student_id":13,"quarter_id":4,"subjects":[2,4,6,1],"feedbacks":[{"subject_id":1,"visual_feedback_id":4},{"subject_id":2,"visual_feedback_id":3},{"subject_id":4,"visual_feedback_id":3},{"subject_id":6,"visual_feedback_id":5}],"shapeScores":[2.1995,2.9995,2.9995,1.3995],"averageScore":2.4,"quarter_avg_score":52.174,"quarter_visual_feedback_id":4,"risk_id":2,"finalized_by":"5"} === INSERT ATTEMPT START === student_id: 13 advisory_id: 2 quarter_id: 4 quarter_visual_feedback_id: 4 risk_id: 2 quarter_avg_score: 52.174 finalized_by: '5' Insert SQL: INSERT INTO tbl_progress_cards (student_id, advisory_id, quarter_id, quarter_visual_feedback_id, risk_id, quarter_avg_score, is_finalized, finalized_by, report_date) VALUES (?, ?, ?, ?, ?, ?, 1, ?, NOW()) ON DUPLICATE KEY UPDATE quarter_visual_feedback_id=VALUES(quarter_visual_feedback_id), risk_id=VALUES(risk_id), quarter_avg_score=VALUES(quarter_avg_score), is_finalized=1, finalized_by=VALUES(finalized_by), report_date=VALUES(report_date) Params: [13,2,4,4,2,52.174,"5"] OK: 1, Affected: 1 === INSERT ATTEMPT END === === NOTIFICATION CREATION START === Student ID: 13, Quarter ID: 4, Teacher ID: 5 Check Query: SELECT n.notification_id FROM tbl_notifications n INNER JOIN tbl_notification_recipients nr ON n.notification_id = nr.notification_id INNER JOIN tbl_progress_notification pn ON n.notification_id = pn.notification_id WHERE n.created_by = ? AND nr.recipient_type = 'Teacher' AND nr.user_id = ? AND pn.student_id = ? AND pn.quarter_id = ? AND n.notif_message LIKE '%[QUARTERLY PROGRESS]%' Check Params: ["5","5",13,4] Existing notification found: NO Creating new notification Inserted into tbl_notifications, ID: 140 Parent row: {"parent_id":29} Inserted parent recipient Inserted teacher recipient Inserted into tbl_progress_notification === NOTIFICATION CREATION SUCCESS === SUCCESS: Progress card(s) inserted/updated for: Gleiah Jimenez Madrenos UNIQUE DEBUG LINE AT TOP POST DATA: {"student_id":20,"advisory_id":3,"quarter_id":1,"user_id":"19"} DEBUG: Entered foreach for student 20 DEBUG: Feedbacks found: 5, Subjects needed: 5 {"advisory_id":3,"student_id":20,"quarter_id":1,"subjects":[2,3,6,1,4],"feedbacks":[{"subject_id":1,"visual_feedback_id":1},{"subject_id":2,"visual_feedback_id":2},{"subject_id":3,"visual_feedback_id":1},{"subject_id":4,"visual_feedback_id":1},{"subject_id":6,"visual_feedback_id":1}],"shapeScores":[4.6,3.7995,4.6,4.6,4.6],"averageScore":4.44,"quarter_avg_score":96.522,"quarter_visual_feedback_id":1,"risk_id":1,"finalized_by":"19"} === INSERT ATTEMPT START === student_id: 20 advisory_id: 3 quarter_id: 1 quarter_visual_feedback_id: 1 risk_id: 1 quarter_avg_score: 96.522 finalized_by: '19' Insert SQL: INSERT INTO tbl_progress_cards (student_id, advisory_id, quarter_id, quarter_visual_feedback_id, risk_id, quarter_avg_score, is_finalized, finalized_by, report_date) VALUES (?, ?, ?, ?, ?, ?, 1, ?, NOW()) ON DUPLICATE KEY UPDATE quarter_visual_feedback_id=VALUES(quarter_visual_feedback_id), risk_id=VALUES(risk_id), quarter_avg_score=VALUES(quarter_avg_score), is_finalized=1, finalized_by=VALUES(finalized_by), report_date=VALUES(report_date) Params: [20,3,1,1,1,96.522,"19"] OK: 1, Affected: 1 === INSERT ATTEMPT END === === NOTIFICATION CREATION START === Student ID: 20, Quarter ID: 1, Teacher ID: 19 Check Query: SELECT n.notification_id FROM tbl_notifications n INNER JOIN tbl_notification_recipients nr ON n.notification_id = nr.notification_id INNER JOIN tbl_progress_notification pn ON n.notification_id = pn.notification_id WHERE n.created_by = ? AND nr.recipient_type = 'Teacher' AND nr.user_id = ? AND pn.student_id = ? AND pn.quarter_id = ? AND n.notif_message LIKE '%[QUARTERLY PROGRESS]%' Check Params: ["19","19",20,1] Existing notification found: NO Creating new notification Inserted into tbl_notifications, ID: 137 Parent row: {"parent_id":34} Inserted parent recipient Inserted teacher recipient Inserted into tbl_progress_notification === NOTIFICATION CREATION SUCCESS === SUCCESS: Progress card(s) inserted/updated for: C Jay Macuse UNIQUE DEBUG LINE AT TOP POST DATA: {"student_id":20,"advisory_id":3,"quarter_id":2,"user_id":"19"} DEBUG: Entered foreach for student 20 DEBUG: Feedbacks found: 5, Subjects needed: 5 {"advisory_id":3,"student_id":20,"quarter_id":2,"subjects":[2,3,6,1,4],"feedbacks":[{"subject_id":1,"visual_feedback_id":3},{"subject_id":2,"visual_feedback_id":3},{"subject_id":3,"visual_feedback_id":3},{"subject_id":4,"visual_feedback_id":2},{"subject_id":6,"visual_feedback_id":4}],"shapeScores":[2.9995,2.9995,2.9995,3.7995,2.1995],"averageScore":3,"quarter_avg_score":65.217,"quarter_visual_feedback_id":3,"risk_id":2,"finalized_by":"19"} === INSERT ATTEMPT START === student_id: 20 advisory_id: 3 quarter_id: 2 quarter_visual_feedback_id: 3 risk_id: 2 quarter_avg_score: 65.217 finalized_by: '19' Insert SQL: INSERT INTO tbl_progress_cards (student_id, advisory_id, quarter_id, quarter_visual_feedback_id, risk_id, quarter_avg_score, is_finalized, finalized_by, report_date) VALUES (?, ?, ?, ?, ?, ?, 1, ?, NOW()) ON DUPLICATE KEY UPDATE quarter_visual_feedback_id=VALUES(quarter_visual_feedback_id), risk_id=VALUES(risk_id), quarter_avg_score=VALUES(quarter_avg_score), is_finalized=1, finalized_by=VALUES(finalized_by), report_date=VALUES(report_date) Params: [20,3,2,3,2,65.217,"19"] OK: 1, Affected: 1 === INSERT ATTEMPT END === === NOTIFICATION CREATION START === Student ID: 20, Quarter ID: 2, Teacher ID: 19 Check Query: SELECT n.notification_id FROM tbl_notifications n INNER JOIN tbl_notification_recipients nr ON n.notification_id = nr.notification_id INNER JOIN tbl_progress_notification pn ON n.notification_id = pn.notification_id WHERE n.created_by = ? AND nr.recipient_type = 'Teacher' AND nr.user_id = ? AND pn.student_id = ? AND pn.quarter_id = ? AND n.notif_message LIKE '%[QUARTERLY PROGRESS]%' Check Params: ["19","19",20,2] Existing notification found: NO Creating new notification Inserted into tbl_notifications, ID: 138 Parent row: {"parent_id":34} Inserted parent recipient Inserted teacher recipient Inserted into tbl_progress_notification === NOTIFICATION CREATION SUCCESS === SUCCESS: Progress card(s) inserted/updated for: C Jay Macuse UNIQUE DEBUG LINE AT TOP POST DATA: {"student_id":20,"advisory_id":3,"quarter_id":3,"user_id":"19"} DEBUG: Entered foreach for student 20 DEBUG: Feedbacks found: 5, Subjects needed: 5 {"advisory_id":3,"student_id":20,"quarter_id":3,"subjects":[2,3,6,1,4],"feedbacks":[{"subject_id":1,"visual_feedback_id":5},{"subject_id":2,"visual_feedback_id":5},{"subject_id":3,"visual_feedback_id":4},{"subject_id":4,"visual_feedback_id":4},{"subject_id":6,"visual_feedback_id":5}],"shapeScores":[1.3995,1.3995,2.1995,2.1995,1.3995],"averageScore":1.72,"quarter_avg_score":37.391,"quarter_visual_feedback_id":5,"risk_id":3,"finalized_by":"19"} === INSERT ATTEMPT START === student_id: 20 advisory_id: 3 quarter_id: 3 quarter_visual_feedback_id: 5 risk_id: 3 quarter_avg_score: 37.391 finalized_by: '19' Insert SQL: INSERT INTO tbl_progress_cards (student_id, advisory_id, quarter_id, quarter_visual_feedback_id, risk_id, quarter_avg_score, is_finalized, finalized_by, report_date) VALUES (?, ?, ?, ?, ?, ?, 1, ?, NOW()) ON DUPLICATE KEY UPDATE quarter_visual_feedback_id=VALUES(quarter_visual_feedback_id), risk_id=VALUES(risk_id), quarter_avg_score=VALUES(quarter_avg_score), is_finalized=1, finalized_by=VALUES(finalized_by), report_date=VALUES(report_date) Params: [20,3,3,5,3,37.391,"19"] OK: 1, Affected: 1 === INSERT ATTEMPT END === === NOTIFICATION CREATION START === Student ID: 20, Quarter ID: 3, Teacher ID: 19 Check Query: SELECT n.notification_id FROM tbl_notifications n INNER JOIN tbl_notification_recipients nr ON n.notification_id = nr.notification_id INNER JOIN tbl_progress_notification pn ON n.notification_id = pn.notification_id WHERE n.created_by = ? AND nr.recipient_type = 'Teacher' AND nr.user_id = ? AND pn.student_id = ? AND pn.quarter_id = ? AND n.notif_message LIKE '%[QUARTERLY PROGRESS]%' Check Params: ["19","19",20,3] Existing notification found: NO Creating new notification Inserted into tbl_notifications, ID: 139 Parent row: {"parent_id":34} Inserted parent recipient Inserted teacher recipient Inserted into tbl_progress_notification === NOTIFICATION CREATION SUCCESS === SUCCESS: Progress card(s) inserted/updated for: C Jay Macuse UNIQUE DEBUG LINE AT TOP POST DATA: {"student_id":20,"advisory_id":3,"quarter_id":4,"user_id":"19"} DEBUG: Entered foreach for student 20 DEBUG: Feedbacks found: 5, Subjects needed: 5 {"advisory_id":3,"student_id":20,"quarter_id":4,"subjects":[2,3,6,1,4],"feedbacks":[{"subject_id":1,"visual_feedback_id":1},{"subject_id":2,"visual_feedback_id":1},{"subject_id":3,"visual_feedback_id":1},{"subject_id":4,"visual_feedback_id":1},{"subject_id":6,"visual_feedback_id":1}],"shapeScores":[4.6,4.6,4.6,4.6,4.6],"averageScore":4.6,"quarter_avg_score":100,"quarter_visual_feedback_id":1,"risk_id":1,"finalized_by":"19"} === INSERT ATTEMPT START === student_id: 20 advisory_id: 3 quarter_id: 4 quarter_visual_feedback_id: 1 risk_id: 1 quarter_avg_score: 100.0 finalized_by: '19' Insert SQL: INSERT INTO tbl_progress_cards (student_id, advisory_id, quarter_id, quarter_visual_feedback_id, risk_id, quarter_avg_score, is_finalized, finalized_by, report_date) VALUES (?, ?, ?, ?, ?, ?, 1, ?, NOW()) ON DUPLICATE KEY UPDATE quarter_visual_feedback_id=VALUES(quarter_visual_feedback_id), risk_id=VALUES(risk_id), quarter_avg_score=VALUES(quarter_avg_score), is_finalized=1, finalized_by=VALUES(finalized_by), report_date=VALUES(report_date) Params: [20,3,4,1,1,100,"19"] OK: 1, Affected: 1 === INSERT ATTEMPT END === === NOTIFICATION CREATION START === Student ID: 20, Quarter ID: 4, Teacher ID: 19 Check Query: SELECT n.notification_id FROM tbl_notifications n INNER JOIN tbl_notification_recipients nr ON n.notification_id = nr.notification_id INNER JOIN tbl_progress_notification pn ON n.notification_id = pn.notification_id WHERE n.created_by = ? AND nr.recipient_type = 'Teacher' AND nr.user_id = ? AND pn.student_id = ? AND pn.quarter_id = ? AND n.notif_message LIKE '%[QUARTERLY PROGRESS]%' Check Params: ["19","19",20,4] Existing notification found: NO Creating new notification Inserted into tbl_notifications, ID: 140 Parent row: {"parent_id":34} Inserted parent recipient Inserted teacher recipient Inserted into tbl_progress_notification === NOTIFICATION CREATION SUCCESS === SUCCESS: Progress card(s) inserted/updated for: C Jay Macuse UNIQUE DEBUG LINE AT TOP GET PARAMS: [] ERROR: Missing required parameters: advisory_id, quarter_id UNIQUE DEBUG LINE AT TOP GET PARAMS: [] ERROR: Missing required parameters: advisory_id, quarter_id UNIQUE DEBUG LINE AT TOP POST DATA: {"student_id":"13","advisory_id":"2","quarter_id":1,"user_id":"5"} DEBUG: Entered foreach for student 13 DEBUG: Feedbacks found: 4, Subjects needed: 4 {"advisory_id":"2","student_id":"13","quarter_id":1,"subjects":["2","4","6","1"],"feedbacks":[{"subject_id":"1","visual_feedback_id":"4"},{"subject_id":"2","visual_feedback_id":"1"},{"subject_id":"4","visual_feedback_id":"1"},{"subject_id":"6","visual_feedback_id":"3"}],"shapeScores":[2.1995,4.6,4.6,2.9995],"averageScore":3.6,"quarter_avg_score":78.261,"quarter_visual_feedback_id":"2","risk_id":1,"finalized_by":"5"} === INSERT ATTEMPT START === student_id: '13' advisory_id: '2' quarter_id: 1 quarter_visual_feedback_id: '2' risk_id: 1 quarter_avg_score: 78.261 finalized_by: '5' Insert SQL: INSERT INTO tbl_progress_cards (student_id, advisory_id, quarter_id, quarter_visual_feedback_id, risk_id, quarter_avg_score, is_finalized, finalized_by, report_date) VALUES (?, ?, ?, ?, ?, ?, 1, ?, NOW()) ON DUPLICATE KEY UPDATE quarter_visual_feedback_id=VALUES(quarter_visual_feedback_id), risk_id=VALUES(risk_id), quarter_avg_score=VALUES(quarter_avg_score), is_finalized=1, finalized_by=VALUES(finalized_by), report_date=VALUES(report_date) Params: ["13","2",1,"2",1,78.261,"5"] OK: 1, Affected: 1 === INSERT ATTEMPT END === === NOTIFICATION CREATION START === Student ID: 13, Quarter ID: 1, Teacher ID: 5 Check Query: SELECT n.notification_id FROM tbl_notifications n INNER JOIN tbl_notification_recipients nr ON n.notification_id = nr.notification_id INNER JOIN tbl_progress_notification pn ON n.notification_id = pn.notification_id WHERE n.created_by = ? AND nr.recipient_type = 'Teacher' AND nr.user_id = ? AND pn.student_id = ? AND pn.quarter_id = ? AND n.notif_message LIKE '%[QUARTERLY PROGRESS]%' Check Params: ["5","5","13",1] Existing notification found: NO Creating new notification Inserted into tbl_notifications, ID: 145 Parent row: {"parent_id":"29"} Inserted parent recipient Inserted teacher recipient Inserted into tbl_progress_notification === NOTIFICATION CREATION SUCCESS === SUCCESS: Progress card(s) inserted/updated for: Gleiah Jimenez Madrenos UNIQUE DEBUG LINE AT TOP POST DATA: {"student_id":"13","advisory_id":"2","quarter_id":2,"user_id":"5"} DEBUG: Entered foreach for student 13 DEBUG: Feedbacks found: 4, Subjects needed: 4 {"advisory_id":"2","student_id":"13","quarter_id":2,"subjects":["2","4","6","1"],"feedbacks":[{"subject_id":"1","visual_feedback_id":"2"},{"subject_id":"2","visual_feedback_id":"3"},{"subject_id":"4","visual_feedback_id":"3"},{"subject_id":"6","visual_feedback_id":"1"}],"shapeScores":[3.7995,2.9995,2.9995,4.6],"averageScore":3.6,"quarter_avg_score":78.261,"quarter_visual_feedback_id":"2","risk_id":1,"finalized_by":"5"} === INSERT ATTEMPT START === student_id: '13' advisory_id: '2' quarter_id: 2 quarter_visual_feedback_id: '2' risk_id: 1 quarter_avg_score: 78.261 finalized_by: '5' Insert SQL: INSERT INTO tbl_progress_cards (student_id, advisory_id, quarter_id, quarter_visual_feedback_id, risk_id, quarter_avg_score, is_finalized, finalized_by, report_date) VALUES (?, ?, ?, ?, ?, ?, 1, ?, NOW()) ON DUPLICATE KEY UPDATE quarter_visual_feedback_id=VALUES(quarter_visual_feedback_id), risk_id=VALUES(risk_id), quarter_avg_score=VALUES(quarter_avg_score), is_finalized=1, finalized_by=VALUES(finalized_by), report_date=VALUES(report_date) Params: ["13","2",2,"2",1,78.261,"5"] OK: 1, Affected: 1 === INSERT ATTEMPT END === === NOTIFICATION CREATION START === Student ID: 13, Quarter ID: 2, Teacher ID: 5 Check Query: SELECT n.notification_id FROM tbl_notifications n INNER JOIN tbl_notification_recipients nr ON n.notification_id = nr.notification_id INNER JOIN tbl_progress_notification pn ON n.notification_id = pn.notification_id WHERE n.created_by = ? AND nr.recipient_type = 'Teacher' AND nr.user_id = ? AND pn.student_id = ? AND pn.quarter_id = ? AND n.notif_message LIKE '%[QUARTERLY PROGRESS]%' Check Params: ["5","5","13",2] Existing notification found: NO Creating new notification Inserted into tbl_notifications, ID: 146 Parent row: {"parent_id":"29"} Inserted parent recipient Inserted teacher recipient Inserted into tbl_progress_notification === NOTIFICATION CREATION SUCCESS === SUCCESS: Progress card(s) inserted/updated for: Gleiah Jimenez Madrenos UNIQUE DEBUG LINE AT TOP POST DATA: {"student_id":"13","advisory_id":"2","quarter_id":3,"user_id":"5"} DEBUG: Entered foreach for student 13 DEBUG: Feedbacks found: 4, Subjects needed: 4 {"advisory_id":"2","student_id":"13","quarter_id":3,"subjects":["2","4","6","1"],"feedbacks":[{"subject_id":"1","visual_feedback_id":"3"},{"subject_id":"2","visual_feedback_id":"3"},{"subject_id":"4","visual_feedback_id":"3"},{"subject_id":"6","visual_feedback_id":"3"}],"shapeScores":[2.9995,2.9995,2.9995,2.9995],"averageScore":3,"quarter_avg_score":65.217,"quarter_visual_feedback_id":"3","risk_id":2,"finalized_by":"5"} === INSERT ATTEMPT START === student_id: '13' advisory_id: '2' quarter_id: 3 quarter_visual_feedback_id: '3' risk_id: 2 quarter_avg_score: 65.217 finalized_by: '5' Insert SQL: INSERT INTO tbl_progress_cards (student_id, advisory_id, quarter_id, quarter_visual_feedback_id, risk_id, quarter_avg_score, is_finalized, finalized_by, report_date) VALUES (?, ?, ?, ?, ?, ?, 1, ?, NOW()) ON DUPLICATE KEY UPDATE quarter_visual_feedback_id=VALUES(quarter_visual_feedback_id), risk_id=VALUES(risk_id), quarter_avg_score=VALUES(quarter_avg_score), is_finalized=1, finalized_by=VALUES(finalized_by), report_date=VALUES(report_date) Params: ["13","2",3,"3",2,65.217,"5"] OK: 1, Affected: 1 === INSERT ATTEMPT END === === NOTIFICATION CREATION START === Student ID: 13, Quarter ID: 3, Teacher ID: 5 Check Query: SELECT n.notification_id FROM tbl_notifications n INNER JOIN tbl_notification_recipients nr ON n.notification_id = nr.notification_id INNER JOIN tbl_progress_notification pn ON n.notification_id = pn.notification_id WHERE n.created_by = ? AND nr.recipient_type = 'Teacher' AND nr.user_id = ? AND pn.student_id = ? AND pn.quarter_id = ? AND n.notif_message LIKE '%[QUARTERLY PROGRESS]%' Check Params: ["5","5","13",3] Existing notification found: NO Creating new notification Inserted into tbl_notifications, ID: 147 Parent row: {"parent_id":"29"} Inserted parent recipient Inserted teacher recipient Inserted into tbl_progress_notification === NOTIFICATION CREATION SUCCESS === SUCCESS: Progress card(s) inserted/updated for: Gleiah Jimenez Madrenos UNIQUE DEBUG LINE AT TOP POST DATA: {"student_id":"13","advisory_id":"2","quarter_id":4,"user_id":"5"} DEBUG: Entered foreach for student 13 DEBUG: Feedbacks found: 4, Subjects needed: 4 {"advisory_id":"2","student_id":"13","quarter_id":4,"subjects":["2","4","6","1"],"feedbacks":[{"subject_id":"1","visual_feedback_id":"2"},{"subject_id":"2","visual_feedback_id":"1"},{"subject_id":"4","visual_feedback_id":"1"},{"subject_id":"6","visual_feedback_id":"1"}],"shapeScores":[3.7995,4.6,4.6,4.6],"averageScore":4.4,"quarter_avg_score":95.652,"quarter_visual_feedback_id":"1","risk_id":1,"finalized_by":"5"} === INSERT ATTEMPT START === student_id: '13' advisory_id: '2' quarter_id: 4 quarter_visual_feedback_id: '1' risk_id: 1 quarter_avg_score: 95.652 finalized_by: '5' Insert SQL: INSERT INTO tbl_progress_cards (student_id, advisory_id, quarter_id, quarter_visual_feedback_id, risk_id, quarter_avg_score, is_finalized, finalized_by, report_date) VALUES (?, ?, ?, ?, ?, ?, 1, ?, NOW()) ON DUPLICATE KEY UPDATE quarter_visual_feedback_id=VALUES(quarter_visual_feedback_id), risk_id=VALUES(risk_id), quarter_avg_score=VALUES(quarter_avg_score), is_finalized=1, finalized_by=VALUES(finalized_by), report_date=VALUES(report_date) Params: ["13","2",4,"1",1,95.652,"5"] OK: 1, Affected: 1 === INSERT ATTEMPT END === === NOTIFICATION CREATION START === Student ID: 13, Quarter ID: 4, Teacher ID: 5 Check Query: SELECT n.notification_id FROM tbl_notifications n INNER JOIN tbl_notification_recipients nr ON n.notification_id = nr.notification_id INNER JOIN tbl_progress_notification pn ON n.notification_id = pn.notification_id WHERE n.created_by = ? AND nr.recipient_type = 'Teacher' AND nr.user_id = ? AND pn.student_id = ? AND pn.quarter_id = ? AND n.notif_message LIKE '%[QUARTERLY PROGRESS]%' Check Params: ["5","5","13",4] Existing notification found: NO Creating new notification Inserted into tbl_notifications, ID: 148 Parent row: {"parent_id":"29"} Inserted parent recipient Inserted teacher recipient Inserted into tbl_progress_notification === NOTIFICATION CREATION SUCCESS === SUCCESS: Progress card(s) inserted/updated for: Gleiah Jimenez Madrenos UNIQUE DEBUG LINE AT TOP GET PARAMS: [] ERROR: Missing required parameters: advisory_id, quarter_id UNIQUE DEBUG LINE AT TOP GET PARAMS: [] ERROR: Missing required parameters: advisory_id, quarter_id