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

« back to all changes in this revision

Viewing changes to bin/ivle-enrol

  • Committer: William Grant
  • Date: 2012-06-28 01:52:02 UTC
  • Revision ID: me@williamgrant.id.au-20120628015202-f6ru7o367gt6nvgz
Hah

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    sys.exit(1)
34
34
 
35
35
if len(sys.argv) not in (5, 6):
36
 
    print >> sys.stderr, '''usage: %s <login> <subjectcode> <year> <semester> [role]
 
36
    print >> sys.stderr, '''usage: %s <login> <subjectcode> <year> <semestercode> [role]
37
37
 
38
38
'role' should be one of student (the default), tutor or lecturer.
39
39
If an enrolment already exists, it will be reactivated and its role set.''' \
49
49
offering = store.find(Offering,
50
50
                    Subject.code == unicode(sys.argv[2]),
51
51
                    Semester.year == unicode(sys.argv[3]),
52
 
                    Semester.semester == unicode(sys.argv[4]),
 
52
                    Semester.code == unicode(sys.argv[4]),
53
53
                    Offering.subject_id == Subject.id,
54
54
                    Offering.semester_id == Semester.id).one()
55
55
if not offering: