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

Hard-coded English string in gradebook

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.6.2
    • Fix Version/s: 1.9
    • Component/s: Gradebook
    • Labels:
      None
    • Affected Branches:
      MOODLE_16_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      When I set 'Drop X Lowest' in my gradebook, the gradebook shows "(Lowest n Dropped)" in English at the Total column while I choose a non-English language pack.

      The trivial fix is:
      — ../moodle162/grade/lib.php Wed Jul 19 11:07:39 2006
      +++ grade/lib.php Wed Sep 20 12:49:22 2006
      @@ -1877,7 +1877,7 @@

      $stats_link = '<a href="javascript:void(0)"onclick="window.open(\'?id='.$course->id.'&action=stats&group='.$group.'&category='.$cview.'\',\''.get_string('statslink','grades').'\',\'height=200,width=300,scrollbars=no\')">'.get_string('statslink','grades').'</a>';
      if ($all_categories[$cview]['stats']['drop'] != 0)

      { - $header .= '<th class="'.$class.'" colspan="'.$grade_columns.'">'.get_string('total','grades').'  (Lowest '. $all_categories[$cview]['stats']['drop']. ' Dropped)'.$total_sort_link.' '.$stats_link.'</th>'; + $header .= '<th class="'.$class.'" colspan="'.$grade_columns.'">'.get_string('total','grades').'  ('.get_string('lowest','grades').' '. $all_categories[$cview]['stats']['drop']. ' '.get_string('dropped','grades').')'.$total_sort_link.' '.$stats_link.'</th>'; }

      else {
      $header .= '<th class="'.$class.'" colspan="'.$grade_columns.'">'.get_string('total','grades').' '.$total_sort_link.' '.$stats_link.'</th>';

      However, I think it's better to concatenate the strings into a single parameterized string like "Lowest $a Dropped".

        Attachments

          Activity

            People

            Assignee:
            skodak Petr Skoda
            Reporter:
            kagotani Hiroto Kagotani
            Tester:
            Sam Hemelryk
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              3/Mar/08