Buzz API

How can we get the correct status/tracking field/code for a excused type activity by API

Naushadur Rahman
How can we get the correct status/tracking field/code for a excused type activity by API. Currently there is no specific field from where I can identify and excused activity by API.

Comments (2)

Sort by
Allison Shepherd
  • Agilix team member

Good morning Naushadur,


Is the recommendation from the previous post below is what is desired? It does provide information on how you can identify excused activities in the API response. The caller of the API may need to filter the API results to only show the Grade status flag which represents Excused.


0 Comment actions Permalink
Brian Collins

The excluded value will be contained in the status flags, so while it's not a field all to its own, it's able to be found.  I've had to create enumerations conversions for this same reason.  I think the concept is pretty simple when written down.  The returned value from the API will be a decimal value of the sum of all the flags assigned.  I create an associative array of all the status flags, sort them by the largest decimal value, and iterate through the array subtracting the flag values when they can be subtracted.  If you're total item value is 16,645 it must contain the following values (if you're looking at grade status)...

16645 must contain ScoredByTeacher
261 must contain Released
5 must contain ShowScore
1 must contain Completed

It cannot contain the other values simply because you can't subtract the decimal values from the calculated total when iterated.  Both HasNotes (32,768) and AutoScoredZero (65,536) which exceed our total of 16,645.  As we loop through our array we remove the value of each that fits in our iterated value.


ScoredByTeacher = 16384 ... 16645 - 16384 = 261, that fits, so our flags value must contain that flag.  We continue on subtracting and find the next value, 'Released' (256) ... 261 - 256 = 5, etc..

If you're aware of this and looking for something else, sorry!  I hope this information helps someone.

0 Comment actions Permalink
Please sign in to leave a comment.