1 package OpenILS::WWW::EGCatLoader;
2 use strict; use warnings;
3 use Apache2::Const -compile => qw(OK DECLINED FORBIDDEN HTTP_GONE HTTP_INTERNAL_SERVER_ERROR REDIRECT HTTP_BAD_REQUEST HTTP_NOT_FOUND);
4 use OpenSRF::Utils::Logger qw/$logger/;
5 use OpenILS::Utils::CStoreEditor qw/:funcs/;
6 use OpenILS::Utils::Fieldmapper;
7 use OpenILS::Application::AppUtils;
10 my $U = 'OpenILS::Application::AppUtils';
16 $ctx->{page} = 'course';
17 $ctx->{readonly} = $self->cgi->param('readonly');
19 my $course_id = $ctx->{page_args}->[0];
21 return Apache2::Const::HTTP_BAD_REQUEST
22 unless $course_id and $course_id =~ /^\d+$/;
24 $ctx->{course} = $U->simplereq(
26 'open-ils.circ.courses.retrieve',
30 $ctx->{instructors} = $U->simplereq(
32 'open-ils.circ.course_users.retrieve',
36 $ctx->{course_materials} = $U->simplereq(
38 'open-ils.circ.course_materials.retrieve.fleshed',
39 {course => $course_id}
41 return Apache2::Const::OK;