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

« back to all changes in this revision

Viewing changes to bin/ivle-enrolallusers

  • Committer: David Coles
  • Date: 2010-07-28 10:52:48 UTC
  • mfrom: (1791.2.10 mediahandlers)
  • Revision ID: coles.david@gmail.com-20100728105248-zvbn9g72v1nsskvd
A series of HTML5 based media handlers using the <audio> and <video> tags.  
This replaces the previous page that just showed a download link (which is 
already available on the menu).

Also solves issue where media files were downloaded by the client twice (once 
in an AJAX request intended only for text).

Known issues:
    * Bug #588285: External BHO will not be able to play media due to not
      having IVLE cookie.
    * Bug #610745: Does not correctly preview revisions
    * Bug #610780: Ogg media does not work in Chromium

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
p.add_option('--user', '-u', metavar="<login>",
43
43
             help="Just perform enrolment for user <login>")
44
44
p.add_option('--verbose', '-v', action='store_true')
45
 
p.add_option('--year', '-y', metavar="<year>",
46
 
             help="If specified, year to make enrolments for (default: "
47
 
                  "current year)")
48
45
options, arguments = p.parse_args()
49
46
 
50
47
if options.verbose:
68
65
else:
69
66
    logging.info("enrolment started for user %s" % options.user)
70
67
 
71
 
if options.year is not None and not options.year.isdigit():
72
 
    logging.error("Year must be numeric")
73
 
    sys.exit(1)
74
 
 
75
 
options.year = None if options.year is None else unicode(options.year)
76
 
 
77
68
for user in users:
78
69
    try:
79
70
        # Get all subjects this user is enrolled in, and add them to the DB if
80
71
        # they match one of our local subject codes
81
 
        res = ivle.pulldown_subj.enrol_user(config, store, user, options.year)
 
72
        res = ivle.pulldown_subj.enrol_user(config, store, user)
82
73
        logging.info("Enrolled user %s in %d subject%s." % (user.login, res,
83
74
                        '' if res == 1 else 's'))
84
75
    except Exception, message: