Example #1
0
            obj = RetrieveIntermediary(myjson)
            result2 = obj.isAssignedBeneficiary()

            beneficiary_tuple = json.loads(result2)
            beneficiary_ids.append(beneficiary_tuple["Id"])
            posn = posn + 1

            obj = BotanicalGarden(orig_email, beneficiary_tuple["Id"],
                                  folder_name)

            obj.getSteps()

            obj.getIntermediaryPoints()

            if obj.clickpoints > 60:
                obj.clickpoints = 60
            if obj.stepspoints > 100:
                obj.stepspoints = 100

            obj.totalpoints = obj.clickpoints + obj.stepspoints

            gardens.append(obj)

except Exception as e:
    print "An exception was thrown inside for record in intermediaries_tuple: %s" % e

bubblesort(gardens)

posn = 0
total_goal_steps = 0
Example #2
0
          myjson={'Fname':'Dummy','Lname':'Dummy','Username':orig_email}
          obj=RetrieveIntermediary(myjson)
          result2=obj.isAssignedBeneficiary()
          
          beneficiary_tuple=json.loads(result2)
          beneficiary_ids.append(beneficiary_tuple["Id"])
          posn=posn+1
          
          obj=BotanicalGarden(orig_email,beneficiary_tuple["Id"],folder_name)
          
          obj.getSteps()
          
          obj.getIntermediaryPoints()

          if obj.clickpoints>60:
              obj.clickpoints=60
          if obj.stepspoints>100:
              obj.stepspoints=100

          obj.totalpoints=obj.clickpoints+obj.stepspoints
          
           
          gardens.append(obj)
          
except Exception as e:
  print "An exception was thrown inside for record in intermediaries_tuple: %s"%e
        
bubblesort(gardens)