]> git.mjollnir.org Git - moodle.git/commit
MDL-14471 - when attempt data is generated by a script then sometimes quiz_get_latest...
authorjamiesensei <jamiesensei>
Wed, 23 Apr 2008 06:45:11 +0000 (06:45 +0000)
committerjamiesensei <jamiesensei>
Wed, 23 Apr 2008 06:45:11 +0000 (06:45 +0000)
commit58ffdbb883f24f18b37243d0486fc9a019a01dd1
tree3ec76ba036ae094ae2f11df4b218d26fdfacfc5a
parentf49edc81d6c799fa44091be07f421f1726e467d5
MDL-14471 - when attempt data is generated by a script then sometimes quiz_get_latest_attempt_by_user fetches the wrong attempt since timestart for the attempt is not a second apart from the last attempt - "patch to quiz/locallib.php function quiz_get_latest_attempt_by_user which makes the query simpler and also makes it more robust.

In the case that there are two attempts started in the same second, which can happen if you are generating random attempt data then the id field is used to tell which is the later attempt."
mod/quiz/locallib.php