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

« back to all changes in this revision

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

  • Committer: Matt Giuca
  • Date: 2010-02-25 09:21:55 UTC
  • Revision ID: matt.giuca@gmail.com-20100225092155-4d9cu6rtsvyc8hzw
Worksheet marks page (and CSV download) now respects the worksheet_cutoff, if supplied, by default. Still allows the cutoff to be manually overridden. Fixes Launchpad bug #526976.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
 
49
49
        # User may supply a "cutoff date" to calculate marks as of that date
50
50
        # Default to current time
51
 
        cutoff = datetime.datetime.now()
 
51
        cutoff = offering.worksheet_cutoff or datetime.datetime.now()
52
52
        data = dict(req.get_fieldstorage())
53
53
        if data.get('cutoff') is not None:
54
54
            try:
91
91
 
92
92
        # User may supply a "cutoff date" to calculate marks as of that date
93
93
        # Default to current time
94
 
        cutoff = datetime.datetime.now()
 
94
        cutoff = offering.worksheet_cutoff or datetime.datetime.now()
95
95
        data = dict(req.get_fieldstorage())
96
96
        if data.get('cutoff') is not None:
97
97
            try: