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

« back to all changes in this revision

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

Allow hiding of worksheets from students, and hiding of worksheet marks out of 5. Also add column for per-offering worksheet cutoff date, as yet unimplemented.

Show diffs side-by-side

added added

removed removed

Lines of Context:
314
314
        URLNameValidator(not_empty=True))
315
315
    name = formencode.validators.UnicodeString(not_empty=True)
316
316
    assessable = formencode.validators.StringBoolean(if_missing=False)
 
317
    published = formencode.validators.StringBoolean(if_missing=False)
317
318
    data = formencode.validators.UnicodeString(not_empty=True)
318
319
    format = formencode.All(
319
320
        WorksheetFormatValidator(),
384
385
        new_worksheet.identifier = data['identifier']
385
386
        new_worksheet.name = data['name']
386
387
        new_worksheet.assessable = data['assessable']
 
388
        new_worksheet.published = data['published']
387
389
        new_worksheet.data = data['data']
388
390
        new_worksheet.format = data['format']
389
391
 
409
411
            'identifier': self.context.identifier,
410
412
            'name': self.context.name,
411
413
            'assessable': self.context.assessable,
 
414
            'published': self.context.published,
412
415
            'data': self.context.data,
413
416
            'format': self.context.format
414
417
            }
417
420
        self.context.identifier = data['identifier']
418
421
        self.context.name = data['name']
419
422
        self.context.assessable = data['assessable']
 
423
        self.context.published = data['published']
420
424
        self.context.data = data['data']
421
425
        self.context.format = data['format']
422
426