Broken links are bad for business or reputation. Most visitors consider stale hyperlinks to be a sign of laziness, carelessness and disrespect them. Unfortunately, if you have a large website with thousands of external links or let say a VLE with hundreds of courses and lots of external references, it's really hard to identify what external links became dead, and it's even harder to fix them because you need to know the exact location of the broken links.
I am going to give you a possible solution specially designed for our Moodle site, but you can use it on other websites as well. It is not perfect and it needs some human supervision (not 100% automated), but it is free and pretty much customisable.
When you have to edit course activities in Moodle, you don't want to delete anything accidentally. However the dropdown menu can be confusing sometimes, especially if the developers change the order of the items and the 'Delete' button is not there where it used to be. And you just click on things by force of habit. Let's make it outstanding visually, so you won't miss it.
When a page is really long (for example, because of infinite scrolling), it becomes too tedious to scroll back up through screens and screens of content. Hence the role of the Back to Top button. It is not just very trendy, but also very useful and it is not implemented in Moodle by default (at least not yet, Moodle v3.8.2). You can see/use a similar one on this particular page, it is a yellow circle with a white arrow on the right.
Let's see how we can resolve that issue.
Update: it is a core functionality from v3.9, but not as pretty as my solution ;)
To be able to create more complex queries, you have to understand the database in the background. This lesson is very important if you don't really know how databases work or if you are not familiar with the Moodle database at all.
As I said earlier, we are going to find specific forums on our Moodle site, where our teachers, developers, course admins are most probably misusing the 'news' forum feature. Before you continue, please read the previous chapter here.
I am sure that I am not the only one who has deleted a user on Moodle by accident. You would think it is very unlikely, but I can assure you, it is not. Especially if you have to maintain a busy environment, lots of tasks and requests, please change this and please change that.
It is a little bit scary, especially if you don't have access to the database directly, you are only a site admin on the front end. As you might know, when you delete a user on the Site administration, you don't really delete the user from the database.
I would like to give you some idea how to find anomalies within your courses.
To be able to do that, you need access to your database and run some SQL reports. Probably the simplest way is to use the Configurable Reports block. I am not going to teach you how to use that block. I am not going to teach you how to write SQL scripts. But I am going to give you a few examples and the very basics, so if you have a bare minimal SQL knowledge and if you are not afraid to experiment, you will be fine. I am going to give you the SQL code with a brief explanation, so you can modify the code to match your own needs. Obviously I am going to start with a very simple one, don't worry.
Sometimes it is confusing that the description of the activity is under the title/link on the course main page, and the same text is also visible when you open the activity.
On the course view and on the activity view page you might need a little bit different content. Or you would like to mimic the fancy Show more... or Read more... buttons on modern web pages.
The following solution will show the button on the course view page but not on the activity page, even if the description is visible on both views.
First, we have to add the JQuery code to the usual place:
Dashboard > Site administration > Appearance > Additional HTML
This trick might be useful when you need to add extra functionality to your Moodle site, but you don't want to modify the PHP code because
The course ID is in the BODY tag as a CLASS among other useful information about the course/page.
Filters can be used to create links automatically in your course content, which is a really great functionality, but too many links can distract the student or they can be annoying or confusing.
In the following example, I did't really create the links in the text editor, just let the system does its job.