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

« back to all changes in this revision

Viewing changes to bin/ivle-enrol

  • Committer: Matt Giuca
  • Date: 2010-07-28 06:09:00 UTC
  • Revision ID: matt.giuca@gmail.com-20100728060900-6a0lcuexcv1juh5r
ivle/webapp/submit/submit.html: Rewrote error message when an offering could not be found to submit to. This can have one of several causes, and the old error assumed it was because you weren't in a subject dir. Now enumerates the possible reasons. (LP: #526853)

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: