Comment API: Difference between revisions
From MoodleDocs
m (New page: ==Objectives== The goals of comments 2.0: * Manage comments centrally * Use a consistent approach for all comments throughout Moodle * Easily integrate comments 2.0 with existing modules...) |
m (add user_id field) |
||
Line 28: | Line 28: | ||
| int(10) | | int(10) | ||
| auto-incrementing | | auto-incrementing | ||
| The unique ID for this comment. | | The unique ID for this comment. | ||
|- | |||
| user_id | |||
| int(10) | |||
| who wrote this comment | |||
|- | |- | ||
| parent_id | | parent_id |
Revision as of 02:05, 11 May 2009
Objectives
The goals of comments 2.0:
- Manage comments centrally
- Use a consistent approach for all comments throughout Moodle
- Easily integrate comments 2.0 with existing modules
Overview
The comments 2.0 provides APIs to:
- Add comments
- Update comments
And provides an ajax interface to allow adding comments on a floating DIV.
Comments database table
Field | Type | Default | Info |
---|---|---|---|
id | int(10) | auto-incrementing | The unique ID for this comment. |
user_id | int(10) | who wrote this comment | |
parent_id | int(10) | the ID for parent comment | |
contextid | int(10) | The context id defined in context table - identifies the instance of plugin owning the comment. | |
itemid | int(10) | Some plugin specific item id (eg. forum post, blog entry or assignment submission) | |
timecreated | int(10) | ||
content | text | content of comment |
Mockup
File:comment interface mockup.png
See also
- MDL-19118 - Comments 2.0 issue