From: Demian K. <dem...@vi...> - 2010-03-26 14:59:56
|
I agree that users are likely to be dismayed if their search results suddenly change because they logged in. It probably only makes sense to use the home library setting from the account if we also force the user to log in up-front, which we probably don't want to do. In any case, my proposed compromise algorithm had a flaw which would have prevented the user setting from being taken into account... So let's try a revision: 1.) If session value is found, use that. 2.) If $_REQUEST value is found, set session value to match and use that. If the $_REQUEST value is not coming from a cookie, we might also want to set a cookie at this time to allow the $_REQUEST value to be reintroduced if the PHP session gets cleared by a user's subsequent log out action. 3.) If "detect by IP" setting is turned on, use IP map to determine home library, set session value to match, and use that. 4.) Set session value to "all libraries" and use that. Obviously, the user can change the session value at any time by using some sort of on-screen control... but it is never based on the user's home library setting. - Demian > -----Original Message----- > From: Alan Rykhus [mailto:ala...@mn...] > Sent: Friday, March 26, 2010 10:45 AM > To: Demian Katz > Cc: vuf...@li... > Subject: RE: [VuFind-Tech] Scoped searching and the home library > > Hello, > > I was thinking. > > John's main concern is when the patron first connects. He needs a > library selected. I do it by the form on the library's home page, he > needs to do it by IP address. So we could set a switch to use the ip > address to determine the home library. > > After the patron starts searching, they determine the library. I've > done > it by adding a 'library=???' setting in all of my links, search > cookies, > etc. So in a way, we are probably talking the same thing, this search > is > in this library. If you look at my implementation, you would see that a > search history list will include an entry for each library a search is > done in if they change libraries with the same search terms. > > As for using the patron's home library when they log on, In my > experience, you do not want to change anything here. I think that a > patron does not log on until they have to. If they have been searching > and finally identify an item they want, you do not want to change their > search parameters. You just want to enable their ability to place a > hold > or ILL request. > > al - (patiently waiting for his conversion to finish) > > On Fri, 2010-03-26 at 10:24 -0400, Demian Katz wrote: > > > The problem I see with this is 'what if the patron wants to search > a > > > different library?' Your session cookie and patron home library > settings > > > are going to override their desire to search elsewhere. > > > > Perhaps a compromise between your model and John's would be something > like this: > > > > 1.) Check first for a session value indicating that the current user > has intentionally overridden the default home library. If found, use > that. > > 2.) If a home library is not yet determined, check to see if a > particular $_REQUEST value has been set to specify a default home > library. Using $_REQUEST would allow home library to be set by a > permanent cookie as John suggested OR through a hard-coded link or form > value as you suggest. > > 3.) If a home library is STILL not determined, and a user is logged > in, check to see if they have a home library associated with their > account. > > 4.) Last resort: default to all libraries. > > > > I think this covers all the use cases, assuming you don't object to > the fact that the "default in $_REQUEST" trumps the "default in user's > account." > > > > If you wanted to get even more flexible, you could add controls to > allow a user to permanently change their home library and perhaps store > an "always use this home library when I am logged in" setting. You > could then put in a step 1.5 to check if a user setting trumps the > $_REQUEST value. > > > > - Demian > > > -- > Alan Rykhus > PALS, A Program of the Minnesota State Colleges and Universities > (507)389-1975 > ala...@mn... |