<<

NAME

C4::Review - Perl Module containing routines for dealing with reviews of items

SYNOPSIS

  use C4::Review;

  my $review=getreview($biblionumber,$borrowernumber);
  savereview($biblionumber,$borrowernumber,$review);
  updatereview($biblionumber,$borrowernumber,$review);
  my $count=numberofreviews($status);
  my $count=numberofreviewsbybiblionumber($biblionumber);
  my $reviews=getreviews($biblionumber, $status);
  my $reviews=getallreviews($status, [$offset], [$row_count]);

DESCRIPTION

Review.pm provides many routines for manipulating reviews.

FUNCTIONS

getreview

  $review = getreview($biblionumber,$borrowernumber);

Takes a borrowernumber and a biblionumber and returns the review of that biblio

savereview

  savereview($biblionumber,$borrowernumber, $review);

Save a review in the 'reviews' database

updatereview

  updateview($biblionumber,$borrowernumber, $review);

Update the review description in the 'reviews' database

numberofreviews

  my $count=numberofreviews( [$status] );

Return the number of reviews where in the 'reviews' database : 'approved' = $status (By default $status = 1)

numberofreviewsbybiblionumber

  my $count=numberofreviewsbybiblionumber($biblionumber);

Return the number of reviews approved for a given biblionumber

getreviews

  my $reviews=getreviews($biblionumber, $status);

Return all reviews where in the 'reviews' database : 'biblionumber' = $biblionumber and 'approved' = $status

getallreviews

  my $reviews=getallreviews($status, [$offset], [$row_count]);

Return all reviews where in the 'reviews' database : 'approved' = $status

If offset and row_count are fiven, it's return all reviews between the $offset position and the ($offset + $row_count) position. (By default : $offset = 0 and $row_count = 20)

approvereview

  approvereview($reviewid);

Takes a reviewid and marks that review approved

unapprovereview

  unapprovereview($reviewid);

Takes a reviewid and marks that review as not approved

deletereview

  deletereview($reviewid);

Takes a reviewid and deletes it

AUTHOR

Koha Team

<<