Download the PHP package jjuanrivvera/canvas-lms-kit without Composer

On this page you can find all versions of the php package jjuanrivvera/canvas-lms-kit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package canvas-lms-kit

# Canvas LMS Kit [![Latest Version](https://img.shields.io/packagist/v/jjuanrivvera/canvas-lms-kit.svg?style=flat-square)](https://packagist.org/packages/jjuanrivvera/canvas-lms-kit) [![Total Downloads](https://img.shields.io/packagist/dt/jjuanrivvera/canvas-lms-kit.svg?style=flat-square)](https://packagist.org/packages/jjuanrivvera/canvas-lms-kit) [![CI](https://github.com/jjuanrivvera/canvas-lms-kit/actions/workflows/ci.yml/badge.svg)](https://github.com/jjuanrivvera/canvas-lms-kit/actions/workflows/ci.yml) [![PHP Version](https://img.shields.io/badge/php-%3E%3D8.1-8892BF.svg?style=flat-square)](https://php.net) [![License](https://img.shields.io/github/license/jjuanrivvera/canvas-lms-kit?style=flat-square)](https://github.com/jjuanrivvera/canvas-lms-kit/blob/main/LICENSE) **The most comprehensive PHP SDK for Canvas LMS API. Production-ready with 45 APIs implemented.**

โœจ Why Canvas LMS Kit?

๐ŸŽฏ Quick Start

๐Ÿ“‘ Table of Contents

๐Ÿ“‹ Requirements

๐Ÿ“ฆ Installation

โš™๏ธ Configuration

API Key Authentication (Simple)

OAuth 2.0 Authentication (User-Based) ๐Ÿ†•

Canvas LMS Kit now supports OAuth 2.0 for user-specific authentication with automatic token refresh!

Environment Variable Configuration

Perfect for containerized deployments and 12-factor apps:

Logging Configuration

The SDK supports any PSR-3 compatible logger for comprehensive debugging and monitoring:

Symfony Integration

Advanced Logging Configuration

What Gets Logged:

Security: The logging middleware automatically sanitizes sensitive fields like passwords, tokens, and API keys to prevent accidental exposure in logs.

Masquerading (Act As User) ๐Ÿ†•

The SDK supports Canvas's masquerading functionality, allowing administrators to perform API operations on behalf of other users. This is essential for administrative operations, support workflows, and testing.

Global Masquerading

Enable masquerading globally for all subsequent API calls:

Context-Specific Masquerading

In multi-tenant environments, masquerading can be set per context:

Security Considerations

Common Use Cases

Support Operations:

Testing Permission-Based Features:

Batch Operations for Multiple Users:

๐Ÿ“„ Pagination

Canvas LMS Kit provides three simple, consistent methods for handling paginated data across all resources:

The Three Methods

When to Use Each Method

Method Use Case Memory Usage API Calls
get() Dashboards, quick views, limited displays Low (1 page) 1
paginate() UI tables, batch processing, when you need metadata Low (1 page) 1 per page
all() Complete data export, small datasets (< 1000 items) High (all data) As many as needed

Memory-Safe Processing of Large Datasets

Common Pagination Patterns

Pattern 1: Building a Paginated UI

Pattern 2: Exporting All Data

Pattern 3: Finding Specific Items

PaginationResult Methods

The paginate() method returns a PaginationResult object with helpful methods:

Performance Guidelines

Relationship Methods & Large Datasets

Important: Relationship methods on Course/User/Group instances return ALL pages for completeness:

๐Ÿ“– View Complete Pagination Guide for advanced examples and patterns.

๐Ÿ’ก Usage Examples

Working with Courses

Managing Assignments

Working with Modules and Module Items

Working with Current User

Managing Groups

File Uploads

Feature Flags

Conversations (Internal Messaging)

Working with Multi-Context Resources

Some Canvas resources exist in multiple contexts (Account, Course, User, Group). Canvas LMS Kit follows an Account-as-Default convention for consistency:

Multi-Context Resources:

Performance Considerations & Memory Usage

When working with large Canvas instances (universities, enterprise organizations), be mindful of memory usage:

Memory Guidelines:

Working with Course-Scoped Resources

Some Canvas resources are strictly course-scoped and require setting the course context before use:

Important Notes:

  1. These APIs will throw an exception if you try to use them without setting the course context first.
  2. Relationship methods return FIRST PAGE ONLY for performance. To get all items:

Learning Outcomes

Content Migrations

๐Ÿ“Š Supported APIs

โœ… Currently Implemented (45 APIs)

๐Ÿ“š Core Course Management - โœ… **Courses** - Full CRUD operations - โœ… **Modules** - Content organization - โœ… **Module Items** - Individual content items - โœ… **Sections** - Course sections - โœ… **Tabs** - Navigation customization - โœ… **Pages** - Wiki-style content
๐Ÿ‘ฅ Users & Enrollment - โœ… **Users** - User management with self() pattern support - โœ… **Enrollments** - Course enrollments - โœ… **Admins** - Administrative roles - โœ… **Accounts** - Account management
๐Ÿ“ Assessment & Grading - โœ… **Assignments** - Assignment management - โœ… **Quizzes** - Quiz creation and management - โœ… **Quiz Submissions** - Student attempts - โœ… **Submissions** - Assignment submissions - โœ… **Submission Comments** - Feedback - โœ… **Rubrics** - Grading criteria and assessment - โœ… **Rubric Associations** - Link rubrics to assignments - โœ… **Rubric Assessments** - Grade with rubrics - โœ… **Outcomes** - Learning objectives and competencies - โœ… **Outcome Groups** - Organize learning outcomes - โœ… **Outcome Imports** - Import outcome data - โœ… **Outcome Results** - Track student achievement
๐Ÿ’ฌ Communication & Collaboration - โœ… **Discussion Topics** - Forums and discussions - โœ… **Groups** - Student groups and collaboration - โœ… **Group Categories** - Organize and manage groups - โœ… **Group Memberships** - Group member management - โœ… **Conferences** - Web conferencing integration - โœ… **Conversations** - Internal messaging system - โœ… **Announcements** - Course announcements extending DiscussionTopics
๐Ÿ”ง Tools & Integration - โœ… **Files** - File management and uploads - โœ… **External Tools** - LTI integrations - โœ… **Module Assignment Overrides** - Custom dates - โœ… **Calendar Events** - Event management - โœ… **Appointment Groups** - Scheduling - โœ… **Progress** - Async operation tracking - โœ… **Content Migrations** - Import/export course content - โœ… **Migration Issues** - Handle import problems - โœ… **Feature Flags** - Manage Canvas feature toggles - โœ… **Brand Configs** - Theme variables and shared brand configurations - โœ… **Gradebook History** - Grade change audit trail and submission version tracking - โœ… **Course Reports** - Asynchronous report generation (grade exports, student data) - โœ… **Developer Keys** - OAuth API key management for Canvas integrations - โœ… **Login API** - User authentication credentials and login methods - โœ… **Analytics** - Learning analytics data (account, course, user level) - โœ… **Bookmarks** - User bookmark management for Canvas resources - โœ… **MediaObjects** - Media files and captions/subtitles management

๐Ÿš€ Advanced Features

Production-Ready Middleware

Multi-Tenant Support

Pagination Support (Simplified API)

Fluent Interface & Method Chaining

All save() and delete() methods return the instance, enabling method chaining:

Relationship Methods

Raw URL Support (Direct API Calls) ๐Ÿ†•

Make direct API calls to arbitrary Canvas URLs using the Canvas facade class:

Features:

Context Management (Account-as-Default)

Canvas LMS Kit uses the Account-as-Default convention for multi-context resources:

Why Account-as-Default?

๐Ÿ“– Full Context Management Guide

๐Ÿงช Testing

Code Quality Tools

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guidelines.

Quick Contribution Guide

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Write tests for your changes
  4. Ensure all tests pass (composer check)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ’ฌ Support

Report a Bug Request Feature Ask Question

Resources

โญ Show Your Support

If you find this project helpful, please consider giving it a star on GitHub! It helps others discover the project and motivates continued development.

[![Star History Chart](https://api.star-history.com/svg?repos=jjuanrivvera/canvas-lms-kit&type=Date)](https://star-history.com/#jjuanrivvera/canvas-lms-kit&Date) --- Built with โค๏ธ by the Canvas LMS Kit community

All versions of canvas-lms-kit with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-json Version *
ext-curl Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^7.3
psr/log Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jjuanrivvera/canvas-lms-kit contains the following files

Loading the files please wait ....