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

« back to all changes in this revision

Viewing changes to ivle/database.py

  • Committer: William Grant
  • Date: 2010-07-30 11:52:23 UTC
  • Revision ID: grantw@unimelb.edu.au-20100730115223-bcyxqpefhp514ra8
Tags: 1.0.2
ReleaseĀ 1.0.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
928
928
    def get_svn_export_command(self, req):
929
929
        """Returns a Unix shell command to export a submission"""
930
930
        svn_url = self.get_svn_url(req.config)
 
931
        _, ext = os.path.splitext(svn_url)
931
932
        username = (req.user.login if req.user.login.isalnum() else
932
933
                "'%s'"%req.user.login)
933
 
        export_dir = self.assessed.principal.short_name
 
934
        # Export to a file or directory relative to the current directory,
 
935
        # with the student's login name, appended with the submitted file's
 
936
        # extension, if any
 
937
        export_path = self.assessed.principal.short_name + ext
934
938
        return "svn export --username %s -r%d '%s' %s"%(req.user.login,
935
 
                self.revision, svn_url, export_dir)
 
939
                self.revision, svn_url, export_path)
936
940
 
937
941
    @staticmethod
938
942
    def test_and_normalise_path(path):