[Koha-patches] [PATCH] Audio feedback for member status, issuing, and returning.

Michael Hafen mdhafen at washk12.org
Fri May 30 20:35:00 CEST 2008


I really didn't give it that much thought when I put this feature
together.

Embedded media in an open source project become a big problem.  Wav
files are very big (compared to other formats), mp3 is only half free
from what I've heard (you have to license the encoder), swf is supposed
to be free in the future but how free, ogg is a possiblility but market
penetration just isn't there yet.  There are the options that I'm aware
of.

Wav is a good option.  I think the wav files I used are around 20 and 67
kb, so not huge.  On a dialup connection the first time you hit the
error sound it will take a couple seconds to transfer.  After that it
should be cached.  On a LAN or WAN this really isn't a big deal
depending on how much the connection is already in use.

The swf files are mp3 size I think, 1 and 3 kb.  This is nice, but does
require the Flash plugin.  I wonder about your statement that the Flash
plugin isn't free, I've never seen a charge to download or an ad
associated with this.  Maybe you mean the encoding tool isn't free, to
this I say that I didn't use the Adobe authoring tool, I used an open
source swf encoder, swftools.  So there are ways around that.  Still
there is the valid argument that swf isn't a free standard.

Setting aside ogg because it's unlikely that the (Windows) end user will
already have a plugin that handles vorbis audio.  That leaves mp3.

Again, last I heard getting an mp3 encoder requires a license.  I may be
wrong about that though.  And there is the advantage that pretty much
any modern computer will have a plugin for mp3.

Moving the embed to an included file sounds like a good idea.  Also
using object instead of embed would be good as long as browsers support
it.

Deciding on the format seems to be the only real question.  Other than
who will do the work.  I've haven't really worked with embed or object
before, so if you want this changed right quick someone else should take
care of it.  As for the source sounds, I pulled them from the
ubuntu-sounds package of Ubuntu Linux, which is maintained by the Ubuntu
Artwork Team.  I assume these sounds are GNU CC licensed or something,
but I may be wrong.  Looks like the files are info.wav and question.wav.

What do you think?

On Fri, 2008-05-30 at 10:13 -0500, Joshua Ferraro wrote:
> Hey Michael,
> 
> Wow, this is a very cool feature ... I've just got a couple issues I'm
> hoping you can address:
> 
> * using SWF adds a dependency on Flash, which although common, is not
> universal and could result in political problems on koha-devel since
> SWF is not a true free standard, nor is the Flash plugin free.  Using
> .wav or .mp3 files instead would be better unless we run into too many
> browser support issues.
> 
> * The <embed> tag is not valid XHTML, and should be recast as the
> object tag (although browser support issues may force us to run with
> <embed>).
> 
> * The HTML for embedding the sound should be moved to an include.
> 
> Does that sound reasonable (no pun intended ;-)). Again, can't stress
> enough how cool this will be, just want to make sure it completely fits
> within our goals in the Koha project... thoughts?
> 
> Josh
> 
> On Tue, May 27, 2008 at 12:15:10PM -0600, Michael Hafen wrote:
> > These two swf files are created by an open source tool from .wav files in the ubuntu-sounds package.
> > ---
> >  circ/circulation.pl                                |   54 ++++++++++++++++++++
> >  circ/returns.pl                                    |   12 ++++
> >  .../prog/en/modules/circ/circulation.tmpl          |    3 +
> >  .../prog/en/modules/circ/returns.tmpl              |    2 +
> >  .../prog/en/modules/members/moremember.tmpl        |    1 +
> >  koha-tmpl/intranet-tmpl/prog/img/error.swf         |  Bin 0 -> 3191 bytes
> >  koha-tmpl/intranet-tmpl/prog/img/ok.swf            |  Bin 0 -> 1101 bytes
> >  members/member.pl                                  |    4 ++
> >  members/moremember.pl                              |   39 ++++++++++++++
> >  9 files changed, 115 insertions(+), 0 deletions(-)
> >  create mode 100644 koha-tmpl/intranet-tmpl/prog/img/error.swf
> >  create mode 100644 koha-tmpl/intranet-tmpl/prog/img/ok.swf
> > 
> > diff --git a/circ/circulation.pl b/circ/circulation.pl
> > index 0b660de..52fea3f 100755
> > --- a/circ/circulation.pl
> > +++ b/circ/circulation.pl
> > @@ -101,6 +101,13 @@ my @failedrenews = $query->param('failedrenew');
> >  my @renew_failed;
> >  for (@failedrenews) { $renew_failed[$_] = 1; } 
> >  
> > +my $sessionID = $query->cookie("CGISESSID") ;
> > +my $session = get_session($sessionID);
> > +my $sounderror;
> > +my @soundederrors = @{ $session->param( 'soundederrors' ) } if ( $session->param( 'soundederrors' ) );
> > +my %soundederrors;
> > +for ( @soundederrors ) { $soundederrors{ $_ } = 1; }
> > +
> >  my $findborrower = $query->param('findborrower');
> >  $findborrower =~ s|,| |g;
> >  #$findborrower =~ s|'| |g;
> > @@ -182,12 +189,16 @@ if ( $print eq 'yes' && $borrowernumber ne '' ) {
> >  my $borrowerslist;
> >  my $message;
> >  if ($findborrower) {
> > +    $session->clear( 'soundederrors' );
> > +    @soundederrors = ();
> > +    %soundederrors = ();
> >      my ( $count, $borrowers ) =
> >        SearchMember($findborrower, 'cardnumber', 'web' );
> >      my @borrowers = @$borrowers;
> >      if ( $#borrowers == -1 ) {
> >          $query->param( 'findborrower', '' );
> >          $message = "'$findborrower'";
> > +	$sounderror = 1;
> >      }
> >      elsif ( $#borrowers == 0 ) {
> >          $query->param( 'borrowernumber', $borrowers[0]->{'borrowernumber'} );
> > @@ -206,6 +217,15 @@ if ($borrowernumber) {
> >      $borrower = GetMemberDetails( $borrowernumber, 0 );
> >      my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber );
> >  
> > +    if ( $od && ! $soundederrors{ ODUES } ) {
> > +	$sounderror = 1;
> > +	$soundederrors{ ODUES } = 1;
> > +    }
> > +    if ( $fines > 0 && ! $soundederrors{ CHARGES } ) {
> > +	$sounderror = 1;
> > +	$soundederrors{ CHARGES } = 1;
> > +    }
> > +
> >      # Warningdate is the date that the warning starts appearing
> >      my ( $today_year,   $today_month,   $today_day )   = Today();
> >      my ( $warning_year, $warning_month, $warning_day ) = split /-/,
> > @@ -228,6 +248,10 @@ if ($borrowernumber) {
> >              expired => format_date($borrower->{dateexpiry}),
> >              renewaldate   => format_date("$renew_year-$renew_month-$renew_day")
> >          );
> > +	unless ( $soundederrors{ EXPIRED } ) {
> > +	    $sounderror = 1;
> > +	    $soundederrors{ EXPIRED } = 1;
> > +	}
> >      }
> >      # check for NotifyBorrowerDeparture
> >    elsif ( C4::Context->preference('NotifyBorrowerDeparture') &&
> > @@ -263,6 +287,7 @@ if ($barcode) {
> >                  IMPOSSIBLE  => 1
> >              );
> >              $noerror = 0;
> > +	    $sounderror = 1;
> >          }
> >      
> >    if ($issueconfirmed && $noerror) {
> > @@ -285,6 +310,7 @@ if ($barcode) {
> >          	        NEEDSCONFIRMATION  => 1
> >          	    );
> >          	    $noquestion = 0;
> > +		    $sounderror = 1;
> >          	}
> >          }
> >  		# only pass needsconfirmation to template if issuing is possible 
> > @@ -557,18 +583,34 @@ foreach $flag ( sort keys %$flags ) {
> >          );
> >          if ( $flag eq 'GNA' ) {
> >              $template->param( gna => 'true' );
> > +	    unless ( $soundederrors{ GNA } ) {
> > +		$sounderror = 1;
> > +		$soundederrors{ GNA } = 1;
> > +	    }
> >          }
> >          if ( $flag eq 'LOST' ) {
> >              $template->param( lost => 'true' );
> > +	    unless ( $soundederrors{ LOST } ) {
> > +		$sounderror = 1;
> > +		$soundederrors{ LOST } = 1;
> > +	    }
> >          }
> >          if ( $flag eq 'DBARRED' ) {
> >              $template->param( dbarred => 'true' );
> > +	    unless ( $soundederrors{ DBARRED } ) {
> > +		$sounderror = 1;
> > +		$soundederrors{ DBARRED } = 1;
> > +	    }
> >          }
> >          if ( $flag eq 'CHARGES' ) {
> >              $template->param(
> >                  charges    => 'true',
> >                  chargesmsg => $flags->{'CHARGES'}->{'message'}
> >              );
> > +	    unless ( $soundederrors{ CHARGES } ) {
> > +		$sounderror = 1;
> > +		$soundederrors{ CHARGES } = 1;
> > +	    }
> >          }
> >          if ( $flag eq 'CREDITS' ) {
> >              $template->param(
> > @@ -584,6 +626,10 @@ foreach $flag ( sort keys %$flags ) {
> >                  flagged    => 1,
> >                  chargesmsg => $flags->{'CHARGES'}->{'message'}
> >              );
> > +	    unless ( $soundederrors{ CHARGES } ) {
> > +		$sounderror = 1;
> > +		$soundederrors{ CHARGES } = 1;
> > +	    }
> >          }
> >          if ( $flag eq 'CREDITS' ) {
> >              $template->param(
> > @@ -597,6 +643,10 @@ foreach $flag ( sort keys %$flags ) {
> >                  flagged  => 1,
> >                  oduesmsg => $flags->{'ODUES'}->{'message'}
> >              );
> > +	    unless ( $soundederrors{ ODUES } ) {
> > +		$sounderror = 1;
> > +		$soundederrors{ ODUES } = 1;
> > +	    }
> >  
> >              my $items = $flags->{$flag}->{'itemlist'};
> >  # useless ???
> > @@ -699,6 +749,10 @@ if ($stickyduedate) {
> >  my ($picture, $dberror) = GetPatronImage($borrower->{'cardnumber'});
> >  $template->param( picture => 1 ) if $picture;
> >  
> > +$session->param('soundederrors', [ keys %soundederrors ] );
> > +$template->param(
> > +    sounderror => $sounderror,
> > +    );
> >  
> >  $template->param(
> >      SpecifyDueDate           => C4::Context->preference("SpecifyDueDate"),
> > diff --git a/circ/returns.pl b/circ/returns.pl
> > index 9228674..7b1133e 100755
> > --- a/circ/returns.pl
> > +++ b/circ/returns.pl
> > @@ -73,6 +73,8 @@ my $printers = GetPrinters();
> >  #my $branch  = C4::Context->userenv?C4::Context->userenv->{'branch'}:"";
> >  my $printer = C4::Context->userenv?C4::Context->userenv->{'branchprinter'}:"";
> >  my $overduecharges = (C4::Context->preference('finesMode') && C4::Context->preference('finesMode') ne 'off');
> > +my $sounderror;
> > +my $soundok;
> >  #
> >  # Some code to handle the error if there is no branch or printer setting.....
> >  #
> > @@ -148,6 +150,7 @@ if ( $query->param('resbarcode') ) {
> >  
> >  
> >      if ( $messages->{'transfert'} ) {
> > +	$sounderror = 1;
> >          $template->param(
> >              itemtitle      => $iteminfo->{'title'},
> >  			itembiblionumber => $iteminfo->{'biblionumber'},
> > @@ -206,6 +209,7 @@ if ($barcode) {
> >          itembiblionumber => $biblio->{'biblionumber'},    
> >      );
> >      if ($returned) {
> > +	$soundok = 1;
> >          $returneditems{0}    = $barcode;
> >          $riborrowernumber{0} = $borrower->{'borrowernumber'};
> >          $riduedate{0}        = $issueinformation->{'date_due'};
> > @@ -243,6 +247,9 @@ if ($barcode) {
> >          }
> >          push( @inputloop, \%input );
> >      }
> > +    if ( ! $returned ) {
> > +	$sounderror = 1;
> > +    }
> >  }
> >  $template->param( inputloop => \@inputloop );
> >  
> > @@ -310,6 +317,7 @@ if ( $messages->{'WrongTransfer'} and not $messages->{'WasTransfered'}) {
> >  # reserve found and item arrived at the expected branch
> >  #
> >  if ( $messages->{'ResFound'}) {
> > +    $sounderror = 1;
> >      my $reserve        = $messages->{'ResFound'};
> >      my $branchname = $branches->{ $reserve->{'branchcode'} }->{'branchname'};
> >      my ($borr) = GetMemberDetails( $reserve->{'borrowernumber'}, 0 );
> > @@ -454,6 +462,7 @@ if ($borrower) {
> >          $flaginfo{redfont} = ( $flags->{$flag}->{'noissues'} );
> >          $flaginfo{flag}    = $flag;
> >          if ( $flag eq 'CHARGES' ) {
> > +	    $sounderror = 1;
> >              $flaginfo{msg}            = $flag;
> >              $flaginfo{charges}        = 1;
> >              $flaginfo{borrowernumber} = $borrower->{borrowernumber};
> > @@ -478,6 +487,7 @@ if ($borrower) {
> >              $flaginfo{itemloop} = \@waitingitemloop;
> >          }
> >          elsif ( $flag eq 'ODUES' ) {
> > +	    $sounderror = 1;
> >              my $items = $flags->{$flag}->{'itemlist'};
> >              my @itemloop;
> >              foreach my $item ( sort { $a->{'date_due'} cmp $b->{'date_due'} }
> > @@ -579,6 +589,8 @@ $template->param(
> >      dropboxmode              => $dropboxmode,
> >      dropboxdate				=> $dropboxdate->output(),
> >  	overduecharges          => $overduecharges,
> > +    sounderror              => $sounderror,
> > +    soundok                 => $soundok,
> >  );
> >  
> >  # actually print the page!
> > diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
> > index 8922db4..92f1e2e 100755
> > --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
> > +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
> > @@ -60,6 +60,9 @@ $.tablesorter.addParser({
> >  <!-- /TMPL_IF -->
> >  
> >  <!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
> > +<!-- TMPL_IF NAME="sounderror" --><EMBED src="/intranet-tmpl/prog/img/error.swf" quality="high"  WIDTH="1" HEIGHT="1" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED><!-- /TMPL_IF -->
> > +<!-- TMPL_IF NAME="inprocess" --><!-- Sound on successful issueing --><EMBED src="/intranet-tmpl/prog/img/ok.swf" quality="high"  WIDTH="1" HEIGHT="1" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED><!-- /TMPL_IF -->
> > +
> >  <!-- TMPL_IF NAME="dateexpiry" --><div class="dialog message">Patron's account has been renewed until <!-- TMPL_VAR NAME="dateexpiry" --></div><!-- /TMPL_IF -->
> >  <!-- TMPL_IF NAME="NEEDSCONFIRMATION" -->
> >  <div class="yui-g">
> > diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl
> > index d71a36c..e692e7f 100644
> > --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl
> > +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl
> > @@ -311,6 +311,8 @@ function Dopop(link) {
> >          </form>
> >  </div>
> >  
> > +<!-- TMPL_IF NAME="sounderror" --><EMBED src="/intranet-tmpl/prog/img/error.swf" quality="high"  WIDTH="1" HEIGHT="1" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED><!-- /TMPL_IF -->
> > +<!-- TMPL_IF NAME="soundok" --><EMBED src="/intranet-tmpl/prog/img/ok.swf" quality="high"  WIDTH="1" HEIGHT="1" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED><!-- /TMPL_IF -->
> >  <!-- TMPL_IF Name="returned" -->
> >  <div class="yui-g">    <table>
> >          <tr><th>Item Information</th><th>Patron Information</th></tr>
> > diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
> > index 29c0b55..de65b80 100644
> > --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
> > +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
> > @@ -81,6 +81,7 @@ if (nodename =="barcodes[]"){
> >  	<div id="yui-main">
> >  	<div class="yui-b">
> >  <!-- TMPL_INCLUDE NAME="members-toolbar.inc" -->
> > +<!-- TMPL_IF NAME="sounderror" --><EMBED src="/intranet-tmpl/prog/img/error.swf" quality="high"  WIDTH="1" HEIGHT="1" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED><!-- <!-- TMPL_VAR NAME="sounderror" --> --><!-- /TMPL_IF -->
> >  <!-- TMPL_IF NAME="error" -->
> >  <div class="dialog alert">
> >  <!-- TMPL_IF NAME="AUTH_UPDATE_FAILED" -->
> > diff --git a/koha-tmpl/intranet-tmpl/prog/img/error.swf b/koha-tmpl/intranet-tmpl/prog/img/error.swf
> > new file mode 100644
> > index 0000000000000000000000000000000000000000..2126177338fdf7d47cdf4c4478b41c159789df4c
> > GIT binary patch
> > literal 3191
> > zcmdVddpOkD9|!R7%&<x>p%A7<m<lOlU1OLut=oihALTM;5JH9-)gp at IlDi$Z<kp7e
> > z7s(||VJPDgAsU<9SId^hrE&ZI?Ci78 at 5$4%zxMaEfBeor=lP!V&v|{`=bZ2Nd(!p{
> > zFGT<V{D2)b0PrYGUJL>lHeDo94WS?i(qTrMbCLk^u`ICJ!13cPn;pyuVgLYU7#vnj
> > zMOzbb(3MDbIb{9+*tnp5_2T~Ya1SVec${m1*vZcegM^K&eV5BO7P6a69~{jKT~9U#
> > zXCJi59vlH_N%LXYrezSkZJ<3K8=MvowQ$)i)Kk*6+AG6mZM7=idV<@9H%Ho@*Cr8!
> > z&X^@Dw7XJ|!h{S}L^nr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GU at AqgtN?dc5KcO&rz^S=(=K^yUYj(1Wd6xa4z^=Mqi$(_u+-UR
> > z;ptMNNxs&4CYzmheD5;l*m8p at E6ws7+ltk=tNPu-)#y3m at R4Bae;|}UE!_SOP?Abv
> > zqXkX^_!lgkRrL_u;I-7FkG)5O%WL$t!YOC%f<R at DWJn!#$(dfvj`2DSZ6uM#yBZE_
> > zDmg8n-(=k>CG(};kKm|^O;`WchFbjrzU-E@<0fWe@~7dTayG@*Yk8zB=6PAh%I<&K
> > z^T!$5LqKkVuo8fCOdji}O^^Z{w5Z{6`q0!t6A7K$Q>mEc)FYjl7vI^c<m~P;m^Ty&
> > z<+C`c2x-WOeHwp at ICI&t>jlnw=~CitB56Q<L`jfjgZ+L{w5n`*2yrTVdU|d+>jw7l
> > d$ckRTipSr0>wi-EFMMFYBmo`>u=(!*{2LlRk<0)9
> > 
> > literal 0
> > HcmV?d00001
> > 
> > diff --git a/koha-tmpl/intranet-tmpl/prog/img/ok.swf b/koha-tmpl/intranet-tmpl/prog/img/ok.swf
> > new file mode 100644
> > index 0000000000000000000000000000000000000000..68624749c0d38db905eb8d190b761fffb2583126
> > GIT binary patch
> > literal 1101
> > zcmZ<@4`%gcVPGg=;NHQ&u)9G;n32KxP*GZiGt>Y7|MxS?0p%nZ)Eu}OfZ+dQrz1d$
> > z*@Mx6fx*Yo*VS0h(p*6!DYYa~Gju2du!nS5$|_i!Rxoe~*c^~MRKx#sqs9E6oiRHC
> > z{-0|3$**$q{C{Omrkc|J6yg6LPe`-K)b`9QNZtSc!&jaoi+CSvu&FUDaFk<ckpKVv
> > zADcCIV*>+2(&7!0oO<ls-i=o;E2Jtvuvo=#(!tPTikU)0Jup;%NJwy)I394wo$*CV
> > zB7t#%_y)rr^A8<AJVCf2`Z!Sj|BubbE9M+CDB$>ze$2=H at q#k0fPSUqo(+Bi&O$%~
> > zl%5 at VC}L`kEdn4Ol8)QJ-?)N-DNKTaNq)gk{!3BvGiFN8uAebOYNq7>r;mjmmMro8
> > z|FdGI8t0^mb`Jah%O^KDE&Aa1u%r2(bOH;*tLrIK|1+^T7-_QbyjsPql<9Ei?Ewqx
> > z4j!pkW=$4`V=V?UN(_oWBtmTbxn9&A(6MH=lyDH>lMg(n)}3;)@5#xPlmF=7NNC7k
> > zWFWXB_2Fr0C8559g<Kw)-7QXG;Xn`0l9rU$n=xy8Pj8Qpzlu_Z_y7L~Tn>4m`Dhgo
> > zfIY;Y%(O?o!Gei_amRh2ZWy@#X14a8|Nqxd*SgT+s`EYU->>&x_4m{NJiGrtu1#d&
> > znm(0(@3u!|ZJlNFRQ0yVDlDdhY at jm$dq_NZ+Kl=G0?Z7#+ivG>f3c`h=*0H&D$UBZ
> > zGqbhhx;D-1Nq97CZEED^S8Eif+U}gt)i)*ft4s9n#l9x8lAE3-y!xaRc0bJS)asJG
> > wVb2%a#a=tI@{6a}ru|Bj*+0fPXFDz0TeIa>suq1be3V&&frXI)SRyb0054nnZU6uP
> > 
> > literal 0
> > HcmV?d00001
> > 
> > diff --git a/members/member.pl b/members/member.pl
> > index 6d42b45..5a71380 100755
> > --- a/members/member.pl
> > +++ b/members/member.pl
> > @@ -78,6 +78,10 @@ $orderby = "surname,firstname" unless $orderby;
> >  $member =~ s/,//g;   #remove any commas from search string
> >  $member =~ s/\*/%/g;
> >  
> > +my $sessionID = $input->cookie("CGISESSID") ;
> > +my $session = C4::Auth::get_session($sessionID);
> > +$session->clear( 'soundederrors' );
> > +
> >  my ($count,$results);
> >  
> >  if(length($member) == 1)
> > diff --git a/members/moremember.pl b/members/moremember.pl
> > index 723bb74..58f2676 100755
> > --- a/members/moremember.pl
> > +++ b/members/moremember.pl
> > @@ -97,6 +97,30 @@ if ( not defined $data ) {
> >      exit;
> >  }
> >  
> > +my $sessionID = $input->cookie("CGISESSID") ;
> > +my $session = C4::Auth::get_session($sessionID);
> > +my $sounderror;
> > +my @soundederrors = @{ $session->param( 'soundederrors' ) } if ( $session->param( 'soundederrors' ) );
> > +my %soundederrors;
> > +for ( @soundederrors ) { $soundederrors{ $_ } = 1; }
> > +
> > +if ( $$data{ debarred } && !$soundederrors{ DBARRED } ) {
> > +    $sounderror = 1;
> > +    $soundederrors{ DBARRED } = 1;
> > +}
> > +if ( $$data{ gonenoaddress } && !$soundederrors{ GNA } ) {
> > +    $sounderror = 1;
> > +    $soundederrors{ GNA } = 1;
> > +}
> > +if ( $$data{ lost } && !$soundederrors{ LOST } ) {
> > +    $sounderror = 1;
> > +    $soundederrors{ LOST } = 1;
> > +}
> > +if ( $$data{ dateexpiry } lt POSIX::strftime( "%Y-%m-%d", localtime ) && !$soundederrors{ EXPIRED } ) {
> > +    $sounderror = 1;
> > +    $soundederrors{ EXPIRED } = 1;
> > +}
> > +
> >  # re-reregistration function to automatic calcul of date expiry
> >  if ( $reregistration eq 'y' ) {
> >  	$data->{'dateexpiry'} = ExtendMemberSubscriptionTo( $borrowernumber );
> > @@ -213,6 +237,11 @@ my $lib2 = &GetSortDetails( "Bsort2", $data->{'sort2'} );
> >  ( $template->param( lib1 => $lib1 ) ) if ($lib1);
> >  ( $template->param( lib2 => $lib2 ) ) if ($lib2);
> >  
> > +if ( $total > 0 && ! $soundederrors{ CHARGES } ) {
> > +    $sounderror = 1;
> > +    $soundederrors{ CHARGES } = 1;
> > +}
> > +
> >  # current issues
> >  #
> >  my ( $count, $issue ) = GetPendingIssues($borrowernumber);
> > @@ -230,6 +259,11 @@ for ( my $i = 0 ; $i < $count ; $i++ ) {
> >      $row{'replacementprice'} = $issue->[$i]{'replacementprice'};
> >      if ( $datedue lt $today ) {
> >          $row{'red'} = 1;    #print "<font color=red>";
> > +
> > +	unless ( $soundederrors{ ODUES } ) {
> > +	    $sounderror = 1;
> > +	    $soundederrors{ ODUES } = 1;
> > +	}
> >  	}
> >      $row{toggle} = $toggle++ % 2;
> >  
> > @@ -360,4 +394,9 @@ $template->param(
> >  	dateformat    => C4::Context->preference("dateformat"),
> >  );
> >  
> > +$session->param('soundederrors', [ keys %soundederrors ] );
> > +$template->param(
> > +    sounderror => $sounderror,
> > +    );
> > +
> >  output_html_with_http_headers $input, $cookie, $template->output;
> > -- 
> > 1.5.4.3
> > 
> > _______________________________________________
> > Koha-patches mailing list
> > Koha-patches at lists.koha.org
> > http://lists.koha.org/mailman/listinfo/koha-patches



More information about the Koha-patches mailing list