LP1849212: Course browse and search can be called without locg param in URL
authorJane Sandberg <sandbej@linnbenton.edu>
Fri, 24 Jul 2020 05:02:35 +0000 (22:02 -0700)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 14 Sep 2020 22:17:12 +0000 (18:17 -0400)
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/templates/opac/parts/course_search/qtype_selector.tt2

index 279b1c8..858d271 100644 (file)
@@ -3,8 +3,13 @@
     {value => "course_number", label => l("Course Number"), plural_label => l('Course Numbers'), browse => 1}
 ];
 
-IF ctx.get_org_setting(
-    CGI.param('locg'), 'circ.course_materials_browse_by_instructor');
+IF CGI.param('locg');
+    locg = CGI.param('locg');
+ELSE;
+    locg = 1;
+END;
+
+IF ctx.get_org_setting(locg, 'circ.course_materials_browse_by_instructor');
 query_types.push({
     value => "instructor", 
     label => l("Instructor"),