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

« back to all changes in this revision

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

  • Committer: William Grant
  • Date: 2009-05-14 02:30:46 UTC
  • mfrom: (1165.3.86 submissions-admin)
  • Revision ID: grantw@unimelb.edu.au-20090514023046-ujf6ay6rf6iioz9s
Merge submissions-admin.

Offering staff can now administer projects and view their projects'
submissions. A tool is also provided to create archives of each submission.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
from ivle.webapp.base.plugins import ViewPlugin
32
32
 
33
33
import ivle.date
 
34
import ivle.chat
34
35
 
35
36
 
36
37
class SubmitView(XHTMLView):
92
93
 
93
94
            project.submit(self.context, self.path, revision, req.user)
94
95
 
 
96
            # The Subversion configuration needs to be updated, to grant
 
97
            # tutors and lecturers access to this submission. We have to 
 
98
            # commit early so usrmgt-server can see the new submission.
 
99
            req.store.commit()
 
100
 
 
101
            # Instruct usrmgt-server to rebuild the SVN group authz file.
 
102
            msg = {'rebuild_svn_group_config': {}}
 
103
            usrmgt = ivle.chat.chat(req.config['usrmgt']['host'],
 
104
                                    req.config['usrmgt']['port'],
 
105
                                    msg,
 
106
                                    req.config['usrmgt']['magic'],
 
107
                                    )
 
108
 
 
109
            if usrmgt.get('response') in (None, 'failure'):
 
110
                raise Exception("Failure creating repository: " + str(usrmgt))
 
111
 
 
112
            # Instruct usrmgt-server to rebuild the SVN user authz file.
 
113
            msg = {'rebuild_svn_config': {}}
 
114
            usrmgt = ivle.chat.chat(req.config['usrmgt']['host'],
 
115
                                    req.config['usrmgt']['port'],
 
116
                                    msg,
 
117
                                    req.config['usrmgt']['magic'],
 
118
                                    )
 
119
 
 
120
            if usrmgt.get('response') in (None, 'failure'):
 
121
                raise Exception("Failure creating repository: " + str(usrmgt))
 
122
 
95
123
            self.template = 'submitted.html'
96
124
            ctx['project'] = project
97
125