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

« back to all changes in this revision

Viewing changes to bin/ivle-cloneworksheets

Semesters now have separate URL name, display name and code attributes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    sys.exit(1)
31
31
 
32
32
if len(sys.argv) != 7:
33
 
    print >> sys.stderr, "usage: %s <oldsubjectcode> <oldyear> <oldsemester> "\
34
 
                         "<newsubjectcode> <newyear> <newsemester>" \
 
33
    print >> sys.stderr, "usage: %s <oldsubjectcode> <oldyear> <oldsemestercode> "\
 
34
                         "<newsubjectcode> <newyear> <newsemestercode>" \
35
35
                         % os.path.basename(sys.argv[0])
36
36
    sys.exit()
37
37
 
40
40
src = store.find(Offering,
41
41
                 Subject.code == unicode(sys.argv[1]),
42
42
                 Semester.year == unicode(sys.argv[2]),
43
 
                 Semester.semester == unicode(sys.argv[3]),
 
43
                 Semester.code == unicode(sys.argv[3]),
44
44
                 Offering.subject_id == Subject.id,
45
45
                 Offering.semester_id == Semester.id).one()
46
46
 
47
47
dst = store.find(Offering,
48
48
                 Subject.code == unicode(sys.argv[4]),
49
49
                 Semester.year == unicode(sys.argv[5]),
50
 
                 Semester.semester == unicode(sys.argv[6]),
 
50
                 Semester.code == unicode(sys.argv[6]),
51
51
                 Offering.subject_id == Subject.id,
52
52
                 Offering.semester_id == Semester.id).one()
53
53