~[wc:commonscripts] ~[wc:teachers_header_css] ~[wc:teachers_navigation_css] ~[SetPostValue:tabname=home] ~[wc:teachers_nav_css] ~[if#gate.pref.busnotes_teacher~(curschoolid)=hide]
~[text:nicktech.busnotes.admin.reports.Not_Permitted]
[else#gate]

~[text:nicktech.busnotes.teachers.editpage.Classroom_Daily_Bus_Notes]  ~[tlist_sql; SELECT sec.course_number, sec.section_number, sec.external_expression FROM sections sec WHERE sec.id =~(gpv.sectionid;sqlText);] ~(course_number).~(section_number) ~(external_expression) [/tlist_sql]

~[if#save.~(gpv.changesSaved)=true]
~[text:nicktech.busnotes.teachers.editpage.Note_saved]
[/if#save] ~[if#d.~(gpv.changesSaved)=delete]
~[text:nicktech.busnotes.teachers.editpage.Note_Deleted]
[/if#d]
~[tlist_sql; SELECT s.lastfirst AS lastfirst, '~[if#perm.pref.busnotes_teacher_perm~(curschoolid)=yes]normalTD[else#perm]hidden[/if#perm]' AS permClass, ~[if#perm.pref.busnotes_teacher_perm~(curschoolid)=yes]u_bus.Perm_Note[else#perm]NULL[/if#perm] AS perm_note, '~[if#new.pref.busnotes_teacher~(curschoolid)=read]hidden[else#new]normalTD[/if#new]' AS rowClass, s.dcid AS dcid, LISTAGG(case when bn.id is not null then chr(60) || 'div class="notesDiv"' || chr(62)~[if#new.pref.busnotes_teacher~(curschoolid)=read][else#new] || chr(60) || 'a href="editBusNote.html?frn=001' || bn.studentsdcid || chr(38) || 'authId=' || bn.id || chr(38) || 'no-store-lp=1" class="dialog dockedDialog button" title="Edit Bus Note"' || chr(62) || 'Edit' || chr(60) || '/a' || chr(62) || ' '[/if#new] || bn.note || ' | Ends' || chr(58) || ' ' || to_char(bn.end_date,'mm/dd/yy') || chr(60) || '/div' || chr(62) end, '' ON OVERFLOW TRUNCATE WITHOUT COUNT) WITHIN GROUP (ORDER BY bn.end_date) AS prev_notes FROM Students s JOIN CC ON s.id = cc.studentid JOIN sections sec ON cc.sectionid = sec.id LEFT OUTER JOIN u_bus ON u_bus.studentsdcid = s.dcid LEFT OUTER JOIN u_bus_notes bn ON s.dcid = bn.studentsdcid AND trunc(sysdate) BETWEEN start_date AND end_date WHERE sec.id = ~(gpv.sectionid;sqlText) AND s.enroll_status = 0 GROUP BY s.lastfirst, u_bus.Perm_Note, s.dcid ORDER BY s.lastfirst ;alternatecolor] [/tlist_sql]
~[text:nicktech.busnotes.teachers.editpage.Student_Name] ~[text:nicktech.busnotes.teachers.editpage.Permanent_Notes] ~[text:nicktech.busnotes.teachers.editpage.Add] ~[text:nicktech.busnotes.teachers.editpage.Todays_Notes]
~(lastfirst) ~(perm_note;ReplaceCRLFWithBR) ~[text:nicktech.busnotes.teachers.editpage.Add] ~(prev_notes;ReplaceCRLFWithBR)
[/if#gate] ~[wc:teachers_footer_css]