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

Report column callback for formatting plugin names

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 5.0
    • Report builder

      See following example where the raw plugin name is used in columns (from the task logs page):

      Create a report formatter method to convert those into human-readable names, similar to this (from the template library):

      The format would be as follows, for example:

      Forum (mod_forum) // Preserve the "frankenstyle" name always.
      

      Try to do so while creating a re-usable API to solve similar problems elsewhere, e.g. MDL-82443 (I'll set this one as a blocker)

      There are many example entity columns that would benefit:

      $ git grep "'\(plugin\|component\)'" | grep entities/
      admin/classes/reportbuilder/local/entities/task_log.php:            'component',
      admin/classes/reportbuilder/local/entities/task_log.php:            new lang_string('plugin'),
      admin/classes/reportbuilder/local/entities/task_log.php:            'component',
      admin/classes/reportbuilder/local/entities/task_log.php:            new lang_string('plugin'),
      admin/roles/classes/reportbuilder/local/entities/role_assignment.php:            'component',
      admin/roles/classes/reportbuilder/local/entities/role_assignment.php:            new lang_string('plugin'),
      cohort/classes/reportbuilder/local/entities/cohort.php:            'component',
      cohort/classes/reportbuilder/local/entities/cohort.php:            new lang_string('component', 'core_cohort'),
      comment/classes/reportbuilder/local/entities/comment.php:            'component',
      comment/classes/reportbuilder/local/entities/comment.php:            new lang_string('plugin'),
      enrol/classes/reportbuilder/local/entities/enrol.php:            'plugin',
      enrol/classes/reportbuilder/local/entities/enrol.php:            new lang_string('plugin'),
      enrol/classes/reportbuilder/local/entities/enrol.php:            'plugin',
      enrol/classes/reportbuilder/local/entities/enrol.php:            new lang_string('plugin'),
      files/classes/reportbuilder/local/entities/file.php:            'component',
      files/classes/reportbuilder/local/entities/file.php:            new lang_string('plugin'),
      files/classes/reportbuilder/local/entities/file.php:            'component',
      files/classes/reportbuilder/local/entities/file.php:            new lang_string('plugin'),
      group/classes/reportbuilder/local/entities/group_member.php:            'component',
      group/classes/reportbuilder/local/entities/group_member.php:            new lang_string('plugin', 'core'),
      report/configlog/classes/reportbuilder/local/entities/config_change.php:            'plugin',
      report/configlog/classes/reportbuilder/local/entities/config_change.php:            new lang_string('plugin', 'report_configlog'),
      report/configlog/classes/reportbuilder/local/entities/config_change.php:            'plugin',
      report/configlog/classes/reportbuilder/local/entities/config_change.php:            new lang_string('plugin', 'report_configlog'),
      tag/classes/reportbuilder/local/entities/collection.php:            'component',
      tag/classes/reportbuilder/local/entities/collection.php:            new lang_string('component', 'core_tag'),
      tag/classes/reportbuilder/local/entities/instance.php:            'component',
      tag/classes/reportbuilder/local/entities/instance.php:            new lang_string('component', 'core_tag'),
      

            pholden Paul Holden
            pholden Paul Holden
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

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