We propose a trust framework model for an educational cloud which is designed to overcome inequalities of M-shaped incomes by simplifying contract-based sharing of resources among multiple schools. We use class algebra, which is similar to SROIQ(D) description logic, as the access control policy language. Benefiting from the high expressivity of class algebra, our model can use implicit relations and reasoning to enforce access control that corresponds to the contracts. The security mechanism allows one-time user login to obtain all of this user's credentials for accessing services. In addition, our model can select appropriate material to adapt to the level of the student by adding the classification information to the attributes of the educational material and the student, and integrating this information into the access control policy to build an exclusive learning graph for each student.