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

« back to all changes in this revision

Viewing changes to ivle/dispatch/request.py

  • Committer: me at id
  • Date: 2009-01-15 05:53:45 UTC
  • mto: This revision was merged to the branch mainline in revision 1090.
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:branches%2Fstorm:1161
bin/ivle-showenrolment: Switch to ivle.database.User.enrolments from
    ivle.db.get_enrolment, removing the dependency on ivle.db.

Show diffs side-by-side

added added

removed removed

Lines of Context:
267
267
            # This includes binary strings.
268
268
            self.apache_req.write(string, flush)
269
269
 
270
 
    def logout(self):
271
 
        """Log out the current user by destroying the session state.
272
 
        Then redirect to the top-level IVLE page."""
273
 
        # List of cookies that IVLE uses (to be removed at logout)
274
 
        ivle_cookies = ["ivleforumcookie", "clipboard"]
275
 
        
276
 
        if hasattr(self, 'session'):
277
 
            self.session.invalidate()
278
 
            self.session.delete()
279
 
            # Invalidates all IVLE cookies
280
 
            all_cookies = Cookie.get_cookies(self)
281
 
            for cookie in all_cookies:
282
 
                if cookie in ivle_cookies:
283
 
                    self.add_cookie(Cookie.Cookie(cookie,'',expires=1,path='/'))
284
 
        self.throw_redirect(ivle.util.make_path('')) 
285
 
 
286
 
 
287
270
    def flush(self):
288
271
        """Flushes the output buffer."""
289
272
        self.apache_req.flush()