Giter Club home page Giter Club logo

moodle-repository_owncloud's Introduction

ownCloud Repository Plugin for Moodle

Build Status Coverage Status

This plugin enables Moodle users to have direct access to their private files from ownCloud/Nextcloud in the Moodle file picker and the URL resource module, enabling to upload files into Moodle directly from their ownCloud/Nextcloud, without having to download it to their local machine first.

Is your institution using multiple ownCloud servers? Don't worry, a Moodle administrator can connect multiple ownCloud servers that are then presented separately to the users. They can't add their own ownCloud servers, though.

This plugin has originally been developed for ownCloud, but works with Nextcloud just as well. For simplicity we will refer to both as "ownCloud".

Acknowledgement: This plugin was originally created by Information Systems students of the project seminar sciebo@Learnweb at the University of Münster in 2016-17; see https://github.com/pssl16 for an archive(!) of their great work. Learnweb (University of Münster) took over maintenance in 2017.

Installation

Installing this plugin is a relatively technical endeavour. If you run into problems, please have a look at the Troubleshooting section in the Moodle Wiki page of this plugin. Maybe your issue is covered there.

This plugin requires configuration in ownCloud (add Moodle as an allowed client) as well as in Moodle (add ownCloud servers to which users will be able to connect).

1. Add Moodle as a client to ownCloud

Prerequisites: Current ownCloud installation (recommended: version 10.0.1+) with enabled HTTPS and the oauth2 ownCloud app. Alternatively, a current Nextcloud installation (recommended: version 13.0.1+) on HTTPS.

Log in as an administrator. Go to Settings ► User authentication and add your Moodle installation as a client:

Name Redirection URI
Your Moodle name Your Moodle URL + /admin/oauth2callback.php

For example, if your users reach Moodle at https://moodle.example.com, your redirection URI would be https://moodle.example.com/admin/oauth2callback.php. The name can be chosen freely, but note that it will presented to ownCloud users, so the name should be self-explanatory to them.

After adding the client, the table displays a corresponding Client Identifier and a secret. Those will be required for the configuration in Moodle, so keep them at hand.

2. Install this plugin to Moodle

Copy the content of this repository to repository/owncloud. No additional settings are displayed to the admin when installing the plugin. However, when the repository is enabled, the admin has to select an issuer which defines the ownCloud server.

The next steps describe how the necessary issuer is created in Moodle's central OAuth 2 services settings. Afterwards, an ownCloud repository instance is created using that issuer.

3. Create OAuth 2 Issuer

You need to configure Moodle so that it knows how to talk to your ownCloud server. For this, a so-called OAuth 2 issuer has to be registered in the admin menu Site administration ► Server ► OAuth 2 services. There, select Create custom service.

Choose the name freely; it will only be shown to you. Enter ClientID and Secret from the ownCloud settings of step 1. Enable the "Authenticate token requests via HTTP headers" checkbox. As Service base URL, enter the full URL to your ownCloud installation, including a custom port (if any). For example, if the ownCloud installation is at https://owncloud.example.com:8000/oc/, then this is the base URL. Ignore the other settings and click Save changes.

Afterwards, your issuer is listed in a table. There, click Configure endpoints to configure the services that we want to use, as ownCloud does not support auto discovery. For the ownCloud Repository plugin four endpoints have to be registered that are ownCloud-specific:

Endpoint name Endpoint URL
token_endpoint Base URL + /index.php/apps/oauth2/api/v1/token
authorization_endpoint Base URL + /index.php/apps/oauth2/authorize
webdav_endpoint Base URL + /remote.php/webdav/
ocs_endpoint Base URL + /ocs/v1.php/apps/files_sharing/api/v1/shares
userinfo_endpoint Base URL + /ocs/v2.php/cloud/user?format=json
Remark: Previously, an additional parameter in the ocs_endpoint URL was listed (?format=xml). This is no longer necessary, however, having the parameter set would not result in any problems either.

Given the Base URL example above, an exemplary token_endpoint URL is https://owncloud.example.com:8000/oc/index.php/apps/oauth2/api/v1/token.

Return to the issuer overview and click on Configure user field mappings. Enter the following mappings:

External field name Internal field name
ocs-data-email email
ocs-data-id username

This is sufficient to use basic functionality of the ownCloud repository!

Optional: If you want to use access controlled links, you also need to connect a system account. This must be an ownCloud account that does not belong to a particular person. Instead, it should be owned by Moodle. First, create such an account in ownCloud or ask your ownCloud administrator to do so. Choose a strong, ideally random password and do not give it to someone else who is not an administrator of your Moodle. Afterwards, in the issuer overview, click on Connect to a system account. Make sure that you are logged in to ownCloud with that account and Authorize Moodle. You should then be back in the issuer overview, where you can verify that you connected the right account by checking its username. (In your browser, log out of ownCloud now to avoid using the system account by accident.) Also, do not change the system account after the plugin has been used. This will break all access controlled links that were created prior to a change.

For further information on configuring OAuth 2 clients visit the Moodle documentation on OAuth 2.

4. Create a repository instance

Now that the ownCloud issuer is configured, it can be associated with an instance of the repository. Go to the repository settings Site administration ► Plugins ► Repositories ► Manage repositories and enable the ownCloud respository (Enabled and visible). When asked for special user permissions, do not check any boxes. As they may not configure OAuth 2 issuers, these permissions are not that useful. Then, open the Settings of the ownCloud repository and click Create a repository instance. Enter a name that will be displayed to Moodle users and select the configured issuer. A text underneath the select box tells you which issuers are suited for use with this repository. If your issuer does not show up, double-check the issuer settings; particularly all URLs (base URL and endpoints) and the names of the endpoints.

Instance configuration form

You can also define the Name of folder that will show up in users' private file storage once they open access controlled links: A share in ownCloud will always result in a file showing up at the user, so this is where that file will go in order to avoid cluttering their document root.

The dropdowns allow you to define how the repository may interact with files: Supported files allows you to restrict usage of the repository, i.e., to allow linking ("external") only or upload ("internal") only, but you can also allow unrestricted usage. If Internal and external is selected, you can define the default type presented to users.

Afterwards, everything is configured and ready to go! Let's see what this looks like for your users:

User View

The repository is available in all activities where the file picker is used. However, course admins can disable it in the Course Administration ► Repositories menu.

In the file picker a login button is displayed (assuming that the user is not authenticated yet):

File picker login

When the button is clicked a pop-up window or a new tab is opened and the user will be requested to login at the ownCloud instance and authorise access from Moodle. If authorisation is granted, the user sees a tabular listing of the files available:

File picker

Here the user can select files, reload the content and logout. The settings button opens the ownCloud web interface in a new window so that you can manage your files easily.

Hints for Developers and Contributors

The plugin uses Moodle's OAuth 2 API that was added in Moodle 3.3.

It makes use of a slightly modified version of Moodle's webdav_client (lib/webdavlib.php) that was extended to incorporate OAuth-2-authenticated requests. The modified version is the class repository_owncloud\owncloud_client; the effective differences to the original webdavlib.php are described by the patch in classes/webdavlib.php.diff.

Additional information can be found in our original documentation (in German).

moodle-repository_owncloud's People

Contributors

dagefoerde avatar joneug avatar katharinameyer avatar ninaherrmann avatar walsidalw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

moodle-repository_owncloud's Issues

"Link to file directly" or "Create an alias..."

I'm unsure about the difference.

I use Moodle 3.5.1 with the latest version of the great plugin.
If I use "Link to file directly" every change to a text or image or changing the folder of a linked file in the Nextcloud folder will be represented in Moodle. So it is very flexible.

OK. The links are different, one like described directly to the file with the Nextcloud URL, the other as a Moodle link.
As far as I tested, changes to the source file are changed the file in Moodle with both methods also.

What exactly is the difference to "Create an Alias/Link...."
Or, what is the best strategy?

Ah, OK I see. Aliases aren't restored in other Moodle's, if I transferred a course, direct links (clearly) yes. So, it is a Moodle behavior, not dependent on the NextCloud plugin.

So, my question is easy:
Is it the wanted behavior as I described it above?

Thanks and best regards
Andreas

Strange behaviour this plugin vs plugin available in moodle 3.7.1

Hello,

I use moodle 3.7.1 and last version of nextcloud.
I configured oAuth2, and all required parameters to use nextcloud in moodle
I want to link to nextcloud files and do not want to have them inside moodle.

Unable to get it with nextcloud plugin embedded in moodle

I tryed moodle demo site with nextcloud demo site to be sure that the problem was not from my platform

Strange thing :
with moodle nexcloud plugin I do not have the option to use link to nexcloud file
I have "create a file copy"
moodle-nextcloud-link_KO

With this plugin I have the option and all is working fine
(create a file alias == link)

moodle-nextcloud-link_OK

The link option (alias in screenshot) is not avaialble in nextcloud moodle plugin ?!!

I set parameters for boths in the same way

Any idea ?

Thanks !

Oauth not found in marketplace

I am using owncloud 10.0 on ubuntu 16.04 with owncloud standard edition. Should this configuration work?
Oauth app is not shown in my marketplace.

Do I have to manually install the Oauth app (e.g. from https://github.com/owncloud/oauth2) or should this be available with standard (not enterprise) edition?

Authentication seems to have succeeded, but the filepicker shows "There are no files"

Hallo,

I tried to bring Moodle and Nextcloud together for our school. I followed the installation instructions and everything seemed to work. But unfortunately the filepicker shows me that no files are available. But there are files available. Both Nextcloud (13.0.6) and Moodle (3.5.1+) are fresh and run on an equally fresh Ubuntu 18.04.
Webserver: nginx
PHP: PHP 7.2.7-0ubuntu0.18.04.2

I've got this in the access.log:

*.*.*.* - - [03/Sep/2018:18:04:16 +0200] "GET /index.php/apps/oauth2/authorize?client_id=gahglhvuiaehggvfheruicfhha&response_type=code&redirect_uri=https%3A%2F%2Fmoodle.example.com%2Fadmin%2Foauth2callback.php&state=%2Frepository%2Frepository_callback.php%3Fcallback%3Dyes%26repo_id%3D8%26sesskey%3Dpx8XbmNNJG&scope=openid%20profile%20email%20files%20ocs HTTP/2.0" 303 0 "https://moodle.example.com/user/files.php" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
*.*.*.* - - [03/Sep/2018:18:04:16 +0200] "GET /login/flow?clientIdentifier=gahglhvuiaehggvfheruicfhha HTTP/2.0" 200 3225 "https://moodle.example.com/user/files.php" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
*.*.*.* - - [03/Sep/2018:18:04:17 +0200] "GET /apps/theming/js/theming?v=0 HTTP/2.0" 499 0 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
*.*.*.* - - [03/Sep/2018:18:04:17 +0200] "GET /cron.php HTTP/2.0" 200 40 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
*.*.*.* - - [03/Sep/2018:18:04:24 +0200] "GET /login/flow/redirect?oauthState=/repository/repository_callback.php%3Fcallback%3Dyes%26repo_id%3D8%26sesskey%3Dpx8XbmNNJG&stateToken=dskghaihgshgjkghhal&clientIdentifier=gahglhvuiaehggvfheruicfhha HTTP/2.0" 303 0 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
*.*.*.* - - [03/Sep/2018:18:04:24 +0200] "GET /login?redirect_url=/login/flow/redirect%3FoauthState%3D/repository/repository_callback.php%253Fcallback%253Dyes%2526repo_id%253D8%2526sesskey%253Dpx8XbmNNJG%26stateToken%3Ddskghaihgshgjkghhal%26clientIdentifier%3Dgahglhvuiaehggvfheruicfhha HTTP/2.0" 200 3658 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
*.*.*.* - - [03/Sep/2018:18:04:24 +0200] "GET /js/core/merged-login.js?v=d746e7e0-0 HTTP/2.0" 499 0 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
*.*.*.* - - [03/Sep/2018:18:04:24 +0200] "GET /cron.php HTTP/2.0" 200 40 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
*.*.*.* - - [03/Sep/2018:18:04:26 +0200] "POST /login?redirect_url=/login/flow/redirect%3FoauthState%3D/repository/repository_callback.php%253Fcallback%253Dyes%2526repo_id%253D8%2526sesskey%253Dpx8XbmNNJG%26stateToken%3Ddskghaihgshgjkghhal%26clientIdentifier%3Dgahglhvuiaehggvfheruicfhha HTTP/2.0" 303 0 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
*.*.*.* - - [03/Sep/2018:18:04:26 +0200] "GET /login/flow/redirect?oauthState=/repository/repository_callback.php?callback=yes&repo_id=8&sesskey=px8XbmNNJG&stateToken=dskghaihgshgjkghhal&clientIdentifier=gahglhvuiaehggvfheruicfhha HTTP/2.0" 200 3029 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
*.*.*.* - - [03/Sep/2018:18:04:27 +0200] "POST /login/flow HTTP/2.0" 303 0 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
*.*.*.* - - [03/Sep/2018:18:04:27 +0200] "GET /admin/oauth2callback.php?state=%2Frepository%2Frepository_callback.php%3Fcallback%3Dyes%26repo_id%3D8%26sesskey%3Dpx8XbmNNJG&code=sajkdghahgavhvjah HTTP/2.0" 303 673 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
2a02:c207:3002:8656::1 - gahglhvuiaehggvfheruicfhha [03/Sep/2018:18:04:28 +0200] "POST /index.php/apps/oauth2/api/v1/token HTTP/1.1" 200 287 "-" "MoodleBot/1.0"
*.*.*.* - - [03/Sep/2018:18:04:28 +0200] "GET /repository/repository_callback.php?callback=yes&repo_id=8&sesskey=px8XbmNNJG&oauth2code=sajkdghahgavhvjah HTTP/2.0" 200 435 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
*.*.*.* - - [03/Sep/2018:18:04:28 +0200] "GET /favicon.ico HTTP/2.0" 404 162 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
*.*.*.* - - [03/Sep/2018:18:04:28 +0200] "POST /repository/repository_ajax.php?action=list HTTP/2.0" 200 203 "https://moodle.example.com/user/files.php" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"

I've attached the Nginx-Conf for both Nextcloud and Moodle. Am I doing something wrong?

cloud.example.txt
moodle.example.txt

Concentrate path handling responsibility into owncloud_client

Path handling is currently split between lib.php and classes/owncloud_client.php. In my opinion, only the latter should be concerned with subpath handling for
a) locating the base of an owncloud installation (e.g. /owncloud/)
b) locating the WebDAV base within an installation (e.g. /remote.php/webdav/).

As both are part of the WebDAV's ls() / PROPFIND responses, get_listing still processes these elements out in lib.php. This should be moved into classes/owncloud_client.php (elegantly, if possible :) ).

----- OLD TEXT (for archiving purposes) -------
Currently, weird slashes are happening:
[Sat Jul 8 20:11:08 2017] 172.17.0.4:47420 [207]: /remote.php/webdav///
[Sat Jul 8 20:11:13 2017] 172.17.0.4:47452 [200]: /remote.php/webdav//Manual.pdf
[Sat Jul 8 20:11:29 2017] 172.17.0.4:47502 [207]: /remote.php/webdav///

Also, handling of paths and subpaths should completely be moved into owncloud_client. The repository should not need to care about this.

Currently, problems occur if ownCloud/Nextcloud is installed in a subdirectory; the current code cannot handle this (assumes a root dir installation only).

"A request to ownCloud has failed: Invalid response" when linking to files in Nextcloud

(If you are an administrator: See the quick fix at the end!)

Nextcloud's OCS API implementation returns XML by default, but also honours the Accept: header. We accidentally send this header with Accept: application/json, so the resulting format is unexpected.
This is caused by Moodle core (https://github.com/moodle/moodle/blob/20cb5f40868186fd7310c897f52120447c113c08/lib/oauthlib.php#L631), as application/json is the default content type which is unchanged. The declared response type (

'response' => 'text/xml'
) is ignored.

For reference, these headers are sent:

‌array (
  0 => 'Content-type: multipart/form-data',
  1 => 'Authorization: Bearer <>',
  2 => 'Accept: application/json',
)

Quick fix:

  • Change the ocs_endpoint URL by appending ?format=xml, so that the URL looks similar to this: https://demo.nextcloud.com/abcdxyz/ocs/v1.php/apps/files_sharing/api/v1/shares?format=xml. As an administrator, you have to do that yourself. There is no upgrade script to do this for you. Sorry! (The README has been updated accordingly).

Actual fix:

  • Change Moodle core to use the declared response type for the Accept: header of outgoing requests.

There is nothing we can do for our plugin. If someone is willing to contribute a Moodle fix this would be most appreciated.

It should be possible to disable Upload by Reference

Implicitly, creating a file reference means creating a public share on owncloud (instead of a course-private share, would many people might assume).

  • This should be made explicit in some way.
  • Administrators should be able to disable this entirely, because maybe an owncloud admin would refuse to add Moodle as a client, unless creation of public links is prohibited.

[original reporter: @Dagefoerde]

Support multiple instances for multiple hosts

As ownCloud (and Nextcloud) are open systems, it is likely that some institutions have several instances. Currently, this plugin can only connect to one, but Moodle's repository API generally supports creating multiple repository instances.

Our repository should also be able to connect to multiple hosts.

"error/Could not decode JSON token response" with CAS login

Following the instructions, I successfully installed, configured and test this great plugin with Owncloud local user accounts. But for Owncloud CAS users (realized by this plugin), it failed. Steps as below:

  1. Click on "Login to your account" in Moodle, the Owncloud login page shows up;
  2. Click on "CAS Login", login in Owncloud, and then "Authorize", but now:
  3. The popup window redirects to the Moodle page, showing error: error/Could not decode JSON token response. The popup window con not close automatically and shows repository in Moodle.

Edit: I find that for the first time connecting Owncloud from Moodle, it succeeded, but for the second and later time, it always showed this error.

Cannot embed files / Cannot download a linked file from within filepicker (SAMEORIGIN policy)

Due to ownCloud's X-Frame-Options: SAMEORIGIN response header, I am unable to download from a public share if I click on the "Download" button in filepicker. The same URL works if it is posted into the browser's address bar manually.

Could be considered an upstream bug, as the problem is that files are opened in an iframe. However, the underlying issue (SAMEORIGIN policy) affects other functionality as well, such as embedding images using the Atto editor (#34). Therefore, in the end a change in ownCloud/Nextcloud is necessary to facilitate embedding from Moodle.

Issues with migration to nexcloud core plugin

Good Morning,

unfortunately I have some Issues migrating the Settings and Files from the old plugin to the nextcloud plugin. I thought it is about time and we should do it before our update to moodle-4.1.

The thing is that the error messages are not really helpful and I can't figure out what is the real Issue and can't find anything helpful in my server logs.

I have some Details from the moodle Debugging output attached.

migration_issue

The Moodle-Version we use is 3.9. Clustered

Maybe you have an idea what could possibly the problem?

Improve mechanism for linking/referencing files

Right now, a reference is created by generating a public share via ownCloud's OCS API, and redirecting to that link in future requests. That means that anyone who guesses the link can access the file, even though he/she does not have access to the corresponding course.

This works – for now – but can be improved. Have a look at Moodle 3.3's Google Docs / OneDrive repositories for a better way.

This should be done without breaking existing links. Automated transition would be A+, but it suffices if existing links just keep working the way they are.

set up everything according to installation instructions, but unable to connect to onecloud

we have a nextcloud12 set up at our site, and I tried to connect it to moodle using your repository plugin.

I configured everything according to the instructions, when I try to access the repository from the moodle file picker, I first get a "login to your account" button

Once i click the button, a new popup window opens that asks me to grant access to Moodle. After logging in, I get the following error:

**error/Could not upgrade oauth token

×Debug info:
Error code: Could not upgrade oauth token
$a contents:
×Stack trace:
line 555 of /lib/oauthlib.php: moodle_exception thrown
line 469 of /lib/oauthlib.php: call to oauth2_client->upgrade_token()
line 386 of /repository/owncloud/lib.php: call to oauth2_client->is_logged_in()
line 62 of /repository/repository_callback.php: call to repository_owncloud->callback()**

any help would be appreciated

Can only link to files, not to directories

In the web client of ownCloud, it is possible to link to directories, not just files.

Using the Moodle plugin, I cannot link to directories, since as soon as I click on a directory the directory opens and displays its content.

This severely limits the functionality of the Moodle plugin and should be changed

Authentifizierter Nutzer darf kein Repository hinzufügen.

Wenn man als normaler User in den Eingenen Dateien versucht ein Oqncloud-Repository hinzuzufügen erhält man die Meldung: "Sie besitzen derzeit keine Rechte, dies zu tun (ownCloud-Konfiguration). "
Ein Admin kann Repo hinzufügen.
moodle 3.3.2+

Make use of OCS link names

In ownCloud / OCS, public links can be described using a name. That does not (seem to) affect the link, but provides the owner with a description in the list of public shares. We should make use of it, because it explains to file owners why there is a link that they have not created explicitly.

making a copy of a file works, creating an alias/shortcut doesnt

another step ahead, another new problem :)

thanks to all the help here, the plugin works at our site now, and files are displayed, and i can make a copy of a file in a course, BUT

if I try to create an alias to a file:
image

i get this message:
A request to ownCloud has failed: Invalid response
image

any ideas?

set up everything according to installation instructions, no error messages, but no files are displayed

so, in the meantime we upgraded to the latest Moodle build, so in theory everything should work now. When I login directly into my owncloud account, I can see my files just fine.

But when I try to access them from Moodle, it tells me "No files available"

Here is what happens exactly:

  • I select our ownCloud instance in the Moodle file picker
  • I click on "Log in to your account"
  • A popup window opens and asks me to grant access to my account
  • I enter my username and password for owncloud
  • The popup window closes, Moodle tells me "No files available"

Could it be an issue that our test site does not use https? Or might something else be configured incorrectly?

Link to a file not working (e.g. in Atto Editor)

I installed the latest version of the plugin v3.5-r1, Moodle Version 3.4.3+ (Build: 20180524), Nextcloud Version 13.0.4.0

Connection to Nextcloud works fine. If I select a file (e.g. a picture) as copy this works also fine.

However, if I select a file as Alias/Link to file is not embedded into Atto Editor. I checked the access.log from Apache and found out, that the URL seems to be OK. When I copy this URL to a new browser window, the file is downloaded successfully.

In contrast to issue #30 there is no error message shown. The file (picture) is just not displayed. When I switch to HTML mode in Atto it shows the link:

<img src="https://moodle.mydomain.de/draftfile.php/5/user/draft/573702844/filename.png" alt="" width="600" height="300" role="presentation" class="atto_image_button_text-bottom"><br></p>

Re-enable tests that behaved weirdly

431fb92 disables two tests that were odd: They succeeded in Travis builds (and, apparently, on @NinaHerrmann's workstation), but they failed on my workstation, because no exception was thrown at all. Therefore, the assertTrue(false) was reached, which was unexpected.

I was not able to understand how they should behave, because I didn't understand why it asserts that the exception message be "Call to undefined method Mock_MoodleQuickForm_select" (and what is actually tested by this). Therefore, I disabled these tests for the time being.

Undefined index: username

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.