Fix to allow teachers to use Attendence Block :-)

Fix to allow teachers to use Attendence Block :-)

by Lady 800cc -
Number of replies: 0

I posted this in the previous forum; but I figured I should make a separate entry for clarity:


I think I've found a fix to the problem of 'teachers' being defaulted to 'student'. It's seems to be working for me. Make the following change everywhere in the code for all of the files that use this piece of code [within the attendence folder]:

Change: if (isteacher($USER->id))

To: if (isteacher())

Now everything is working perfect except that the block should not display at all for guests. It's a minor issue in that the links for a student show, when logged in as guest; but if you click the links there will be no data because there is no 'studentID'.  Otherwise, with the above changes, the teacher can use the attendence block no problem. smile

Average of ratings: -