added checkTeacher,all,and checkPermissions functions on TestModel