from pampy import _ curic_patterns = [] curic_patterns.append( { "attributes": { "fieldName": "Division", "fieldId": 65000, "isLookUpField": True, "displayName": "Division" }, "lookUpDisplay": _, "dataTypeDetails": { "type": "lookup" }, "fieldValue": _ } ) def div1(a,b): r = "Division: %s, id: %s" % (a,b) print(r) return(r) curic_patterns.append(div1) curic_patterns.append( { "attributes": { "fieldName": "Department", "fieldId": 65001, "isLookUpField": True, "displayName": "Department" }, "lookUpDisplay": _, "dataTypeDetails": { "type": "lookup" }, "fieldValue": _ }) def d2(a,b): r = "Department: %s, id: %s" % (a,b) print(r) return r curic_patterns.append(d2) curic_patterns.append({ "attributes": { "fieldName": "Award Type", "fieldId": 60221, "isLookUpField": True, "displayName": "Award Type" }, "lookUpDisplay": _, "dataTypeDetails": { "type": "lookup" }, "fieldValue": _ }) def d3(a,b): r = "Award: %s, id: %s" % (a,b) print(r) return r curic_patterns.append(d3) p1 = { "attributes": { "fieldName": "Description", "fieldId": _, "isLookUpField": False, "displayName": "Description" }, "dataTypeDetails": { "type": "string" }, "fieldValue": _ } def pp1(a,b): r = "Description (id:%s) %s" % (a,b) #print(r[:40]) return r curic_patterns.append(p1) curic_patterns.append(pp1) p2 = {"attributes": { "fieldName": "Program Title", "fieldId": _, "isLookUpField": False, "displayName": "Program Title" }, "dataTypeDetails": { "type": "string", "maxLength": 250 }, "fieldValue":_ } def pp2(a,b): r = "Program (id:%s) %s" % (a,b) #print(r) return r curic_patterns.append(p2) curic_patterns.append(pp2) p3 = { "attributes": { "fieldName": "Course", "fieldId": _, "isLookUpField": True, "displayName": "Course" }, "lookUpDataset": [ [ { "name": "Max", "value": _ }, { "name": "IsVariable", "value": _ }, { "name": "Min", "value": _ }, { "name": "Text", "value": _ } ] ], "dataTypeDetails": { "type": "lookup" }, "lookUpDisplay": _, "fieldValue": _ } def pp3(a,b,c,d,e,f,g): r = "Course (%s / %s) %s (%s), var? %s %s - %s" % (a,g, f, e, c, b, d) #print(r) return r curic_patterns.append(p3) curic_patterns.append(pp3) p4 = { "attributes": { "sectionOrInstance": "section", "sectionName": "Unit Range", "sectionSortOrder": 2, "oneToManySection": False }, "subsections": [], "fields": [ { "attributes": { "fieldName": "Units Low", "fieldId": 59608, "isLookUpField": False, "displayName": "Units Low" }, "dataTypeDetails": { "scale": 2, "type": "numeric", "precision": 6 }, "fieldValue": _ }, { "attributes": { "fieldName": "Units High", "fieldId": 59609, "isLookUpField": False, "displayName": "Units High" }, "dataTypeDetails": { "scale": 2, "type": "numeric", "precision": 6 }, "fieldValue": _ } ] } def pp4(a,b): r = "Unit Range: %s - %s" % (a,b) return r curic_patterns.append(p4) curic_patterns.append(pp4) p5 = { "attributes": { "fieldName": "Discipline", "fieldId": _, "isLookUpField": True, "displayName": "Discipline" }, "lookUpDisplay": _, "dataTypeDetails": { "type": "lookup" }, "fieldValue": _ } def pp5(a,b,c): r = "Discipline (%s) %s / %s" % (a,b,c) #print(r) return r curic_patterns.append(p5) curic_patterns.append(pp5) p6 = { "attributes": { "fieldName": "Course Block Definition", "fieldId": _, "isLookUpField": False, "displayName": "Course Block Definition" }, "dataTypeDetails": { "type": "string" }, "fieldValue": _ } def pp6(a,b): r = "Block (%s) %s" % (a,b) #print(r) return r p7 = { "attributes": { "fieldName": "Block Header", "fieldId": _, "isLookUpField": False, "displayName": "Block Header" }, "dataTypeDetails": { "type": "string", "maxLength": 4000 }, "fieldValue": _ } def pp7(a,b): r = "Block Header (%s) %s" % (b,a) #print(r) return r p8 = { "attributes": { "fieldName": "Block Footer", "fieldId": _, "isLookUpField": False, "displayName": "Block Footer" }, "dataTypeDetails": { "type": "string", "maxLength": 4000 }, "fieldValue": _ } def pp8(a,b): r = "Block Footer (%s) %s" % (b,a) #print(r) return r curic_patterns.append(p6) curic_patterns.append(pp6) curic_patterns.append(p7) curic_patterns.append(pp7) curic_patterns.append(p8) curic_patterns.append(pp8) ###################### ###################### Trying to remove more junk ###################### j1 = {"attributes": {"fieldName": _, "fieldId": _, "isLookUpField": False, "displayName": _, }, "dataTypeDetails": {"type": "string", "maxLength": _, }, "fieldValue": _, } def jj1(a,b,c,d,e): r = "String Label: %s (id %s) Value: %s" % (a,b,e) #print(r) return r curic_patterns.append(j1) curic_patterns.append(jj1) j2 = {"attributes": {"fieldName": _, "fieldId": _, "isLookUpField": False, "displayName": _, }, "dataTypeDetails": {"scale": _, "type": "numeric", "precision": _, }, "fieldValue": _, } def jj2(a,b,c,d,e,f): r = "Generic Num Field: Name: %s, ID: %s, Displayname: %s, Value: %s" % (a,b,c,f) #print(r) return r j3 = {"attributes": {"fieldName": _, "fieldId": _, "isLookUpField": True, "displayName": _, }, "lookUpDisplay": _, "dataTypeDetails": {"type": "lookup", }, "fieldValue": _, } def jj3(a,b,c,d,e): r = "Generic lookup Field: Name: %s / %s, ID: %i, Displayname: %s, Value: %s " % (a,c,b,d,e) #print(r) return r curic_patterns.append(j2) curic_patterns.append(jj2) curic_patterns.append(j3) curic_patterns.append(jj3) j4 = {"attributes": {"fieldName": _, "fieldId": _, "isLookUpField": False, "displayName": _, }, "dataTypeDetails": {"type": "flag", }, "fieldValue": _, } def jj4(a,b,c,d): r = "Generic Flag Field: Name: %s, ID: %s, Displayname: %s, Value: %s" % (a,b,c,d) #print(r) return r curic_patterns.append(j4) curic_patterns.append(jj4) j5 = {"attributes": {"fieldName": _, "fieldId": _, "isLookUpField": False, "displayName": _, }, "dataTypeDetails": {"scale": _, "type": "numeric", "precision": _, }, "fieldValue": _, } def jj5(a,b,c,d,e,f): r = "Numeric Field, Name: %s / %s Id: %s, Value: %s" % (a,c,b,f) j6 = {"attributes": {"fieldName": _, "fieldId": _, "isLookUpField": False, "displayName": _, }, "dataTypeDetails": {"type": "string", }, "fieldValue": _, } def jj6(a,b,c,d): r = "String+Label field. Label: %s / %s Value: %s Id: %s" % (a,c,d,b) #print(r) return r curic_patterns.append(j5) curic_patterns.append(jj5) curic_patterns.append(j6) curic_patterns.append(jj6) """j2 = {"attributes": {"fieldName": _, "fieldId": _, "isLookUpField": False, "displayName": _, }, "dataTypeDetails": {"scale": 2, "type": "numeric", "precision": 6, }, "fieldValue": _, } def jj2(a,b,c,d): r = "Generic Num Field: Name: %s, ID: %s, Displayname: %s, Value: %s" % (a,b,c,d) print(r) return r j2 = {"attributes": {"fieldName": _, "fieldId": _, "isLookUpField": False, "displayName": _, }, "dataTypeDetails": {"scale": 2, "type": "numeric", "precision": 6, }, "fieldValue": _, } def jj2(a,b,c,d): r = "Generic Num Field: Name: %s, ID: %s, Displayname: %s, Value: %s" % (a,b,c,d) print(r) return r """