Ubiquitous learning system based on cloud computing brings forth new challenges for resources security when owners outsource resources for sharing on cloud servers. This paper established a context-aware access control scheme based on Ciphertext-Policy Attribute-Based Encryption (CP-ABE). In this scheme, the learning resources owners are responsible for encrypting resources based on the access policies generated by owner self, and ciphertexts are associated with access policies. When a requestor accesses the encrypted resource, the terminal used by this requestor will sense the situation automatically. The secret key of a requestor can decrypt a particular ciphertext only if the context attributes of the requestor satisfies the access policy associated with that ciphertext. Different keys based on different requestors’ contexts can decrypt the same ciphertext associated with the same access policy, which shows that the presented scheme is more flexible and scalable to meet the need of unknown user access control in ubiquitous learning environment. In addition, the new scheme can avoid lots of drawbacks of centralized access control method based on Public Key Infrastructure (PKI), and embody the 5A characteristics of ubiquitous learning owing to the introduction of context.