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

Hard-coded English string in gradebook

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.6.2
    • 1.9
    • Gradebook
    • None
    • MOODLE_16_STABLE
    • 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

            skodak Petr Skoda
            kagotani Hiroto Kagotani
            Sam Hemelryk Sam Hemelryk
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              3/Mar/08