<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/dev/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mgauk</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/dev/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mgauk"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/Special:Contributions/Mgauk"/>
	<updated>2026-06-27T17:13:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Rewrite_Comment_API&amp;diff=58974</id>
		<title>Rewrite Comment API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Rewrite_Comment_API&amp;diff=58974"/>
		<updated>2021-06-15T13:31:16Z</updated>

		<summary type="html">&lt;p&gt;Mgauk: Created page with &amp;quot;{{Infobox Project |name = Rewrite Comment API |state = Development in progress |tracker = MDL-71935 |discussion = https://moodle.org/mod/forum/discuss.php?d=423482 |assignee =...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Project&lt;br /&gt;
|name = Rewrite Comment API&lt;br /&gt;
|state = Development in progress&lt;br /&gt;
|tracker = MDL-71935&lt;br /&gt;
|discussion = https://moodle.org/mod/forum/discuss.php?d=423482&lt;br /&gt;
|assignee = Martin Gauk and Lars Bonczek (TU Berlin, innoCampus)&lt;br /&gt;
}}&lt;br /&gt;
{{Moodle_4.0}}&lt;br /&gt;
&lt;br /&gt;
This is a project to rewrite the Comment API.&lt;br /&gt;
&lt;br /&gt;
== Database Structure ==&lt;br /&gt;
=== comments ===&lt;br /&gt;
&lt;br /&gt;
This table keeps information about posted comments.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;contextid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|the id of the context this was posted in &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;component&#039;&#039;&#039; &lt;br /&gt;
|varchar(100)  &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt;&lt;br /&gt;
|the plugin this comment belongs to&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;commentarea&#039;&#039;&#039; &lt;br /&gt;
|varchar(100)  &lt;br /&gt;
|&lt;br /&gt;
|the comment area this was posted in &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;itemid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|the itemid this belongs to&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;content&#039;&#039;&#039; &lt;br /&gt;
|text  &lt;br /&gt;
|&lt;br /&gt;
|this comment&#039;s text content &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;format&#039;&#039;&#039;&lt;br /&gt;
|int(2)&lt;br /&gt;
|&lt;br /&gt;
|the text format&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;userid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|the id of the user who posted this comment&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;usermodified&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|the id of the user who last modified this comment&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;pseudonym&#039;&#039;&#039; &lt;br /&gt;
|varchar(100)  &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt;&lt;br /&gt;
|the pseudonym specified when the comment was posted &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;timecreated&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|the time when this comment was posted&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;timemodified&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|the time when this comment was last modified&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;replytoid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt;&lt;br /&gt;
|the id of the comment this is a reply to&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;replies&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|0&lt;br /&gt;
|the number of replies to this comment&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;upvotes&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|0&lt;br /&gt;
|the number of upvotes on this comment&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;customdata&#039;&#039;&#039; &lt;br /&gt;
|text  &lt;br /&gt;
|&lt;br /&gt;
|the JSON-encoded custom data associated with this comment &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== comments_queue ===&lt;br /&gt;
&lt;br /&gt;
This table keeps track of comments that will be mailed in digest form.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;userid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|the id of the user to notify &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;commentid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|the id of the comment to notify about &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;timemodified&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|the timestamp when this record was last modified &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== comments_subscriptions ===&lt;br /&gt;
&lt;br /&gt;
This table keeps track of subscriptions to comments or comment sections.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;userid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|the id of the user to notify &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;contextid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|subscribe to comments in this context &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;component&#039;&#039;&#039; &lt;br /&gt;
|varchar(100)  &lt;br /&gt;
|&lt;br /&gt;
|subscribe to comments belonging to this component&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;commentarea&#039;&#039;&#039; &lt;br /&gt;
|varchar(100)  &lt;br /&gt;
|&lt;br /&gt;
|subscribe to comments belonging to this commentarea&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;itemid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt;&lt;br /&gt;
|subscribe to comments with this itemid &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;commentid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt;&lt;br /&gt;
|subscribe to replies to this comment &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;subscription&#039;&#039;&#039; &lt;br /&gt;
|int(2)  &lt;br /&gt;
|&lt;br /&gt;
|the subscription type (0 off, 1 immediate, 2 digests, -1 default)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;timemodified&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|the timestamp when this record was last modified &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== comments_votes ===&lt;br /&gt;
&lt;br /&gt;
This table keeps track of votes on comments.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;userid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|the id of the user who voted &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;commentid&#039;&#039;&#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|the id of the comment that was voted for&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;vote&#039;&#039;&#039; &lt;br /&gt;
|int(2)  &lt;br /&gt;
|&lt;br /&gt;
|the vote (0 no vote, 1 upvote)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mgauk</name></author>
	</entry>
</feed>