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

Completely remove subtiltes workflow, Correctly update workflows if tags changed #1215

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
5 changes: 1 addition & 4 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ org.opencastproject.userdirectory.studip.cache.expiration=1

Make sure to change the token and add that token to the Opencast config in Stud.IP. Furthermore configure the Opencast-Plugin in Stud.IP to have the `nobody` role for it to work.

6. Recommended for Opencast Version >= 17, edit `/etc/opencast/custom.properties` and enable:
6. Recommended for Opencast Version >= 17, edit `/etc/opencast/custom.properties` and enable:

```
# Allow episode ID based access control via roles.
Expand Down Expand Up @@ -121,9 +121,6 @@ You can configure which workflow is used for different actions. They can be edit
| upload | Workflow run after uploading a video | upload |
| studio | Workflow run after creating a video OC Studio | upload |
| delete | Workflow run when a video shall be deleted permanently | delete |
| subtiltes | Workflow run after a subtitle has been added or removed | archive |

The subtitles-Workflow needs to make sure that the changes are published, otherwise the subtitles will not be visible.

## Credentials for Opencast

Expand Down
4 changes: 0 additions & 4 deletions lib/Models/WorkflowConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ public static function createAndUpdateByConfigId($config_id, $workflows = null)
case 'studio';
$type = 'upload';
break;

case 'subtitles';
$type = 'archive';
break;
}

$workflow_id = isset($workflows[$entry->id])
Expand Down
26 changes: 26 additions & 0 deletions migrations/102_remove_subtitles_workflow.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

class RemoveSubtitlesWorkflow extends Migration
{
public function description()
{
return 'Remove "editor" from list of configurable workflows';
}

public function up()
{
$db = DBManager::get();

$db->exec("ALTER TABLE `oc_workflow_config`
MODIFY `used_for` enum('schedule','upload','studio','delete') CHARACTER SET latin1 COLLATE latin1_bin
");

$db->exec("DELETE FROM `oc_workflow_config` WHERE `used_for` NOT IN ('schedule','upload','studio','delete')");

SimpleOrMap::expireTableScheme();
}

public function down()
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,5 @@ REPLACE INTO `oc_workflow_config` (`id`, `config_id`, `used_for`, `workflow_id`)
(2, 1, 'upload', 6),
(3, 1, 'studio', 6),
(4, 1, 'delete', 1),
(5, 1, 'subtitles', 9);

SET FOREIGN_KEY_CHECKS=1;
1 change: 0 additions & 1 deletion vueapp/components/Config/WorkflowOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export default {
(
wf['tag'] === wf_conf['used_for']
|| wf['tag'] === 'upload' && wf_conf['used_for'] === 'studio'
|| wf['tag'] === 'archive' && wf_conf['used_for'] === 'subtitles'
)
) {
options.push({
Expand Down