LP1895678: Bring course materials into the bootstrap OPAC
[Evergreen.git] / Open-ILS / src / perlmods / lib / OpenILS / WWW / EGCatLoader.pm
index 663cde6..ac307e8 100644 (file)
@@ -466,6 +466,9 @@ sub load_common {
         return $rows;
     };
 
+    $ctx->{course_ou} = int($self->cgi->param('locg')) || $self->ctx->{physical_loc} || $self->ctx->{aou_tree}->()->id;
+    $ctx->{use_courses} = $ctx->{get_org_setting}->($ctx->{course_ou}, 'circ.course_materials_opt_in') ? 1 : 0;
+
     return Apache2::Const::OK;
 }