Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support MOODLE 4.5
Browse files Browse the repository at this point in the history
Nathan Nguyen committed Nov 13, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 99a74ec commit 6d5c184
Showing 8 changed files with 15 additions and 34 deletions.
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -26,14 +26,10 @@ The following sections outline the steps that need to be followed to install the
## Supported Moodle Versions
This plugin currently supports Moodle:

* 3.4
* 3.5
* 3.6
* 3.7
* 3.8
* 3.9
* 3.10
* 3.11
| Moodle version | Branch |
-----------------|-------------------|
| Moodle 3.4+ | MOODLE_34_STABLE |
| Moodle 4.5+ | MOODLE_405_STABLE |

## Plugin Installation
The following steps will help you install this plugin into your Moodle instance.
5 changes: 2 additions & 3 deletions classes/converter.php
Original file line number Diff line number Diff line change
@@ -25,11 +25,10 @@

defined('MOODLE_INTERNAL') || die();

require_once($CFG->dirroot . '/local/aws/sdk/aws-autoloader.php');

use \core_files\conversion;
use Aws\S3\S3Client;
use Aws\S3\Exception\S3Exception;
use smsgateway_aws\helper;

/**
* Class for converting files between different formats using unoconv.
@@ -108,7 +107,7 @@ public function create_client($handler=null) {

// Check if we are using the Moodle proxy.
if ($this->config->useproxy) {
$connectionoptions['http'] = ['proxy' => \local_aws\local\aws_helper::get_proxy_string()];
$connectionoptions['http'] = ['proxy' => helper::get_proxy_string()];
}

// Allow handler overriding for testing.
7 changes: 3 additions & 4 deletions classes/provision.php
Original file line number Diff line number Diff line change
@@ -25,13 +25,12 @@

defined('MOODLE_INTERNAL') || die();

require_once($CFG->dirroot . '/local/aws/sdk/aws-autoloader.php');

use Aws\S3\S3Client;
use Aws\S3\Exception\S3Exception;
use Aws\CloudFormation\CloudFormationClient;
use Aws\CloudFormation\Exception\CloudFormationException;
use Aws\Exception\AwsException;
use smsgateway_aws\helper;

/**
* Class for provisioning AWS resources.
@@ -173,7 +172,7 @@ protected function create_s3_client($handler=null) {

// Check if we are using the Moodle proxy.
if ($this->useproxy) {
$connectionoptions['http'] = ['proxy' => \local_aws\local\aws_helper::get_proxy_string()];
$connectionoptions['http'] = ['proxy' => helper::get_proxy_string()];
}

// Allow handler overriding for testing.
@@ -290,7 +289,7 @@ protected function create_cloudformation_client($handler=null) {

// Check if we are using the Moodle proxy.
if ($this->useproxy) {
$connectionoptions['http'] = ['proxy' => \local_aws\local\aws_helper::get_proxy_string()];
$connectionoptions['http'] = ['proxy' => helper::get_proxy_string()];
}

// Allow handler overriding for testing.
5 changes: 2 additions & 3 deletions classes/tester.php
Original file line number Diff line number Diff line change
@@ -25,11 +25,10 @@

defined('MOODLE_INTERNAL') || die();

require_once($CFG->dirroot . '/local/aws/sdk/aws-autoloader.php');

use Aws\S3\S3Client;
use Aws\S3\Exception\S3Exception;
use Aws\Iam\Exception\IamException;
use smsgateway_aws\helper;

/**
* Class for provisioning AWS resources.
@@ -150,7 +149,7 @@ public function create_s3_client($handler=null) {

// Check if we are using the Moodle proxy.
if ($this->useproxy) {
$connectionoptions['http'] = ['proxy' => \local_aws\local\aws_helper::get_proxy_string()];
$connectionoptions['http'] = ['proxy' => helper::get_proxy_string()];
}

// Allow handler overriding for testing.
3 changes: 0 additions & 3 deletions tests/converter_test.php
Original file line number Diff line number Diff line change
@@ -27,9 +27,6 @@

defined('MOODLE_INTERNAL') || die();

global $CFG;
require_once($CFG->dirroot . '/local/aws/sdk/aws-autoloader.php');

use Aws\Result;
use Aws\MockHandler;
use Aws\CommandInterface;
3 changes: 0 additions & 3 deletions tests/events_test.php
Original file line number Diff line number Diff line change
@@ -27,9 +27,6 @@

defined('MOODLE_INTERNAL') || die();

global $CFG;
require_once($CFG->dirroot . '/local/aws/sdk/aws-autoloader.php');

use Aws\Result;
use Aws\MockHandler;
use Aws\CommandInterface;
3 changes: 0 additions & 3 deletions tests/provision_test.php
Original file line number Diff line number Diff line change
@@ -27,9 +27,6 @@

defined('MOODLE_INTERNAL') || die();

global $CFG;
require_once($CFG->dirroot . '/local/aws/sdk/aws-autoloader.php');

use Aws\MockHandler;
use Aws\Result;
use Aws\CommandInterface;
11 changes: 4 additions & 7 deletions version.php
Original file line number Diff line number Diff line change
@@ -25,11 +25,8 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'fileconverter_librelambda';
$plugin->release = 2023010900;
$plugin->version = 2023010900;
$plugin->requires = 2017111309;
$plugin->release = 2024111300;
$plugin->version = 2024111300;
$plugin->requires = 2024100700;
$plugin->maturity = MATURITY_STABLE;
$plugin->dependencies = array(
'local_aws' => 2023072100
);
$plugin->supported = [34, 401]; // A range of branch numbers of supported moodle versions.
$plugin->supported = [405, 405]; // A range of branch numbers of supported moodle versions.

0 comments on commit 6d5c184

Please sign in to comment.