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

« back to all changes in this revision

Viewing changes to bin/ivle-showenrolment

  • Committer: me at id
  • Date: 2009-01-15 05:53:45 UTC
  • mto: This revision was merged to the branch mainline in revision 1090.
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:branches%2Fstorm:1161
bin/ivle-showenrolment: Switch to ivle.database.User.enrolments from
    ivle.db.get_enrolment, removing the dependency on ivle.db.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 
41
41
if user.enrolments.count() > 0:
42
42
    print 'IVLE enrolment for %s (%s):' % (user.login, user.fullname)
43
 
    print '    Code       Name Year Semester     Role'
44
 
    print '-------- ---------- ---- -------- --------'
 
43
    print '    Code       Name Semester Year'
 
44
    print '-------- ---------- -------- ----'
45
45
    for e in user.enrolments:
46
 
        print '%8s %10s %4s %8s %8s' % (
 
46
        print '%8s %10s %8s %4s' % (
47
47
                e.offering.subject.code, e.offering.subject.short_name,
48
 
                e.offering.semester.year, e.offering.semester.semester,
49
 
                e.role
 
48
                e.offering.semester.semester, e.offering.semester.year
50
49
                )
51
50
else:
52
51
    print '%s (%s) is not enrolled in any IVLE offerings' % (