 My name is Jan and I'm with the Moodle team of the University of Minster. And recently we've had quite an interesting development project that is on integrating own cloud and next cloud with Moodle and this is what I'm going to talk about. Let me do a quick show of hands first. Two of you has ever heard about own cloud or next cloud. It has a general idea of what it is. Okay, quite a lot of you who is already using it at the institution or personally. All right, not so many but I hope there will be more. Just for everyone who didn't hear about it yet, probably you know Dropbox. It's a cloud file sharing service where you can put all your files and basically they are wherever you are because you have a mobile app to access them. You can have clients on every computer that you have. And next cloud and own cloud do the same thing but in that sense they are more like Moodle because own cloud and next cloud are open source projects that you can host on premise which means that you can put all your files into your own kind of Dropbox and have it everywhere and take the files with you. But you retain all control about the files which is pretty great. Which is something that especially in Germany is very demanded by many people and by many institutions. Yeah, so this is something that we've tackled in the past months. And well, a little pluck at first to say where we're coming from. Our Moodle installation is called LearnWeb and it's established since 2007 and basically is a thing in everyday life of all our teachers and students right now. Yeah, because we have to use it, oh we are using it for our courses and it's really convenient. And then three years ago, we have a new offering at our university that is called SkiBo, well actually Cybo because it's the science box which is an own cloud installation for the University of Münster but that is also offered for all universities in the states of North and Westphalia. So right now we have, I think actually 28, sorry for the mistake here, 28 institutions that are connected to this own cloud installation that they can use. And I guess there will be more in the next couple of months. Yes, and this is basically what we're trying to do in terms of data protection, in terms of having our files within the institution or at least within the same state of North and Westphalia. And we have a setup that allows for five petabyte of storage capacity and basically every user, every student and teacher is granted 30 gigabytes for free. So that's already more than Dropbox here. And now what we wanted to have because both services are expected to play a key aspect in everyday life of all our staff and students is to have a tight integration between both of them. So that it's easy to use the own cloud service from Moodle. Just to clarify a bit, basically whenever I say own cloud or next cloud, this means that both products from a Moodle perspective are pretty much the same from a technical perspective, of course they aren't anymore, but both basically you share the same histories. So next cloud has started two years ago, but with the same roots as own cloud. And we are using interfaces of own cloud and next cloud that are still the same. So everything that I say will apply to own cloud as well as next cloud anyway. All right, and in order to have an integration here, let me do a quick motivation. You have the problem or maybe the convenience that all your files are probably in own cloud or in next cloud, like when you're a student, you're working on assignments together with other people then the final product might already be in own cloud. And when you want to upload this assignment, the end result to Moodle, then right now the thing you have to do is you have to download the file from own cloud to your own computer or to your mobile phone and then re-upload it again in Moodle. And that is basically unnecessary steps. Instead we could connect Moodle directly to own cloud in order to let Moodle draw the files right from own cloud onto the Moodle server without this intermediate step. There is a plugin in Moodle that can be used in order to achieve this. And this is called the Web Dove plugin. You can actually use it because Web Dove is the file protocol that is used by own cloud and next cloud. However, this plugin has a few downsides because first of all, you have to configure it as an administrator in order for your users. But if you do this, then there's no private storage. So everyone has access to the same files and that's not really what you want. As an administrator, you can let your users configure it themselves, but then they can basically connect to any kind of service that uses Web Dove. So I don't know if you want that. And now the major technical problem is that it actually stores your own cloud password in the Moodle database in order to be able to access this repository. And this is not really something that you want because whenever something might happen to you at a database, then the user's passwords of own cloud and next cloud are basically in the hands of others. So for me personally, this is a no go. We didn't want to deploy this. We rather wanted a solution that can access own cloud files without having to store the user's password in Moodle, right? And there are approaches for this. The approach that we took is the OAuth protocol. That is something you might already know when you were surfing the web. You have buttons for login with Google or login with Facebook, and what happens in the background is basically an OAuth process where you sign up to Facebook at Facebook. So only Facebook knows your Facebook password and that's the way to go. And the password is then replaced by a randomly generated token that serves as a replacement for the password for any further communication between the two servers. So this is something that we wanted to implement for own cloud and next cloud. Actually, this wasn't possible before, but we basically developed a plugin for own cloud so that own cloud can act as a OAuth server in order to be able to handle this authentication process. And we developed a set of plugins for Moodle that use this OAuth process in order to authenticate with next cloud and own cloud in order to then exchange files. Yeah, so the result that we have are two plugins that I want to show you. First of all, there is an activity module. This is not yet released to plugin directory because it's still work in progress. I'd like to say that first. But we think it's very useful and we will release it in the next couple of months. So consider the following situation. Imagine you are a teacher of a course with like 40 students. And you want to divide these students into groups. Okay, so 40 is bad. Let's say 36 students. You want to divide them into groups of six. They have to work on assignments. They have to collaborate on this. They will maybe have to write a couple of documents, maybe exchange pictures. And you want to provide them with a means of exchanging these files without them having to decide on what service to use and how they will go about this. So what you would probably do now is you would create Dropbox folders for each of the six groups. I say Dropbox because that would be the story skill situation that was also used at our university. You would create Dropbox folders for each of the groups and then you would have to collect the email addresses or the usernames of the students at Dropbox. So maybe you would pass around a sheet of paper. Everyone fills in their email address. And then when you are back at home you will have to invite every member of each group to their respective folder using this email address. And if you've ever typed in a set of handwritten email addresses then you know that it is tedious. There will be a typo somewhere. Maybe you will invite the wrong person because of a typo or something like this. And that is actually something that can be automated very well, right? So what our plugin does as an activity module is it connects to your own cloud. It creates one folder for each group individually and then invites all the members of the group to the own cloud folder. Yeah, so that is what happens automatically and you will be relieved of the manual task of having to invite every single person of this group. This is presented as an activity module which means that it will be integrated very good in your course pages. And basically the process is that the teachers create this activity module in order to offer this as a service to students. And so the students can decide to use it by clicking on this activity module in their course, then logging into own cloud. And in that instant this folder will be shared with them. So basically every student member has to click on this activity, every group member has to click on this activity once. Then they all have this folder within their own cloud and they can work with the applications that they're using on a day to day basis in their own cloud. So this is work in progress right now. I will share the link at the latest slide if you're interested in the code. And maybe you can watch out there when for the release of this plugin if you're interested in this. The other thing is actually ready and has been published since October if I'm not mistaken to the plugin directory. This is a very simple means of integrating Moodle and own cloud because it allows this aspect of directly accessing own cloud files from within Moodle without this intermediate step of copying things to your computer. As I said this is a password less authentication strategy so if you have the Moodle file picker the first thing you will be presented with is a log into your account button. And you click on that and this takes you in a separate window to your next cloud installation. You will have to type in your next cloud username and password there so this is shared only with next cloud and not with Moodle. And then next cloud asks you whether you want to grant access to Moodle accessing your files as a server-sided application. As a user you would click on grant access and then the next thing you see is the file picker with all the files that you have in your next cloud and you can select from these files and directly upload them into Moodle. So this is just for comparison on the lower right you can see your next cloud folder with all the files that you have uploaded there and there's one file that is actually been shared with another person probably and on Moodle you see the exact same files showing up. All right. Yeah so when you select one of these files here you are presented with two options right now. One option is just as you would regularly interact with the file you can upload it which means that Moodle will download a copy from this file from your next cloud and then put this into the file here that we talked about in the last presentation and create basically an entire copy of the file within Moodle. That is quite useful for example if you want to make sure that the file isn't tampered with later on. For example in assignments then it's very important that this is a hard copy of the file that cannot be changed after submission by students. And the alternative option is you can also create a link to this file which might be nice when you are a teacher and you want to upload your presentation to the Moodle course and whenever you make changes to your presentation you want them to be reflected in Moodle as well. So that is what happens when you create a link to the file because whenever changes are made to the file the file doesn't need to be changed in Moodle. It's just the same link to the same kind of file and the changes will appear in Moodle right away. Yes, plugins have the option of prohibiting this linking mode and for example Mod Assign is doing exactly that in order to prevent students from uploading files that they can change later on. In the back end it works like this. We are also using the webtof protocol in order to communicate with the file system of OnCloud. And the webtof protocol is used in order to download the files into Moodle. And when we are talking about linking then what happens in the background is we use a programming interface that is offered by OnCloud and NextCloud which is called the OCS API. And what happens in the background is it creates a share in NextCloud. So a public share, you might know this from Dropbox as well. Basically it creates a link, a URL that is randomly generated that is hard to guess. And this link is then copied into Moodle. Okay, so the actual file isn't really reflected only by this link. You have to know of course this is always a public URL. There's no listing of public URLs in an OnCloud directory but it's always possible to guess this URL or the first student who accesses this file through Moodle will also know the URL then and can maybe pass it on to others. So this is strictly not intended for something that needs to remain private within your course but that could still be a very useful feature, right? All right, so here are some useful links. First of all, this repository is available on the plugin directory. You can look for OnCloud or for NextCloud and actually we've published several versions and we will continue to publish several versions of this in order to provide you with a proper branding. So if you're using an OnCloud installation you would probably download the OnCloud version and if you have a NextCloud installation you would want to download the NextCloud version. The only thing that's really different is the icon that is presented in the file picker so that your users will have something that can reflect your actual installation that they recognize, right? Then there's the collaborative folders activity just if you're curious about the code or if you want to maybe contribute to this but we will hope to publish this in the next couple of months and in case you have like problems with installing any of these we've started to assemble a wiki in the Moodle docs with a few hurdles that you might come across and that we hope will help you solve installation issues if you have any. All right, then I want to give credit to the ones who have actually initially developed this because we at the University of Münster we have now taken over maintenance and we will continue to develop and maintain these plugins but initially this was actually made by a student group so we had five students from the University of Münster who did this as part of the classes in information systems bachelor program where for a semester they had to work on a project and in this case the project where the Moodle own cloud integration plugins. So this is actually us at the University at the technically University of Berlin where the own cloud conference happened and we got together with the own cloud developer guys who helped us a lot in implementing this and there's us sitting in the lecture hall, but anyway. All right, that's it from me. If you have any questions feel free to ask right now or maybe later at the conference and here are my details if you want to reach me. Thank you. Thank you. Questions? There's one up there. What? One question up there. Hi, a question about the security aspect you were mentioning about it creating the public folders. Is that going to be the same on the new plug-in that's coming out where you're allowing an area for five or six students to collaborate within a course? Will that be a public folder as well? Pardon, I don't think I got the question, sorry. I was, it's a question about the security aspects where you're saying that I think the second plug, the plug-in that's available already effectively creates a public folder and so it's not somewhere to, a way of sharing, a way of sharing confidential documents. Do you mean the collaborative folders part or this linking to a repository? The linking to repository, yeah. Okay, well you're linking only to individual files, but my question is if the collaborative folders one where you create within, you're the new plug-in that hasn't been published yet, but from what I understand, you're creating folders within Moodle for a group of students to access. Will those, is that secure? Or are there ways that people could get into it by either guessing the URL or if somebody shared the URL? No, other people won't have a chance to access them. The collaborative folder shares, creates folders in own cloud or next cloud and shares them with all the students who are involved in a group privately. So there's no way to access them if you aren't in this group in Moodle. So this is really tightly coupled into this Moodle group system and then there are only private shares. All right, okay, thanks. Any further questions? Martin. Thank you, Jan. I just wanted to say this is a really cool initiative. We've been, I've been meeting with the next cloud CEO and team and we're working on, we both want to work a lot closer together and we have intention to over the coming year or two. I think next cloud is the best option, next cloud, own cloud. So there was a fork, if you don't know, I would put all my money on next cloud. But that is the best option going forward. If you want to get off Google Drive or Office 365, those repositories and get into an open thing, next cloud is the thing that's leading the pack. So Jan, who stepped up with University of Munster too, to do this integration is super helpful and very important. And I would love to see if anyone's interested in making that integration super awesome. That talk to this guy and help, because I think it'd be a great project to have. Let's see, a Moodle and next cloud together are a quite dynamite combination. Thanks for the encouraging remark. Just carrying on from Martin's point a bit. Do you think, because next cloud, known cloud support apps within that side of the platform as well, do you see any scope for creating a Moodle plugin within next cloud to provide any sort of functionality there? You mean for this functionality? Well, just for in general, for Moodle integration. That would always be possible, of course. On cloud and next cloud are both very extendable through this app system. So what we call plugins are apps in on cloud and next cloud. And you can always think of very interesting integration scenarios. So for example, one app they have developed is live editing features for documents. So like Google Drive document editing, but in next cloud and on cloud. And I would very much like to see a plugin that would support this, for example. But I think we would need to discuss on where to integrate this in Moodle exactly and how this would bring any benefits to make this perfect. Definitely. Question, could this be integrated into the group assignment? To create assignments for groups? Could that be, I could say, a part as an option? I would consider this a part, but I would basically separate the functionality into two different things. But you could always very well use a combination of both collaborative folders and a group assignment like right next to each other, right? So you have the collaborative folders in order to collaboratively create documents that will later be submitted as part of the group assignment. Yes, definitely. You mentioned that it's possible to disable linking to the files. Is it possible to disable copying of the files? I think, if somebody wants to link to a few gigabyte file, I would like to disable just offer next cloud as an option to share big files to keep them off the Moodle. That would be an interesting addition to this plugin. So it's not possible as of now, especially not on a per file basis, but of course it would be great to disable uploading for every file that's larger than your upload limit and just linking them. I think effectively, I've never tried this, but effectively I guess uploading a file that is larger than the limit will fail, but probably only after it has been uploaded. So actually it would be too late. But you can find out how large this file is from on cloud. It will create an error and then a problem. It's a good idea for an extension of this plugin. Thanks. I have a question, also. So have you tried with the mobile app that this file linking with next cloud works? No, we haven't tried this so far because we aren't using the Moodle mobile app yet. But that would be very interesting to try out. I don't know, do you have support for repositories in general in the mobile app? Yeah, you know that in Moodle 3.3, we include support for OneDrive and Google Drive. And we did some enhancements in the mobile app to support file linking and offline files. So right now, if you implement repository plugin like this one, like next cloud, you can serve files in different ways. You can serve an offline version of the file that will be, so for example, if you are doing linking, instead doing a redirection, because this is not going to work offline, you will generate an offline version of this document. So you will be able to use it offline in the mobile app. Okay, so I would follow this link and download the contents from the link. Yeah, so if, yeah, if you are, so we have a special parameter in the mobile app. So if we are offline, so if you are downloading a course for offline, we pass a special parameter to the repository, sorry, the alarm of this. We should finish. There is a special parameter that is called offline. So instead doing the redirection, in that case, you should generate, create an offline version of the document. So for example, in Google Drive, instead of redirecting to a PDF file, you return a PDF path that we download in the app. So if when you are using the app, if you are offline, we display the offline version of the document, but if you are connected, we follow the redirection. So this is how it works for supporting offline documents in the mobile app, but we can talk later. I would assume this would work, but I think we should check it out together and maybe we can talk about it. It would be really great to see support for this repository in the mobile app as well, of course, because that's where it's most helpful, I guess. Thanks. Thank you.