Groups now have a flag button that allows users to flag other posts. When a flag is flagged 3 times, it is sent to the moderator for review The root user now has an additional group - "Moderation". Root can add other users as members to the group as moderators The Moderation group allows moderators to review flagged posts. Moderators see each flagged post as a separate thread. The Moderation group has "Approve", "Delete", and "Original Post" buttons in addition to the comment button. Moderators can comment, approve, delete as well as view the original thread which contains the flagged post. Approving a flagged post resets the flag count associated with the post
Deleting a post shows the message "This post has been flagged" to other users in the group.
Secret sharing is now used to generate encryption keys, replacing the table in the private database that contained keys for each group.
Version number changes to 80 since patch contains both versions 79 and 80. VersionFunctions added to update the database
administrator2023-06-01 17:03
Hey Prajna,
Thanks for your patch! Here are some comments:
- It seems like the current patch does not provide any version function code to upgrade the database in VersionFunctions.php .
- It still uses hard-coded English text rather than localization strings.
- Code like: <button><label>Don't do</label></button> is a bad use of the label tag. Just have <button><?= tl('localizaton_minor identifier') ?></button>
- You currently add a constant MODERATION_GROUP_ID, but don't use it consistently and instead use the number 5.
- For an existing instance of Yioop, you must assume that group_id 5 is in use and will not be used for moderation. So your code
and upgrade code needs to flexibly adapt to different values for MODERATION_GROUP_ID.
- there were minor white-space/coding guideline issues.
I applied your patch to my local copy and am working through make the code look like I what I want. So I don't want you to make another
patch. However, if you could take a stab at writing a VersionFunctions.php .upgrade function and posting your code as a note here,
that would be very helpful. The function should have any alter tables, and inserts to go from version 78 of the database to version 79.
Best,
Chris
prajnapuranik2023-07-24 21:33
Hello Professor,
I'm attaching the discussed patch to this issue. Please let me know if there are any changes to be made.
Groups now have a flag button that allows users to flag other posts. When a flag is flagged 3 times, it is sent to the moderator for review The root user now has an additional group - "Moderation". Root can add other users as members to the group as moderators The Moderation group allows moderators to review flagged posts. Moderators see each flagged post as a separate thread. The Moderation group has "Approve", "Delete", and "Original Post" buttons in addition to the comment button. Moderators can comment, approve, delete as well as view the original thread which contains the flagged post. Approving a flagged post resets the flag count associated with the post Deleting a post shows the message "This post has been flagged" to other users in the group. Secret sharing is now used to generate encryption keys, replacing the table in the private database that contained keys for each group. Version number changes to 80 since patch contains both versions 79 and 80. VersionFunctions added to update the database
Hey Prajna,
Thanks for your patch! Here are some comments: - It seems like the current patch does not provide any version function code to upgrade the database in VersionFunctions.php . - It still uses hard-coded English text rather than localization strings. - Code like: <button><label>Don't do</label></button> is a bad use of the label tag. Just have <button><?= tl('localizaton_minor identifier') ?></button> - You currently add a constant MODERATION_GROUP_ID, but don't use it consistently and instead use the number 5. - For an existing instance of Yioop, you must assume that group_id 5 is in use and will not be used for moderation. So your code
- there were minor white-space/coding guideline issues.
I applied your patch to my local copy and am working through make the code look like I what I want. So I don't want you to make another patch. However, if you could take a stab at writing a VersionFunctions.php .upgrade function and posting your code as a note here, that would be very helpful. The function should have any alter tables, and inserts to go from version 78 of the database to version 79.
Best, Chris
Hello Professor,
I'm attaching the discussed patch to this issue. Please let me know if there are any changes to be made.
Thanks, Prajna
ModerationBugFix.patch
Code what incorporated for vrsion 9.4 of Yioop. Thanks for the patch!
Attachments:
CS298PrajnaV80.patch