Download the PHP package escolalms/reports without Composer

On this page you can find all versions of the php package escolalms/reports. 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 reports

EscolaLMS Reports

Package for statistics & reports

swagger codecov phpunit downloads downloads downloads

Purpose

This package contains web API for retrieving statistical data about other LMS components (or event any arbitrary non-LMS Models for which Metrics and/or Reports are registered).

Installation

Dependencies

Usage

Configuration

By editing published config reports.php you can:

  1. Change which metrics are available in API (by editing metrics)
  2. Change settings for each Metric (by editing metric_configuration)
    1. limit defines how many data points will be calculated by default (if you don't pass limit as query parameter); for example: TutorsPopularityMetric with limit set to 10 will return popularity of 10 most popular Tutors
    2. history is a boolean that defines if this metric should be automatically calculated and stored in database
    3. cron is cron config which determines how often automatic calculation of metrics happens
  3. Change which stats are available in API (by editing stats) and to which Model they are mapped

Stats

Stats are used for calculating some statistical data about given single Model (for example Course or Topic). No historical data is stored, only current data is available.

Available stats

Creating your own stat

To create your own Stat, you need to create class implementing EscolaLms\Reports\Stats\StatContract. After creating a Stat you need to register it by adding it to stats array in config file.

Metrics

Metrics are used for reporting data accumulated over time. Historical data is stored for each day using scheduled job, and requesting a metric returns that historical data (that is, metric values stored at given date).

Available metrics

Creating your own metric

To create your own Metric, you need to create class implementing EscolaLms\Reports\Metrics\Contracts\MetricContract. You can extend EscolaLms\Reports\Metrics\AbstractMetric to use default implementations of most of the methods declared in this interface. After creating a Metric you need to register it by adding it to metrics array in config file.

Endpoints

All the endpoints are defined in swagger.

Metrics endpoints

  1. GET /api/admin/reports/metrics returns list of metrics configured in reports.php config file
  2. GET /api/admin/reports/report calculates data for chosen metric; you can pass following query parameters to this endpoint:
    1. metric={classname} is required; classname is one of the metrics returned in /api/admin/reports/metrics endpoit
    2. limit={int} is optional; determines the maximum number of data points that will be returned
    3. date={date} is optional; will try to load historical report data for given date or return 404 if there is no data available; without this param, endpoint will return today's data

Stats endpoints

  1. GET /api/admin/stats/available returns list of stats configured in reports.php config file
  2. `GET /api/admin/stats/

Tests

Run ./vendor/bin/phpunit --filter='EscolaLms\\Reports\\Tests' to run tests.

Test details: codecov phpunit

Events

No Events are defined in this package.

Listeners

No Listeners are defined in this package.

How to use this package on Frontend

Admin Panel

Reports dashboard

Course Stats

Permissions

Permissions are defined in Seeder.

Roadmap. Todo. Troubleshooting


All versions of reports with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
escolalms/core Version ^1.2
laravel/framework Version >=8.0
maatwebsite/excel Version ^3.1
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 escolalms/reports contains the following files

Loading the files please wait ....