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

Workflow configuration panel during upload #390

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

ferishili
Copy link
Contributor

This PR fixes #389,

Requirements:

Description

This PR is the feature request, by which teachers would have the ability to decide further upload process options provided in workflow configuration panel and set and pass them to the upload process.
In simple words, this PR provides the upload workflow configuration panels on the upload page to get user defined values, then pass those values to the workflow to process the uploaded video accordingly.

Settings

There are 2 new settings options added:

  1. Show workflow configurations during upload (enableuploadwfconfigpanel) : This is the feature activation setting, by which admins could enable/disable this feature!
  2. Allowed upload workflow configurations (alloweduploadwfconfigs) : With this setting, admins could set which config panel elements are allowed to be shown in the upload page, it is a comma-separated list of element ids.
    Leaving it empty means all elements would be shown!

Upload Page:

When all above mentioned requirements and settings are correctly set and configured, there will be a new section right after Event Visibility called Processing Settings in the upload page.
In this sections, every (allowed) element that is provided in the workflow config panel will be converted to moodle form element and shown to the teachers.

IMPORTANT TO KNOW (Standards):

  • As of now the supported html elements are:
    • select
    • input (text)
    • input (checkbox)
    • input (radio)
    • input (datetime/date)
    • input (number)
  • There is no possibility to support any inline JavaScript/JQuery code block!
  • Each element must have an id attribute
  • Each element should have a specific label element with attribute (for="{element-id}") containing the descriptive text (title) for the element.
    • If not provided, the system looks for the first preceding-forwarding sibiling label element
    • If any of the above are presented, the system will look for the first label element of the parent element.

Technical

This PR adds two new columns into block_opencast_uploadjob table:

  • workflowconfiguration: This field contains the user defined (dynamic) workflow configuration values as JSON string.
  • workflowid: This field contains the initial upload workflow id (retrievable only with ingest)
    Because of this two new addition this PR requires a plugin version increase, please be advised while testing this PR!

Testing:

To test this PR you would need:

  • tool_opencast plugin > Upgrade Opencast PHP Library to 1.8.0 + Api Version setting (OC 16 Support) + Moodle 4.4 Required Changes moodle-tool_opencast#63
  • Use the default "schedule-and-upload" workflow or an upload workflow that has config panel: the default workflow is shipped with straightToPublishing config panel element.
  • Make sure that Workflow to start after upload (uploadworkflow) setting option is configured accordingly.
  • in plugin admin setting set the following:
    • Show workflow configurations during upload (enableuploadwfconfigpanel)
    • Allowed upload workflow configurations (alloweduploadwfconfigs)
  • in upload page:
    • Single upload and Batch upload try to locate the new section "Processing Settings" and see/change workflow configration panel elements.
    • Try to perform uploads in both single and batch modes with different workflow config panel parameters.

NOTE:

this PR is using oc-16-support branch from tool_opencast plugin in its moodle-ci file, which is the exact copy of this PR: Opencast-Moodle/moodle-tool_opencast#63
When that PR is merged and a new version is out the branch-tool-plugin: oc-16-support has to be set back to master!

@ferishili ferishili added enhancement has behat The feature contains behat testing scenarios or modified existing ones feature has phpunit The changes also include PHPUnit tests labels Oct 1, 2024
@ferishili ferishili self-assigned this Oct 1, 2024
@ferishili
Copy link
Contributor Author

IDEAS & FEEDBACK from Community meeting:

  • configuration_panel_json is the way to go for the next releases of opencast
  • Set parameters globally => in favor of not adding more settings, this option has to be taken care of in the workflow itself!

@mwuttke
Copy link

mwuttke commented Nov 20, 2024

In my test environment, based on the lms-community-integration from @mtneug, calling up the processing settings in the single and in the batch upload page worked so far. However, as I did not add any further workflows in Opencast, I could not test several possibilities to upload process to the end.

@bluetom bluetom requested review from bluetom and removed request for justusdieckmann November 22, 2024 08:31
@bluetom bluetom added the 4.5.1 label Nov 22, 2024
@mwuttke
Copy link

mwuttke commented Nov 23, 2024

In my test environment the PR works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.5.1 enhancement feature has behat The feature contains behat testing scenarios or modified existing ones has phpunit The changes also include PHPUnit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Offering workflow configurations when uploading a video
3 participants