154
158
# fast. We can grab all of the paths needing authorisation directives with
155
159
# a single query, and we cache the list of viewers for each offering.
156
160
offering_viewers_cache = {}
157
for (ssn, year, sem, name, psid, pspath, offeringid) in store.find(
161
for (ssn, year, sem, name, psid, pspath, gid, offeringid) in store.find(
158
162
(Subject.short_name, Semester.year, Semester.semester,
159
163
ProjectGroup.name, ProjectSubmission.id, ProjectSubmission.path,
161
165
Assessed.id == ProjectSubmission.assessed_id,
162
166
ProjectGroup.id == Assessed.project_group_id,
163
167
Project.id == Assessed.project_id,