fix: remove bank PUBLISHED guard from selectQuestions

selectQuestions now only checks item-level PUBLISHED status.
startSession already handles bank detection by counting published items.
This fixes assessment always falling back to LLM generation.
This commit is contained in:
Developer
2026-05-21 10:26:19 +08:00
parent 35b1c6c37d
commit eba30517a6
@@ -525,11 +525,6 @@ export class QuestionBankService {
count: number,
): Promise<QuestionBankItem[]> {
const bank = await this.findOne(bankId);
if (bank.status !== QuestionBankStatus.PUBLISHED) {
throw new ForbiddenException(
'Only PUBLISHED banks can be used for selection',
);
}
const allItems = await this.itemRepository.find({
where: { bankId, status: QuestionBankItemStatus.PUBLISHED },