Skip to content
Snippets Groups Projects
Commit 86ce32b3 authored by Elmar Ludwig's avatar Elmar Ludwig
Browse files

work around bug in Opencast plugin 2.x, fixes #137 (1.8 branch only)

parent d0296fb9
No related branches found
No related tags found
No related merge requests found
......@@ -39,8 +39,12 @@ if (!interface_exists('PrivacyPlugin')) {
// this is included for Stud.IP >= 5.0
if (interface_exists('Courseware\CoursewarePlugin')) {
require_once 'lib/VipsCoursewarePlugin.php';
class _VipsPlugin extends StudIPPlugin implements Courseware\CoursewarePlugin {
use VipsCoursewarePlugin;
}
} else {
require_once 'lib/CoursewarePlugin.php';
class _VipsPlugin extends StudIPPlugin {}
}
StudipAutoloader::addClassLookups([
......@@ -62,19 +66,15 @@ StudipAutoloader::addClassLookups([
'VipsTest' => __DIR__ . '/lib/VipsTest.php'
]);
use Courseware\CoursewarePlugin;
/**
* Vips plugin class for Stud.IP
*/
class VipsPlugin extends StudIPPlugin implements StandardPlugin, SystemPlugin, PrivacyPlugin, CoursewarePlugin
class VipsPlugin extends _VipsPlugin implements StandardPlugin, SystemPlugin, PrivacyPlugin
{
public static $exam_mode;
public static $instance;
public static $template_factory;
use VipsCoursewarePlugin;
public function __construct()
{
global $perm, $user;
......
<?php
/*
* CoursewarePlugin.php - Vips copy of the CoursewarePlugin interface
* Copyright (c) 2022 Elmar Ludwig
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*/
namespace Courseware {
interface CoursewarePlugin {}
}
namespace {
trait VipsCoursewarePlugin {}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment