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

« back to all changes in this revision

Viewing changes to ivle/pulldown_subj/__init__.py

  • Committer: William Grant
  • Date: 2009-12-07 05:01:09 UTC
  • mfrom: (1340 trunk)
  • mto: This revision was merged to the branch mainline in revision 1353.
  • Revision ID: grantw@unimelb.edu.au-20091207050109-230vmxx0lmfiphjx
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
            return result
47
47
    return []
48
48
 
49
 
def enrol_user(config, store, user, year=None):
 
49
def enrol_user(config, store, user):
50
50
    """
51
51
    Looks up the student in whatever modules are available.
52
52
    The pulldown does not tell us what year to enrol the student for, so the
62
62
    Returns the number of subjects the user was enrolled in (not including
63
63
    subjects outside the system, or subjects already enrolled).
64
64
    """
65
 
    if year is None:
66
 
        year = unicode(datetime.datetime.now().year)
67
 
 
68
65
    count = 0
69
 
    for subject, semester in get_subjects(config, user.login):
 
66
    for subject, year, semester in get_subjects(config, user.login):
70
67
        offering = store.find(Offering,
71
68
                              Subject.code == subject,
72
69
                              Offering.subject_id == Subject.id,