From: kbeswick Date: Fri, 11 Jun 2010 16:18:03 +0000 (+0000) Subject: Add categories 'Alumni' , 'College Students' and 'High School Students'. Give them... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=398ed33a9a739732fc264579201f2da475231964;p=contrib%2FConifer.git Add categories 'Alumni' , 'College Students' and 'High School Students'. Give them same circ rules as Readers category. In reference to Conifer ticket #284 git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/branches/rel_1_6_0@893 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- diff --git a/circ/circ_duration.js b/circ/circ_duration.js index 1548e18c4d..bfcd1f8895 100755 --- a/circ/circ_duration.js +++ b/circ/circ_duration.js @@ -76,11 +76,10 @@ if (patronProfile == 'Undergraduate') { if (patronProfile == 'Staff members') { result.durationRule = '3_weeks_2_renew'; } -if (patronProfile == 'Readers') { +if (patronProfile == 'Readers' || patronProfile == 'Alumni' || patronProfile == 'College Students' || patronProfile == 'High School Students') { result.durationRule = '3_weeks_2_renew'; } - log_info('final duration results: ' + result.durationRule + ' : ' + result.recurringFinesRule + ' : ' + result.maxFine ); diff --git a/circ/circ_duration_OWAL.js b/circ/circ_duration_OWAL.js index 5785b09bba..50a0d50d34 100644 --- a/circ/circ_duration_OWAL.js +++ b/circ/circ_duration_OWAL.js @@ -31,9 +31,9 @@ if (isValidPatron(patronProfile)) { var temp_array = patronProfile.split(" "); var profileFirst = temp_array[0]; - if (patronProfile == 'Readers' && patron.home_ou.shortname != 'OWAL') { + if ((patronProfile == 'Readers' || patronProfile == 'Alumni' || patronProfile == 'College Students' || patronProfile == 'High School Students') && patron.home_ou.shortname != 'OWAL') { // use override value - Non-Law Readers can borrow nothing - } else if (patronProfile == 'Readers' && copy.circ_modifier == 'LAW_MONO') { + } else if ((patronProfile == 'Readers' || patronProfile == 'Alumni' || patronProfile == 'College Students' || patronProfile == 'High School Students') && copy.circ_modifier == 'LAW_MONO') { result.durationRule = 'OWAL_' + profileFirst; // Law Readers can only borrow LAW_MONO items } else { switch(copy.circ_modifier) { diff --git a/circ/circ_groups.js b/circ/circ_groups.js index c41de654b4..93c78d417e 100755 --- a/circ/circ_groups.js +++ b/circ/circ_groups.js @@ -48,5 +48,23 @@ var GROUP_CONFIG = { overdueThreshold : 100, maxHolds : -1 }, + 'Alumni' : { + maxItemsOut : 15, + fineThreshold : 10, + overdueThreshold : 100, + maxHolds : -1 + }, + 'College Students' : { + maxItemsOut : 15, + fineThreshold : 10, + overdueThreshold : 100, + maxHolds : -1 + }, + 'High School Students' : { + maxItemsOut : 15, + fineThreshold : 10, + overdueThreshold : 100, + maxHolds : -1 + }, } diff --git a/circ/circ_lib.js b/circ/circ_lib.js index fafbc0d5a2..61b65d7144 100644 --- a/circ/circ_lib.js +++ b/circ/circ_lib.js @@ -315,7 +315,7 @@ function debugGroupConfig(name, foundName, config) { /* custom functions for Windsor libraries */ function isValidPatron(patronProfile) { - var valid_patrons = ['Faculty', 'Graduate', 'Undergraduate', 'Staff members', 'Readers']; + var valid_patrons = ['Faculty', 'Graduate', 'Undergraduate', 'Staff members', 'Readers', 'Alumni', 'College Students', 'High School Students']; for (var i = 0; i < valid_patrons.length; i++) { if (valid_patrons[i] == patronProfile) { return true; diff --git a/circ/circ_permit_copy.js b/circ/circ_permit_copy.js index e18eff5ca9..8f93442652 100644 --- a/circ/circ_permit_copy.js +++ b/circ/circ_permit_copy.js @@ -87,7 +87,7 @@ if (copy.circ_lib.shortname == 'OWAL') { if (isValidPatron(patronProfile)) { // only Law external borrowers can borrow Law items - if (patronProfile == 'Readers' && patron.home_ou.shortname != 'OWAL') { + if ((patronProfile == 'Readers' || patronProfile == 'Alumni' || patronProfile == 'College Students' || patronProfile == 'High School Students') && patron.home_ou.shortname != 'OWAL') { result.events.push('COPY_CIRC_NOT_ALLOWED'); }