Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-71935

Rewrite Comment API

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.0
    • Comments

      The current Comment API is quite old and some important features are missing. We (TU Berlin) would like to implement a new Comment API to replace the current one.

      We are thinking of the following (new) features:

      • Plugins have to define their comment areas in db/comments.php.
      • Two possible comment structures (plugin defines which one to use): flat (all replies are below the other as it is currently) or question/answers (replies are indented and associated with a parent comment).
      • Possibility to comment without showing the user's real name. A plugin defines whether this is allowed or even enforced (e.g. mod_assign could always hide the grader's name from students, cf. MDL-66987).
      • A plugin may implement a class that represents one comment section (i.e. a context, component, comment area, item id) and that controls the permissions and enabled features.
      • Notifications: Users can (un)subscribe to a comment section, to a comment (getting notified when there are replies to a certain comment), to all comment sections (all itemids) within a (context, component, area). And maybe even (un)subscribe to all comment sections of a course?
      • Plugin optionally defines which users should be notified by default (e.g. mod_assign could notify the grader by default when a student comments the grade).
      • Users can view the newest comments in all comment sections (all itemids) within a (context, component, area). Maybe even the newest comments in (all contexts in a course, component, area)?
      • Permalink to a comment and link to the page that the comments (within an area and itemid) belong to.
      • Allow users to edit their comments within $CFG->maxeditingtime.
      • Possibility for a plugin to add custom/meta data (JSON) to a comment (for example, a video plugin could add the point in time in the video that the comment refers to).
      • In addition to the existing capabilities (moodle/comment:delete, moodle/comment:post and moodle/comment:view) we want to add: moodle/comment:editany and moodle/comment:postpseudonym

      The old API should be deprecated and removed later.

      Should be done in following issues:

      • Comments can be upvoted with a thumbs up (in order to avoid simple comments like "+1") and a thumbs up counter is displayed. Users can undo their upvote. Plugins may disable votes.
      • Users can decide if they want to be notified immediately or in a daily digest.

            mgauk Martin Gauk
            mgauk Martin Gauk
            4 Vote for this issue
            12 Start watching this issue


                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.