ronefel / moodle-mod_googlemeet

Google Meet resource module plugin for Moodle 3.7+
Other
19 stars 15 forks source link

Error when Sync with Google Drive because of multiple folder named "Meet Recordings" shared from different account #11

Closed mmn6d6d6e closed 3 years ago

mmn6d6d6e commented 3 years ago

Step to reproduce:

  1. create the activity using user b@gmail.com
  2. from another account (a@gmail.com), share a folder named "Meet Recordings" to b@gmail.com
  3. Sync with Google Drive
  4. Error: Is not possible to synchronize with an account other than the one that created the room.

Cause of problem:

https://github.com/ronefel/moodle-mod_googlemeet/blob/master/amd/src/view.js#L284 It only reads and checks the first data.

Possible solution:

  1. Using a loop to check all data instead of only check the first data
  2. Optionally update https://github.com/ronefel/moodle-mod_googlemeet/blob/master/amd/src/view.js#L277 to make it only return data with owner email matched the user email.