COMP3311 23T3 Assignment 2
Fixes and Updates
Database Systems
Last updated: Tuesday 14th November 8:01am
Most recent changes are shown in red ... older changes are shown in brown.

[Specification]  [Database]  [SQL Schema]  [Grades+Rules]  [Examples]  [Testing]  [Submitting]  [Fixes+Updates]


This file will contain descriptions for any fixes to solve minor bugs that people might find in the supplied code/database. Each fix is tagged with a timestamp, which is when I fixed it in the supplied code. If you collected the code/database after that time, it will already have the relevant fix included.

Fix #1: wrong dbname in supplied q?.py   (Tue 31 Oct 10:00pm)

The original q?.py files had "dbname=mymyunsw" in the database connection string. It should be "dbname=ass2". I've updated the supplied files and the ass2.zip file.

Fix #2: suspect import in supplied q2.py   (Wed 01 Nov 9:00pm)

The original q2.py file had from helpers import getCourse, but there's no getCourse function in helpers.py. You can either treat this as a hint that you might want to define a getCourse function in helpers.py, or you can delete the import statement from q2.py. I have done the latter in ass2.zip.

There is also a reference to a function getSubject() which does not exist either in q2.py or helpers.py. You need to create this yourself.

Fix #3: added description of header for Q4   (Thu 02 Nov 6:00pm)

I had forgotten to describe what was in the transcript header in the original spec. I've now added the description so that the examples make more sense.

Fix #4: example output from python3 q4.py 5893146   (Sat 04 Nov 11:10am)

The UOC_FOR_WAM in the DEBUG line was incorrect. Hopefully it is now correct.

Fix #5: more fixes for the Example file   (Sat 04 Nov 3:30pm)

Two examples had output that was inconsistent with the spec:

python3 q3.py 3707
python3 q3.py 12345
Now fixed.

Fix #6: more fixes for the Example file   (Sat 04 Nov 10:30pm)

A couple of examples were missing the unrs note.
Now fixed. Changes appear in red.

Fix #7: clarification for Q1   (Mon 06 Nov 10:00m)

The intention was to use Program_enrolments as the basis for determining enrolled students. Some people have been using Course_enrolments and getting different counts. Tehe reason for using Program_enrolments is that some students might be currently enrolled in a program, but not studying any courses in a given term. I thought I'd put using in the spec or that the Warning might be enough of a hint. I have now made it explicit..

Fix #8: order of "to be completed" items   (Mon 06 Nov 8:45pm)

The example for python3 q5.py 5892943 had the "to be completed" items in the wrong order (not following the spec). Now fixed.

Fix #9: status of NC   (Mon 06 Nov 8:45pm)

The NC grades was allocated to the wrong group in the Grades+Rules page. It is an unresolved grade and belongs with grades like LE. Because it's "unresolved" it doesn't contribute any UOC. I've now fixed all occurences in Grades+Rules.

Fix #10: names of requirements   (Thu 09 Nov 8:45pm)

It wasn't explicitly stated in the specification how the Total UOC requirements should be displayed. This was deferred to the Examples page. But since this seems to have caused some confusion, an explicit statement has been added to the spec.

The Free Electives rules should have followed the specification and used the actual name of the Free Electives rule, rather than simply "Free Electives" in the Q3 example output. This has been fixed in the example output, and also makes the naming consistent with that in Q5.

Fix #11: wrong field used in supplied getStudent()   (Fri 10 Nov 7:00am)

The getStudent() function in helpers.py used the wrong field name to look up the student from their zID.

where  p.id = %s

should be

where  p.zid = %s

Fix #12: length of truncated Subject names   (Sat 11 Nov 12:00pm)

The Examples and autotests truncated Subject names to 31 chars. The spec asked for 32 chars, but I've now changed it to be consistent with the Examples and autotests, which I assume most people have been working from.

Fix #13: buggy acadobjs strings   (Sun 12 Nov 5:00pm)

A couple of requirements have a buggy acadobjs string. They can be fixed by running this SQL command in your own ass2 database:

update requirements
set acadobjs = replace(acadobjs,'COMP9##,GSOE92###','COMP9###,GSOE92##')
where acadobjs ~'COMP9##,GSOE92###';

I've also fixed this in ~cs3311/web/23T3/assignments/ass2/files/ass2.dump.

Depending on how implemented course code pattern checking, this may or may not have affected you.

Fix #14:: more buggy acadobjs strings   (Tue 14 Nov 7:00pm)

A couple of requirements have a buggy acadobjs string. They can be fixed by running this SQL command in your own ass2 database:

update requirements
set acadobjs = replace(acadobjs,'ENG3600','ENGG3600')
where acadobjs ~ 'ENG3600' ;

I've also fixed this in ~cs3311/web/23T3/assignments/ass2/files/ass2.dump.

This shouldn't have affects on your code.