Details
Description
External sites should be able to link to courses by course code (shortname). I also want a very fast way to jump to any course for administration.
I've coded a 404 page which directs a URL of the form
[yoursite]/course_shortname
straight to the course if there is a unique match. If not it will go to course search results for the term.
If the URL is to a subdirectory page which doesn't exist (i.e. has extra slash(es) in URL), it will print a tidy 404 page.
Requires server 404 redirect to this file (in root of site).
To prevent a docs link to non-existant page, it needs a hack to footer around the echo docs link...
7a8,9
> GLOBAL $dontdodocs;
> if(empty($dontdodocs)) {
10a13
> }
Probably should prevent it from finding hidden courses but moodle shouldn't let people into them anyhow.
Comments?
Also needs the string
$string['invalidURL'] = 'The requested URL \"$a\" was not found.';
in lang/../error.php