From c87bdd8e023f4f2584dee2fd7953c494ccc0f10c Mon Sep 17 00:00:00 2001 From: Nicolas Mailloux Date: Mon, 2 Dec 2024 13:47:45 -0500 Subject: [PATCH] FlashExam: write cards not known to file --- src/apps/flashexam.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/apps/flashexam.cpp b/src/apps/flashexam.cpp index ac9abd9..0937b0d 100644 --- a/src/apps/flashexam.cpp +++ b/src/apps/flashexam.cpp @@ -95,6 +95,14 @@ void flashExam::initCardsList(QString cardsList, QString answersList) { void flashExam::on_backBtn_clicked() { + if(nonRedundantRandomization) { + QString cardsNotKnownQstring; + for(int i = 0; i < cardsNotKnown.count(); i++) { + cardsNotKnownQstring.append(cardsStringList.at(cardsNotKnown.at(i)) + "\n"); + } + log("Writing cardsNotKnownQstring to file", className); + writeFile("/mnt/onboard/onboard/flashexam-cards-not-known_" + QDateTime::currentDateTime().toString("dd.MM.yyyy-hh.mm.ss"), cardsNotKnownQstring); + } this->setDisabled(false); setupCardsList(); ui->stackedWidget->setCurrentIndex(0);