Moodle

Course tags improvements

Details

  • Type: Sub-task Sub-task
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 2.0
  • Fix Version/s: None
  • Component/s: Tags
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE

Description

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

  1. simplertags.diff
    09/Apr/09 8:56 PM
    14 kB
    Jenny Gray
  2. simplertags.diff
    05/Mar/09 11:56 PM
    7 kB
    Jenny Gray

Activity

Hide
Mathieu Petit-Clair added a comment -

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
Show
Mathieu Petit-Clair added a comment - 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
Hide
Jenny Gray added a comment -

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?

Show
Jenny Gray added a comment - 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?
Hide
Jenny Gray added a comment -

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!!)

Show
Jenny Gray added a comment - 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!!)
Hide
John Beedell added a comment -

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.

Show
John Beedell added a comment - 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.
Hide
Jenny Gray added a comment -

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.

Show
Jenny Gray added a comment - 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.
Hide
Eloy Lafuente (stronk7) added a comment -

So the only open thing in this issue is about to create one "name, id" index in the tag table?

Show
Eloy Lafuente (stronk7) added a comment - So the only open thing in this issue is about to create one "name, id" index in the tag table?

People

Dates

  • Created:
    Updated: