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

« back to all changes in this revision

Viewing changes to bin/ivle-enrolallusers

  • Committer: David Coles
  • Date: 2009-07-30 07:46:28 UTC
  • Revision ID: coles.david@gmail.com-20090730074628-9lm1hyjmobpvwhy3
Fix the console input UI so that it displays propperly regardless of window width
 by laying it out with 'display: table'. Also fixed file browser spacing since
console overlapped the status bar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
    print >> sys.stderr, "%s must be run as root" % sys.argv[0]
56
56
    sys.exit(1)
57
57
 
58
 
store = ivle.database.get_store(ivle.config.Config())
 
58
config = ivle.config.Config()
 
59
store = ivle.database.get_store(config)
 
60
 
59
61
if options.user is None:
60
62
    users = store.find(ivle.database.User).order_by(ivle.database.User.login)
61
63
else:
76
78
    try:
77
79
        # Get all subjects this user is enrolled in, and add them to the DB if
78
80
        # they match one of our local subject codes
79
 
        res = ivle.pulldown_subj.enrol_user(store, user, options.year)
 
81
        res = ivle.pulldown_subj.enrol_user(config, store, user, options.year)
80
82
        logging.info("Enrolled user %s in %d subject%s." % (user.login, res,
81
83
                        '' if res == 1 else 's'))
82
84
    except Exception, message: