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

Find a way to set block configuration in the data generator

XMLWordPrintable

    • MOODLE_403_STABLE

      At the moment, there's no way to set configdata for a block on the data generator, any configuration needs to be done using manual steps:

          And I add the "Random glossary entry" block
          And I configure the "block_glossary_random" block
          And I set the following fields to these values:
            | Title                           | AutoGlossaryblock   |
            | Take entries from this glossary | GlossaryAuto        |
            | How a new entry is chosen       | Last modified entry |
          And I press "Save changes"
      

      And setting the configdata parameter in the data generator won't work:

      And the following "blocks" exist:
            | blockname       | contextlevel | reference | pagetypepattern | defaultregion | configdata |
            | glossary_random | Course       | C1        | course-view-*   | side-pre      | {"config_title":"AutoGlossaryblock","config_glossary":"glossary1","config_type":"1"} |
      

      That's because when a block is manually configured the whole form is serialized and not just the fields that have changed.

      So the idea here is to find a nice way to pass block data the configdata field and make it work, being possible to replace those manual steps to configure a block.

            Unassigned Unassigned
            lameze Simey Lameze
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

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