Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/addon/mod/assign/providers/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,15 @@ export class AddonModAssignHelperProvider {
return true;
}

return !!submission.plugins.find((plugin) => this.submissionDelegate.isPluginEmpty(assign, plugin));
for (const plugin of submission.plugins) {
// If any plugin is not empty, we consider that the submission is not empty either.
if (!this.submissionDelegate.isPluginEmpty(assign, plugin)) {
return false;
}
}

// If all the plugins were empty (or there were no plugins), we consider the submission to be empty.
return true;
}

/**
Expand Down