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

« back to all changes in this revision

Viewing changes to bin/ivle-enrolallusers

  • Committer: William Grant
  • Date: 2009-07-05 12:23:11 UTC
  • mto: (1294.4.2 ui-the-third)
  • mto: This revision was merged to the branch mainline in revision 1353.
  • Revision ID: grantw@unimelb.edu.au-20090705122311-wfyih6snxs4c144p
Recenter the breadcrumb text.

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: