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

« back to all changes in this revision

Viewing changes to bin/ivle-enrolallusers

Merge submissions-subversion-acls.

Offering staff can now use Subversion to access submissions.

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
 
config = ivle.config.Config()
59
 
store = ivle.database.get_store(config)
60
 
 
 
58
store = ivle.database.get_store(ivle.config.Config())
61
59
if options.user is None:
62
60
    users = store.find(ivle.database.User).order_by(ivle.database.User.login)
63
61
else:
78
76
    try:
79
77
        # Get all subjects this user is enrolled in, and add them to the DB if
80
78
        # they match one of our local subject codes
81
 
        res = ivle.pulldown_subj.enrol_user(config, store, user, options.year)
 
79
        res = ivle.pulldown_subj.enrol_user(store, user, options.year)
82
80
        logging.info("Enrolled user %s in %d subject%s." % (user.login, res,
83
81
                        '' if res == 1 else 's'))
84
82
    except Exception, message: