This function does two things. It builds the page showing a table of all the clients in a given open lab room. It also adds a link to that page to the open-labs bullet list on the start page.
# - - - b u i l d O p e n L a b
def buildOpenLab ( ul, room, reportInfo, clientSet ):
'''Build an open lab room page and the link to it.
[ (ul is an et.Element) and
(room is a Room instance) and
(reportInfo is a ReportInfo) and
(clientSet is a ClientSet) ->
room page for room := table of clients in that room
from clientSet, with devices from reportInfo
ul +:= a new 'li' element linking to that page ]
'''
First add a bullet to the bullet list, containing the room name, with a link to the room page.
#-- 1 --
# [ ul +:= a new 'li' element with a link to the room
# page for (room) ]
ul.append ( E.li ( linkToRoomPage ( room ) ) )
For the logic that builds the room page, see
Section 17, “buildRoomPage(): Make the page with a
table of all the clients in a room”.
#-- 2 --
# [ room page := table of clients in room (room)
# from clientSet, with devices from reportInfo ]
buildRoomPage ( room, reportInfo, clientSet )