Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Forum update

From MoodleDocs
Revision as of 04:25, 19 May 2014 by Andrew Nicols (talk | contribs) (Initial info on forum types)

Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on moodle.org or use the page comments.

Moodle Forum Revamp
Project state Specification
Tracker issue MDL-39707
Discussion
Assignee Jason Fowler & Andrew Nicols @ Moodle HQ


Project goals

  • Improve accessibility of the Moodle Forums
  • Make the forums more modern in appearance
  • Make the code in the forums module more manageable
  • Make it possible for themers and developers to over ride aspects of the forum layout easily

Considerations

  • Backwards compatibility
  • Creating sub-plugins for "Forum Types" (Q&A etc) and "Forum View"
  • Subscription management
  • Editor Light - a cut down version of Atto for "Reply inline"
  • Make use of Renderables and Renders

Details

At present the Moodle forums are the oldest part of the code base, and lag behind the rest of Moodle in a big way.

We hope to implement a new interface for the forums, based on the accessible view from MoodleRooms' HSU Forum, and add some new functionality over time.

Current issues

  • Forum can not be over ridden by themers or developers.
  • Difficult to add new core forum types.
  • Impossible to add contrib forum types.
  • Forum is difficult to use as an accessible service.
  • Forum is not even close to WCAG compliant.
  • Forum look awful compared to modern areas of Moodle.
  • Can't style or override appearance of forum emails.
  • Forum doesn't use the new scheduling API.
  • News forum is so different from other types it will need a sub type of its own, maybe even an activity type of its own.
  • Courses are EXTREMELY tied to forums - News forums for example.
  • Missing features
    • Thread level subscription
    • Post locking
    • Post hiding
    • Time locking
    • Anonymity
    • Discussion sorting
    • Private reply
    • Sticky posts
    • Inline reply
  • Forum code does not match the current coding guidelines.

Potential tasks

Implement sub-plugins

We will need to take apart the current forum code base, and rewrite the bulk of it to allow the implementation of sub plugins for forum view and forum types. This will allow contrib developers to add new plugins to forum and extend it as they see fit.

Create accessible forum view

The core forum view would be modelled on the Accessible Forum from Moodlerooms, rewritten to make proper use of the renderers and renderables. This would contain the renderers and renderables used by the forum types.

Recreate forum types as sub-plugins

At present we have several types of forum type:

  • News forum (news)
  • Single simple discussion (single);
  • Each person posts one discussion (eachuser);
  • Question and Answer (qanda);
  • Standard forum displayed in a blog-like format (blog); and
  • Standard forum for general use (general).

However, there have been frequent requests for more types of forum for specific use-cases, pedagogical approaches, and other requirements (MDL-42981, MDL-20903, MDL-40385, MDL-3277, etc). At present all of the current forum types are hard-coded in lib.php and locallib.php so it is not possible for contrib developers to submit new forum types. It is also very difficult to add new forum types to core, and it is hard to maintain existing code. Cron logic is also heavily influenced by the existing types which makes debugging difficult.

As a resolution to these issues, we propose the creation of a new sub-plugin for forums for forum types.

Implement new subscription methods

Documentation