This function builds the room page for a classroom. It also constructs that room's row in the classroom table on the start page.
# - - - b u i l d C l a s s r o o m
def buildClassroom ( parent, room, reportInfo, clientSet ):
'''Build one classroom table row and classroom page.
[ (parent is an et.Element) and
(room is a Room instance) and
(reportInfo is a ReportInfo) and
(clientSet is a ClientSet) ->
parent +:= a row for that classroom, with
workstation and instructor station counts from
clientSet, and a link to a room page for that room
room page for that room := table of clients in
that room, with configuration data from
clientSet and devices from reportInfo ]
'''
Building the classroom table line is a bit complex because
we have to count the workstations and instructor stations
in that room. For that logic, see Section 23, “buildClassroomRow(): Build one line of
the classroom table”.
#-- 1 --
# [ parent +:= a tr with the room name and a link to its
# room page, and count of workstations and instructor
# stations from clientSet ]
buildClassroomRow ( parent, room, clientSet )
For the logic that builds the room page, see in Section 17, “buildRoomPage(): Make the page with a
table of all the clients in a room”.
#-- 2 --
# [ room page for room +:= table of clients in room
# room.roomPrefix from clientSet, with roomType in
# the page title, with devices from reportInfo ]
buildRoomPage ( room, reportInfo, clientSet )