forked from hangshuo652/aurak
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:
@@ -525,11 +525,6 @@ export class QuestionBankService {
|
|||||||
count: number,
|
count: number,
|
||||||
): Promise<QuestionBankItem[]> {
|
): Promise<QuestionBankItem[]> {
|
||||||
const bank = await this.findOne(bankId);
|
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({
|
const allItems = await this.itemRepository.find({
|
||||||
where: { bankId, status: QuestionBankItemStatus.PUBLISHED },
|
where: { bankId, status: QuestionBankItemStatus.PUBLISHED },
|
||||||
|
|||||||
Reference in New Issue
Block a user