99
102
ctx['submission'] = project.submit(self.context,
100
unicode(self.path), revision, req.user)
101
except (database.DeadlinePassed, database.SubmissionError), e:
103
unicode(self.path), revision, req.user,
105
except database.DeadlinePassed:
106
# Show late submission page
107
self.template = 'submit-late.html'
108
ctx['project'] = project
109
except database.SubmissionError, e:
102
110
raise BadRequest(str(e) + ".")
104
# The Subversion configuration needs to be updated, to grant
105
# tutors and lecturers access to this submission. We have to
106
# commit early so usrmgt-server can see the new submission.
109
# Instruct usrmgt-server to rebuild the SVN group authz file.
110
msg = {'rebuild_svn_group_config': {}}
111
usrmgt = ivle.chat.chat(req.config['usrmgt']['host'],
112
req.config['usrmgt']['port'],
114
req.config['usrmgt']['magic'],
117
if usrmgt.get('response') in (None, 'failure'):
118
raise Exception("Failure creating repository: " + str(usrmgt))
120
# Instruct usrmgt-server to rebuild the SVN user authz file.
121
msg = {'rebuild_svn_config': {}}
122
usrmgt = ivle.chat.chat(req.config['usrmgt']['host'],
123
req.config['usrmgt']['port'],
125
req.config['usrmgt']['magic'],
128
if usrmgt.get('response') in (None, 'failure'):
129
raise Exception("Failure creating repository: " + str(usrmgt))
131
self.template = 'submitted.html'
132
ctx['project'] = project
112
# The Subversion configuration needs to be updated, to grant
113
# tutors and lecturers access to this submission. We have to
114
# commit early so usrmgt-server can see the new submission.
117
# Instruct usrmgt-server to rebuild the SVN group authz file.
118
msg = {'rebuild_svn_group_config': {}}
119
usrmgt = ivle.chat.chat(req.config['usrmgt']['host'],
120
req.config['usrmgt']['port'],
122
req.config['usrmgt']['magic'],
125
if usrmgt.get('response') in (None, 'failure'):
126
raise Exception("Failure creating repository: "
129
# Instruct usrmgt-server to rebuild the SVN user authz file.
130
msg = {'rebuild_svn_config': {}}
131
usrmgt = ivle.chat.chat(req.config['usrmgt']['host'],
132
req.config['usrmgt']['port'],
134
req.config['usrmgt']['magic'],
137
if usrmgt.get('response') in (None, 'failure'):
138
raise Exception("Failure creating repository: "
141
self.template = 'submitted.html'
142
ctx['project'] = project
135
145
ctx['principal'] = self.context