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

« back to all changes in this revision

Viewing changes to www/apps/tutorial/__init__.py

MergeĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
260
260
        # XXX Marks calculation (should be abstracted out of here!)
261
261
        # percent / 16, rounded down, with a maximum mark of 5
262
262
        ctx['max_mark'] = 5
263
 
        ctx['mark'] = min(problems_pct / 16, max_mark)
 
263
        ctx['mark'] = min(ctx['problems_pct'] / 16, ctx['max_mark'])
264
264
 
265
265
def get_worksheets(subjectfile):
266
266
    '''Given a subject stream, get all the worksheets and put them in ctx'''