-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
2023083100 release code
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
name: Moodle Plugin CI | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'node_modules/**' | ||
pull_request: | ||
paths-ignore: | ||
- 'node_modules/**' | ||
|
||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
postgres: | ||
image: postgres:12 | ||
env: | ||
POSTGRES_USER: 'postgres' | ||
POSTGRES_HOST_AUTH_METHOD: 'trust' | ||
ports: | ||
- 5432:5432 | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3 | ||
mariadb: | ||
image: mariadb:10 | ||
env: | ||
MYSQL_USER: 'root' | ||
MYSQL_ALLOW_EMPTY_PASSWORD: "true" | ||
MYSQL_CHARACTER_SET_SERVER: "utf8mb4" | ||
MYSQL_COLLATION_SERVER: "utf8mb4_unicode_ci" | ||
|
||
ports: | ||
- 3306:3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 3 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- php: '8.0' | ||
moodle-branch: 'master' | ||
database: 'pgsql' | ||
- php: '8.1' | ||
moodle-branch: 'MOODLE_401_STABLE' | ||
database: 'pgsql' | ||
- php: '8.1' | ||
moodle-branch: 'MOODLE_402_STABLE' | ||
database: 'pgsql' | ||
|
||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
with: | ||
path: plugin | ||
|
||
- name: Setup PHP ${{ matrix.php }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: ${{ matrix.extensions }} | ||
ini-values: max_input_vars=5000 | ||
# none to use phpdbg fallback. Specify pcov (Moodle 3.10 and up) or xdebug to use them instead. | ||
coverage: none | ||
|
||
- name: Initialise moodle-plugin-ci | ||
run: | | ||
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3 | ||
echo $(cd ci/bin; pwd) >> $GITHUB_PATH | ||
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH | ||
sudo locale-gen en_AU.UTF-8 | ||
echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV | ||
- name: Install moodle-plugin-ci | ||
run: | | ||
moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1 | ||
env: | ||
DB: ${{ matrix.database }} | ||
MOODLE_BRANCH: ${{ matrix.moodle-branch }} | ||
|
||
- name: PHP Lint | ||
if: ${{ always() }} | ||
run: moodle-plugin-ci phplint | ||
|
||
- name: PHP Copy/Paste Detector | ||
continue-on-error: true # This step will show errors but will not fail | ||
if: ${{ always() }} | ||
run: moodle-plugin-ci phpcpd | ||
|
||
- name: PHP Mess Detector | ||
continue-on-error: true # This step will show errors but will not fail | ||
if: ${{ always() }} | ||
run: moodle-plugin-ci phpmd | ||
|
||
- name: Moodle Code Checker | ||
if: ${{ always() }} | ||
# Allow 3 warnings for privacy provider interfaces (Moodle <3.6) | ||
run: moodle-plugin-ci codechecker --max-warnings 3 | ||
|
||
- name: Moodle PHPDoc Checker | ||
if: ${{ always() }} | ||
run: moodle-plugin-ci phpdoc | ||
|
||
- name: Validating | ||
if: ${{ always() }} | ||
run: moodle-plugin-ci validate | ||
|
||
- name: Check upgrade savepoints | ||
if: ${{ always() }} | ||
run: moodle-plugin-ci savepoints | ||
|
||
# Mustache and Grunt are failing so commenting out for now | ||
# - name: Mustache Lint | ||
# if: ${{ always() }} | ||
# run: moodle-plugin-ci mustache | ||
|
||
# - name: Grunt | ||
# if: ${{ always() }} | ||
# run: moodle-plugin-ci grunt --max-lint-warnings 0 | ||
|
||
- name: PHPUnit tests | ||
if: ${{ always() }} | ||
run: moodle-plugin-ci phpunit --fail-on-warning | ||
|
||
- name: Behat features | ||
if: ${{ always() }} | ||
run: moodle-plugin-ci behat --profile chrome |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,59 @@ | ||
# moodle-tiny_panoptoltibutton | ||
Moodle plugin that allow users to embed LTI content into the TinyMCE rich text editor. | ||
This plugin adds a button to the TinyMCE Text Editor to allow for teachers and students to embed Panopto content using existing Panopto LTI tools | ||
|
||
|
||
## Prerequisites for using the Panopto Button plugin for TinyMCE: | ||
|
||
* Access to the server where Moodle is installed and running. As this plugin is not registered for automatic update, it cannot be upgraded from Moodle | ||
UI and requires direct access to the server. | ||
* The Moodle 2.0 Plugin for Panopto. The plugin and instructions for installation may be found at | ||
https://github.com/Panopto/Moodle-2.0-Plugin-for-Panopto | ||
* The TinyMCE rich text editor for Moodle. This may be enabled by navigating to **Site Administration > Plugins > Text editors > Manage editors** on | ||
the left-hand column of the Moodle page and using the up/down arrows to move 'TinyMCE editor' to the top of the list. Make sure that TinyMCE is | ||
enabled by confirming that its corresponding icon under the 'Enable' column shows an unobstructed eye, or click the icon until it appears this way. | ||
|
||
|
||
## Installation instructions: | ||
|
||
1. Get the latest release source package (either as zip or tar.gz) from https://github.com/Panopto/moodle-tiny_panoptoltibutton/releases | ||
1. Log in to Moodle as an Admin. | ||
1. Navigate to **System Administration > Plugins > Install Plugins** | ||
1. Drag the .zip of the latest release over the drag and drop section to install a plugin. | ||
1. Moodle should detect the new/upgraded plug-in and show "Plugins check" screen which prompts you to install/upgrade. Click "Upgrade Moodle database now" button to proceed. | ||
1. After installation is completed, visit **Site Administration > Plugins > Text Editors > General Settings** and confirm that 'Add Panopto Video' has been added to the list of installed plugins for TinyMCE. | ||
1. The Panopto LTI button for TinyMCE should now be installed and will appear on all rich text input windows throughout the Moodle site. | ||
|
||
## Usage: | ||
|
||
1. On a rich text input window on the Moodle site, navigate the cursor to the position at which you would like your content to be inserted and click the Panopto dropdown button (the button containing the green Panopto logo and a dropdown icon). | ||
1. We only show existing LTI tool that have a Tool URL that matches the Panopto server a course is provisioned with. At this time Panopto only supports embedding rich text editor LTI content from pages associated with a course provisioned by the Panopto block. | ||
1. After selecting an item in the dropdown a new window will appear containing the selected Panopto LTI tool. From here the user can select and embed content depending on what LTI tool was selected. | ||
|
||
## Making changes to the code: | ||
|
||
### Update AMD module | ||
|
||
You can build all modules in Moodle by using the grunt amd command. To update the amd module from this plugin: | ||
1. Execute `npm install` on the root of the Moodle project. | ||
2. Navigate to `<moodle-root>/lib/editor/tiny/panoptoltibutton/amd/` and execute: | ||
|
||
``` | ||
$ npx grunt amd | ||
``` | ||
|
||
### Development mode | ||
|
||
In development mode Moodle will also send the browser the corresponding source map files for each of the JavaScript modules. The source map files will tell the browser how to map the minified source code back to the un-minified original source code so that the original source files will be displayed in the sources section of the browser's development tools. | ||
|
||
To enable development mode set the cachejs config value to false in the admin settings or directly in your config.php file: | ||
|
||
``` | ||
// Prevent JS caching | ||
$CFG->cachejs = false; | ||
``` | ||
|
||
## Deploy new version | ||
|
||
1. Increment the version in version.php by 1 (e.g. change 2020061000 to 2020061001) | ||
1. Add everything except the .git and node_modules folder to a zip archive | ||
1. Treat the zip archive as a new release and follow the installation instructions above. As long as the version is higher than the currently installed version an update should trigger. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.