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

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/subject.py

  • Committer: Matt Giuca
  • Date: 2010-02-25 08:37:31 UTC
  • Revision ID: matt.giuca@gmail.com-20100225083731-bsvacg8vaz4k3n7m
OfferingEdit view: Added Worksheets cutoff field.

Show diffs side-by-side

added added

removed removed

Lines of Context:
385
385
    description = formencode.validators.UnicodeString(
386
386
        if_missing=None, not_empty=False)
387
387
    url = formencode.validators.URL(if_missing=None, not_empty=False)
 
388
    worksheet_cutoff = DateTimeValidator(not_empty=True)
388
389
    show_worksheet_marks = formencode.validators.StringBoolean(
389
390
        if_missing=False)
390
391
 
427
428
                        self.context.semester.semester,
428
429
            'url': self.context.url,
429
430
            'description': self.context.description,
 
431
            'worksheet_cutoff': self.context.worksheet_cutoff,
430
432
            'show_worksheet_marks': self.context.show_worksheet_marks,
431
433
            }
432
434
 
436
438
            self.context.semester = data['semester']
437
439
        self.context.description = data['description']
438
440
        self.context.url = unicode(data['url']) if data['url'] else None
 
441
        self.context.worksheet_cutoff = data['worksheet_cutoff']
439
442
        self.context.show_worksheet_marks = data['show_worksheet_marks']
440
443
        return self.context
441
444
 
471
474
        new_offering.semester = data['semester']
472
475
        new_offering.description = data['description']
473
476
        new_offering.url = unicode(data['url']) if data['url'] else None
 
477
        new_offering.worksheet_cutoff = data['worksheet_cutoff']
474
478
        new_offering.show_worksheet_marks = data['show_worksheet_marks']
475
479
 
476
480
        req.store.add(new_offering)