Skip to content

Commit

Permalink
fixes #197, fixes #199, load jquery filupload plugin if Stud.IP versi…
Browse files Browse the repository at this point in the history
…on is 4.1 or below and WYSIWYG is disabled
  • Loading branch information
tgloeggl committed Mar 9, 2020
1 parent ca2e377 commit a2c2aa7
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 132 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ stylesheets/flex.css
opencast.zip

opencast-theodul.zip

node_modules
4 changes: 4 additions & 0 deletions OpenCast.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ function __construct()

PageLayout::addScript($this->getPluginUrl() . '/javascripts/application.js');

if (StudipVersion::olderThan('4.2') && !Studip\Markup::editorEnabled()) {
PageLayout::addScript($this->getPluginUrl() . '/node_modules/blueimp-file-upload/js/jquery.fileupload.js');
}

if (class_exists('Context')) {
$id = Context::getId();
} else {
Expand Down
130 changes: 0 additions & 130 deletions build.php

This file was deleted.

4 changes: 3 additions & 1 deletion classes/lti/OpencastLTI.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ public static function generate_combined_acls(array $course_ids, array $modes)
$course_id = $course_ids[$index];
$mode = $modes[$index];

$resulting_acl->add_acl(static::generate_standard_acls($course_id)[$mode]);
if ($mode) {
$resulting_acl->add_acl(static::generate_standard_acls($course_id)[$mode]);
}
}

return $resulting_acl;
Expand Down
36 changes: 36 additions & 0 deletions package-lock.json

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

25 changes: 25 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "studip-opencast-plugin",
"version": "1.2.99",
"description": "Stud.IP plugin for Opencast",
"dependencies": {
"blueimp-file-upload": "^10.8.0"
},
"devDependencies": {},
"scripts": {
"pretranslate": "find * \\( -iname \"*.php\" -o -iname \"*.ihtml\" \\) | xargs xgettext --from-code=UTF-8 -j --add-location=never --package-name=Opencast --language=PHP -o \"locale/en/LC_MESSAGES/opencast.po\"",
"translate": "msgfmt \"locale/en/LC_MESSAGES/opencast.po\" --output-file=\"locale/en/LC_MESSAGES/opencast.mo\"",
"prezip": "npm install",
"zip": "zip -r Opencast-V$npm_package_version.zip classes controllers cronjobs images locale migrations models node_modules stylesheets views LICENSE INSTALL.md README.md bootstrap.php constants.php Opencast.class.php plugin.manifest"
},
"repository": {
"type": "git",
"url": "git+https://github.com/elan-ev/studip-opencast-plugin.git"
},
"author": "Till Glöggler <tgloeggl@uos.de>",
"license": "AGPL-3.0-or-later",
"bugs": {
"url": "https://github.com/elan-ev/studip-opencast-plugin/issues"
},
"homepage": "https://github.com/elan-ev/studip-opencast-plugin#readme"
}
2 changes: 1 addition & 1 deletion plugin.manifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pluginname=OpenCast
pluginclassname=OpenCast
origin=elan-ev
version=1.2.99
version=1.2.100
studipMinVersion=4.0
studipMaxVersion=4.4
summary=Vorlesungsaufzeichnung
Expand Down

0 comments on commit a2c2aa7

Please sign in to comment.