Diane,
That's great to first try to understand why students may be off task. Other reasons besides what you've listed are illness, not prepared, prior knowledge is weak, are confused about what the assignment is, or distracted by other non-school matters (financial, childcare, work, relationships, transportation, etc). Many times there's little we can do about these behind the scenes stuff, other than listen, if the student wants to talk about it. Nonetheless, while they're in school, getting them engaged and keeping them focused is our target goal.
Barry Westling