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

Avoid string concatenation with hardcoded percentage symbol in gradebook

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.2
    • Gradebook
    • MOODLE_402_STABLE
    • Hide
      1. Log in as admin
      2. Navigate to Language > Language customisation in site administration
      3. Choose English > Open language pack for editing
      4. Choose grade.php / String identifier: "percentshort" and press Show strings
      5. Enter "% (percent)" in the _Local customisation" field
      6. Save changes to the language pack
      7. Create a new course
      8. Add a quiz activity to the course
      9. Navigate to course gradebook setup
      10. Confirm the quiz table row Weights column displays modified language string "% (percent)"
      Show
      Log in as admin Navigate to Language > Language customisation in site administration Choose English > Open language pack for editing Choose grade.php / String identifier: "percentshort" and press Show strings Enter "% (percent)" in the _Local customisation" field Save changes to the language pack Create a new course Add a quiz activity to the course Navigate to course gradebook setup Confirm the quiz table row Weights column displays modified language string "% (percent)"

      This commit from MDL-75274 added a percentage character (%) to the gradebook setup Weights column

      We should use the same from the site language pack. Same reasoning as MDL-74885 - the grades lang string file already defines the appropriate string we should use:

      lang/en/grades.php:$string['percentshort'] = '%';
      

            pholden Paul Holden
            pholden Paul Holden
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 20 minutes
                20m

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