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

« back to all changes in this revision

Viewing changes to ivle/dispatch/__init__.py

  • Committer: me at id
  • Date: 2009-02-03 03:51:39 UTC
  • Revision ID: svn-v4:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1192
ivle.dispatch: Only show tracebacks if we are logged in and not a student, or
    if we cannot write to the error log. Previously they were shown if we were
    not logged in, not a student, or the error log was unwritable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
301
301
        logging.error('%s\n%s'%(str(msg), tb))
302
302
        # Error messages are only displayed is the user is NOT a student,
303
303
        # or if there has been a problem logging the error message
304
 
        show_errors = (not publicmode) and (not login or \
305
 
                            (not str(role) == "student") or logfail)
 
304
        show_errors = (not publicmode) and ((login and \
 
305
                            str(role) != "student") or logfail)
306
306
        req.write("""<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"                 
307
307
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">                                      
308
308
<html xmlns="http://www.w3.org/1999/xhtml">