Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Opencast PHP Library to 1.8.0 + Api Version setting (OC 16 Support) + Moodle 4.4 Required Changes #63

Merged
merged 8 commits into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion classes/local/api_testable.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class api_testable extends api {
private $httpcode;

/** @var string version api version to apply for */
public $version = '1.9.0';
public $version = '1.10.0';

/** @var string the username. */
private string $username;
Expand Down
2 changes: 0 additions & 2 deletions classes/local/environment_util.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

namespace tool_opencast\local;

defined('MOODLE_INTERNAL') || die;

/**
* An environment util for the Opencast Moodle plugins.
*
Expand Down
1 change: 1 addition & 0 deletions classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Privacy Subsystem implementation for tool opencast.
*
Expand Down
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"name": "moodle/tool_opencast",
"require-dev": {
"elan-ev/opencast-api": "^1.5"
"require": {
"elan-ev/opencast-api": "1.8"
},
"config": {
"platform-check": false
}
}
22 changes: 11 additions & 11 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions db/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Services for the Opencast API.
*
* @package tool_opencast
* @copyright 2018 Tobias Reischmann <tobias.reischmann@wi.uni-muenster.de>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

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

$functions = [
Expand Down
4 changes: 2 additions & 2 deletions lang/en/tool_opencast.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@

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

$string['pluginname'] = 'Opencast API';
$string['addinstance'] = 'Add instance';
$string['apicreadentialstestfailedlong'] = 'The given Username or Password for the Opencast API is not valid.<br />Please use valid Username and Password in order to avoid fatal error during tasks which use this setting.';
$string['apicreadentialstestfailedshort'] = 'Opencast API User Credentials test failed with http code: {$a}';
$string['apicreadentialstestfailedlong'] = 'The given Username or Password for the Opencast API is not valid.<br />Please use valid Username and Password in order to avoid fatal error during tasks which use this setting.';
$string['apicreadentialstestsuccessfulshort'] = 'Opencast API User Credentials test successful.';
$string['apipassword'] = 'Password of Opencast API user';
$string['apipassworddesc'] = 'Configure the password of the Opencast user who is used to do the Opencast API calls.';
Expand Down Expand Up @@ -69,6 +68,7 @@
$string['opencast:externalapi'] = 'Access to Opencast API webservices';
$string['opencast:instructor'] = 'Gives the role of an instructor in Opencast';
$string['opencast:learner'] = 'Gives the role of a learner in Opencast';
$string['pluginname'] = 'Opencast API';
$string['privacy:metadata'] = 'The Opencast API admin tool only provides API endpoints and general settings for the set of Opencast plugins. It stores which Opencast series belongs to which Moodle course, but it does not store any personal data.';
$string['serverconnectionerror'] = 'There was a problem with the connection to the Opencast server. Please check your Opencast API credentials and your network settings.';
$string['testtooldisabledbuttontitle'] = 'Unable to conduct the connection test due to unloaded js modules.';
Expand Down
2 changes: 1 addition & 1 deletion thirdpartylibs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<library>
<location>vendor/elan-ev/opencast-api</location>
<name>Opencast PHP Library</name>
<version>1.3</version>
<version>1.8</version>
<license>GPL</license>
<licenseversion>3.0-or-later</licenseversion>
</library>
Expand Down
18 changes: 18 additions & 0 deletions vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

// autoload.php @generated by Composer

if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
trigger_error(
$err,
E_USER_ERROR
);
}

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit8ba2ca4e105ea351f7cb241590a7de7e::getLoader();
Loading