<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/dev/index.php?action=history&amp;feed=atom&amp;title=Rewrite_Comment_API</id>
	<title>Rewrite Comment API - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/dev/index.php?action=history&amp;feed=atom&amp;title=Rewrite_Comment_API"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Rewrite_Comment_API&amp;action=history"/>
	<updated>2026-06-27T03:59:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Rewrite_Comment_API&amp;diff=58976&amp;oldid=prev</id>
		<title>Bonczek: Make customdata field nullable</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Rewrite_Comment_API&amp;diff=58976&amp;oldid=prev"/>
		<updated>2021-06-16T10:36:59Z</updated>

		<summary type="html">&lt;p&gt;Make customdata field nullable&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:36, 16 June 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l98&quot;&gt;Line 98:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 98:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|&amp;#039;&amp;#039;&amp;#039;customdata&amp;#039;&amp;#039;&amp;#039;  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|&amp;#039;&amp;#039;&amp;#039;customdata&amp;#039;&amp;#039;&amp;#039;  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|text   &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|text   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;center&amp;gt;NULL&amp;lt;/center&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|the JSON-encoded custom data associated with this comment  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|the JSON-encoded custom data associated with this comment  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key docs_development:diff:1.41:old-58974:rev-58976:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Bonczek</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Rewrite_Comment_API&amp;diff=58974&amp;oldid=prev</id>
		<title>Mgauk: Created page with &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 =...&quot;</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Rewrite_Comment_API&amp;diff=58974&amp;oldid=prev"/>
		<updated>2021-06-15T13:31:16Z</updated>

		<summary type="html">&lt;p&gt;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;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&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;
|&amp;#039;&amp;#039;&amp;#039;Field&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Type&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Default&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Info&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;id&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;contextid&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;component&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;commentarea&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;itemid&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|the itemid this belongs to&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;content&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|text  &lt;br /&gt;
|&lt;br /&gt;
|this comment&amp;#039;s text content &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;format&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|int(2)&lt;br /&gt;
|&lt;br /&gt;
|the text format&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;userid&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;usermodified&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;pseudonym&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;timecreated&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;timemodified&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;replytoid&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;replies&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;upvotes&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;customdata&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;Field&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Type&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Default&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Info&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;id&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;userid&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;commentid&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;timemodified&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;Field&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Type&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Default&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Info&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;id&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;userid&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;contextid&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|subscribe to comments in this context &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;component&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;commentarea&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;itemid&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;commentid&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;subscription&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;timemodified&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;Field&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Type&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Default&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Info&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;id&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
|int(10)  &lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;userid&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;commentid&amp;#039;&amp;#039;&amp;#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;
|&amp;#039;&amp;#039;&amp;#039;vote&amp;#039;&amp;#039;&amp;#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>