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

(-)a/Koha/Course.pm (-2 / +20 lines)
Lines 17-30 package Koha::Course; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
21
use base qw(Koha::Object);
20
use base qw(Koha::Object);
22
21
23
=head1 NAME
22
=head1 NAME
24
23
25
Koha::Course - Koha Course Object class
24
Koha::Course - Koha Course Object class
26
25
27
=head1 API
26
=head2 Relations
27
28
=head3 instructors
29
30
  my $instructors = $course->instructors();
31
32
Returns the related Koha::Patrons object containing the instructors for this course
33
34
=cut
35
36
sub instructors {
37
    my ($self) = @_;
38
39
    my $instructors = Koha::Patrons->search(
40
        { 'course_instructors.course_id' => $self->course_id },
41
        { join                           => 'course_instructors' } );
42
43
    return $instructors;
44
}
45
28
46
29
=head2 Internal methods
47
=head2 Internal methods
30
48
(-)a/course_reserves/course-details.pl (-2 / +1 lines)
Lines 56-62 elsif ( $action eq 'rm_all' ) { Link Here
56
    }
56
    }
57
}
57
}
58
58
59
my $course          = GetCourse($course_id);
59
my $course = Koha::Courses->find( $course_id );
60
my $course_reserves = GetCourseReserves(
60
my $course_reserves = GetCourseReserves(
61
    course_id       => $course_id,
61
    course_id       => $course_id,
62
    include_items   => 1,
62
    include_items   => 1,
63
- 

Return to bug 28762