inspectorG4dget / AnonymousFeedback

1 stars 0 forks source link

Application displays duplicate entries for tutorial sections #34

Closed scriptbae closed 7 years ago

scriptbae commented 7 years ago

This issue is suspected to be related to #33.

Using the current master:HEAD (5e692f20a11302b906aceb5d1b61d6f5b48758d7) as well as the provided database bootstrapping file and testing data, the application displays duplicates of tutorial sections when attempting to evaluate a TA for course ITI1121. Related screenshot attached.

screenshot from 2017-01-24 22-58-08

The cause of this issue requires further investigation.

scriptbae commented 7 years ago

This issue is no longer suspected to be related to #33.

cannotparse commented 7 years ago

The bug isn't fixed. Bug appears on my version too.

cannotparse commented 7 years ago

I believe this was apart of a feature I was half way through implementing on the day before we needed to "present" it. Let me bring up the code.

scriptbae commented 7 years ago

@NuclearBanane brain fart. The bug is indeed still present.

cannotparse commented 7 years ago

Below code needs to have the exception handling fixed. But it was trying to differentiate the context of needing to only see all the sections in existence to assign TA's to it in the assign TA form. This way this function can server both getting active sections with TA's to the student view and in-active sections still requiring sections. Didn't mange to complete it in time, ofc.

try:
     active = self.get_argument('active')
except :
     active = False

You'll also want to look at def getSections(courseCode, year, semester, active):

scriptbae commented 7 years ago

@NuclearBanane that snippet seems to be unrelated.

cannotparse commented 7 years ago

It isn't, it chooses between the following queries which need to be fleshed out.

if active is True:
        t.execute("""SELECT sectionID, weekday, startTime, endTime
                FROM section, teaches
                WHERE section.course=%s
                    AND section.currYear=%s
                    AND section.semester=%s
                    AND teaches.currYear=section.currYear
                    AND teaches.semester=section.semester
                    AND teaches.course=section.course""",
                    (courseCode, year, semester))
    else :
        t.execute("""SELECT sectionID, weekday, startTime, endTime
                FROM section
                WHERE course=%s
                    AND currYear=%s
                    AND semester=%s""",
                    (courseCode, year, semester))
scriptbae commented 7 years ago

Tentatively fixed in PR #40. Will put together some test cases later tonight and if that merge passes the test cases, this issue will be closed.