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

Support multilang for analytics custom model names

XMLWordPrintable

    • MOODLE_401_STABLE

      Admins can customize Analytics model names.

      The default model names are obtained from the lang pack, but multilang tags for custom model names are dropped by PARAM_NOTAGS in core_analytics_inplace_editable().

      Replacing the line:

              $model->rename(clean_param($newvalue, PARAM_NOTAGS));
      

      with the line:

              $model->rename(clean_param($newvalue, PARAM_TEXT));
      

      will fix the problem.

      Reproduction Steps:

      1. Make sure multilang filter is enabled and a lang pack (say German) is installed.
      2. Make sure Analytics are enabled (in "Site administration" > "General" tab > "Advanced features").
      3. Open Analytics models page by "Site administration" > "General" tab > "Analytics models".
      4. Click any model name (say "Upcoming activities due") and type "<span class="multilang" lang="en">Example</span><span class="multilang" lang="de">Beispiel</span>", then Enter.
      5. You see the model name is "ExampleBeispiel".

            Unassigned Unassigned
            kagotani Hiroto Kagotani
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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