Add categories 'Alumni' , 'College Students' and 'High School Students'. Give them...
authorkbeswick <kbeswick@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Fri, 11 Jun 2010 16:18:03 +0000 (16:18 +0000)
committerkbeswick <kbeswick@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Fri, 11 Jun 2010 16:18:03 +0000 (16:18 +0000)
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

circ/circ_duration.js
circ/circ_duration_OWAL.js
circ/circ_groups.js
circ/circ_lib.js
circ/circ_permit_copy.js

index 1548e18..bfcd1f8 100755 (executable)
@@ -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 );
 
index 5785b09..50a0d50 100644 (file)
@@ -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) {
index c41de65..93c78d4 100755 (executable)
@@ -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
+       },
 
 }
index fafbc0d..61b65d7 100644 (file)
@@ -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;
index e18eff5..8f93442 100644 (file)
@@ -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');
                }