learnweb / moodle-repository_owncloud

[ARCHIVE] Starting Moodle 3.6, our plugin ships with Moodle! :tada: Use this:
https://docs.moodle.org/en/Nextcloud_repository
GNU General Public License v3.0
8 stars 8 forks source link

Undefined index: username #18

Closed jonlan closed 7 years ago

jonlan commented 7 years ago

I installed the required versions of moodle and owncloud on a local vmware with self generated SSL certificates. Everything looks good.

While trying to connect a system account i receive the following message:

"Undefined index: username in /var/www/html/moodle/lib/classes/oauth2/api.php"

Full message: Debug info: username: Required field Error code: invalidpersistenterror $a contents: Required field Stack trace:

line 467 of /lib/classes/persistent.php: core\invalid_persistent_exception thrown
line 760 of /lib/classes/oauth2/api.php: call to core\persistent->create()
line 137 of /admin/tool/oauth2/issuers.php: call to core\oauth2\api::connect_system_account()

Output buffer:
Notice: Undefined index: username in /var/www/html/moodle/lib/classes/oauth2/api.php on line 756

Dagefoerde commented 7 years ago

Hi Jonas, the repository plugin does not require a system account. If you want to get that to work, you need to add a userinfo_endpoint that calls the cloud/user function of OCS. However, even if you get it connected, the plugin does not interact with it. Therefore I think it's best to not even configure it. Cheers!