Skip to content

About

Moodle helper scripts

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Userscripts

A collection of userscripts for Moodle integrators working in Jira Cloud.

Installation

Prerequisites

Install a userscript manager extension for your browser:

Chrome

Firefox

Installing Scripts

  1. Click the "Install" link next to any script below
  2. Tampermonkey will open an installation dialog
  3. Click "Install" to confirm
  4. The script will now run automatically on matching pages

Alternative manual installation:

  1. Copy the contents of any .user.js file from this repository
  2. Open Tampermonkey dashboard in your browser
  3. Click "Create a new script"
  4. Paste the script content
  5. Save the script (Ctrl+S or Cmd+S)

Available Scripts

Pull Helper Script (pull.user.js)

A Moodle Pull Helper Script for Integrators that works on Jira Cloud. - Install

Jira Better Layout Script (betterlayout.user.js)

A Jira Better Layout Script for Moodlers that works on Jira Cloud. - Install

  • Move the status transition buttons back to the right panel.
  • Remove Freshdesk fields.

Development

Use Node.js 22.22.2+, 24.15.0+, or 26+ in a supported release line, plus Git and a POSIX shell (Linux or macOS) for the command tests. Node.js is only required for development; installing the userscripts in a browser does not require it.

npm ci
npm run check

npm run check runs ESLint, Prettier's formatting check, and the DOM regression tests. Run npm run format to apply formatting. The shared style uses four spaces, single quotes, semicolons, and trailing commas.

The tests load the actual userscripts with jQuery 4.0.0 in JSDOM. They cover command quoting, repository validation, build links, clipboard errors, dynamically loaded fields, and both scripts running together. A real Git test uses temporary local repositories to verify fetching and merging the exact branch. These tests simulate Jira's DOM; changes to Jira's live markup still need a browser check.

Pull Helper accepts repository URLs in the form https://github.com/owner/repo (with an optional .git suffix). Legacy git://github.com/owner/repo URLs are converted to HTTPS. Pull branch fields must contain valid Git branch names; empty fields and fetch refspecs are skipped. Copied commands use POSIX shell quoting for repository and branch values.

Both scripts react to DOM changes without requiring AJS. Their jQuery instance is kept local so Jira's existing $ and jQuery globals are restored.

When updating a userscript, bump its @version so userscript managers can detect the update.

License

This work is released under the terms of the GNU General Public License, v3 or later.

About

Moodle helper scripts

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages