 So, hi everybody. I'm Nina. I'm actually from the University of Minster, so we only have one Moodle instance But well what we have with that instance is that we wanted to delete courses I don't know how many of oh actually that's a good opening question. How many of you Do delete courses automatically in some way? Yes, so Some are shaking like see me automatically So actually we did not had a process for that at all in the start and there's not like an event trigger Which would say ah this course is not long and needed But there are a lot of teachers who still want to use their course or want to keep their grades or something so in general we just started having more courses and more courses for each year since 2007 and at some point this was not working for us anymore so our main motivation was that we got server warnings which were Yeah, you're going up and you do not have space anymore So we're getting this like on a weekly basis and we were thinking about how to get more space and The people who are giving us the servers who are also from our university Started getting the angry because we always ask for more space and they knew we could not really do anything against it Because I don't know how many of you have some sort of integration, but we have integration for videos So those are not longer on our platform and we have integration for big files But this did not help for our major problem So we had as motivational aspect kind of okay We if we delete courses with my memory space available We have kind of a cleaner system So our course search is not the best I would say if you're searching for courses you might find something which is five years old just because you typed in a typical word and Of course, this is usually not the course you want to find Last but not least what we also hope for were faster page loading times Because we're getting to a limit where we cannot optimize it any longer and it's roughly one second So it's okay, but of course users are complaining So what did we do we started programming like something and this was more a kind of okay We wanted to work for our university and And at some point we thought well, it would be nice to have something which is applicable for other moodle instances So it continued and continued and crime and right now we have a relatively big plug-in But in our opinion it's worth it So It's on GitHub. It's also in the plug-in directory and it's called to life cycle so the the whole idea of this tool is that you have custom rules which you Have as workflow we call it and Due to this like this workflow you defining deletes the causes automatically Of course, that's since it's the leading content. It's really a sensible thing so we had to do a lot of security things around it and Of course also software we have a documentation on GitHub So I don't know how many of you are using the GitHub docs, but I think they're really nice and What I will Continue by telling how we did it as an exemplar as an example How this tool can work and then more general what else you can do with the tool so Using me at the top which was like, oh, yeah, we can delete everything That's so nice and there was not the opinion of our university because of course you want to keep some courses and the teachers are sensible about it So actually we could degrade on a more complicated workflow than that I will show it in a minute, but most there the most common reason where okay, we have to keep grades I think in Germany, it's for all universities for five or four years they could export them but well some teachers want to keep it and Another thing was that courses are used as templates, of course, and we wanted to keep some of those courses so We decided oh No, that's the wrong one We decided for this workflow, which we Have in the plug-in. I will tell you how to do that in a second so We have something which Starts to select which courses are affected which is called a trigger in this context and We decided for courses, which are older than Roughly four years, so it's a little bit less that was Due to some other things we are deciding and the first thing we do is we send an email to the teachers Which is like hey, here's a list of courses We think you do not need them any longer We want to delete them if you have a problem if you want to keep the courses click on that link and Mark the course which you want to keep and we'll keep it So it was a really a user-friendly maybe not the best one for deleting a lot of corset, but it was the user-friendly way of saying Do not do not feel like we want to delete your stuff. It's just if you do not do not need it any longer We'll do it and of course as we think that our teachers are a little bit lazy They had two months in case they are on a vacation or had is just full-time or whatever And then we send them a reminder like hey, we notified you two months ago You have another month left if you still please check list of courses if you want to keep something and Of course, we said we will not make backups Of course, we did backups, but they don't really need to know So what we did additionally what was making the courses invisible? So if the students do not longer see the course they might notify the teacher Hey, what's about that course and the teacher can still react to that and think about if he wants to keep that course and Then after one month we created the backups, which we did not tell anybody And we just saved them to some other disk many me Because they do not need to be like you do not need to access them very fast And yeah, then finally we deleted the courses. So that was really nice for us and This whole process of having the tool implementing the workflow doing test runs doing the normal run Took quite long, but we think it's worth it. So now we think it's a really good plug-in. We we are running it so we really trusted it and So most of the credits go to to be as Reichman some of you might know him He started that in 2017 and we are improving the plug-in, but like the basis was from him That's one to five So a little bit more to the technical part so you get an idea of how how you can adapt for your own regulations we have two types of sub plugins which is the triggers and the triggers define When a course is selected. So and there's a start of each workflow you have some kind of selection criteria which must be true for the course otherwise it will not be deleted and the most obvious one which I just mentioned I Yeah with the triggers I Skip that and go back in a second So the most obviously which I mentioned was how old is the course which we define depending on the start date of the course And but there are different ones you could apply a course category So that's what we did for testing that we said okay We're not going to do a big bang with our whole Moodle instance But we're going to select a category where we know a lot of teachers so they can notify us how they like the process And if it all works fine We have a trigger for a specific date So we only do that in the vacation time and we do not do that like the whole the whole year So we have one big batch the teachers can look through all courses especially vacation is nice because they start doing the new courses and really think about what they need and what they don't need and But this this list can be enhanced So if you have some other specific trigger if you have some kind of system connected Which will tell you which courses can be deleted or if you want to delete all courses for teachers which are gone you could Program yourself as a plug-in and do and put it into that plug-in. So this slide. I just skipped differentiates between triggers which select the course and then steps which is what happens to the courses So in the workflow, I showed you I think nearly all of the steps which we programmed were Inside it so creating a backup is of course one of the major steps We have the email steps for teachers. We are working on an email steps for students But we're not too sure if every teacher wants that so we're not too sure how to how we're going to do that Deleting courses is one step and making the courses invisible But this is also if you want to program your own We have like empty repos which do the which have the interfaces Empty so you can just put in whatever you need as a logic and There's a little disclaimer, which is I'm personally not in UX UI anything person. Actually, I'm doing my PhD in Majorly in C and CUDA. So I'm not I'm really not good at it. And that's what you see when you install the plug-in because We started rating it for our own university and we have our own administration menu and our own design so everything was Initially programmed to fit that design. So if you install it, you might be confused where certain functions are and we're trying to improve that That's not that that's not the point. But if you install it right now, you might be confused. I'm doing a little demo I'm just checking But I shortly added I just shortly need to duplicate that screen. Otherwise, it will take forever Change perfect so I changed to the boost theme which I guess most of you are most familiar with So inside of the site administration within the plugins we have a lot of Different Settings you can have so that's the confusing fight about it because you do not really know where to start We have some general settings which are in case Teacher decided that his course should not be deleted. There's this question of how long should it not be deleted? Should it never be deleted again? So as a default we say, okay We do not consider this course for half a year because usually the circle is half a year until the next course is died And then we ask him again if that course should be deleted and There's a setting for where you want to put your back ups, which does not exist as I'm on my test instance but This is useful if you have a lot of backups Of course, you do not want to have them in the usual backup folder, but maybe somewhere else where you have more space Then we have the workflows Well, I'm switching to production so you can see real workflows. I think my test instance does not have the good ones and So We have multiple of them running Which you can do if you have course categories which handle their courses in a different way You can have multiple workflows for example. I don't know the The law department of a university maybe has other regulations for their grades than our mathematical compass and so you if you might want to have different workflows running and if you add a workflow You have to give it a title and There's a display title which is it's all not as I will not put it into production. It's not that important It asks you if you want to go back courses How long this I am how long they are not longer considered and All that stuff so I'm going a little bit fast so I can still talk the other slides through and What you can do is that you add your own triggers which are here I think they're main mainly the triggers I presented to you triggers are always connected in an end logic so all of them have to apply not only one of them and You can add multiple steps Maybe as an outlook we are working on it. This is one of our pull requests, which we didn't look into So We are aiming for having this a little bit more visual You can see what is which courses will be triggered which steps are taken, but we did not match that so that's kind of outlook and As I just saw that I have five minutes left. I'll switch back to this one Which is Because I think it's of major importance that you define your goals before you're installing that plug-in and Then use the plug-in in the way that you can reach your goals because what we did was of course we wanted to gain more space kind of and We deleted like 40% of our courses, which was great for us because we had this very user-friendly approach Where we thought a lot of teachers will just say no do not delete that do not delete that do not delete that and then We will not delete a lot of courses, but that worked out. Well However for our instance We did not really have an improvement in the file system Because old courses which are quite likely More deleted. They are not that big. They do not have that much files at least for us So if you want to improve that you really have to delete the recent courses. It does not it cannot magically delete Yeah remove space It was quite good for For the backup folder So we are also doing automatic backups and that was really going down as all backups Which are done automatically for specific courses were deleted. So that was quite an improvement and And especially if you're having problems with the database This is maybe not what you what will help you Because the database and mood is really growing in the last years as we're having more logs if we as at least for our instance We are installing a lot of plugins and all the plugins are having again a lot of entries in their tables So the database is growing bigger and bigger and bigger and this was not really the solution So we have to say think about something else and Yeah, but that's maybe so you can see it has different effects and you need to think about what which kind of effect you need for your instance Yeah remarks for me what I kind of learned from having the plugin it really depends on what your workflow what you're getting out It is finally released candidate where we are really sure it works And the communication with the teachers or course instructors or whatever You can I'm always I'm always trying to be polite, but if they're treating you like you're the file hosting system You're not So we have a different system for that. We do not need to keep a moodle course just for having files and Last but not least outlook Yeah, we have this notify students thing which we are thinking about as students might want to download the whole course We are thinking about batch. So we have some kind of batch processing But about more specific ways. So right now. It's just you define the maximum size of courses which I Processed in one cron job. So your cron job does not get full and stuck of courses But that you might have some more some more words you can apply which are like, okay on Saturday and Sunday You can delete a lot since no one will use the cron job a lot But it's not there. It's a feature thing and what we are also thinking about is deleting users That's kind of with a question mark because we are just getting SAP and this might Give us the possibility to delete users. So We'll look out if we're deleting also users with this plug-in. That's what we own workflows But yeah, that's the plug-in Thank you for your attention If you have any questions, you can ask him right now. I think 10 minutes is the time Approximately, of course, you can also talk to me. I will be here the whole conference and may log it up. Yeah Are there any questions? We're actually a little bit ahead of schedule because the previous session ran a little quick Thanks for the presentation. It's very interesting. We're looking at deletion and archiving our university Just a question on how did you get to 3.75 years in terms of the course? Could you speak up a little bit? Oh? Is that better? Sorry And in terms of the 3.75 years, how did you get to that calculation? Is that something in line with your university policy in terms of course deletion? Yeah, it's those four years. I some regulation how long you have to keep specific documents about the course and Since we had like three months until the teacher has to make a decision to keep or delete that course it was Four years minus those three months Thank you. Hello Thank you Hello, I was wondering When the teachers get the request do wonder to delete this old course, how do they? How do they tell the system I do not want that course to be deleted and I want that do the Plug in a handle that as well or is that I'm Should they on I love should they unhide it or how do that? Work how does that work? When the teachers don't want a course to be deleted I think I didn't get the point. So you want to delete additional courses or Yes Yeah It's it's a moodle page and you have your list of courses as a table and you can say Don't delete and delete for every course Did everybody catch that question if you need to repeat it in case anybody missed If you have more time there are a lot of features in that plug-in which I did not had time to present It's like many of workflows. So we if you want to you can define workflows Which are triggered by the teacher so the teacher can say okay for this course. I want to start the deletion process and Yeah, I feel like I'm forgetting stuff But we really try to improve it in a way that also if you're installing you do not you have less problems So we have an error handling page which actually it checks your cron job for errors, which might occur Which I don't know if any of you have that but we have at our instance sometimes Problems with the great table. It's rarely happening but that you cannot access the great table and If courses are broken on I think they might be not deletable. So this is all then listed in error handling if you want to If you deleted a course and you are the teacher is notifying you that he wants to have this course back We have a page for which where is it course backups? So you're getting a list of all courses you ever deleted which is taking from the from the folder where you're having the backups and Then you can restore the course with one click So it is not a long process where you have to go to the server, but you can do it with the UI and Yeah, oh, I forgot one of the steps one of the steps if you're testing the plug-in is the admin improve step So if you have that in your workflow before a step is happening You get a notification as well every site administrator gets a notification and you can see all the courses Which are affected by that step and you can say okay This is fine. This is the courses which should be I don't know deleted notified whatever and I think Maybe I have some courses in there. Ah nice. Yeah quite a lot So this would be the admin improve that I see okay This course is supposed to be notified for the first time And I can proceed or I can say okay This course should be rolled back and I can also do like Bulk actions so I do that for all the courses or some of them So we did a quite big plug-in. We're working on the UI Any more questions on that? Hi, this is Sam here the question is how do you hi? How do you verify the backup is successful before deleting the cost again? How do you verify the backup is successful before deleting the cost like do you check the file size? Well, we're using the usual mooder core function. So we we are relying that this one is working Thank you also regarding the cost backups When you specify Folder where the backups are put you just presented us an overview Does it generate that overview? Indexing the folder or is it just regarding the backups that are written through life cycle. Oh Yeah, it's going in the backup folder and checking the files there. That's absolutely awesome because We can then use it to Automated backups that are not in the mood data folder and make those accessible and I would need to check that because I'm not Sure if we are using the name is the same naming scheme So we're getting the information out of the name and we might have used a different name Okay, I have a question This tool seems very well designed and implemented. However, we are more interested that instead of deleting the courses We implement a similar mechanism to reset them Is reset one of the available steps or maybe which could replace deleting it because deleting the courses and end to this process So how hard would it be to add this functionality or to? Develop our own version which does this Reset would just be an additional step, of course We would need to implement that but I guess that this would just be I mean you're having that You're getting that list of IDs of courses and I guess Moodle has some kind of core function for resetting So I would imagine it's a very simple plugin. Yes, so replace delete course with reset course. Yeah Thank you