ndunand / moodle-mod_opencast

OpenCast module for Moodle
8 stars 6 forks source link

channel not found error if ACL was just set #7

Open ndunand opened 5 years ago

ndunand commented 5 years ago

To reproduce:

  1. Alice adds mod_opencast activity instance (new series) to an existing Moodle course in which Bob is teacher
  2. Bob now clicks on the activity (this causes Bob to be added to the series ACL)
  3. Bob now clicks on activity settings
  4. Bob sees a message claiming that the linked series cannot be found or does not exist OpenCast

OpenCast logs:

"PUT /api/series/#####/acl HTTP/1.1" 200 545 "-" "-"
"GET /api/series/#####/acl HTTP/1.1" 200 398 "-" "-"
"GET /api/events?filter=series:##### HTTP/1.1" 200 2 "-" "-"

This happens in step 2 when Bob accesses the series.

The problem: The OpenCast API is asynchronous so the ACL change will not be available immediately so when reading the series' ACL back, this might still return the series ACL without Bob being added. To make it worse, the result is cached by the Moodle plugin so reloading the page won’t help.

ndunand commented 5 years ago

Possible fix: