Issue Details (XML | Word | Printable)

Key: MDL-15471
Type: Sub-task Sub-task
Status: Open Open
Priority: Major Major
Assignee: Mathieu Petit-Clair
Reporter: Mathieu Petit-Clair
Votes: 0
Watchers: 3
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle
MDL-13404

Course tags improvements

Created: 30/Jun/08 03:21 PM   Updated: 09/Apr/09 08:56 PM
Return to search
Component/s: Tags
Affects Version/s: 2.0
Fix Version/s: None

File Attachments: 1. File simplertags.diff (14 kB)
2. File simplertags.diff (7 kB)


Participants: Jenny Gray, John Beedell and Mathieu Petit-Clair
Security Level: None
Affected Branches: MOODLE_20_STABLE


 Description  « Hide
Following MDL-11992 commit, we will need to improve the integration of the initial course tagging patch with the rest of the tagging system. Among things that need to be improved:
1) use of "hardcoded" font-style - course tagging uses dynamic css font-size plus: better mathematical distribution, minus: harder to theme) while tags uses s?? classes -,
2) the choice of "tag type" in the block (all, mine, course, official, community)
3) push back into /tag/lib.php as much common code as possible

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Mathieu Petit-Clair added a comment - 30/Jun/08 05:43 PM
Known issues:
  • it's still possible to have multiple blocks: looking at the code, it appears that it's a feature of blocklib that you can't make a "multiple instances" block become a "unique instance" block. I don't know if it's really useful to have multiple tags block on a given page.
  • the block displaying the course tags uses dynamically calculated font-size instead of css classes: both ways have advantages, we'll need to discuss it a bit more
  • it's possible to choose which "types" of tags to display in the block (using javascript links): we need to come up with a better way to present these (eg. "community tags" are a bit OU-specific)
  • help files are ongoing editing in MDL-15385 and will be committed when they're ready

Jenny Gray added a comment - 05/Mar/09 11:48 PM
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?


Jenny Gray added a comment - 05/Mar/09 11:56 PM
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 Gray made changes - 05/Mar/09 11:56 PM
Field Original Value New Value
Attachment simplertags.diff [ 16459 ]
John Beedell added a comment - 06/Mar/09 12:13 AM
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.

Jenny Gray added a comment - 09/Apr/09 08:56 PM
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.


Jenny Gray made changes - 09/Apr/09 08:56 PM
Attachment simplertags.diff [ 16831 ]