diff --git a/doc/deletefrommoodle.md b/doc/deletefrommoodle.md index a9f42b4..8ad22b6 100644 --- a/doc/deletefrommoodle.md +++ b/doc/deletefrommoodle.md @@ -4,6 +4,7 @@ - Set up the [webserver](webservicesetup.md) on the Moodle instance. - Set up your [local machine](localsetup.md). - Use `createrepo.php`, `exportrepofrommoodle.php` and `importrepotomoodle.php` to manage your repository. +- Version 4.1.5+ of Moodle is required for this functionality (or 4.2.2+ as 4.2.0 and 4.2.1 are not compatible). ## Deleting - After running `importrepotomoodle.php` you may be informed of questions in Moodle that are no longer linked to your repository - either there is no manifest entry (i.e. the question has been added to Moodle after export) or there is no question file in the repo (i.e. the question has been deleted from the repo). diff --git a/doc/localsetup.md b/doc/localsetup.md index e19425c..e2071e1 100644 --- a/doc/localsetup.md +++ b/doc/localsetup.md @@ -28,7 +28,12 @@ You need to download the gitsync scripts and set it up locally as described belo - Unzip the folder into a folder of your choice. - Add the folder to the `Path` variable of your system via 'Edit System Environment Variables'. - You will need to enable a PHP extension. On the command line, run `php -i`. This will display pages of information but near the top there should be a line similar to `Loaded Configuration File => C:\Program Files\php-x64\php.ini`. Open the shown file as an administrator and search for `;extension=curl`. Remove the semi-colon from this line and save. + You will need to enable a PHP extension. On the command line, run `php -i`. This will display pages of information but near the top there should be a line similar to `Loaded Configuration File => C:\Program Files\php-x64\php.ini`. Open the shown file as an administrator and search for `;extension=curl`. Remove the semi-colon from this line and save. If you are on Windows, you will also need to [supply and maintain certificates](https://php.watch/articles/php-curl-windows-cainfo-fix): + + 1) Download the [`cacert.pem`](https://curl.se/ca/cacert.pem). + 2) Move the file to a directory accessible by PHP and the web server. For example, to `C:/php/cacert.pem`. + 3) Edit the `php.ini` file and modify the `curl.cainfo` entry to point to the absolute path to the `cacert.pem` file e.g. `curl.cainfo = "C:/php/cacert.pem"`. + 4) Restart the web server e.g. `systemctl restart apache2`. ## Setup - Open a terminal and clone this repository `git clone https://github.com/maths/moodle-qbank_gitsync.git gitsync`. The repository will be downloaded in a folder `gitsync` inside your current folder. diff --git a/version.php b/version.php index c7fa2b0..f1c4837 100644 --- a/version.php +++ b/version.php @@ -27,6 +27,7 @@ $plugin->version = 2023120400; // Question versions functionality of Moodle 4 required. // Question delete fix for Moodle 4.1.5 required. +// NB 4.2.0 and 4.2.1 do not have the fix. $plugin->requires = 2022112805; $plugin->component = 'qbank_gitsync'; $plugin->maturity = MATURITY_BETA;