~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-12 02:06:46 UTC
  • Revision ID: matt.giuca@gmail.com-20100212020646-2jd7uig1z5vmpqfd
Policy decision: Tutors no longer have access to the enrolment page. This disallows them from enrolling students in subjects they teach. (Moved 'enrol' and 'enrol_student' to lecturer/admin-only privilege). This fixes Launchpad Bug #493945.

Show diffs side-by-side

added added

removed removed

Lines of Context:
331
331
 
332
332
 
333
333
# XXX: This really shouldn't be needed.
334
 
def create_list_of_fake_worksheets_and_stats(config, store, user, offering):
 
334
def create_list_of_fake_worksheets_and_stats(store, user, offering):
335
335
    """Take an offering's real worksheets, converting them into stats.
336
336
 
337
337
    The worksheet listing views expect special fake worksheet objects
345
345
    problems_total = 0
346
346
 
347
347
    # Offering.worksheets is ordered by the worksheets seq_no
348
 
    worksheets = offering.worksheets
349
 
 
350
 
    # Unless we can edit worksheets, hide unpublished ones.
351
 
    if 'edit_worksheets' not in offering.get_permissions(user, config):
352
 
        worksheets = worksheets.find(published=True)
353
 
 
354
 
    for worksheet in worksheets:
 
348
    for worksheet in offering.worksheets:
355
349
        new_worksheet = FakeWorksheetForMarks(
356
350
            worksheet.identifier, worksheet.name, worksheet.assessable)
357
351
        if new_worksheet.assessable: