View | Details | Raw Unified | Return to bug 21603
Collapse All | Expand All

(-)a/C4/CourseReserves.pm (-4 / +4 lines)
Lines 966-974 sub SearchCourses { Link Here
966
    my $enabled = $params{'enabled'} || '%';
966
    my $enabled = $params{'enabled'} || '%';
967
967
968
    my @params;
968
    my @params;
969
    my $query = "SELECT c.* FROM courses c";
969
    my $query = "
970
970
        SELECT c.course_id, c.department, c.course_number, c.section, c.course_name, c.term, c.staff_note, c.public_note, c.students_count, c.enabled, c.timestamp
971
    $query .= "
971
        FROM courses c
972
        LEFT JOIN course_instructors ci
972
        LEFT JOIN course_instructors ci
973
            ON ( c.course_id = ci.course_id )
973
            ON ( c.course_id = ci.course_id )
974
        LEFT JOIN borrowers b
974
        LEFT JOIN borrowers b
Lines 992-998 sub SearchCourses { Link Here
992
           )
992
           )
993
           AND
993
           AND
994
           c.enabled LIKE ?
994
           c.enabled LIKE ?
995
        GROUP BY c.course_id
995
        GROUP BY c.course_id, c.department, c.course_number, c.section, c.course_name, c.term, c.staff_note, c.public_note, c.students_count, c.enabled, c.timestamp
996
    ";
996
    ";
997
997
998
    $term //= '';
998
    $term //= '';
(-)a/t/db_dependent/CourseReserves.t (-2 / +4 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 26;
20
use Test::More tests => 27;
21
21
22
use Koha::Database;
22
use Koha::Database;
23
use t::lib::TestBuilder;
23
use t::lib::TestBuilder;
Lines 136-139 DelCourse($course_id); Link Here
136
$course = GetCourse($course_id);
136
$course = GetCourse($course_id);
137
ok( !defined( $course->{'course_id'} ), "DelCourse deleted course successfully" );
137
ok( !defined( $course->{'course_id'} ), "DelCourse deleted course successfully" );
138
138
139
$courses = SearchCourses(); # FIXME Lack of tests for SearchCourses
140
is( ref($courses), 'ARRAY', 'SearchCourses should not crash and return an arrayref' );
141
139
$schema->storage->txn_rollback;
142
$schema->storage->txn_rollback;
140
- 

Return to bug 21603