~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/tutorial/service.py

MergedĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
136
136
        except ValueError:
137
137
            raise NotFound()
138
138
 
 
139
        # XXX Hack around Google Code issue #87
 
140
        # Query from the given date +1 secnod.
 
141
        # Date is in seconds (eg. 3:47:12), while the data is in finer time
 
142
        # (eg. 3:47:12.3625). The query "date <= 3:47:12" will fail because
 
143
        # 3:47:12.3625 is greater. Hence we do the query from +1 second,
 
144
        # "date <= 3:47:13", and it finds the correct submission, UNLESS there
 
145
        # are multiple submissions inside the same second.
 
146
        date += datetime.timedelta(seconds=1)
 
147
 
139
148
        worksheet_exercise = req.store.find(WorksheetExercise,
140
149
            WorksheetExercise.exercise_id == exercise,
141
150
            WorksheetExercise.worksheet_id == Worksheet.id,