|
[
Permalink
| « Hide
]
Mathieu Petit-Clair added a comment - 30/Jun/08 05:43 PM
Known issues:
I was tidying up some other work and realised that there's no hook to delete course tags when the course is deleted.
Currently we handle this from within local/lib.php local_delete_course(). But that's not been committed to Moodle 2.0 as part of the course tagging, so there I don't think course tags are cleaned up at all I think there are two options: it might be possible to add a handler for the 'course_deleted' event, or we should add to the remove_course_contents() function in moodlelib.php What do you think? BTW just realised, following some usability testing, we dropped the "all,mine, course, official, community" links at the bottom of the block and made a few other minor alterations so it takes up less space.
I attach a patch which I think shows what we've done (but I've knocked it together very quickly, so I hope it works!!) Jenny, the delete course tags is already in moodlelib.php remove_course_contents() in 2.0 code, but I agree that it would probably be better to add it to the events system in the long run.
I've updated the patch that shows our simpler interface because I found some left-overs that were causing a significant performance hit if your tag table is large.
I also recommend adding an index on tag for name,id to make the query that supports the auto-complete on the "add a tag" box more efficient. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||