Issue Details (XML | Word | Printable)

Key: MDL-13434
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Mathieu Petit-Clair
Reporter: Mathieu Petit-Clair
Votes: 0
Watchers: 2
Operations

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

clean up the public api

Created: 12/Feb/08 07:33 PM   Updated: 18/Mar/08 05:41 PM
Return to search
Component/s: Tags
Affects Version/s: 1.9, 2.0
Fix Version/s: 1.9

File Attachments: 1. File taglib.php (3 kB)


Participants: Mathieu Petit-Clair
Security Level: None
Resolved date: 18/Mar/08
Affected Branches: MOODLE_19_STABLE, MOODLE_20_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
The current API for tags isn't optimal. Some operations are done in tag/lib.php, some in blog/lib.php, some in blocks/... This aims to clean up the current API, makit it easier to expend the tags functions in moodle.

I'm sending a first file, containing only documentation and prototypes. I'm trying to come up with something that does the job, but is as minimal as possible.

Missing from this file are:
 * tag_selection_box(...): a function to display the "tag selection box", so that all forms display the same interface to the user (which is currently not the case: user interests and blog posts have different ways of getting tags)
 * tag_get_links(...): a function to return the tags along with the html links to them
 * ...?


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Mathieu Petit-Clair added a comment - 13/Feb/08 04:34 PM
Petr, to answer your question (and if I understand correctly) - is the tag string case normalised? ... yes it is, I'll be re-using part of the same code as is already in cvs.

Though, while on the subject, I was thinking that it might eventually be an option not to normalize it and let users use whatever they want as tag.


Mathieu Petit-Clair committed 4 files to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 18/Mar/08 05:29 PM
MDL-13594 - Fixes a display problem with "flagged" tags, code cleanup, other small fixes.
MDL-13434 - Cleaned up a bit more the api
MDL-13687 - If a manual relation is added to a tag, the opposition relation will be added at the same time.
MODIFY tag/lib.php   Rev. 1.43.2.31    (+44 -30 lines)
MODIFY tag/user.php   Rev. 1.1.2.2    (+2 -2 lines)
MODIFY tag/edit.php   Rev. 1.5.2.16    (+2 -2 lines)
MODIFY tag/index.php   Rev. 1.16.2.11    (+2 -2 lines)
Mathieu Petit-Clair committed 4 files to 'Moodle CVS' - 18/Mar/08 05:32 PM
Merge from 1.9
MDL-13594 - Fixes a display problem with "flagged" tags, code cleanup, other small fixes.
MDL-13434 - Cleaned up a bit more the api
MDL-13687 - If a manual relation is added to a tag, the opposition relation will be added at the same time.
MODIFY tag/index.php   Rev. 1.26    (+2 -2 lines)
MODIFY tag/edit.php   Rev. 1.21    (+2 -2 lines)
MODIFY tag/lib.php   Rev. 1.71    (+44 -30 lines)
MODIFY tag/user.php   Rev. 1.3    (+1 -1 lines)
Mathieu Petit-Clair added a comment - 18/Mar/08 05:41 PM
I'm closing this issue : the public API is now stable. It's possible that changes will be done to "private" functions. More specifically, any function receiving an "array $record" might change to "string $record_type, int $record_id", but there are only very few of them left, and they shouldn't be used outside of the tag library itself.

Mathieu Petit-Clair made changes - 18/Mar/08 05:41 PM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Fix Version/s 1.9 [ 10190 ]
Mathieu Petit-Clair committed 1 file to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 19/Mar/08 05:11 PM
MDL-13434 Addslashes removed, is added whenever necessary in tag/lib.php.
MODIFY lib/moodlelib.php   Rev. 1.960.2.66    (+3 -3 lines)
Mathieu Petit-Clair committed 1 file to 'Moodle CVS' - 19/Mar/08 05:12 PM
MDL-13434 Addslashes removed, is added whenever necessary in tag/lib.php.
MODIFY lib/moodlelib.php   Rev. 1.1024    (+3 -3 lines)