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

« back to all changes in this revision

Viewing changes to ivle/worksheet/utils.py

  • Committer: Matt Giuca
  • Date: 2010-02-25 09:14:35 UTC
  • Revision ID: matt.giuca@gmail.com-20100225091435-3pt7qq2spwpsf37p
Offering view now respects worksheet_cutoff when displaying the student's mark. Currently also the individual worksheet completions stop at the cutoff. This can be changed, but is hard.

Show diffs side-by-side

added added

removed removed

Lines of Context:
346
346
 
347
347
 
348
348
# XXX: This really shouldn't be needed.
349
 
def create_list_of_fake_worksheets_and_stats(config, store, user, offering):
 
349
def create_list_of_fake_worksheets_and_stats(config, store, user, offering,
 
350
    as_of=None):
350
351
    """Take an offering's real worksheets, converting them into stats.
351
352
 
352
353
    The worksheet listing views expect special fake worksheet objects
373
374
        if new_worksheet.assessable:
374
375
            # Calculate the user's score for this worksheet
375
376
            mand_done, mand_total, opt_done, opt_total = (
376
 
                ivle.worksheet.utils.calculate_score(store, user, worksheet))
 
377
                ivle.worksheet.utils.calculate_score(store, user, worksheet,
 
378
                                                     as_of=as_of))
377
379
            if opt_total > 0:
378
380
                optional_message = " (excluding optional exercises)"
379
381
            else: