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

« back to all changes in this revision

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

  • Committer: David Coles
  • Date: 2010-07-20 05:55:20 UTC
  • Revision ID: coles.david@gmail.com-20100720055520-yxyfn2qqycfwboiq
URL quote paths in checkout URLs.

The two benefits of this are that we no longer have issues with spaces in 
submitted paths and also don't have to worry about shell escape characters 
(and possible shell injection to a lectures console).

Show diffs side-by-side

added added

removed removed

Lines of Context:
735
735
    permission = "view_project_submissions"
736
736
    tab = 'subjects'
737
737
 
738
 
    def build_subversion_url(self, req, submission):
739
 
        princ = submission.assessed.principal
740
 
 
741
 
        return os.path.join(princ.get_svn_url(req.config, req),
742
 
                            submission.path[1:] if
743
 
                                submission.path.startswith(os.sep) else
744
 
                                submission.path)
745
 
 
746
738
    def populate(self, req, ctx):
747
739
        self.plugin_styles[Plugin] = ["project.css"]
748
740
 
752
744
        ctx['EnrolView'] = EnrolView
753
745
        ctx['format_datetime'] = ivle.date.make_date_nice
754
746
        ctx['format_datetime_short'] = ivle.date.format_datetime_for_paragraph
755
 
        ctx['build_subversion_url'] = self.build_subversion_url
756
747
        ctx['project'] = self.context
757
748
        ctx['user'] = req.user
758
749
        ctx['ProjectEdit'] = ProjectEdit