}
my $courses = GetCourses(%params);
if ( @$courses == 1 ) {
if ( $search_on && @$courses == 1 ) {
print $cgi->redirect("/cgi-bin/koha/course_reserves/course-details.pl?course_id=" . $courses->[0]->{'course_id'});
} else {
$template->param( courses => $courses );
-