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

« back to all changes in this revision

Viewing changes to ivle/database.py

  • Committer: William Grant
  • Date: 2010-02-12 06:53:51 UTC
  • Revision ID: grantw@unimelb.edu.au-20100212065351-63ll06upbjrwl9vk
Allow tutors to manage groups.

Show diffs side-by-side

added added

removed removed

Lines of Context:
377
377
            enrolment = self.get_enrolment(user)
378
378
            if enrolment or user.admin:
379
379
                perms.add('view')
380
 
            if (enrolment and enrolment.role in (u'tutor', u'lecturer')) \
381
 
               or user.admin:
 
380
            if enrolment and enrolment.role == u'tutor':
382
381
                perms.add('view_project_submissions')
383
382
                # Site-specific policy on the role of tutors
384
383
                if config['policy']['tutors_can_enrol_students']:
386
385
                    perms.add('enrol_student')
387
386
                if config['policy']['tutors_can_edit_worksheets']:
388
387
                    perms.add('edit_worksheets')
 
388
                if config['policy']['tutors_can_admin_groups']:
 
389
                    perms.add('admin_groups')
389
390
            if (enrolment and enrolment.role in (u'lecturer')) or user.admin:
390
391
                perms.add('view_project_submissions')
 
392
                perms.add('admin_groups')
391
393
                perms.add('edit_worksheets')
392
394
                perms.add('edit')           # Can edit projects & details
393
395
                perms.add('enrol')          # Can see enrolment screen at all