Tutorial service's attempt getter often gets the wrong attempt

Bug #492490 reported by William Grant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
IVLE
Triaged
Medium
Unassigned

Bug Description

1. Submit an exercise attempt some time in the middle of a second.
2. Select that attempt and try to view it.

You get the previous attempt. This is because the URL only has information
to second resolution, whereas the database stores much finer than that.

Tags: worksheets
Revision history for this message
Matt Giuca (mgiuca) wrote :

Just give each entry in problem_attempt a sequential ID. Give the IDs to the
JavaScript so it has access to the attempt ID. The URL for attempts is the attempt
ID. This removes timing issues from the client side entirely.

Revision history for this message
Ivo Widjaja (ivow) wrote :

Viewing any of the previous attempts always gives the first attempt.
Server used: http://ivle.informatics.unimelb.edu.au

Revision history for this message
Matt Giuca (mgiuca) wrote :

Ivo: I can't reproduce that behaviour on the production server. Can you provide more
information?

The main issue we're discussing here is a bug introduced recently (and not in
production yet), so you must be talking about a separate issue. Can anyone reproduce it?

Revision history for this message
Matt Giuca (mgiuca) wrote :

Hacked a fix in r1225: query from the given date +1 second.

Date is in seconds (eg. 3:47:12), while the data is in finer time (eg. 3:47:12.3625).
The query 'date <= 3:47:12' will fail because 3:47:12.3625 is greater.

Hence we do the query from +1 second, 'date <= 3:47:13', and it finds the correct
submission, UNLESS there are multiple submissions inside the same second.

This isn't a perfect fix, so I'm leaving the issue open (non-critical). See comment
#1 above for the ideal fix.

Revision history for this message
Ivo Widjaja (ivow) wrote :

I'm still having this issue for the first exercise in the first worksheet (worksheet
2). Strangely, viewing previous attempts works fine in exercise 2.

Revision history for this message
Ivo Widjaja (ivow) wrote :

It happens to the first exercise in every worksheet

Revision history for this message
Matt Giuca (mgiuca) wrote :

Ivo, I can't reproduce any of the above issues (on the test cluster). (The only
remaining issue is if you made multiple submissions within 1 second -- I assume you
didn't do that).

Which issue are you referring to? 'Selecting an attempt gives the previous attempt'
or 'Selecting an attempt gives the first attempt'?

We can't reproduce any of these.

William Grant (wgrant)
tags: added: worksheets
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.