elan-ev / studip-opencast-plugin

This is an Stud.IP plugin for Opencast
https://elan-ev.github.io/studip-opencast-plugin/
GNU General Public License v2.0
9 stars 22 forks source link

Show correct author in Stud.IP #913

Closed tibroc closed 6 months ago

tibroc commented 7 months ago

Currently the author of the event shown in Stud.IP is apparently the user of the last workflow in opencast:

image

This should be the author of the event in Stud.IP.

In this example Manuel is the only user not "administrator" because he has an actual respective Opencast user. Also the Author name is only set by a later cronjob instead of setting it directly (it should be known from the beginning).

dennis531 commented 7 months ago

Related https://github.com/elan-ev/studip-opencast-plugin/issues/903

dennis531 commented 7 months ago

It seems that Opencast saves the Dublin Core entry creator under presenter in the metadata. Thus, no creator is delivered in the requested event, but the creator can be found under presenter.

Example Upload dublin core in SOP:

<?xml+version="1.0"+encoding="UTF-8"?>
<dublincore+xmlns="http://www.opencastproject.org/xsd/1.0/dublincore/"+xmlns:dcterms="http://purl.org/dc/terms/"+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<dcterms:creator>root@studip</dcterms:creator>
<dcterms:contributor>Dennis+Benz+</dcterms:contributor>
<dcterms:subject>Medienupload,+Stud.IP</dcterms:subject>
<dcterms:created+xsi:type="dcterms:W3CDTF">2024-01-26T15:47:00.000Z</dcterms:created>
<dcterms:description></dcterms:description>
<dcterms:language><![CDATA[]]></dcterms:language>
<dcterms:title>Test+WF</dcterms:title>
<dcterms:isPartOf></dcterms:isPartOf></dublincore>

Event from Opencast:

object(stdClass)#383 (23) {
  ["identifier"]=>
  string(36) "8f783502-d36e-4b33-8ddd-196fedd08a67"
  ["creator"]=>
  string(0) ""
  ["presenter"]=>
  array(1) {
    [0]=>
    string(11) "root@studip"
  }
  ["created"]=>
  string(20) "2024-01-26T15:47:00Z"
  ["is_part_of"]=>
  string(0) ""
  ["subjects"]=>
  array(2) {
    [0]=>
    string(12) "Medienupload"
    [1]=>
    string(7) "Stud.IP"
  }
  ["start"]=>
  string(20) "2024-01-26T15:47:00Z"
  ["description"]=>
  string(0) ""
  ["language"]=>
  string(0) ""
  ["source"]=>
  string(0) ""
  ["title"]=>
  string(7) "Test WF"
  ["processing_state"]=>
  string(9) "SUCCEEDED"
  ["duration"]=>
  NULL
  ["license"]=>
  string(0) ""
  ["archive_version"]=>
  int(3)
  ["contributor"]=>
  array(1) {
    [0]=>
    string(11) "Dennis Benz"
  }
  ["series"]=>
  string(0) ""
  ["has_previews"]=>
  bool(true)
  ["location"]=>
  string(0) ""
  ["rightsholder"]=>
  string(0) ""
  ["publication_status"]=>
  array(2) {
    [0]=>
    string(8) "internal"
    [1]=>
    string(13) "engage-player"
  }
  ["status"]=>
  string(30) "EVENTS.EVENTS.STATUS.PROCESSED"
  ["publications"]=>
  array(1) {
    [0]=>
    object(stdClass)#389 (7) {
      ["metadata"]=>
      array(1) {
        [0]=>
        object(stdClass)#384 (7) {
          ["flavor"]=>
          string(18) "dublincore/episode"
          ["size"]=>
          int(-1)
          ["checksum"]=>
          string(0) ""
          ["id"]=>
          string(36) "71493609-bab4-4a5a-b172-d91a947565d1"
          ["mediatype"]=>
          string(8) "text/xml"
          ["url"]=>
          string(146) "http://localhost:8080/static/mh_default_org/engage-player/8f783502-d36e-4b33-8ddd-196fedd08a67/57721800-112c-4afd-8472-d1ef2cfaf572/dublincore.xml"
          ["tags"]=>
          array(1) {
            [0]=>
            string(7) "archive"
          }
        }
      }
      ["attachments"]=>
      array(5) {
        [0]=>
        object(stdClass)#387 (8) {
          ["flavor"]=>
          string(26) "presenter/timeline+preview"
          ["ref"]=>
          string(42) "track:753f5122-87bb-4541-a9a6-667199a26288"
          ["size"]=>
          int(-1)
          ["checksum"]=>
          string(0) ""
          ["id"]=>
          string(36) "133ac0a9-ecb7-4ebf-ad26-71a1e95737a0"
          ["mediatype"]=>
          string(9) "image/png"
          ["url"]=>
          string(226) "http://localhost:8080/static/mh_default_org/engage-player/8f783502-d36e-4b33-8ddd-196fedd08a67/12b7de0f-412b-4829-8636-924d759cc387/3c3757bc-6af9-4b67-b471-f07466e5b0ee_5aac31f7-5fe7-47f1-b42d-f4d03950c88e_timelinepreviews.png"
          ["tags"]=>
          array(1) {
            [0]=>
            string(15) "engage-download"
          }
        }
        [1]=>
        object(stdClass)#386 (8) {
          ["flavor"]=>
          string(22) "presenter/feed+preview"
          ["ref"]=>
          string(42) "track:753f5122-87bb-4541-a9a6-667199a26288"
          ["size"]=>
          int(1115)
          ["checksum"]=>
          string(0) ""
          ["id"]=>
          string(36) "4d610ff2-4cc7-4ce9-8743-00e8c69c45ce"
          ["mediatype"]=>
          string(10) "image/jpeg"
          ["url"]=>
          string(184) "http://localhost:8080/static/mh_default_org/engage-player/8f783502-d36e-4b33-8ddd-196fedd08a67/a7de35f8-70e4-4ed1-bf3c-96ca89c14e5c/3c3757bc-6af9-4b67-b471-f07466e5b0ee_3.000s-feed.jpg"
          ["tags"]=>
          array(2) {
            [0]=>
            string(4) "atom"
            [1]=>
            string(3) "rss"
          }
        }
        [2]=>
        object(stdClass)#382 (8) {
          ["flavor"]=>
          string(22) "security/xacml+episode"
          ["ref"]=>
          string(0) ""
          ["size"]=>
          int(-1)
          ["checksum"]=>
          string(0) ""
          ["id"]=>
          string(36) "d69a4435-b8e1-4fe0-989b-8da7f9aa7cf6"
          ["mediatype"]=>
          string(8) "text/xml"
          ["url"]=>
          string(139) "http://localhost:8080/static/mh_default_org/engage-player/8f783502-d36e-4b33-8ddd-196fedd08a67/232b1913-64c1-44f7-907d-01f5e3ce1a1a/acl.xml"
          ["tags"]=>
          array(1) {
            [0]=>
            string(7) "archive"
          }
        }
        [3]=>
        object(stdClass)#393 (8) {
          ["flavor"]=>
          string(24) "presenter/search+preview"
          ["ref"]=>
          string(42) "track:753f5122-87bb-4541-a9a6-667199a26288"
          ["size"]=>
          int(2040)
          ["checksum"]=>
          string(0) ""
          ["id"]=>
          string(36) "426caf6d-2465-451e-80ad-3fa2c8fcb60a"
          ["mediatype"]=>
          string(10) "image/jpeg"
          ["url"]=>
          string(186) "http://localhost:8080/static/mh_default_org/engage-player/8f783502-d36e-4b33-8ddd-196fedd08a67/06131aa6-8878-478d-b58c-ebfec314bd21/3c3757bc-6af9-4b67-b471-f07466e5b0ee_3.000s-search.jpg"
          ["tags"]=>
          array(1) {
            [0]=>
            string(15) "engage-download"
          }
        }
        [4]=>
        object(stdClass)#390 (8) {
          ["flavor"]=>
          string(24) "presenter/player+preview"
          ["ref"]=>
          string(0) ""
          ["size"]=>
          int(-1)
          ["checksum"]=>
          string(0) ""
          ["id"]=>
          string(36) "868ce6a2-5565-49f4-b055-3ccc79ad8dca"
          ["mediatype"]=>
          string(9) "image/png"
          ["url"]=>
          string(146) "http://localhost:8080/static/mh_default_org/engage-player/8f783502-d36e-4b33-8ddd-196fedd08a67/9a26c88c-58f3-433d-80b7-1af01b32f12c/coverimage.png"
          ["tags"]=>
          array(1) {
            [0]=>
            string(15) "engage-download"
          }
        }
      }
      ["channel"]=>
      string(13) "engage-player"
      ["id"]=>
      string(36) "514dc16e-d0fb-411f-8a51-1d663490a437"
      ["media"]=>
      array(3) {
        [0]=>
        object(stdClass)#301 (18) {
          ["has_audio"]=>
          bool(false)
          ["framerate"]=>
          float(25)
          ["description"]=>
          string(0) ""
          ["bitrate"]=>
          float(453817)
          ["is_master_playlist"]=>
          bool(false)
          ["url"]=>
          string(172) "http://localhost:8080/static/mh_default_org/engage-player/8f783502-d36e-4b33-8ddd-196fedd08a67/8de98d0c-3592-46bd-8ee5-e1b29668488f/3c3757bc-6af9-4b67-b471-f07466e5b0ee.mp4"
          ["has_video"]=>
          bool(true)
          ["tags"]=>
          array(3) {
            [0]=>
            string(13) "1080p-quality"
            [1]=>
            string(15) "engage-download"
            [2]=>
            string(16) "engage-streaming"
          }
          ["flavor"]=>
          string(18) "presenter/delivery"
          ["duration"]=>
          int(120560)
          ["size"]=>
          int(6874780)
          ["framecount"]=>
          int(3014)
          ["checksum"]=>
          string(38) "174669517b000e50ee5f02ccea937bca (md5)"
          ["width"]=>
          int(1920)
          ["is_live"]=>
          bool(false)
          ["id"]=>
          string(36) "14e5944c-eaa9-4de1-8fb5-e0c5781f7a6e"
          ["mediatype"]=>
          string(9) "video/mp4"
          ["height"]=>
          int(1080)
        }
        [1]=>
        object(stdClass)#392 (18) {
          ["has_audio"]=>
          bool(false)
          ["framerate"]=>
          float(25)
          ["description"]=>
          string(0) ""
          ["bitrate"]=>
          float(241812)
          ["is_master_playlist"]=>
          bool(false)
          ["url"]=>
          string(172) "http://localhost:8080/static/mh_default_org/engage-player/8f783502-d36e-4b33-8ddd-196fedd08a67/888de2dc-05ad-41c3-b069-34395903556f/3c3757bc-6af9-4b67-b471-f07466e5b0ee.mp4"
          ["has_video"]=>
          bool(true)
          ["tags"]=>
          array(3) {
            [0]=>
            string(12) "720p-quality"
            [1]=>
            string(15) "engage-download"
            [2]=>
            string(16) "engage-streaming"
          }
          ["flavor"]=>
          string(18) "presenter/delivery"
          ["duration"]=>
          int(120560)
          ["size"]=>
          int(3680135)
          ["framecount"]=>
          int(3014)
          ["checksum"]=>
          string(38) "5c7c1e564e3421349d89a3a247527b49 (md5)"
          ["width"]=>
          int(1280)
          ["is_live"]=>
          bool(false)
          ["id"]=>
          string(36) "5ba15ba2-8c17-4111-9ea2-20bf651eeef4"
          ["mediatype"]=>
          string(9) "video/mp4"
          ["height"]=>
          int(720)
        }
        [2]=>
        object(stdClass)#394 (18) {
          ["has_audio"]=>
          bool(false)
          ["framerate"]=>
          float(25)
          ["description"]=>
          string(0) ""
          ["bitrate"]=>
          float(142007)
          ["is_master_playlist"]=>
          bool(false)
          ["url"]=>
          string(172) "http://localhost:8080/static/mh_default_org/engage-player/8f783502-d36e-4b33-8ddd-196fedd08a67/05783920-9e55-4b6b-8b22-7278d77d6a68/3c3757bc-6af9-4b67-b471-f07466e5b0ee.mp4"
          ["has_video"]=>
          bool(true)
          ["tags"]=>
          array(3) {
            [0]=>
            string(12) "480p-quality"
            [1]=>
            string(15) "engage-download"
            [2]=>
            string(16) "engage-streaming"
          }
          ["flavor"]=>
          string(18) "presenter/delivery"
          ["duration"]=>
          int(120560)
          ["size"]=>
          int(2176350)
          ["framecount"]=>
          int(3014)
          ["checksum"]=>
          string(38) "b85a0c979a90514fc68d37b7f74a4950 (md5)"
          ["width"]=>
          int(854)
          ["is_live"]=>
          bool(false)
          ["id"]=>
          string(36) "2342a225-beed-49cd-9d0d-39dd07a7e175"
          ["mediatype"]=>
          string(9) "video/mp4"
          ["height"]=>
          int(480)
        }
      }
      ["mediatype"]=>
      string(9) "text/html"
      ["url"]=>
      string(63) "http://localhost:8080/play/8f783502-d36e-4b33-8ddd-196fedd08a67"
    }
  }
}

Possible solutions:

  1. Ignore Opencast's author value if video has auhor
    • Problem: Could lead to inconsistent data
  2. or use presenter for author
    • Problems: editable and multiple values

I prefer first solution as studip should know the uploader of the video. But this doesn't work for opencast studio recordings.

Edit: Alternatively, we could remove the author and add presenters in the plugin. The plugin would then show presenters and contributors for each video.

dennis531 commented 7 months ago

Note about the name flows: grafik

tgloeggl commented 7 months ago
dennis531 commented 7 months ago

Concept: