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

Add module and pluginname to course editor activity state (backport of MDL-77386)

XMLWordPrintable

    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MDL-77552-401
    • 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.
        • Check there is a "CourseEditor[COURSEID]" button (where [COURSEID] is the current course id)
      6. 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"

      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]  is 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"
    • HQ 2023 Sprint i1.3 Moppies

      This a request from the discussion MDL-77319 to backport a 4.2 issue MDL-77386.

      The Moodle 4.0+ course editor renders all the course index content in the front end. This has many advantages but limits the mustache data generation to the information stored in the front end. This information is called "course state" and contains much information about the sections and activities.

      However, the current data for each activity is limited to the features implemented in the core formats, without considering that themes and blocks can also use that information to override or render extra templates.

      In particular, having the module (forum, wiki...) and the plugin name (mod_forum, mod_wiki) in the front end 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.

      The patch won't affect the current editor behaviour and will only add two new attributes to the state object.

            tusefomal Ferran Recio
            tusefomal Ferran Recio
            Carlos Escobedo Carlos Escobedo
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 47 minutes
                2h 47m

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