I suggested one course listing (rather than separate listings for summer and winter) and created a prototype for review in which each listing included a new line "offered in:" with appropriate values based on the arrays in the courses_offered file.
Then I asked if they'd like to be able to list courses by actual sessions offered (sep-apr, sep-dec, jan-apr, may-aug) and they said yes, so I:
- added new array variables to the courses_offered and courses_taught files (one for each of the four sessions)
- rewrote substantial chunks of the php code that figures out if a specific course is offered by the department (for use in grad and undergrad courses pages) and by specific instructors (for use in specific professor pages).
- documented the code and tested it
The site now requires that the dept provide lists of courses offered in each of 4 sessions rather than 2, for the overall department and for each instructor.
Logging time spent on search committee work.
That's four done for volume 19 (Christensen, Blackwell, Lindqvist and Rees), and four to go (Bunch, Lunde, Smith, and Thorsen). Still waiting on confirmation of a couple of issues on Rees from JT.
To create a view (in order to make my queries more straightforward) I had to build some SQL that queried the same table twice. My successful query looks like this:
SELECT lookup_primary_character_id, PrimChar.character_name, lookup_related_character_id, RelChar.character_name, relationship
FROM CharToCharRels
JOIN Characters AS PrimChar ON lookup_primary_character_id = PrimChar.character_id
JOIN Characters AS RelChar ON lookup_related_character_id = RelChar.character_id
The trick was to do one SELECT and two JOINs to the same table, using different aliases (PrimChar and RelChar) in the JOINs.
I extended this method to produce a query that creates a result which includes the name info and the cite info, thusly:
SELECT lookup_rel_id, lookup_cite_id, CharToCharRels.id, lookup_primary_character_id, PrimChar.character_name AS primaryChar, lookup_related_character_id, RelChar.character_name AS relatedChar, relationship
FROM CharToCharRels
JOIN Characters AS PrimChar ON lookup_primary_character_id = PrimChar.character_id
JOIN Characters AS RelChar ON lookup_related_character_id = RelChar.character_id
JOIN CharToCharToCiteRels AS cites ON lookup_rel_id = CharToCharRels.id
NOTE: Martin pointed out that Stewart had solved this, and blogged about it A YEAR AGO!! Grrr.
Had a very heartening day today: these are the things I learned how to do:
- Create directories, copy files, etc. using platform-independent calls.
- Read an XML file using the
QXmlStreamReaderobject (which is rather like a sophisticated SAX parser, or perhaps a nodeIterator). - Create a DOM document and save it to disk.
XML handling looks to be really easy and practical, and my little app is now able to load and save files correctly. All that's left for the trial app phase now is to figure out how to save and restore window geometry and state, and handle enabling/disabling actions.
Loring discovered that some of the images she had optimized were out of sequence, so we had to go in and rename a few. The errors occurred in files spanning three years. Thankfully, only one of the years was published.
I will go in and change the <pb> tags in each of the affected files, which should not take too long. Once a given year is complete, I will upload them at once and switch over to the new image files shortly thereafter. For now, though, the end user should not notice anything. The <pb> tags point to the old images.
Markup of the first of CC's articles is now done, and I'm beginning the rendering code for it. The document and footnotes show up just fine already, but the references to external docs aren't working yet; neither are the biblio items, although it looks as though they're all being retrieved.
I now have the retrieval of references by Ajax working. This is the deal:
- Some reference items link to other reference items. When we retrieve a document from the db, we automatically retrieve all references which are linked from the original document, and add them to the output page, so they can be shown as required; but we can't easily parse all the retrieved references to see if they have links to other references, because this kind of recursion is potentially infinite.
- Therefore the JavaScript
showReferences()function does this:- Check if the reference exists in the document. If it does, show it as normal.
- If it doesn't, then:
- Construct a URL to retrieve the reference, and set the targetEl element to the
<div>that contains the current list of references. This means the Ajax function will append the retrieved element to the list of references in the document. - Construct a string which calls the
showReference()function again, and store that in theonAjaxCompletevariable. The Ajax code, when it completes, checks whether this is null or not, and if it's not null, it calls it witheval(). - When the
showReference()function is called a second time, the item now exists in the document, so it can be shown in the normal way. - There's a trap for when the retrieval fails, to stop infinite loops.
- Construct a URL to retrieve the reference, and set the targetEl element to the