PHPackages                             otago/moodlecount - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. otago/moodlecount

ActiveMoodle-local[API Development](/categories/api)

otago/moodlecount
=================

A web service that returns the number of read/unread messages for a user

013PHP

Since May 8Pushed 11y ago3 watchersCompare

[ Source](https://github.com/otago/moodlecount)[ Packagist](https://packagist.org/packages/otago/moodlecount)[ RSS](/packages/otago-moodlecount/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Web service plugin for Moodle 2.X
---------------------------------

[](#web-service-plugin-for-moodle-2x)

Returns the count of unread/read messages in moodle

To test: 1- install the plugin in moodle/local/moodlecount/ 2- Read, setup and run moodle/local/moodlecount/client/client.php

Installation
------------

[](#installation)

You can install via composer or copy and paste the files. The module lives in the **/local/** folder.

### Install via composer

[](#install-via-composer)

First navigate to your moodle directory:

`cd /var/www/moodle-folder`.

Add the module to your composer list: `composer require otago/moodlecount:dev-master --no-update`

Update composer: `composer update --no-dev`

Note if you're installing on a dev environment you'll omit the --no-dev

### Usage

[](#usage)

After installation, you'll need to update the moodle database with your module. Simply login as an admin and moodle should prompt you.

Next you'll need to add the functions to the list of functions to your web service. Navigate to *Site administration &gt; Plugins &gt; Web services &gt; External services*. Select your web service you want (if you have not created a role, user and service for web services, google it) to add your functions to, and click 'Add functions'.

Then select **local\_op\_wstemplate\_count\_read\_messages** or **local\_op\_wstemplate\_count\_unread\_messages**from the list.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/67215?v=4)[torleif](/maintainers/torleif)[@torleif](https://github.com/torleif)

---

Top Contributors

[![torleif](https://avatars.githubusercontent.com/u/67215?v=4)](https://github.com/torleif "torleif (9 commits)")

### Embed Badge

![Health badge](/badges/otago-moodlecount/health.svg)

```
[![Health](https://phpackages.com/badges/otago-moodlecount/health.svg)](https://phpackages.com/packages/otago-moodlecount)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k13](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
