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

« back to all changes in this revision

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

  • Committer: William Grant
  • Date: 2010-01-30 01:49:18 UTC
  • mfrom: (1465.1.2 exercise-breadcrumbs)
  • Revision ID: grantw@unimelb.edu.au-20100130014918-bn9i82pp30hin59r
Add an 'Exercises' breadcrumb before the exercise name.

Show diffs side-by-side

added added

removed removed

Lines of Context:
538
538
 
539
539
class ExercisesView(XHTMLView):
540
540
    """View for seeing the list of all exercises"""
541
 
    
 
541
 
542
542
    permission = 'edit'
543
543
    template = 'templates/exercises.html'
 
544
    breadcrumb_text = 'Exercises'
 
545
 
544
546
    #XXX: This should be done somewhere else
545
547
    def authorize(self, req):
546
548
        for offering in req.store.find(Offering):
547
549
            if 'edit' in offering.get_permissions(req.user):
548
550
                return True
549
551
        return False
550
 
    
 
552
 
551
553
    def populate(self, req, ctx):
552
554
        self.plugin_styles[Plugin] = ['exercise_admin.css']
553
555
        ctx['req'] = req