All posts by Brian

Misconceptions misnumbering

Jill is working on a new topic (

Processes that shape the earth/Plate Tectonics Version II (PT)) which shares a number of misconceptions with another topic (Earth Science: Processes that shape the Earth / Plate Tectonics (EP)).

Problem: She changed the topic of those misconceptions believing it would be available to both topics. Once she realized this was not the case, she changed the topic back, but the numbering was off.

Solution: She provided me a list of which misconceptions were out of sync. Because adding a misconception involves updating multiple tables I actually had to add the misconceptions through the Item interface and then change the numbering on the backend.

Conclusion: The conclusion is that the conclusion is pretty obvious. This functionality needs to be revised. Changing the topic of a misconception has considerable consequences throughout the Items utility, so I think it may be necessary to add an additional step to this process. For example, have the current topic displayed along with a check box and a disabled/hidden topic menu. Then use the checkbox to enable/disable the menu and possibly some kind of textual warning (“Changing this is likely to break something.”).

Another note is that the ‘code’ column denoting the numbering sequence is not a unique column so we could have the numbering be editable on the interface. Although this could have some duplication complications.

I also found it strange that when submitting a new misconception, there is no notification and you are not redirected back to the miscon list. I found out the hard way that once you submit a misconception you are essentially in edit mode (not Add New Miscon anymore) and any changes made are being made to the record you just added. It wasn’t obvious to me the difference between Add and Edit mode.

Updates to field test registrant_list_demo

As I was meddling with registrant_list_demo.php I found that the demographics were not showing up for any of my test cases.  I was under the mistaken impression this data was obtained from an external server, but it is actually taken from a data dump from the nces stored on our server in a database called ‘demographics’ (go figure).  The demographics data appears to be sorted by zip code.  I am surmising that this data dump is requested from nces after the registration process is complete and an updated list of zip codes has been generated. 

I’m sure Mr. Sweeney can provide details of this request procedure upon his return.  The demographics script is working fine, but the demographics data is most likely out if date.  Cari indicated the demographics data will not be needed for a few weeks.

Updates to field test registrant_list

When I first opened up the register dir I found register.php, review.php and review.v1.php.  Based on script and notes in the script the registration and review registration processes were consolidatedby Mr. Sweeney in register.php, but perhaps at one point they were separate.  review.php and review.v1.php turned out to be the registrant listing scripts. 

This names were confusing so I renamed them to registrant_list.php and registrant_list_demo.php (demographics).

I added a filter (by year) to limit output results.  However it is not technically filtering by year.  There was already a date limit written into the existing query (2007-04-27, I think) which I used as the start range marker for 2007.  The start range for 2008 is 2008-01-01.  The messy part is that everything prior to 2007-04-27 is marked as 2006 in the filter when in fact the records only go back to 2007-04-17.  I expect to be working on this script again in the near future (see “Updates to field test registrant_list_demo”) at which point I will probably change the filter to just ‘Prior’.

image upload problem (New Items)

The researchers reported a problem uploading images while using the Add New Items section of the Items Utility.  

The researchers were unable to access the upload server directory via the fckeditor (from the fck interface, hit image upload icon and then ‘browse’ server… js error, popup interface is non-functional).  Error messages indicated a connector error.  I traced this to a setting in the fckconfig.js.  The fileBrowserLanguage setting was set to asp instead of php.  In addition, I found there were some other mods missing.  Somehow fckconfig.js was reverted back to an earlier/original version.

I found a more recent version on my local machine (last update 5/2007) which seemed to correct the problem.  However, I’m not sure when I downloaded my version (so I don’t know how old it is), and I don’t know if BS has made any revisions since 5/2007. 

This is the version I uploaded: fckconfig

Dreamweaver Instability

Lately I haven’t been able to use Dreamweaver to edit ASP or PHP pages without it crashing. After a quick search of the web I found that this is a known problem with a fairly simple solution. See the following KB from Adobe: Dreamweaver CS3 crashes after Daylight Savings Time ends.

The title of the post doesn’t really seem relevant at first, but a quick read of the content of the KB shows it to be exactly the problem I was encountering.

Found via Blogvaria.

Working with OAI

We’ve been helping with the development of the PRISMS resource review utility and public interface.

Our most recent task was to find a way to provide access to the data in an exchange format compatible with the NSDL. To do this we were looking for a PHP-based OAI provider that could interface with our MySQL database. We found a capable application in the work of Heinrich Stamerjohanns. He has put together a set of PHP scripts which provides exactly the kind of functionality we needed.

Continue reading Working with OAI

PHP Session Timeout

The items utility has had a nasty habit of timing out users after a relatively short amount of time. In the past I tried extending the cookie timeout, but that didn’t really seem to help. The problem has been troublesome because it seems to happen almost randomly.

A little web research has led me to another conclusion as to the source of the problem: session data garbage collection.

Continue reading PHP Session Timeout

WordPress Unified User Database

In order to simplify user management of WordPress blogs hosted on our site I wanted to find a way to share users between two separate set ups. This is much easier to do than I had expected. For each setup you need to make sure WordPress uses the same database but different table prefixes.

The first step is to set up the initial blog. Next, set up any additional blogs. For each additional blog you need only add two lines to the wp-config.php file:

define('CUSTOM_USER_TABLE', 'wp_users');
define('CUSTOM_USER_META_TABLE', 'wp_usermeta');

wp_users should point to the original blog user table. wp_usermeta should point to the original blog user metadata table. From here on out you can configure and manage your blogs as normal. The only difference will be that users who have not been assigned a role for a specific blog setup will be listed under the “No role for this blog” category on the Users tab.

References: