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

Add module and pluginname to course editor activity state

XMLWordPrintable

    • MOODLE_402_STABLE
    • MOODLE_402_STABLE
    • MDL-77386-master
    • Hide
      1. Login as admin and create a course with one forum activity (it could be the announcements one).
      2. Go to "Site administration -> Development -> Debugging" and set Debug messages to DEVELOPER. Save the changes.
      3. Purge caches
      4. Go to the course
      5. Go to the bottom of the page to the "Reactive instances" part.
        1. Check there is a "CourseEditor[COURSEID]" button (where [COURSEID]it the current course id)
      6. Click the  "CourseEditor[COURSEID]" button to open the debug panel and scroll a bit to see the panel.
        1. Check that in the State data text area the existence of (like in the screenshot):
          1. "module": "forum"
          2. "plugin": "mod_forum"

      Show
      Login as admin and create a course with one forum activity (it could be the announcements one). Go to "Site administration -> Development -> Debugging" and set Debug messages to DEVELOPER. Save the changes. Purge caches Go to the course Go to the bottom of the page to the "Reactive instances" part. Check there is a "CourseEditor [COURSEID] " button (where [COURSEID] it the current course id) Click the  "CourseEditor [COURSEID] " button to open the debug panel and scroll a bit to see the panel. Check that in the State data text area the existence of (like in the screenshot): "module": "forum" "plugin": "mod_forum"
    • 0.5
    • HQ 2023 Sprint i1.2 Moppies

      The current course editor is based on a data structure called state which is loaded in the frontend using the core_courseformat_get_state webservice. This data structure is used to support all user interactions and even to generate the course index on the fly.

      The state data prevent the front end from asking for extra information from the backend. However, the current data provided for each activity is limited to the features implemented in the formats, without taking into consideration that themes and blocks can also use that information for the same reasons.

      In particular, having the module (forum, wiki...) and the plugin name (mod_forum, mod_wiki) in the frontend allows the themes and blocks to use that information to their own advantage. For example, to render activity icons, get specific strings from an activity lang or generate URLs easily.

      This issue was detected during the discussion of MDL-77319 and came from  theme developer that wants to override the course index templates.

       

            tusefomal Ferran Recio
            tusefomal Ferran Recio
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Andrew Lyons Andrew Lyons
            Andrew Lyons Andrew Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 30 minutes
                1h 30m

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