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

« back to all changes in this revision

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

  • Committer: matt.giuca
  • Date: 2009-02-02 22:27:12 UTC
  • Revision ID: svn-v4:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1191
tutorial: Fixed use of wrong variable names (broke during refactor).

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'''