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

Bad language string concatenation by the group selector

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.2.6, 3.3.3, 3.4
    • Fix Version/s: None
    • Component/s: Groups
    • Labels:
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE

      Description

      When an activity has group mode enabled, there is standard text:

      Separate groups (grouping name) [ Drop-down | v ]

      This is done with string concatenation (bad!). It makes it impossible to customise because the strings groupsseparate and groupsvisible are re-used in several places. (Also, the usability of that text is not great)

      I would suggest two new strings:

      $string['selectedgroup'] = 'Selected group {$a->menu}'
      $string['selectedgroupfromgrouping'] = 'Selected group ({$a->grouping}) {$a->menu}'

      (Do we need to tell users what the group mode is here?)

      I was about to do that as a quick change, when I realised that really, we should not just hack the original code (which is duplicated in groups_print_course_menu and groups_print_activity_menu, and there is similar code in groups_allgroups_course_menu.

      A proper fix would involve making a new group_selector renderable, with a template to render it, and I don't have time now. Volunteers welcome.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              timhunt Tim Hunt
              Participants:
              Component watchers:
              Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: