LW noticed that a number of courses that should have prerequisites listed didn't. I confirmed.
First guess was that the markup in the calendar html had changed so the regexp in the create course listing array functions were failing. Disproved that by labouriously testing the output of each regexp line.
There is a test in the code that says if you can't find the course in the current calendar AND the summer and winter sessions are looking at different calendars, look in the previous calendar (for cases where a course has been delisted but is still on offer for one last summer session). The actual syntax for the first part of that test was "$information.length < 1" which looks reasonable. In fact, "$information.length" is syntactically nonsensical, but rather than generate an error, it generates 0 which of course tests as < 1 so the whole thing tests as true. The test should read "strlen($information) < 1".
The rest of the conditional only mattered if a) you're in the months of June, July or August; b) the courses have been renumbered between last year and the current year. This is the first time since the code was written that all the conditions in the multiple-condition test were true, so the conditional block of code was executed and the wrong values put into the array.
When I replaced the incorrect bit of syntax the code worked properly.
No Pingbacks for this post yet...
This blog is for work done for academic departments which does not fall under other categories.
|<< <||> >>|