Fieldtype, Module

Archived
Forum
(read-only)

eeXam

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Coffee Bean Design

     

Clearing all test attempts/answers for specific member?

Support Request

n0p
n0p

Is it possible to clear all correct attempts for logged in member on all tests without definition of specifit test id, entry id?

I know the {exp: eexam: clear} tag, but the tag requires an entry ID or test id, what is not interesting for me. I need to delete all attempts for logged in member - if it is achieved a certain condition (if member fails on test, all his previous correct resolved tests must be deleted )

something like:

DELETE exp_eexam_attemptsexp_eexam_answers
FROM exp_eexam_attempts
INNER JOIN exp_eexam_answers
ON exp_eexam_attempts
.attempt_id exp_eexam_answers.attempt_id
WHERE exp_eexam_attempts
.member_id=AND exp_eexam_attempts.correct=1

If I can’t delete it from one of your methods, what do you suggest ?

Coffee Bean Design
# 1
Developer
Coffee Bean Design

I think the query tag with your SQL is the best way to achieve what you want.