-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete answer from dashboard #687
Conversation
Codecov Report
@@ Coverage Diff @@
## master #687 +/- ##
==========================================
+ Coverage 90.54% 91.06% +0.51%
==========================================
Files 52 58 +6
Lines 1830 1924 +94
Branches 242 257 +15
==========================================
+ Hits 1657 1752 +95
+ Misses 168 166 -2
- Partials 5 6 +1
Continue to review full report at Codecov.
|
}) | ||
|
||
//what todo, when no quizAnswer | ||
if (nextBestQuizAnswer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Else if not best call the same thing but make it set attempted: false
await UserQuizState.query(trx).update({ | ||
status: "open", | ||
tries: userQuizState[0].tries > 0 ? userQuizState[0].tries - 1 : 0, | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also update the spam flags.
@@ -12,8 +12,9 @@ import { | |||
} from "../../contexts/AnswerListContext" | |||
|
|||
interface AdditionalAnswerCardProps { | |||
faded: boolean | |||
status: string | |||
$faded: boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ ????
assistant: ["view", "edit", "grade"], | ||
teacher: ["view", "edit", "grade"], | ||
admin: ["view", "edit", "grade", "download", "duplicate", "delete"], | ||
assistant: ["view", "edit", "grade", "delete"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to delete-answers
const updatedUserQuizState = await userQuizState | ||
.$query(trx) | ||
.updateAndFetch({ | ||
status: "open", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make this locked if new userQuizState.tries >= quiz.tries
need to add tests