Download the PHP package adamjenkins/moodle-local_oerexchange without Composer

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

local_oerexchange

The central catalogue and API plugin for the OER Exchange platform — an open-educational-resources sharing platform built on Moodle. Runs on the dedicated Exchange site; teachers share and import through the companion local_oerclient plugin installed on their own Moodle sites.

What it does

Web services

Custom service local_oerexchange (db/services.php):

Function Auth Purpose
local_oerexchange_search site token Browse/search the catalogue
local_oerexchange_get_resource site token Full detail + structure preview
local_oerexchange_publish_resource personal token Publish a share
local_oerexchange_record_import site token Record a completed import
local_oerexchange_get_share_status personal token Live state of one's own published resource
local_oerexchange_get_config site token Advertised limits

Two bootstrap steps have no token yet, so they are plain public endpoints rather than WS functions: register.php (site registration) and link_consume.php (exchange a one-time code for the freshly minted personal token, from the connect.php account-linking handshake).

Because register.php cannot authenticate its caller, it is bounded two ways: registering a URL that already has a pending row returns that row instead of adding another (so a client retrying is harmless), and new registrations site-wide are capped per hour, answering 429 beyond that.

A content area on the catalogue

Show a content area on the catalogue (off by default) puts admin-authored HTML at the top of the Browse OER catalogue page — a welcome message, guidance for contributors, or an announcement. It is a checkbox plus an HTML editor, matching how core handles its own search banner: switching the checkbox off takes the area down without discarding what you wrote.

The content is rendered by the catalogue itself, so it appears on every route to that listing — the plugin's own page, and both ways the catalogue can serve as the site home page (see below). It also shows on an empty catalogue, which is when a welcome message is most useful.

Anonymous access

Browsing the catalogue and viewing a resource page work without logging in. Downloading a resource's .mbz does not, unless Allow anonymous download is turned on — and that setting governs Try it as well, because a sandbox trial downloads the .mbz itself to boot. With the setting off, an anonymous visitor who clicks Try it is sent to the login page.

Show the catalogue to visitors at the site home page (off by default) goes one step further: with it on, a visitor who is not logged in and opens the site home page is served the catalogue at that address, instead of being sent to the login form. The page is rendered in place, so the address bar stays at the site root and searching from there stays there too. forcelogin can remain on — it still applies to every other page; only the front page is opened. The catalogue is not served while the site is in maintenance mode, and /?redirect=0 always reaches the normal front page. Implemented as a \core\hook\after_config listener, which runs before core index.php's require_course_login().

For logged-in users, the plugin adds an OER catalogue option to Moodle's own Appearance → Navigation → Default home page for users (\core_user\hook\extend_default_homepage); core handles that case by redirecting to the catalogue's own address.

A "site key" issued on approval is a real core web service token, minted against a dedicated, non-interactive Moodle account created for that site (local_oerexchange\local\site_manager) — not a custom auth scheme.

Uploading, and knowing what happened next

A share is published asynchronously: the file is stored immediately, and an adhoc task validates the backup on the next cron run before the resource appears in the catalogue. Both upload pages therefore show a progress bar while the file is being sent (course backups here routinely run to hundreds of megabytes, which a plain form post reports to nobody), and then land on the new resource's own page, which says "Checking your upload…" and updates itself to either Published or the rejection reason — no reload, no guesswork. The progress bar is progressive enhancement: with JavaScript off, the same form posts to the same address and the same thing happens, minus the bar.

File size and the sandbox

Resource pages and catalogue cards show each resource's file size, and a resource big enough to make an in-browser trial slow carries a note beside Try it saying so and pointing at Download instead.

Warn about slow trials above (sandboxwarnbytes) sets that threshold. Its default, 50 MiB, is the stock sandbox engine's fast-download budget: below it, a trial fetches the backup with a visible percentage; above it, the engine falls back to a download inside its WebAssembly PHP that reports no progress at all. A 359 MB course measured on the stock budget booted successfully but took 4 minutes 15 seconds, nearly four of them apparently idle. Set it to 0 to never warn.

Keep this in step with your sandbox. The companion oer-sandbox kit can raise that budget when it builds the bundle (OER_FAST_DOWNLOAD_MAX_MB, default 384). If yours is built that way, set this setting to the same number — otherwise the Exchange warns about resources the sandbox now handles quickly. On the reference deployment, raising the budget to 384 MiB took the same 359 MB course from 4 min 15 s to 23.8 seconds, with a percentage throughout.

Never offer a trial above (sandboxmaxbytes, 0 = no limit) is the hard version: above it no Try it button is rendered and a direct link to the trial is refused, with the size and the limit explained in place of the button. It is off by default, because a large trial does work — it is only slow.

Maximum upload size (maxbackupbytes, 500 MB) is the one limit that actually refuses an upload. It is enforced on every publish path, shown on the upload pages, checked in the browser before a large file is sent, and advertised to registered client sites so their share forms can check it first.

Licence display

Show licence codes in capitals (uppercaselicencenames, on by default) chooses whether a resource's licence code reads CC-SA-4.0 or cc-sa-4.0 on resource pages, catalogue cards and the browse block. It is a display setting only: codes are wrapped in <span class="oer-licence-name"> and the capitals come from CSS, so the licence is stored, filtered and advertised to client sites exactly as it was published. The licence filter dropdown keeps the stored spelling regardless. A theme can override the styling with .oer-licence-name--upper { text-transform: unset; }, because plugin stylesheets are emitted before theme CSS.

Requirements

Installation

Acknowledgments

This plugin's sandbox integration (classes/local/sandbox/) builds launch URLs for Moodle Playground — all of the actual work of running Moodle in a browser (WASM boot, blueprint provisioning, service-worker/bundle machinery) is that project's, not ours; this plugin only constructs a URL for it. Moodle Playground itself runs on WordPress Playground's @php-wasm/web PHP-in-WebAssembly runtime, the foundational piece that makes any of this possible in a browser tab. Deployment of the actual sandbox (building and serving the static bundles) lives in the companion oer-sandbox repo, whose README carries the fuller acknowledgment.

License

GPL-3.0-or-later, see LICENSE.


All versions of moodle-local_oerexchange with dependencies

PHP Build Version
Package Version
Requires moodle/moodle Version >=5.0 <5.3
moodle/composer-installer Version ^1.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 adamjenkins/moodle-local_oerexchange contains the following files

Loading the files please wait ...