Skip to content

Commit

Permalink
use function from questionlib.php to delete attempt data
Browse files Browse the repository at this point in the history
  • Loading branch information
gustav_delius committed Apr 12, 2006
1 parent 78517b5 commit 375ab45
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mod/quiz/report/overview/report.php
Expand Up @@ -46,8 +46,7 @@ function display($quiz, $cm, $course) { /// This function just displays the
if ($todelete = get_record('quiz_attempts', 'id', $attemptid)) {
// TODO: use function from questionlib.php to delete attempt
delete_records('quiz_attempts', 'id', $attemptid);
delete_records('question_states', 'attempt', $todelete->uniqueid);
delete_records('question_sessions', 'attemptid', $todelete->uniqueid);
delete_attempt($todelete->uniqueid);

// Search quiz_attempts for other instances by this user.
// If none, then delete record for this quiz, this user from quiz_grades
Expand Down

0 comments on commit 375ab45

Please sign in to comment.