Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
even faster?
Browse files Browse the repository at this point in the history
  • Loading branch information
matt01y committed May 23, 2024
1 parent 85837ac commit b06aa0d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/dataloaders/ProjectsTeacherLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ export async function LoadProjectsForTeacher(filter_on_current: boolean = false,

const allGroups: (Group[]|undefined)[] = (await groupPromises)
const groups: Group[][] = allGroups.filter(group => group !== undefined) as Group[][]
const groupsR = await Promise.all(groups.map(groupArray => Promise.all(groupArray.map(group => apiFetch<Backend_submission>(`/groups/${group.group_id}/submission`)))));
const amount_of_submissions: number[] = []
for (const groupArray of groups) {
for (const groupArray of groupsR) {
let amount = 0
const submissionsData = await Promise.all(groupArray.map(group => apiFetch<Backend_submission>(`/groups/${group.group_id}/submission`)));
for (const submissionData of submissionsData) {
for (const submissionData of groupArray) {
try {
if (!submissionData.ok){
continue
Expand Down

0 comments on commit b06aa0d

Please sign in to comment.