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

« back to all changes in this revision

Viewing changes to ivle/worksheet.py

Fix retrieval of old exercise attempts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
128
128
 
129
129
def get_exercise_attempt(store, user, worksheet_exercise, as_of=None,
130
130
        allow_inactive=False):
131
 
    """Given a storm.store, User and Exercise, returns an
 
131
    """Given a storm.store, User and WorksheetExercise, returns an
132
132
    ivle.database.ExerciseAttempt object for the last submitted attempt for
133
133
    this question.
134
134
    Returns None if the user has not made an attempt on this
138
138
        attempts made before or at this time.
139
139
    allow_inactive: If True, will return disabled attempts.
140
140
    """
141
 
    return _get_exercise_attempts(store, user, exercise, worksheet, as_of,
 
141
    return _get_exercise_attempts(store, user, worksheet_exercise, as_of,
142
142
        allow_inactive).first()
143
143
 
144
144
def save_exercise(store, user, worksheet_exercise, text, date):